Building Model 2 Extra Mile
STEP 10: Save the Model, Compile and Run
When the text is placed where you want, save the model, then compile. When the model has finished compiling you are ready to run the model and look at the graphs, charts, and 3D text you have just finished putting in the model (see Figure 2-53).
Figure 2-54. The completed Model
This ends the “Model 2 Extra Mile” lesson. As you can see it is very easy to add powerful 3D reporting visuals to your simulation models.
Lesson 3
Introduction
Lesson 3 introduces the Rack, network nodes, and spline points and how they are used in a conveyor layout, advanced statistics, and model logic using a global table. Introduction of multiple runs and model scenarios will also be discussed. Lesson 3 will use the model from lesson 2 as a starting point. Make sure you have completed lesson 1, and lesson 2 before starting lesson 3.
In lesson 3 it will be assumed you have worked through lessons 1 and 2, and are familiar with the tasks of working in the properties and parameters GUIs. In the previous lessons every step was illustrated to make sure the modeler had complete understanding of the steps needed to build the model. In lesson 3 some of the simple tasks such as adding a new object to the model and entering basic parameters will be identified in the step-by-step description but screen shots may not be provided. It will be assumed that the modeler has learned how to perform those tasks in previous lessons. Any new information will be described in detail and will be accompanied by screenshots as in previous lessons.
What You Will Learn
1. How to use spline points for conveyor layout 2. Using global tables for routing logic
3. Using a path network for the fork truck
4 .How to use the report to create user defined output 5. How to execute multiple runs of the model
6 .How to use Fly Paths for model presentation
New Objects
In this lesson you will be introduced to the Rack, NetworkNode, and Spline objects.
Approximate Time to Complete this Lesson
Model 3 Description
In model 3 the sink will be replaced with 3 racks that will be used to store the completed flowitems prior to shipping (Figure 3-1). Change the layout of conveyor 1, and 3 to physically drop flowitems off at the conveyor queue. Using a global table for reference, have all itemtype 1 flowitems be sent to rack 2, all of itemtype 2s sent to rack 3, and all itemtype 3s sent to rack 1. Using the networknode object set up a path network for the fork truck to use at it moves flowitems from the conveyor queue to the racks. After the model is complete, set up a flypath to show the model during a presentation. Set up a multiple run of the model to show statistical variance.
Figure 3-1. Model 3 diagram
Model 3 Data
Modify conveyor 1 and 3 to move flowitems into the conveyor queue. Routing from conveyor queue to racks: Use a global table to rout the flowitems in the following manner-
Itemtype 1 to rack 2 Itemtype 2 to rack 3 Itemtype 3 to rack 1
Set up a node network for the fork truck to travel that is from the conveyor queue to the racks.
Flexsim Software Concept Learning
SplinePoints
SplinePoints are used in Flexsim to define and design SplineConveyor and path layouts. Flexsim uses advanced spline technology to allow the modeler a convenient method to add curves, inclines, and declines to SplineConveyors and NetworkNode paths. Though the use of a spline for a SplineConveyor and a NetworkNode may differ, the application is the same. This discussion will be focused on the NetworkNode path but the application is the same for the SplineConveyor.
When two NetworkNodes are placed in the model view and connected to together by pressing the “A” key and click-and-drag a green path line will be displayed (Figure 3-2).
Figure 3-2. Connecting NetworkNodes
If you zoom the view close to the SplinePoint Flexsim will display “SplinePoint” information for the modeler (Figure 3-3).
Figure 3-3. “SplinePoint” information view
SplinePoint parameters
Deltax: The difference in the X direction from the last SplinePoint. Deltay: The difference in the Y direction from the last SplinePoint. Deltaz: The difference in the Z direction from the last SplinePoint. XYangle: The XYangle from the last SplinePoint. Angles are from
plus (+) and minus (-) 0-90 degrees.
Length: This is the overall length of the path from the beginning or
first SplinePoint.
To move the SplinePoint, select the ball with the mouse. A yellow box will appear around the SplinePoint ball (Figure 3-4).
Figure 3-4. Selected SplinePoint ball.
To move the SplinePoint in the XY angle or to add a curve to the path just click-and-drag the ball with the left mouse button in the model view window. To change the Z height of the SplinePoint, select the ball and click-and-drag with both the right and left mouse buttons, then roll the mouse forward to lower the SplinePoint, or roll the mouse backward to raise the SplinePoint (Figure 3-5).
Figure 3-5. Changing the Z height of the SplinePoint
Adding Additional SplinePoints
Additional SplinePoints can be added to the path by holding down the “Ctrl” key and then clicking on a SplinePoint (Figure 3-6). If a SplinePoint is clicked a SplinePoint will be added at the center point between the clicked SplinePoint and the SplinePoint that immediately follows the clicked SplinePoint (Figure 3-7).
Figure 3-7. Adding a SplinePoint between 2 SplinePoints
Once SplinePoints have been added to the path they can be moved independently to configure the shape (Figure 3-8).
Figure 3-8. Moving SplinePoints to configure the shape of the path
NetworkNodes can be configured to specify the number of resources and direction of the path. By pressing the “S” key and clicking-and- dragging from one NetworkNode to the other you can define the path as a single direction path. This is indicated by a red line on the side of the path that can no longer be used. (Figure 3-9).
Figure 3-9. Single direction path
When a path has been configured using SplinePoints, the mobil resources that use the path will automatically follow the spline that has been defined. The SplinePoint balls can be toggled on and off by holding down the “Ctrl” key and clicking on the NetworkNode (Figure 3-10).
Figure 3-10. SplinePoints turned off with “Ctrl” click on the NetworkNode
Note: When using a SplinePoints in your model it is important to select the “Lock Splines” in the “Edit” menu. This will lock the SplinePoints and will increase the run speed substantially.
The Model Tree View
The model tree view is used in Flexsim to explore the model structure and objects in detail. To access the model tree view select the button from the toolbar. The model tree view will then be displayed (Figure 3-11).
Figure 3-11. Model tree view
The model tree view is a view window that provides many unique features for the modeler. In this view the modeler can:
1. Customize Flexsim objects using C++ or Flexscript 2. View all object data
3. Access the properties and parameters GUI 4. Edit the model, delete objects, modify all data
If you follow a few simple navigation rules you will find the tree view one of the most usable views within Flexsim. Since all tree views in Flexsim work the same way, once you understand how the tree view works you will be able to navigate and understand the structure of any tree view that is accessible by the user.
Tree View Basics
Flexsim has been designed to hold all data and information in a tree structure. This tree structure is the core data structure for all of Flexsim’s object oriented design. Those who are familiar with C++ object oriented programming will immediately recognize Flexsim’s tree view as the C++ standard for object oriented data management.
There are several symbols used in the tree view that will help you understand the structure as you navigate the tree.
The entire main tree view is referred to as a project. The library, flowitem bin, and model are contained in a project. The view tree contains all the views and GUI definitions. When a session is saved the main tree and the views tree are saved.
The folder icon identifies main components of the complete project. The model is a component of the main project. The library is another component of the main project.
The object icon is used to represent Flexsim objects in the tree view.
The node icon is used to specify data nodes within an object. Data nodes can have additional data nodes placed inside them. If a data node has a “+” just to the left of the icon it will contain one or more additional data nodes. Data nodes can hold numeric or alphanumeric values.
Certain data nodes are specified as C++ data nodes that hold C++ code. C++ code can be entered directly in a C++ data node. This code is compiled when the “Build C++” is executed.
Data nodes can also be specified as a “Flexscript” node. This node can contain Flexscript code and will be auto-compiled during the running of the model. Flexscript commands are pre- compiled C++ functions. Flexscript commands can be viewed by selecting the button in the toolbar (Figure 3-12).
Figure 3-12. Flexscript commands
When you select an object in the tree view by clicking on the icon with the mouse, the tree view will display the object as follows:
A highlighting box will be placed around the object icon and an expand tree symbol will be place to the left of the object icon. If you select this expand tree symbol the data nodes for that object will be displayed as shown in Figure 3-13.
Figure 3-13. Expanded object tree view
As objects and data nodes are expanded the tree view can quickly grow to be outside the viewing limits of the tree view window. Flexsim allows you to move the tree around in the window by using the mouse. To move the tree around in the window just click-and- drag on the left side of the tree, or use the mouse wheel to scroll up and down.
Data nodes can be expanded by clicking on the “+” to the left of the node icon. Since data nodes can have values or text you will see the text information or the data values to the right of the node (Figure 3- 14).
Figure 3-14. Text and value data nodes
Data can be edited directly in the tree by selecting the node you wish to edit. If it is a value data node you will be able to edit the value in the field (Figure 3-15). If it is a text data node you will be given a text edit field on the right side of the window to edit the text (Figure 3-16). If you select on an
object or data node you will not be able to move the tree. Select a spot in the view that is empty then drag the mouse to move the tree. You can also use the mouse wheel to move the tree up and down.
Figure 3-15. Editing of a value data node
Figure 3-16. Editing a text data node
As you can see the tree is the repository of all data for the model. The properties and parameters GUIs are used to provide a more user-friendly way to manipulate the data in the tree. It is possible to completely edit your model from the tree but it is recommended that you use the GUIs to avoid inadvertent deletion of model data. The properties and parameters GUIs can be accessed in the tree view by right clicking or double clicking on the object icon .