Chapter 4 – Model Objects
4.1 – Introduction
See Using Model Objects video tutorial.
In today’s busy world it is becoming more important to leverage our work to create gains by automating the mundane, passing legacy information to others and quickly providing access to recent innovations. Model Objects make this goal a reality. Model Objects are self-contained plug-in sections of models that are intended to be re-used. A model object contains all of the activities, logic, attributes, variables, etc. necessary to run properly when plugged into a model. Model objects allow teams, departments or companies to develop a library of quick-to-use model sections. These model section may for example contain the proven best practice order handling logic, the approved graphics for company models or difficult logic.
Model objects may be intended to be pasted one time into a model, such as the digital clock shown below. ProcessModel does not have a build-in capability to handle large digital numbers or day of week functions, but simple action logic was combined with WMF graphics to provide every user the capability to add this functionality in a few seconds.
Other model objects are intended to be used many times in the same model. An example might be a bus stop object. In this model object, when a bus stops, people intended for that stop must depart, then a calculation must be done to see if there is enough room on the bus for all the people waiting, and if not, then only a limited number of people are allowed to enter the bus. The bus must then move on and the remaining people wait for the next bus. Even though the logic for the bus stop is above the level of all but the best modelers, once created and tested, anyone could create a bus model with 3 or 103 stops in a matter of minutes using this kind of a model object.
Some of the most difficult problems that you will encounter in simulation modeling can be solved in minutes with the new model objects for arrivals and routing. model objects provide advanced capability for resources, priorities, graphics, batching, on screen clocks and more. Do you want to learn how to do advanced modeling? Take apart the model objects and see how they were developed. You can learn how to approach the problem and uncover some great gems in the process.
If you don’t find what you are looking for in the model objects library, contact us and we may be willing to develop your model object free of charge.
4.2 – Using Model objects
Applying model objects is really very simple. Using the Model Objects menu, the user selects a model object and inserts it into a target model. Model objects can be accessed by selecting the Model Objects/Select menu item.
Model Objects The model object dialog allows selection by industry or category. When the By Industry option is selected, the model objects, for industry chosen at install, will be displayed. If the Other category was selected, all the model objects for all industries will be displayed. The industry can be changed by selecting the Tools/ Preferences menu item.
When the By Category option is selected, all objects from all industries are arranged in areas such as: arrivals; batching; conveyors; cost; flow control; etc.
Preview Selecting a name from the tree diagram, on the left of the dialog, will show a picture of the main elements of the model object in the Preview pane.
Description The designated purpose of the model.
Video Link A link to an online video describing the usage of the model.
Insert Places the selected model object at the point of the cursor. When no graphics are previously on the screen the Insert button is grayed out. If a Model object is to be the first element on the model, make certain to place text or some other graphical element on the layout before attempting to insert a model object.
Open Opens the model object in a self-contained format. Any suggested entries can be tested or modified. The model object can be run so that you can see how it behaves with the changes to suggested entries. Deeper explanations are given for attributes, variable and scenario parameters used in the model.
ProcessModel doesn’t have a conveyor construct, but you can model the behavior of most types of conveyors with simple flowchart elements. Activities become sections of the conveyor and routings can be used to represent the movement. Model objects have been created to represent different elements of conveyors.
4.3 – Elements of Model Objects
Model objects are designed so the model will run as an independent model. Often this means that additional model items will be needed to allow the model to run. Added text entries are also provided to explain the model object and how to integrate it within your model. When a model object is inserted only the critical parts are copied into a target model. The following explanations are given to explain what is being shown on the layout in addition to the model object.
All model objects are visually developed with the same general format. Some model objects contain added elements to help in explaining model operation. A typical model object will have the following elements:
Items shaded or outlined in
light gray are not part of the model object, but only included so the model object can be simulated.
Title The title will start with the category and then describe the basic function of the model object.
Why would I use this model object? Will provide one or more reasons why a user may want to consider the model object.
How to use this model object Provides step by step instructions for manually inserting the model object, integrating with a model and adjusting the needed parameters.
How to build this model object Provides additional information about the construction of the model object so that alternate methods might be considered.
Level of difficulty Provides a relative scale of how difficult this model objects will be for the user to integrate into a base model. Simple, would imply that no action logic changes would be necessary. Moderate, would suggest that some action logic would need to be modified. Difficult, may involve extensive changes to action logic or changes to multiple areas. Some model objects provide both difficulty of “use” and “difficulty of modification.”
Notes Describe the use of Attributes, Variable and Scenario parameters along with the information about how to make detailed changes to the model object.
Linked File (small yellow graphic emphasized by the red box in the picture below) A text files used to load information about the model object into the model object database. This is how the ProcessModel knows how to put the category, industry, description into the Model object database.
4.4 – Creating Model Objects
You can design your own model objects and attach them to the model object library. This will allow for proprietary model objects specific to your company that can be shared by your entire organization. The knowledge gained by one individual can be multiplied by creating model objects for others needing similar capabilities.
4.4.1 – Steps in Creating a Model Object
1. Copy the Activities, Routings and Resources needed to replicate the desired behavior.
2. Paste the copied elements into a new model.
3. Add ProcessModel elements needed so this new model will operate independently.
4. Using the text tool, document the purpose and how to use this MO. Make notes that will help the user understand the MO operation.
5. Change the color of all non-essential model elements light gray.
For changing the color of text, routings and activities see Chapter 2, Section , Formatting Lines.
6. Change the name of the layer on which the model resides to Model and add a new layer titled Notes. To make these changes, right mouse-click on the layer tab in the lower left corner of the layout and open the layer manager.
Use the layer manager to rename current layers and add new layers.
7. Move all non-essential elements to the Notes layer. Only model elements that will be copied from the model object will remain on the Model layer. To move items on the ProcessModel layout to another layer, select the elements desired (shift-click to select multiple items) then right-mouse-click on one of the layer tabs and select Move to Layer. Select the Notes layer and press OK.
8. Create data file to supply information to the model object data base. This is a text file (can be created using Notepad) with a predefined format. The format follows:
@#Indus#@Manufacturing, Service, Healthcare, Logistics, Other,#@
@#Categ#@Arrivals, Batching, Conveyors, Costing, Flow Control, Inspection, Miscellaneous, Priorities, Routings, Setup, Shifts, Time, Utilization, Visual Indicators,#@
Save this text file with the same name as your model, except with an extension of “.txt”. A typical text file might look like the one shown below:
@#Indus#@Manufacturing, Military, Service, Other,#@
@#Desc#@If you have a need to route ENTITIES by percentage that changes based on the ENTITY name.#@
In the Industry section, type the industry for which this MO applies. Enter one or more industries separated by commas and the last entry ending with a comma. In the example above, this model will show up in 3 industries and in the other category.
In the Category section, type the category for which this Mo applies. This section will generally have one category, but may have more.
In the Keywords section, type all the keywords that might be used to find a model object separated by commas.
In the Description section, type the sentence or paragraph that defines the purpose of this model object.
In the Video section, enter the full URL describing the path to an online video.
Notice the general pattern. “@#” starts a section followed by a name of the section (Indus, Categ, Keyw, Desc, video). The name of the section is followed by “#@”, the information of the section and then another “#@”
9. Create a picture of the model object Layout. This file will be used to generate the preview for the model object. Save the .JPG with the same name as the model but in the JPG format. A picture size of 600 X 450 is recommended for a preview picture.
10. Link the .TXT file from step 8 and the .JPG from step 9 to the model. In the Notes tab of the model add a shape from the palette (it won’t make any difference if it is an entity, activity or resource and the name is not important). Change the Object Type to “Link”.
Link the two files by right-mouse-clicking on the link object and selecting Link Document.
11. Change the Paste Rule for variables, attributes and scenario parameters to allow them to integrate properly. Each of the three elements above need to know how to behave if there is already an element with the same name in the target model.
Set the Paste Rule to Duplicate if this element name can be used in many places. For example: the name a_Dir1 might be used every time action logic is used to determine which routing to take. The same attribute would be reused at every decision and thus could be used many times without creating a new attribute.
Set the Past Rule to Clone if the name being pasted must be unique for the logic being pasted. For example: the counter v_Count1 might be used to tell the logic how many times an entity had been through a particular set of logic. This means when a model object containing v_Count1 is copied into a model which already has the same variable name, the arriving variable needs to be renamed and all of the logic in the arriving model object needs to be rewritten using the new variable name.
12. Click on the Model Tab to make the Model layer active.
13. Save the model in the ProcessModel Model Objects directory.
4.5 – Model Object Updates
You can request that ProcessModel check the website to see if model objects have been added or if existing model objects have been modified. This keeps you up-to-date with the latest approved content and new capabilities. To check to see if there are new model objects available, select Model Objects/Check for Updates. Model objects added by the user will not be modified or deleted. If a ProcessModel model object has been modified by you and would like to have the changes appear in the model object directory, save the Model Object as a new name, save the linked files (.txt and .jpg) with the same name as the model and relink them to the notes page.