Logic
In ProModel AutoCAD® Edition, Logic statements take additional action in models by creating “code”. Many Logic statements and system functions are available to help you create the Logic necessary for your model, which is described in this section. In addition, you may also define your own expressions that can be utilized in your model’s Logic.
To access the Logic information for your model, make sure the Simulation Properties panel is open and navigate to the Simulation Browser's Flow tab. Select a Location or Route and select Logic at the top of the Simulation Properties panel to open the Logic editor for that Location or Route.
Each Location and Route within a Flow has its own Logic defined within it. Which Location or Route you use to define certain Logic has an impact on when that Logic is executed. For example, if you assign a value to an Attribute in a Flow's first Location Logic, Entities following that Flow are marked with that value as soon as they enter the system. However, if you instead define the Logic in a Location later in the Flow, Entities are not marked with that value until they reach that Location. Keep this in mind as you use Logic in your model.
As you start typing in the Logic panel, usable statement suggestions open due to the Intellisense feature. Select the desired statement and select your keyboard's Enter or Space to complete the word in the Logic Editor. You may also open the Statements panel to see common statements that can be used in Logic.
The following section describes some common statements and functions that you may utilize while creating Logic for your model. However, this guide is not a complete list of usable statements in ProModel AutoCAD® Edition.
- Incrementing and Decrementing - Increment or decrement certain values as events occur in the system. ProModel offers the following statements to execute increments and decrements as you create Logic.
- Time - Use the elapsed time within the simulation as a model Logic component.
- Dates - Use the following Calendar date types in your model.
- Simulation Interruption - While building your model, there may be times where you wish to stop your simulation at a certain time or when certain events occur. ProModel offers the following statements to pause, interrupt, or stop your simulation when necessary.
- Grouping - Use the following statements allow you to group, obtain, and interact with model components. You can have more precise control on how Entities and Resources behave in your simulation.
- Code - The following statements allow you to build and organize your code more precisely within your model's Logic sections.
- Conditional Statements - Use a variety of statements that add conditions to your Logic. Use these statements if you want an action to occur only in specific circumstances.
- Creation - Use the following statements allow you to create items, such as Variables, Entities, and Resources, to use in your model.
- System - Use the following statements to debug, animate, and otherwise manipulate and track your simulations.
- Waiting - Use the following statements to simulate waiting periods in your model.
- Moving - Use the following statements for more control over how Entities move throughout your model.
- Mathematics - Use the following mathematical functions in your model.
- Downtimes - Use the following statements to activate, change, and track downtimes within your model.
- Arrays - Use the following functions and statements to manipulate and provide information on the arrays in your model.
- Name-Index Functions - Use the following functions to return or convert name-index numbers for various items in your model.
- Model Information - Use the following functions to return information about you model for planning and decision-making.
- Model Manipulation - Use the following statements to manipulate the information within your model.
Next: Use Simulation Tools to have complete control over your simulation