Sie sind auf Seite 1von 14

Lesson 1 Tutorial

1. Introduction
2. Step-By-Step Model Construction
Introduction
Lesson 1 introduces the basic concepts of diagramming and building a simple model.
Building a diagram of the process is a great way to start every model that you will build in
FlexSim. If you can not build a diagram, flowchart, or at least see a picture in your mind of
how the process works, you will have a difficult time building the model in FlexSim.

Note: if you have already gone through the Getting Started tutorial, many of the
concepts you learn in this lesson will not be new. However, subsequent lessons build
upon this lesson, so it is probably a good idea to go through it anyway.

What You Will Learn


How to build a simple layout
How to connect ports for routing flowitems
How to detail and enter data into FlexSim objects
How to navigate in the animation views
How to view simple statistics on each FlexSim object

New Objects
In this lesson you will be introduced to the Source, Queue, Processor, Conveyor, and Sink
objects.

Approximate Time to Complete this Lesson


This lesson should take about 30-45 minutes to complete.

Model Views
FlexSim uses a three-dimensional modeling environment. There are two options for the
view: perspective view and orthographic view. The orthographic view will look more flat,
where as the perspective view will have a more real world feel to it. You may use any view
option to build or run the model. You may open as many view windows as you want in
FlexSim. Just remember that as more view windows are opened the demand on computer
resources increases.

Model 1 Description
In our first model we will look at the process of testing three products coming off a
manufacturing line. There are three different flowitem itemtypes that will arrive based on a
normal distribution. Itemtypes will be uniformly distributed between itemtypes 1, 2, and 3. As
flowitems arrive they will be placed in a queue and wait to be tested. Three testers will be
available for testing. One tester will be used for itemtype 1, another for itemtype 2, and the
third for itemtype 3. Once the flowitem is tested it will be placed on a conveyor. At the end of
the conveyor the flowitem will be sent to a sink where it will exit the model. Figure 1-1 shows
a diagram of the process.
Click here for the Step-By-Step Tutorial.

Model 1 Data
Source arrival rate: normal(20,2) seconds
Queue maximum size: 25 flowitems
Testing time: exponential(0,30) seconds
Conveyor speed: 1 meter per second
Flowitem routing: Itemtype 1 to Tester 1, Itemtype 2 to Tester 2, Itemtype 3 to Tester 3.
Step-By-Step Model Construction
Building Lesson 1 Model
Open the application by double clicking on the FlexSim icon on your desktop. Once the
software loads, you should see the FlexSim menu and toolbars, Library, and Orthographic
Model View windows.
If at any time you encounter difficulties while building this model, a fully functional tutorial
model can be found at http://www.flexsim.com/tutorials

Starting a New Model


Open FlexSim by double-clicking on the FlexSim icon on your desktop. The Startup
Wizard appears by default. Select the "Build a New Model" option.

FlexSim allows the user to select appropriate units for a model. By default, the Model Units
dialog will appear for each new model. You can select units for time, length, and fluids. The
units you choose will be assumed throughout the model. For this model, use the following:

Time Units: Seconds.


Length Units: Meters.
Fluid Units: Liters.
Step 1: Create the Objects
Create a Source in the model and name it Source (To see how this is done, click here).
Create a Queue, 3 Processors, 3 Conveyors, and 1 Sink in the model. Place and
name them as shown below. To name an object: double-click on it, change its name at
the top of the Properties window, and press Apply or OK. Click Here to see how this is
done.
Step 2: Connect the ports
Enter the connection mode by either clicking the button or by pressing and holding the
A key on the keyboard. Once in the connection mode, there are two ways to make a
connection between objects. You can either click on one object and then click on another
object, or you can click and drag from one object to the next. Either way, keep in mind that
the flow direction of a connection is dependent on the order in which you make the
connection. Flow goes from the first object to the second object in the connection.
Incidentally, connections can be broken by clicking the button or by pressing and
holding the Q key on the keyboard while clicking or dragging from one object to another in
the same manner as when you connected them.

Connect Source to Queue.


Connect Queue to Processor1, Processor2, and Processor3.
Connect Proceesor1 to Conveyor1, Processor2 to Conveyor2, and Processor3 to
Conveyor3.
Connect Conveyor1, Conveyor2, and Conveyor3 to Sink.
Step 3: Assign the arrival rate
In this model we need to change the Inter-Arrival time and the itemtype to generate 3 types
of items.

