Show / Hide Table of Contents

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.

Logic Highlight

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.

Statements pane

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.

  1. 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.
    1. Inc
    2. Dec
    3. IncEntCost
    4. IncLocCost
    5. IncResCost
  2. Time - Use the elapsed time within the simulation as a model Logic component.
    1. Clock
    2. Log
    3. SysClock
    4. TimeLeft
  3. Dates - Use the following Calendar date types in your model.
    1. CalDay
    2. CalDOM
    3. CalHour
    4. CalMin
    5. CalMonth
    6. CalYear
  4. 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.
    1. Pause
    2. Prompt
    3. Display
    4. Stop
  5. 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.
    1. Accum
    2. Join
    3. Get
    4. Free
    5. Jointly Get
    6. Split
    7. Load
    8. Unload
    9. Group and Ungroup
    10. Combine
  6. Code - The following statements allow you to build and organize your code more precisely within your model's Logic sections.
    1. #region
    2. Comments
  7. 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.
    1. If Then Statements
    2. Else
    3. While
    4. Until
    5. Break
    6. BreakBlk
    7. Begin and End
    8. Route
    9. Return
  8. Creation - Use the following statements allow you to create items, such as Variables, Entities, and Resources, to use in your model.
    1. Create
    2. Int
    3. Real
    4. Order
    5. Graphic
  9. System - Use the following statements to debug, animate, and otherwise manipulate and track your simulations.
    1. Animate
    2. Debug
    3. Trace
    4. ResetStats
    5. Read
    6. Write
    7. Close
    8. Reset
    9. Char
    10. DynPlot
    11. Format
    12. Report
    13. ThreadNum
    14. View
    15. WriteLine
    16. Xwrite
    17. Xsub
  10. Waiting - Use the following statements to simulate waiting periods in your model.
    1. Wait
    2. Wait Until
    3. Match
    4. Use
    5. Activate
  11. Moving - Use the following statements for more control over how Entities move throughout your model.
    1. Move
    2. Move For
    3. Move On
    4. Move With
    5. Send
  12. Mathematics - Use the following mathematical functions in your model.
    1. Ln
    2. Round
    3. Sqrt
    4. Exp
    5. Rand
    6. Trunc
  13. Downtimes - Use the following statements to activate, change, and track downtimes within your model.
    1. Down
    2. DownQty
    3. DTDelay
    4. DTLeft
    5. DTLength
    6. Preemptor
    7. Skip
  14. Arrays - Use the following functions and statements to manipulate and provide information on the arrays in your model.
    1. ArrayDims
    2. ArrayDimSize
    3. MapArr
  15. Name-Index Functions - Use the following functions to return or convert name-index numbers for various items in your model.
    1. Ent
    2. Entity
    3. Last
    4. Loc
    5. Location
    6. Next
    7. OwnedResource
    8. Res
    9. Resource
    10. Variable
  16. Model Information - Use the following functions to return information about you model for planning and decision-making.
    1. Cap
    2. Contents
    3. Entries
    4. FreeCap
    5. FreeUnits
    6. GroupQty
    7. ResQty
    8. ForLocation
    9. ForResource
    10. GetCost
    11. GetReplicationNum
    12. GetResRate
    13. LocState
    14. ObjectID
    15. OwnedResourceUnit
    16. ResourceUnit
    17. PercentOP
    18. PercentUtil
    19. ScenarioName
    20. TimesUsed
    21. Units
  17. Model Manipulation - Use the following statements to manipulate the information within your model.
    1. Priority
    2. Rename
    3. SetRate

Next: Use Simulation Tools to have complete control over your simulation

In This Article
Back to top Generated by DocFX