Defining Logic > Logic Builder

Logic Builder

The Logic Builder provides a convenient interface for entering syntactically correct logic for the objects in your process.

Note: when you click the Logic button in a Properties dialog in the Professional edition of Process Simulator, a menu appears (per the image below) that allows you to select either Builder (for the Logic Builder) or Free Form (for the Free Form Logic window).

On the left side of the Logic Builder dialog, there is a list of statements, which can be displayed alphabetically or by category. Double-click on the name of the statement you would like to add to your object's logic. The logic will either be added to the logic window above the currently selected line, or a dialog will be displayed where you can enter the parameters the particular statement requires. Once you have entered the required parameters, the logic will be added to the logic window.

 

Note that among the typical statements are two quasi statements: the <Blank Line> statement and the <Activity Time> statement. The <Blank Line> statement inserts a blank line within the lines of logic for the purpose of readability. The <Activity Time> statement controls where the activity time defined in the Activity Properties dialog is executed within the logic. If the <Activity Time> statement is not used in the logic sequence, the activity time defined in the Activity Properties dialog will be executed, by default, after the defined logic.

 

Note: MapArr and Return <expression> are statements available only in the Professional edition of Process Simulator. Likewise, CalDay, CalDOM, CalHour, CalMin, CalMonth, and CalYear are calendar functions available only in the Professional edition of Process Simulator; and GetReplicationNum and Location are system functions available only in the Professional edition.

 

On the right side of the Logic Builder there is a logic window and a toolbar.

Logic Window

The logic window displays the logic you have defined and the order that it will be executed. Logic is executed from top to bottom each time this particular logic is called during simulation.

 

The order of the logic can be changed using the arrows in the toolbar; however, local variables will always be displayed at the top of the logic. If multiple local variables are defined, their position in the Logic Builder can be interchanged amongst them. Statements that have been added to the logic window can be edited by double-clicking on the line you wish to edit.

 

In order to preserve correct syntax, you may not directly type text into the logic window, but must add and modify the logic by double-clicking on the statements you wish to add or modify. There is a limit of 600 lines of logic that can be entered into any logic window in Process Simulator.

Logic Builder Toolbar

The toolbar in the Logic Builder allows you to manipulate the lines of code in the logic window. You must first select a line of code in the logic window before using the options in the toolbar.


© 2016 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com