Paul Toone avatar image
Paul Toone posted

Lesson 3 Step-By-Step Model Construction   

Building Model 3

To start building model 3, you will need to load model 2 from the last lesson.

If at any time you encounter difficulties while building this model, a fully functional tutorial model can be found at

Step 1: Load Model 2

  • Load model 2 if it is not already open.

Step 2: Add curved conveyor sections from the outside conveyors that feed items closer to ConveyorQueue.

Now we will add curved sections to the two outside conveyors.

  • Disconnect the top and bottom conveyors from ConveyorQueue with a 'Q' disconnect.
  • From the Library'sConveyors group, drag two Curved Conveyors into the model and place them next to the top and bottom conveyors respectively.
  • Adjust the direction of the curve for the top curved conveyor. Click on the top conveyor, then click and drag the red four-way arrow on the conveyor's end point. Drag it around so that the conveyor makes a 90 degree turn right instead of left. You can also drag the green arrow to adjust the radius of the curved conveyor.

  • Move each curved conveyor so that its start point is aligned with the end point of the top and bottom conveyors respectively. The conveyors should snap to the end of the straight sections. When you release the cursor, a transfer will be created between the two conveyors. This is a square drawn at the intersection point, signifying that it is a transfer point between the two conveyors.
  • Recreate the connection from the new curved conveyors to ConveyorQueue with an 'A' connection.

Step 3: Delete the sink

  • Highlight the Sink and press the Delete key.

When an object is deleted, all port connections to and from that object are deleted as well. Be aware that this may affect the port numbering of those objects that were connected to the deleted object.

Step 4: Create three Racks

  • Create three Racks, place them to the right of ConveyorQueue, and name them Rack1, Rack2, and Rack3. Place the racks far enough away from the queue to allow the fork truck some travel distance to reach the racks.
  • Connect ConveyorQueue to Rack1, Rack2, and Rack3 (A key).

Step 5: Create a Global Table to Control Flowitem Routing

The next step is to set up a global table that will be used to reference which rack each flowitem will be sent to (or more accurately stated, which output port of the conveyor queue the flowitems will be sent through). It is assumed that output port 1 was connected to Rack1, port 2 to Rack2, and port 3 to Rack3. If the connections are not in the correct order, you can modify them through the queue's properties window on the General tab in the Ports section.

We will send all itemtype 1s to Rack2, all itemtype 2s to Rack3, and all itemtype 3s to Rack1. Here are the steps to setting up a global table:

  • Add a new Global Table from the Toolbox (View > Toolbox or click on the Tools button in the main toolbar).

  • Change the Name to Route.
  • Set Rows to 3 and Columns to 1.
  • Double click on the row names (Row 1, Row 2, Row 3) and name the rows Item1, Item2 and Item3, then fill in the values which correspond to the output port number (rack number) we want to send the flowitems to.
  • Click the Close button to apply the changes and close the table.

Now that the global table is defined, we can adjust the "Send To Port" option on the queue.

Step 6: Adjusting the Send To Port Option on the ConveyorQueue

You may define the ConveyorQueue's flow and transport options 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 ConveyorQueue to bring up its Properties window.
  • Click the Flow tab. Select the option By Global Table Lookup from the Send To Port list. The code template window will appear. Edit the options to read as follows:

  • Click the OK button to close the Properties window.

Step 7: Reset, Save, and Run

At this point it would be wise to Reset, Save the model, and then Run the model to verify that the changes are working correctly. The model should run with the fork truck transporting flowitems to the racks based on the itemtype definition in the global table.

Step 8: Adding NetworkNodes to develop a path for the Fork Truck

NetworkNode's are used to develop a path network for any task executer object, such as a Transporter, Operator, ASRSvehicle, Crane, etc. In the previous lessons we have used the operator and transporter to transport flowitems around the model. Up to this point we have let the task executer move freely across the model in a direct line between objects. Now we would like to confine the travel of the fork truck to a specific path as it transports flowitems from the conveyor queue to the racks. The following steps are used to set up a simple path.

  • Create NetworkNodes by dragging them from the library and into the model. Place them near the ConveyorQueue and each of the racks, and name them NN1, NN2, NN3, and NN4. The nodes will become the pick-up points and drop-off points in the model. You may add additional nodes between these nodes, but it is not necessary.

  • Connect NN1 to NN2, NN3, and NN4 (A key). A line will appear after the connection is made with two green boxes along it, indicating that travel is possible in both directions between the two nodes.

  • Connect each NetworkNode to the corresponding object (NN1 to ConveyorQueue, NN2 to Rack1, etc.) with the A key. A thin blue line will appear when the connection is made correctly. (If you cannot see the blue line, you may need to move the NetworkNodes)

  • The last step is to connect the fork truck to the node network. In order for the fork truck to know that it has to use the path, it must be connected to one of the NetworkNodes in the path network. Connect the Transporter to NN1 (A key). This node now also becomes the starting point for the fork truck when you reset the model.

Step 9: Reset, save, and run the model

Now it would be a good idea to Reset, Save, and then Run the model to make sure the fork truck is using the network paths.

A word about offsets

As the model runs, you will notice that the fork truck will travel off the NetworkNode when it picks up or drops off a flowitem. This is a result of having the "Travel offsets for load/unload tasks" selected in the fork truck's properties.

Offsets are used by the fork truck to locate where the flowitem needs to be picked up or dropped off in the object. This allows the fork truck to travel into the queue and pick up the box, and travel to the specific cell in the rack to drop off the box. To force the fork truck to stay at the NetworkNode and not to travel off the path network, select "Do not travel offsets for load/unload tasks" from the drop down picklist found below the field entitled Deceleration.

Path networks automatically use Dijkstra's algorithm to determine the shortest distance to travel between any two nodes in the network.

Step 10: Using reports to view output results

To view summary results of the simulation after having run the model for a period of time, select the main menu option Statistics > Reports and Statistics.

Go to the Summary Report tab of the Reports and Statistics dialog window.

To generate a basic report, press the Generate Report button. If you have any other attributes you would like reported, you can add them using the interface provided. The report will be exported to a csv file and automatically displayed in Excel or whichever default program is set up to open csv files on your computer.

To create a state report, go to the State Report tab of the Reports and Statistics dialog window, and press Generate Report.

Step 11: Running multiple runs of your model using the experimenter

To access the experimenter in FlexSim, select the main menu option Statistics > experimenter.

The Simulation Experiment Control window will appear.

The Simulation Experiment Control window is used to run multiple replications of a given model, and to run multiple scenarios of a model. When running multiple scenarios, you can declare a number of experiment variables, and then specify the values you want these variables to be set to for each of the scenarios you want to run. Confidence intervals are calculated and displayed for each of the performance measures you define on the Performance Measures tab. For more information on the experimenter, refer to the experimenter section of the help documentation.

This completes lesson 3. Congratulations!

flexsim users manual
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.



paul.t contributed to this article


FlexSim 2016.1