Double-click on the Source to open its Properties window


On the Source tab, select Statistical Distribution from the Inter-Arrivaltime list. A
statistical distribution popup will appear.
Set Distribution to normal.
Set Mean to 20.
Set Std Dev to 2.
Set Stream to 0.

This specifies an inter-arrival time with mean of 20 seconds and standard deviation of 2
seconds.
The next thing we need to do is assign an itemtype number to the flowitems as they enter
the system. This will be uniformly distributed between 1 and 3. The best way to do this
would be to change the itemtype on the OnCreation trigger of the Source, so don't close the
Properties window yet.

Step 4: Set Itemtype and Color


Click the Triggers tab, and add a function (click the button) to the OnCreation trigger
and select the Set Item Type and Color option. The code template popup will appear.

The duniform distribution is similar to a uniform distribution except that instead of returning
any real number between the given parameters, only discrete integer values will be
returned. The default values will be used in this example.

Click OK to apply the changes and close the Properties window.


The next step will be to detail the queue. Since the queue is a place to hold flowitems until
they can be processed at the processor, there are 2 things we need to do. First, we need to
set the capacity of the queue to hold 25 flowitems. Second, set the flow options to send
itemtype 1 to Processor1, itemtype 2 to Processor2, and itemtype 3 to Processor3.

Step 5: Setting the Queue Capacity


You may set the Queue's Maximum Content by clicking on the Queue in the 3D view to
display its properties in the Quick Properties window.
Alternatively, you can open the object's properties window:

Double-click on the queue to open it's Properties window.


Change the Maximum Content to 25.
Don't close the Properties window yet.
Step 6: Define the Flow for the Queue
You may define the Queue's flow by clicking on the Queue in the 3D view to display its
properties in the Quick Properties window.
Alternatively, you can open the object's properties window:

Click the Flow tab in the Properties Window to set the flow options for the queue.
On the Send To Port list, select By Expression
Since we have assigned an itemtype number equal to 1, 2, or 3, we can now use the
itemtype to specify the port number through which flowitems will pass. Notice that the
default output port is: getitemtype(item). Leave this as it is. Processor 1 should be
connected to port 1, processor 2 should be connected to port 2 and so on. Click outside of
the box to apply the trigger.
Click the OK button to apply and close the queue's properties window.
The next step is to set the processor times.

Step 7: Define the Process Time


You may define the Processor's Process Time by clicking on the Queue in the 3D view to
display its properties in the Quick Properties window.
Alternatively, you can open the object's properties window:

Double-click Processor1 to open its Properties window.


On the Processor tab, in the Process Time section, select Statistical Distribution
from the Time list. The statistical distribution popup will appear.
Set Distribution to exponential.
Set Location to 0
Set Scale to 30.
Set Stream to 0.
Repeat this for the other 2 processors.
The default speed for the conveyors is already set to 1 length unit per time unit so there is
no need to modify the conveyors at this time.
Now we are ready to run the model.

Step 8: Reset and Run the model

Always click the button to reset system and model parameters to their initial
state before running a model.
Click the button to start the simulation.

You should see flowitems entering the queue and then moving to the processors. From the
processors, flowitems should move to the conveyors and then to the sink. You can change
how fast the model runs by moving the Run Speed slide bar on the Simulation Run Panel.
Step 9: Viewing simple statistics

The above image shows how to view simple statistics for each object. If nothing is showing
or only the names are showing, you can change the View Settings to show the statistics. To
change the View Settings, click somewhere in the background of the view and in the Quick
Properties window to the right, change the Show Names combo box to Show Names and
Stats.
You can view more statistics of an object by clicking on the object and viewing the statistics
tab in the Quick Properties.
Step 10: Save Model
Save your model by clicking the Save button on the main toolbar. The "Save FlexSim Model
file" window will appear allowing you to navigate to the folder where you want to save your
model. Change the "File name" to an appropriate name (lesson1.fsm) and select save.
Remember that the file name extension must be .fsm.
You have now completed Lesson 1. Spend some time reviewing the steps and viewing the
model as it runs. Congratulations!
To continue the tutorial, go to Lesson 2.

Das könnte Ihnen auch gefallen