ProModel User Guide-5
ProModel User Guide-5
Creating Reports
This value is in decimal format, not trun- •Maximum Value The maximum log entry
cated. (Excludes off-shift time, break time, value during the simulation for the given
and scheduled downtimes.) Log Name.
•Capacity The capacity defined in the •Average Value The average value of all
Locations module for this location. log entries during the simulation for the
•Total Entries The total number of entities given Log Name.
that entered the location, not including enti-
ties arriving to be joined and loaded. Entities Please note
split, unloaded, or ungrouped from another
entity at a location do not count as additional Log statistics are set up by the user with a LOG
entries. Arriving entities that have been pre- statement to track the time entities spend between
viously grouped or loaded to form a single any two points in the model.
entity only count as one entry.
•Average Time Per Entry The average time
each entry spent at the location. This time
may include partial times from the beginning Node Entries
and end of the actual run time.
A node entry summary is generated for each non-
•Average Contents The average number
passing path network in the system. It contains
of entries at the location. the following information.
•Maximum Contents The maximum num-
•Path Name The name of the path the node
ber of entries which occupied the location
resides on.
over the course of the simulation.
•Total Entries The number of times that a
•Current Contents The number of entities
resource entered the path node.
remaining at the location when the simula-
•Blocked Entries The number of times a
tion ended.
resource tried to claim a path node occupied
•% Utilization The percentage of capacity
by another resource.
occupied, on average, during the simulation.
Cumulative Occupancy Time x 100
Resources Costing
Capacity x Scheduled Time
•NonUse Cost Dollars NonUse Cost = (1-%
Cumulative Occupancy Time refers to the
Utilization) * Scheduled Time * Rate
sum of the clock time each entity spends at a
•% NonUse Cost Refers to the resource’s
location for processing.
percentage of the sum of all nonuse costs
•Usage Cost Dollars Usage Cost = (% Uti-
Logs
lization * Scheduled Time * Rate) + (Times
•Numbers of Observations The number of Used * Cost per use)
log entries that occurred during the simula-
•% Usage Cost Refers to the resource’s
tion for the given Log Name.
percentage of the sum of all resource usage
•Minimum Value The minimum log entry costs
value during the simulation for the given
•Total Cost Dollars Total Cost = Usage
Log Name.
Cost + NonUse Cost
ProModel 387
User Guide
•% Total Cost Refers to the resource’s per- •Average Time Per Usage The average
centage of the sum of all resource costs time the resource spent transporting or pro-
cessing an entity, or servicing a location or
Resource States other resource. Includes any pickup and
•Scheduled Time The total amount of time drop-off time as well as any blocked time
the resource was scheduled to be available. while in use. (See note on time units.)
(Excludes off-shift time, break time, and •Average Time Travel To Use The average
scheduled downtimes.) time the resource spent traveling to a loca-
•% In Use The percentage of time the tion or other resource to transport or process
resource spent transporting or processing an an entity, or to service a location or other
entity, or servicing a location or other resource. Does not include any pickup time,
resource that was down. This also includes but does include any blocked time. (This
deposit time. information is not available if your model
does not have dynamic resources.)
•% Travel To Use The percentage of time
the resource spent traveling to a location or •Average Time Travel To Park The aver-
other resource to transport or process an age time the resource spent traveling to
entity, or to service a location or other either a park node or a downtime node. (This
resource. This also includes pickup time. information is not available if your model
(This information is not available if your does not have dynamic resources.)
model does not have dynamic resources.) •% Blocked In Travel The percentage of
•% Travel To Park The percentage of time time the resource was unable to move to a
the resource spent traveling to a path node to destination because the next path node along
park or traveling to its downtime node. (This the route of travel was blocked (occupied by
information is not available if your model another resource). (This information is not
does not have dynamic resources.) available if your model does not have
dynamic resources.)
•% Idle The percentage of time the resource
was available but not in use. •% Utilization The percentage of time the
resource spent traveling to be used, trans-
•% Down The percentage of time the
resource was unavailable due to unscheduled porting or processing an entity, or servicing a
downtimes. location or other resource.
Total Travel to Use Time + Total Time In Usage
Resources x 100
Total Scheduled Time
•Units The number of units defined in the
Resources module for that resource.
•Scheduled Time The total amount of time
Please note
the resource was scheduled to be available.
(Excludes off-shift time, break time, and ProModel reports resource groups and multi-unit
scheduled downtimes.) resources both by unit and collectively. The col-
•Number of Times Used The total number lective unit (aggregate) report for a resource
of times the resource has been acquired to totals the first three fields and averages the last
transport or process an entity or to service five fields discussed above.
locations or other downed resources.
388 Chapter 10:
Creating Reports
Variables
•Total Changes The total number of times
the value of the given variable changed dur-
ing the simulation.
•Average Time Per Change The average
time a given variable remained at any one
value.
•Minimum Value The lowest value of the
variable during the simulation.
•Maximum Value The highest value of the
variable during the simulation.
•Current Value The final value of the vari-
able when the simulation ended.
•Average Value The average value of the
variable during the simulation. This value is
time weighted.
Please note
Please note
State Chart
State Charts show stacked bar charts of location,
resource, and entity states. States describe the
condition of these objects.
ProModel 393
User Guide
This type of chart is useful for quickly seeing window. See “Category Chart Properties” on
what your locations, resources, and entities spent page 392.
their time doing. Such visualizations can help
identify problem areas in your process. State Chart Example
To display a State Chart, select State Chart from An example of a State Chart is shown below.
the View menu or the State Chart icon from the
Toolbar. As a shortcut, you can also right-click
on any column of data in a report containing per-
centage values and select State Chart from the
drop-down menu.
When you choose to view a State Chart, the State
Chart Selection dialog will be displayed.
State Chart Properties Positioning your cursor over a bar on the chart
The State Chart Properties window is function- will display specific information about that par-
ally equivalent as the Category Chart Properties ticular bar. The appearance and structure of
394 Chapter 10:
Creating Charts
your chart can be edited using the chart toolbar click on an item to move it from the Available
or the right-click menu. For more information Items area to the Selected Items area or back
see “Right-click Menu” on page 379. again. You may also use the arrow buttons to
move items between the two areas.
If you check the Manual Bar Width option, you
may choose the range value for each bar shown in
Histogram the chart. If you leave this field unchecked, 3DR
will automatically calculate the range value for
A histogram is a bar chart showing the percent-
each bar, which will not necessarily be the value
age of time or times that time plot data fell within
in the Bar Width field.
a particular range of values.
There are two types of histograms that can be dis-
Chart Properties
played:
Choosing the properties option for time weighted
•Time-weighted Values Percentage of total
values histogram will open a window with two
simulation time that the values fell into a
tabs: Data and Display
specific range. (e.g. the Contents variable of
a location.)
Chart Properties: Data
•Simple Values Percentage of total simula-
tion time that a variable was within a range
of values (e.g. cycle times).
Selection Window
Selection Window
Chart Properties
The chart properties for the simple values histo-
gram are the same as for the time-weighted val-
ues histogram. See “Chart Properties” on
page 394.
ProModel 397
User Guide
Chart Properties
Choosing the properties option for time weighted
values time plot will open a window with two
tabs: Data and Display
Chart Example
The example chart below compares the time-
weighted time plot contents of a queue for two
scenarios.
Chart Properties
Choosing the properties option for simple values
The X-Axis shows the time periods for the chart. time plot will open a window with two tabs: Data
The Y-Axis shows the average content values of and Display
the queue for the time periods in the X-Axis.
Chart Properties: Data
The One Operator scenario additionally displays
the minimum and maximum contents of the
The chart properties:data for the simple values
queue for each time period for all replications, as
time plot are the same as for the time-weighted
well as the contents 99.99% confidence interval,
values histogram. See “Chart Properties” on
which means that 99.99% of all queue contents
page 394.
will be with the two confidence interval lines by
period.
Chart Properties: Display
This chart shows the impact that an additional
The Display tab for the time-weighted time plot
operator has on the contents of a queue.
properties window is functionally equivalent as
ProModel 399
User Guide
the Category Chart Properties: Display window, State Values Time plot
with the exception of the “Line Properties”
The state values time plot shows location state
option.
statistics over time.
• Line Properties: Choose the pattern and
thickness for the lines on the chart. Selection Window
See “Category Chart Properties” on page 392.
Chart Example
The example chart below compares the value of
the variable “WIP” over time for two scenarios.
Chart Properties
The Y-Axis shows the value of the WIP (work in Choosing the properties option for state values
progress) variable over the time in the X-Axis. time plot will open a window with two tabs: Data
The example shows how adding two additional and Display
resources to the demo model increases WIP and
reduces the fluctuation in WIP. Chart Properties: Data
The only option available from this properties
window is to change the time units shown in the
X-Axis.
Selection Window
Chart Properties
Choosing the properties option for the counts
time plot will open a window with two tabs: Data
and Display
Chart Example
The example chart below compares the through-
put of a pallet entity for two scenarios.
Language Elements
Language elements are the smallest units of the
language used to define a model’s objects and
logic. Language elements include:
•Names
•Keywords
•Numbers
•Character Strings
•Operators
404 Chapter 11:
Names
Names
A name or identifier is any combination (up to
eighty characters long) of letters, numbers, and
underscores (“_”), used to identify model ele-
ments such as locations, entities, variables, and
functions. Although any valid name can refer to
any object, it is best to use names which describe
the object they identify (e.g., using “ClientA” to
describe an entity that represents a client).
Names, like all words in ProModel, are case
insensitive, meaning that ProModel sees
“PARKING_A,” “Parking_A,” and
“PaRkInG_a” as identical.
Names must use the following conventions:
•Names may contain the letters A through Z
(upper or lower case), digits (0-9) and the
underscore “_”. Names may not contain
spaces. When opening an older model,
ProModel flags improper use of these
restricted characters.
•Do not use a digit as the first character of a
name. After the first character, any charac-
ter may be a digit. For example, “2Var” is
an invalid name, but “V2”, is a valid name.
•Names may not be keywords, but names
may contain keywords. For example,
“For” is an invalid name, but “Forklift” is
a valid name. Similarly, “Queue2” and
“OrderQty” are both valid.
•No matter what they identify, every name in
a model must be unique. For example, you
cannot name both a location and an entity
“Server.” You may, however, name one
“Server1” or “Server_Location” and the
other “Server2” or “Server_Resource.”
ProModel 405
User Guide
Operator Meaning
= Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal to
A=B
A>B
A<B
A >= B
A <= B
A <> B
Examples
2 hr
E(10) min
Var1+40.25 min.01
Colon notated time expressions evaluate from A string expression must begin with a concatena-
right to left as illustrated in the following exam- tion operator ($) or with a string constant in
ples: quotes (i.e., “...”). The concatenation operator
combines components together, and must be
Example Meaning between all components of a string expression.
:05 5 seconds For example, if Attr1 is 7.83, then the expression
5:00: or 5:: 5 hours “STRING1”$ ATTR1 $ “STRING2” evaluates
5:00 or 5: 5 minutes to “String17.83String2.”
2:40: 2 hours and 40 minutes To output the name of a location, entity, or
15:02:05 15 hours, 2 minutes and 5 sec- resource, use the appropriate function inside a
onds string expression: LOC() for locations, ENT() for
3:25 3 minutes and 25 seconds entities, and RES() for resources. For example,
Attr1::Var2 Attr1 hours and Var2 seconds the following logic checks the first ten locations
in a model and displays the name of any location
that is completely full.
Var1 = 1
While Var1 <= 10 Do
Begin
If FreeCap(Loc(Var1)) = 0 Then
DISPLAY Loc(Var1) $ “is full.”
INC Var1
End
Nested expressions
A+B*(C+D)
((A>B) OR (B>C)) AND (C>D)
The expression (C+D) is a nested expression
which is evaluated first. Multiple nesting is per-
mitted, with the innermost nesting being eval-
uated first.
Example 1
15 - MATRIX[4]**2 + CLOCK(MIN) / 60
414 Chapter 11:
Operator Precedence
Example 2
Routing Rules
Routing rules determine the next location for the
processing entity. They are specified in the
“Rule” field of the Routing edit table. They may
be typed manually or selected from the Routing
Rule Dialog box shown below by clicking on the
Rule button. For more information about routing,
see “Routing Edit Table” on page 155.
416 Chapter 12:
Alternate
Alternate Example
Backup Example
Continue Valid In
The rule field of the Routing edit table only. A
CONTINUE rule must be the only routing in a
Syntax samples
routing block and must always take a quantity of
one.
CONT 1
Example
Process Table
Entity Location Operation (min)
Gear Loc1 WAIT 2
Gear Loc2 WAIT 3
IF CLOCK() > 1 THEN
BEGIN
var = 999
ROUTE 2
END
ELSE ROUTE 1
Gear Loc2
Routing Table
Blk Output Destination Rule Move Logic
1 Gear Loc2, 99 FIRST 1 MOVE FOR 1
1 Gear Loc3 FIRST 1 MOVE FOR 1
2 Gear Loc2, var CONT 1
1 Gear Loc3 FIRST 1 MOVE FOR 1
See Also
“Processing” on page 149.
420 Chapter 12:
Dependent
Dependent Example
Empty Example
Components
<expression>
Total entities output from the process. This expression
is valid only for the first routing of a routing block. For
more information on this expression, see “Processing”
on page 149.
422 Chapter 12:
First Available
Valid In
The rule field of the Routing edit table only.
Components
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see the
“Processing” on page 149.
ProModel 423
User Guide
Join Example
The rule field of the Routing edit table only. JOIN statement. Also see “Processing” on
page 149.
Components
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
“Processing” on page 149.
424 Chapter 12:
Load
Load Example
The rule field of the Routing edit table only. See Also
LOAD statement. Also see “Processing” on
Components page 149.
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
“Processing” on page 149.
ProModel 425
User Guide
Process Table
Description
Entity Location Operation (min)
Selects one of the locations listed in a block of
EntA Loc1 WAIT 2.5
routings based on which has been unoccupied the
longest. If several multi-capacity locations all
Routing Table
have one or more current entities, the location
with the most available capacity will be selected. Blk Output Destination Rule Move Logic
If no capacity is available at any location, the first 1 Plane Gate1 LU 1 MOVE FOR 2
one that becomes available is selected. This rule Plane Gate2 LU MOVE FOR 2
is useful in situations where residual effects must Plane Gate3 LU MOVE FOR 2
diminish before further usage of a location (e.g., Plane Gate4 LU MOVE FOR 2
an oven cooling to an ambient temperature, the
vapor clearing out of a paint booth, etc.). Routing Table
Please note that this routing rule is not valid for Blk Output Destination Rule Move Logic
single-capacity locations 1 EntA Loc2 LU 1
EntA Loc3 LU
Valid In EntA Loc4 LU
The rule field of the Routing edit table only.
See Also
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
“Processing” on page 149.
426 Chapter 12:
Most Available
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
“Processing” on page 149.
ProModel 427
User Guide
Probability Example
Random Example
Process Table
Description
Entity Location Operation (min)
Randomly selects one of several available loca- EntA Loc1 WAIT 3
tions listed in a block of routings such that each
location having available capacity is equally Routing Table
likely to be selected. If none of the locations
listed has available capacity, the first location Blk Output Destination Rule Move Logic
that becomes available will be selected. 1 EntA Loc2 RANDOM 1
EntA Loc3 RANDOM
Valid In EntA Loc4 RANDOM
The rule field of the Routing edit table only. See Also
PROBABILITY routing rule. Also see “Process-
Components ing” on page 149.
<expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
“Processing” on page 149.
ProModel 429
User Guide
Send Example
Description
Process Table
Causes an entity to remain at the current location
until one of the listed destinations issues a SEND. Entity Location Operation (min)
Once a location has been selected, capacity must PO Holding
be available at that location before the routing
actually takes place. Multiple alternative SEND Routing Table
destinations may be specified in a block.
Blk Output Destination Rule Move Logic
Valid In 1 PO VendorA SEND 1 MOVE FOR 48
Hr
The rule field of the Routing edit table only. PO VendorB SEND MOVE FOR 48
Hr
PO VendorC SEND MOVE FOR 48
Components Hr
Turn Example
Description
Process Table
Selects the locations listed in a block of routings
in rotation by availability. If none of the locations Entity Location Operation (min)
listed are available, the first one that becomes PO Keypunch WAIT U(3,1) min
available is selected. A particular location may be
listed more than once in a routing block if it is to Routing Table
have a greater proportion of turns than the others.
Blk Output Destination Rule Move Logic
Valid In 1 PR Buyer1 TURN 1
PR Buyer2 TURN
The rule field of the Routing edit table only. PR Buyer3 TURN
<Boolean expression>
Syntax samples
Any expression which evaluates to TRUE or FALSE.
<Boolean expression> {<expression>} <expression>
The total entities output from the process. This expres-
sion is valid only for the first routing of a routing
block. For more information on this expression, see
Description “Processing” on page 149.
Selects one of several locations listed in a routing
block based upon a user-defined condition. Sev-
eral User-Condition routings usually are used in Example
the same routing block. At least one of the user-
defined conditions in a block must be true or an Customers bring their cars to a local service
error message will appear and the simulation will station for emissions testing and state inspec-
terminate. Capacity must be available at the loca- tion. After each car completes a 10-minute
tion before the routing actually takes place. inspection operation at location Inspect, they
Unlike most primary routing rules, an ALTER- are put in the proper service bay depending
NATE or BACKUP routing may be specified on the car’s engine type. Late-model (post-
after each USER CONDITION routing in the 1975) cars are tested in Bays 1 and 2, pre-
1975 cars are tested in Bay3, and diesel
same routing block.
engine cars are tested in Bay4. If Bay1 is
selected but not available, an alternate loca-
tion (Bay2) is selected. If both Bay1 and Bay2
are down, a backup location (Bay3) is
selected. Bay3 also has an alternate location
(Bay4) in case it is unavailable, but has no
backup location. Bay4 has neither an alter-
nate location nor a backup location.
Valid In
The rule field of the Routing edit table only.
ProModel 433
User Guide
Process Table
Entity Location Operation (min)
CAR Inspect WAIT 10
Routing Table
Destinatio
Blk Output n Rule Move Logic
1 CAR Bay1 IF Type=1 1
CAR Bay2 ALT
CAR Bay3 BACKUP
CAR Bay3 IF Type=2
CAR Bay4 ALT
CAR Bay4 IF Type=3
See Also
“Processing” on page 149.
434 Chapter 12:
User Condition
ProModel 435
User Guide
and, in most instances, this conversion will be system whenever they are encountered by an
satisfactory. The only place where the user may entity in the operation logic. They are valid only
want to use a different conversion is when Pro- in certain areas. See each statement for a list of
Model converts from a real to an integer. places where it is valid.
When converting from a real to an integer, Pro- There are two subsets of operation statements:
Model ignores everything to the right of the deci- entity-related and resource-related. Entity-
mal point. When converting from an integer to a related operation statements perform specific
real, ProModel simply adds a decimal point to the actions on entities only. Resource-related opera-
integer. ProModel handles name-index numbers tion statements involve resources alone (for
exactly like integers. Most often, these automatic example, GET and FREE) or resources and enti-
conversion will be sufficient, but occasionally it ties together (for example, USE).
will be necessary to convert between the types
differently. For these situations, use the conver- Statement Blocks
sion functions.
A statement block is a group of statements that
begin with the keyword BEGIN, or the symbol
Statements “{”, and end with the keyword END, or the sym-
bol “}”. Two examples appear below. See
Statements cause ProModel to take some action BEGIN and END for more extensive examples of
or perform some operation. Unlike functions, statement blocks.
statements neither return a value nor use paren-
theses, and logic may contain comments. (See
“Comments” on page 461.) Statements can use Statement blocks
spacing (including a new line) before each word
in a statement, and are case insensitive so any let- BEGIN {
ter may be either upper or lower case. Statement 1 Statement 1
Statement 2 Statement 2
General Action and Control
Statement 3 Statement 3
Statements
... ...
General statements can be divided into two main
Statement n Statement n
categories: action and control statements. They
are called general because they can be used in END }
any logic. Action statements cause some action to
occur in the model, such as changing an entity’s
graphic or writing to a file. Control Statements
determine the next statement to be executed, such
as loops, branches, and statement blocks.
Distribution Functions
Distribution functions are built-in functions
which, in conjunction with streams, return ran-
dom values according to a statistical distribution.
The following table is a summary of available
distribution functions. They are valid in any
numeric expression.
General Components time shift the entire distribution. Any time an axis
shift is specified, a stream must be specified also.
<s> The optional stream to use in conjunction
with the distribution’s probabilities. If this option Any negative value returned by a distribution that
is omitted, ProModel will use stream one. For is used for a time expression will be automati-
more information on streams, see “Streams” on cally converted to zero.
page 266.
<ax> An optional axis shift. The distributions,
E, G, W, L, IG, P5, and P6 all normally have a
minimum value of zero. Use an axis shift to alter
the distribution’s minimum value and at the same
438 Chapter 13:
Priorities
Priorities
Many statements in this manual use <priority> as
a component. A priority determines the order in
which competing commands are fulfilled. For
example, priority determines which of two com-
peting requests to USE a resource gets fulfilled,
or which of two competing requests to SEND the
same entities to different locations gets fulfilled.
Commands or entities with high enough priority
can even bring back up locations that are down,
or force a location to stop processing one entity
and process another instead. This is called “pre-
emption.” All priorities must be an expression
that evaluates to a number between 0 and 999.
For a complete explanation of priorities and pre-
emption, see “Location Priorities and Preemp-
tion” on page 111, “Resource Shift Downtime
Priorities” on page 141, “Preemptive Entities” on
page 121, and “Preemption Process Logic” on
page 300.
ProModel 439
User Guide
<expression>
The number of entities to accumulate. If this expres-
Description
sion results in zero or one, it is ignored. If it results in a
Accumulates, without consolidating, the speci- number greater than the location’s capacity or a nega-
fied quantity of entities at a location. ACCUM tive number, the simulation will stop with an error.
works like a gate that prevents entities from pro- This expression is evaluated every time an entity to be
cessing until a certain number arrive. Once the accumulated arrives, so the quantity to be accumulated
specified number of entities have accumulated, can vary as the entities to be accumulated arrive. If an
they will go through the gate and begin process- entity arrives that changes this expression to a number
ing individually, independent of each other. lower than the number of entities already accumulated,
all of the accumulated entities begin to process.
ACCUM can be used to model situations where
several entities should be accumulated before
they get processed. For example, when a resource
processes orders at a work station, it may be more
Example
efficient to accumulate several orders before
requesting the resource. Entities named “Pallet” arrive at a location
named “Loading” and accumulate in batches of
If you specify an ACCUM operation in a process 20. Entities named “Box” also arrive at Loading
for an individual entity, accumulation will occur and accumulate in batches of 10. Only after the
by individual entity type. However, if you specify right number of boxes or pallets accumulates
ALL as the processing entity, all entity types at does ProModel request the forklift. The accumula-
tion of Boxes and Pallets at Loading is entirely
440 Chapter 14:
Accum
Process Table
Entity Location Operation (min)
Pallet Loading ACCUM 20
USE ForkliftFOR 2
Box Loading ACCUM 10
USE Forklift FOR 2
ALL Storage ACCUM 30
Routing Table
Blk Output Destination Rule Move Logic
1 Pallet Storage FIRST 1 MOVE FOR 5
1 Box Storage FIRST 1 MOVE FOR 5
1 ALL Loc3 FIRST 1 MOVE FOR 5
See Also
COMBINE, JOIN, and GROUP.
ProModel 441
User Guide
Activate Components
Description
Example
Starts an independent subroutine. Only subrou-
tines of type interactive can be called with ACTI- This example uses ACTIVATE in a model’s initializa-
VATE. The calling logic then continues without tion logic to start a subroutine named Res_Log().
waiting for the called subroutine to finish. There- Res_Log() is a user-defined subroutine that logs
fore, independent subroutines can run in parallel every time that all units of a resource named
with the logic that called them. Independent sub- Worker are in use. After it logs the time that all
routines are not entity or location dependent and units were busy, it waits ten minutes to check
run without regard to what happens inside the again. Note that the WHILE...DO loop in the sub-
routine is never exited. This technique allows the
logic that called them.
subroutine to run during the entire simulation.
Use ACTIVATE to process logic that has WAIT Initialization Logic:
or WAIT...UNTIL statements when you do not Activate Res_Log()
want to use an entity to process the WAIT or
Res_Log()
WAIT...UNTIL statements. For example, an
INT X = 1
ACTIVATE in the initialization logic could call a
WHILE X = 1 DO
subroutine that adjusts the arrival frequency for a BEGIN
type of entity depending on the time of day. IF FREEUNITS(Worker)=0
Independent subroutines called with ACTIVATE THEN LOG "All workers busy at ",0
WAIT 10
cannot use entity-specific or location-specific
END
system functions. If the subroutine has a return
value, then that value is ignored. External subrou-
tines cannot be called with ACTIVATE, although See Also
they may be called from within an activated sub- XSUB(). Also see “Subroutines” on page 246.
routine.
Valid In
Any logic.
442 Chapter 14:
Animate
Syntax samples
ANIMATE <expression>
ANIMATE 70
ANIMATE Var1
Description
Sets the simulation’s animation speed. The
higher the value, the faster the animation. ANI-
MATE is used primarily to speed up or slow
down a model for cursory or detailed observation
whenever a particular condition is encountered. See Also
Another common use is to set the animation
speed to one-hundred in the Initialization Logic GRAPHIC and SOUND.
to rapidly advance the simulation to some point
in time.
Valid In
Any logic.
Components
<expression>
The new speed of the animation. This expression can
be any number from 0 to 100 and is evaluated every
time the ANIMATE statement is encountered. The
default speed is 56.
Example
ArrayDims()
General System Function
Syntax samples
ARRAYDIMS(<arrayname>)
ARRAYDIMS(MyArray)
Description
Returns the number of dimensions in an array.
Valid In
Any Logic
Components
<arrayname>
The name of the array for which you wish to know the
number of dimensions.
See Also
ArrayDimSize().
444 Chapter 14:
ArrayDimSize()
ArrayDimSize()
General System Function
Syntax samples
ARRAYDIMSIZE(<arrayname>, <dim_num>)
ARRAYDIMSIZE(MyArray, 2)
Description
Returns the size of a dimension in an array. You
must provide the name of the array and the partic-
ular dimension of the array for which you want to
know the size.
Valid In
Any Logic
Components
<arrayname>
The name of the array.
<dim_num>
The number of the dimension for which you wish to
know the size.
See Also
ArrayDims().
ProModel 445
User Guide
Assignment Statement
Syntax samples
Description
Assigns the value of a numeric expression to a
designated variable, array element, or attribute.
Valid In
Any Logic
Example
Var1 = 300
Attr2 = Clock(hr) - Attr3
Please Note
Valid In
Any logic.
Example
Valid In BREAKBLK.
Any logic.
Example
Example
CalDay() Example
General System Function Suppose that shipment arrival types vary from
day to day. Since Monday’s Shipment_Type_A
arrival patterns are unique, you will need to use a
Syntax samples distribution specific to those patterns.
IF CALDAY()=1 THEN
CALDAY()
BEGIN
Shipment_Type_A =
Monday_Distribution_A
Description USE Forklift FOR Unload_Time
END
The CALDAY() function corresponds to the
weekday of the calendar date you defined as part
of the warm-up period or simulation begin date
under simulation options. Since CALDAY() See Also
resets with the advent of a new week, every CALDOM(), CALHOUR(), CALMIN(), CAL-
weekday will return the same value (i.e., MONTH(), and CALYEAR().
Wednesday will always return a value of 3).
Valid In
Any logic.
Please note
CalDOM()
General System Function
Syntax samples
CALDOM()
Description
The CALDOM() function corresponds to the cal-
endar day of the month you defined as part of the
warm-up period or simulation begin date under
simulation options. Values returned by this func-
tion will be integers in the range of 1 to 31.
Valid In
Any logic.
Please note
See Also
CALDAY(), CALHOUR(), CALMIN(), CAL-
MONTH(), and CALYEAR().
ProModel 451
User Guide
Syntax samples
CALHOUR()
Description
The CALHOUR() function corresponds to the
hour of the calendar date you defined as part of
the warm-up period or simulation begin date
under simulation options. Since this function ties
directly to the 24-hour clock displayed on the
screen during simulation, CALHOUR() will
never return a value higher than 23.
Valid In
Any logic.
Please note
Example
Syntax samples
CALMIN()
Description
The CALMIN() function corresponds to the
minute of the calendar date you defined as part of
the warm-up period or simulation begin date
under simulation options. Since this function ties
directly to the 24-hour clock displayed during
simulation, CALMIN() will never return a value
higher than 59.
Valid In
Any logic.
Please note
Example
CalMonth()
General System Function
Syntax samples
CALMONTH()
Description
The CALMONTH() function corresponds to the
month of the year you defined as part of the
warm-up period or simulation begin date under
simulation options. Values returned by this func-
tion will be integers in the range of 1 to 12.
Valid In
Any logic.
Please note
Example
See Also
CALDAY(), CALDOM(), CALHOUR(),
CALMIN(), and CALYEAR().
454 Chapter 14:
CalYear()
CalYear()
General System Function
Syntax samples
CALYEAR()
Description
The CALYEAR() function corresponds to the
year of the calendar date you defined as part of
the warm-up period or simulation begin date
under simulation options.
Valid In
Any logic.
Please note
See Also
CALDAY(), CALDOM(), CALHOUR(),
CALMIN(), and CALMONTH().
ProModel 455
User Guide
Cap() Example
Description
Returns the total capacity of a location. CAP() Process Table
can be used to prepare a batch of entities to fill a
Entity Location Operation (min)
location. Sink Oven ACCUM CAP(LOCATION())
Valid In
Routing Table
Any logic and any expression evaluated after
Blk Output Destination Rule Move Logic
translation. For a list of expressions evaluated
1 Sink Cool FIRST 1 MOVE FOR
after translation, see the “Appendix A” on 5
page 587.
See Also
Components
FREECAP(), LOC(), and LOCATION().
<location>
The name of the location to examine. If this component
is the name of a multi-unit location, CAP() will return
the capacity of the entire location. For example, if each
unit of a five-unit location has a capacity of five,
CAP() will return twenty-five. This component can
also be the name of an individual unit in a multi-unit
location.
456 Chapter 14:
Char()
Char() Example
String Function The logic below displays the combined cost of all
the Parts ordered through a particular service
center. The simulation has kept a tally of all the
Syntax samples parts it has ordered in the variable Parts, and
each part cost 25 English pounds. The logic dis-
CHAR(<expression>) plays the cost of the parts with the pound symbol
(£), which is ASCII code 156.
CHAR(10)
DISPLAY “Total cost of parts:” $ CHAR(156) $ Parts *
25
Description
Returns the ASCII character for the number that
the expression evaluates to. This function is most
useful for outputting ASCII characters that can-
not be typed, such as accented characters. This
function is most often used in conjunction with a
string expression and the concatenation (“$”)
operator.
The number corresponding to the ASCII charac-
ter varies with each computer depending on the
character set specified in the config.sys file of See Also
your computer. To determine the number corre- “String Expressions” on page 412.
sponding to the ASCII character at your com-
puter, run the model CHAR.MOD found in the
MODELS\REFS directory. View the file this
model generates called CHAR.TXT found in the
same directory as the model.
Valid In
Any string expression.
Components
<expression>
Any expression that evaluates to a number between 0
and 255. The expression is evaluated every time the
CHAR() function is encountered.
ProModel 457
User Guide
Clock() Components
Attr1 = CLOCK()
See Also
“General Information” on page 179 and “Time
Description Expressions” on page 411.
Returns value of the elapsed simulation time in
the units specified. Clock units should be kept
consistent when comparing values. If an attribute
has been assigned a time in minutes, any time
value compared with that attribute should also be
in minutes.
When no units are specified in the parentheses in
the clock function, ProModel returns the default
time unit specified in the General Information.
Valid In
Any logic and most fields, except those fields
evaluated at translation. For a list of fields evalu-
ated at translation, see the “Appendix A” on
page 587.
458 Chapter 14:
Close
Close
General Operation Statement
Syntax samples
Description
Closes a file that has previously been written to
with WRITE, WRITELINE, XWRITE, or read
with READ. Use CLOSE when finished with a
file to free system resources. A file will automati-
cally be re-opened to be read or written if it has
been closed. All opened files are automatically
closed at the end of a simulation. When you are
using many external files and you want to con-
serve system resources, this statement is espe-
cially helpful.
Valid In
Any logic.
Components
<file ID>
The file ID of the desired file as defined in the External
Files editor.
See Also
READ, WRITE, WRITELINE, XWRITE, and
RESET.
ProModel 459
User Guide
Combine Valid In
The operation column of Process edit tables only.
Entity-Related Operation Statement COMBINE may not be used in combination with
CREATE, GROUP, UNGROUP, LOAD,
UNLOAD, SPLIT AS, or other combine state-
Syntax samples
ments in the same process logic.
COMBINE <expression> {AS <new entity
name>} Components
COMBINE Var1
<expression>
COMBINE 3 AS EntQ
The number of entities to combine. Negative values
COMBINE Var1 as ENT(Attr1) generate an error message. If this expression evaluates
to zero, it is ignored. If it evaluates to one, then no enti-
ties are actually combined, but the entity that encoun-
tered the combine statement is renamed (if the AS
Description option has been specified).
Accumulates and consolidates a specified quan- This expression is evaluated every time an entity
tity of entities into an entity, optionally with a encounters the COMBINE statement, so the amount of
different name. Unlike the GROUP statement, entities to be combined can vary as the simulation
combined entities lose their identities and progresses. If an entity arrives that changes this expres-
attributes and cannot be ungrouped later. Use sion to a number lower than the number of entities
already waiting to be combined, all of the entities wait-
COMBINE when several entities need to be com-
ing to be combined are combined, including the entity
bined, such as when eight spark plugs are com-
that just arrived.
bined in a box. Note that after several entities
have been combined at a location, no additional AS <new entity name>
statistics will be collected for any of the com- The optional name of the resulting entity. If left off, the
bined entities at that location. new entity will have the same name as the last com-
bined entity or the output entity name.
When specifying COMBINE <expression> AS
<new entity name> in the operation logic, there
must be another operating block at the same loca- Explicit Entity Actions
tion. In this case, the incoming entity at the new
operating block is the new entity name specified COMBINE passes cost on to new entities but not
in the COMBINE statement. statistical information. ProModel counts com-
bined entities as exits.
460 Chapter 14:
Combine
Example
Process Table
Entity Location Operation (min)
mboard Assembly COMBINE 20
Routing Table
Blk Output Destination Rule Move Logic
1 Tote Shipping FIRST 1 MOVE FOR 5
See Also
GROUP, ENT(), ACCUM, and LOAD. Also see
the “Attributes” on page 225.
ProModel 461
User Guide
Comments Valid In
Any logic.
Documentation Symbols
Example
Syntax samples
The logic below has several notes to explain it.
# Additionally, ProModel ignores the ELSE statement
and the ELSE statement’s block.
//
IF Parts_Available > Attr2 THEN
/*...*/
//Parts needed is stored in attribute 2
BEGIN
JOIN Attr2#Join the number of parts
Components # needed only if there are
# enough parts available.
#
WAIT Attr1
The pound sign signals the start of a one-line comment.
END
ProModel will ignore any characters on the rest of the
line. /* ELSE
// BEGIN//Start operation
Two forward slashes signal the start of a one-line com- INC Var1
ment. ProModel will ignore any characters on the rest
WAIT Attr3
of the line. This symbol works exactly the same as the
# sign. END */
/*...*/
A slash followed by an asterisk signals the start of a
multi-line comment. ProModel will ignore all charac-
ters after the “/*” until it finds an asterisk followed by a
slash, “*/”. Use this type of comment for long explana-
tions and to prevent ProModel from executing long
portions of logic during debugging. Comments using //
or # may be nested inside multi-line comments.
Description
Comments are notes to the modeler inside blocks
of logic. ProModel ignores them, but they can be
particularly useful to explain logic when more
than one person will be using a model.
462 Chapter 14:
Contents()
Contents() Example
Components
<location>
The name of the location to examine.
<entity type>
The optional name of the type of entity to look for. If
omitted, CONTENTS() will return the total of all enti-
ties at the location.
ProModel 463
User Guide
Create Components
Example
Process Table
Entity Location Operation (min)
Record Station1 WAIT N(8,.3)
CREATE 2 AS
Copy
Copy Station1 WAIT U(3,.3)
Routing Table
Blk Output Destination Rule Move Logic
1 Record Station2 FIRST 1MOVE FOR 5
1 Copy File_Cab FIRST 1MOVE FOR 5
See Also
ORDER, SPLIT AS, ENT(), and RES().
ProModel 465
User Guide
Valid In
Any logic.
Example
Dec Example
General Operation Statement The example below shows two variables decre-
mented in exit logic. The variable Num_in_system
is decremented by one, while variable Var3 is
Syntax samples decremented by 20.
Description
Decrements a variable, array element, or attribute
by the value of a specified numeric expression.
To decrement a variable, attribute, or array ele-
ment when the current entity actually leaves a
location, use DEC in the move logic.
<name>
Any variable, array element, or attribute.
<expression>
The amount to decrement the value. If this expression
is omitted, the value will be decremented by one. This
can be a negative number.
ProModel 467
User Guide
Display Example
General Action Statement This simple example displays the value of both
Var1 and of Attr1 if Attr2 is 1. This logic will display
the dialog box below if Attr2 is 1. If Attr2 is not 1,
Syntax samples an error message will appear.
Operation (min)
DISPLAY <string expression>
IF Attr2=1 THEN
DISPLAY “Var1 =” $ Var1 $ “and Attr1 =” $
Attr1 DISPLAY “Var1 =” $ Var1 $ “\nand Attr1 =” $ Attr1
Description
Pauses the simulation and displays a message.
The simulation will resume when the user selects
OK. The concatenation operator ($) should be
used to combine a numeric value into the string
(as in the first syntax example above). Using the
ENT(), LOC(), and RES() functions will display
the name of the entity, location, or resource.
Please note
Valid In
Any logic. The “\n” character starts new lines.
Components
<string expression>
See Also
The message to be displayed. To display a numeric PROMPT, PAUSE, CHAR(), and FORMAT().
value, use the concatenation operator ($) as in the first
syntax example.
468 Chapter 14:
Do...Until
Syntax samples
Example
DO <statement block> UNTIL <Boolean
expression>
A machining station can manufacture parts of
increasing complexity from the same entity,
DO INC Var1 UNTIL Array1[Var1] <> 10 called a Blank. When a Blank arrives at the sta-
tion, the value stored in Attr1 determines the
complexity of the part and the amount of time
DO needed to create the new part. The following
logic models this situation with a DO...UNTIL loop.
BEGIN All blanks that arrive go through a five minute pro-
INC Var2, 5 cessing time, and then go through the operation
several more times depending on the value of
WAIT 5 sec Attr1.
END
UNTIL FreeCap(Loc1) > 5
Process Table
Entity Location Operation (min)
Description Blank Machining INT Count = 0
Repeats a statement or statement block continu- DO
BEGIN
ously while a condition remains false. WAIT 5 min
DO...UNTIL is an exit-condition loop, meaning INC Count
that the loop will always be executed at least END
once. Use DO...UNTIL when an operation will UNTIL Count = Attr1
always be executed at least one time and possibly
more times. Routing Table
Blk Output Destination Rule Move Logic
Valid In
1 Base Painting FIRST 1
Any logic.
See Also
Components BEGIN, END, DO...WHILE, and WHILE...DO.
<statement block>
The statement or block of statements to execute.
ProModel 469
User Guide
Do...While Components
Please note
Valid In
Any logic.
470 Chapter 14:
Down
Valid In
Any logic, except Initialization and Termination
logic.
Components
<dtname>
The name of the called downtime. This name is
defined in the Called Downtime dialog, found in the
Locations table.
<priority>
You may optionally define a priority. This will over-
ride the priority you defined in the Called Downtime
dialog for the specified called downtime.
ProModel 471
User Guide
DownQty() Example
General System Function Two resources, Welders, weld brackets onto steel
frames at a location, Man_Weld, in 6.5 minutes.
An automatic welding machine, Auto_Weld, can
Syntax samples perform the same task, but it takes 9.3 minutes.
However, if only one Welder is available and the
DOWNQTY(<location> or <resource>>) other Welder is down (e.g., on break), it takes one
Welder 13.0 minutes to weld the brackets to the
IF DOWNQTY(Loc1) > 3 THEN ROUTE 2 frames. Therefore, if one Welder is down, the
DISPLAY “Total Res1 Down Now:” $ DOWN- frames should route to the automatic welding
QTY(Res1) machine, Auto_Weld.
DTDelay() Example
Description
Returns the difference between the time when See Also
you scheduled a non-preemptive downtime to DOWNQTY().
occur and the time it actually occurred. Use
DTDelay to determine if downtimes are being
postponed because of incompleted work. You
can use DTDelay in downtime logic to ensure
that a location comes back up at a specific time.
Also returns the difference between the time
when a downtime is preempted and the time it
resumes.
Valid In
Any downtime logic including off-shift and break
logic. This function returns a real number.
Components
<time unit>
The function will return the downtime delay in any of
the following units: SEC, MIN, HR, DAY, and WK.
ProModel 473
User Guide
DTLeft() Example
DynPlot() Example
Components
<Chart name>
The name of the Dynamic Plot chart as defined in the
Dynamic Plots dialog. Enclose the name in quotation
marks.
ProModel 475
User Guide
End Example
BEGIN {
END }
Just as in the logic above, if Attr1 in the following
example equals one, ten Cases are ordered.
However, Var1 increments no matter what the
Description value of Attr1. Without a statement block, the
Defines a statement block along with a corre- IF...THEN applies only to the very next statement,
no matter how you format the logic.
sponding BEGIN statement. BEGIN and END
are almost always used in conjunction with other IF Attr1 = 1 THEN
control statements such as IF...THEN and ORDER 10 Case
DO...WHILE. Every END must pair with a
INC Var1
BEGIN.
Valid In
Any logic. See Also
BEGIN, IF...THEN, DO...WHILE,
WHILE...DO, DO...UNTIL, and END.
476 Chapter 14:
Ent()
Ent() Example
Type Conversion Function The logic below orders three batches of five
different entity types to a location, Receiving.
Description
See Also
Converts a name-index number or integer to an
entity name. Use this function when a statement LOC(), RES(), ENTITY(), and LOCATION().
or function needs the name of an entity whose
name index number is stored in an attribute, vari-
able, or some other expression. ENT() can also be
used to vary the entity that a statement references
by using an expression for the name-index num-
ber. When used in an expression expecting a
string, such as in the second syntax example
above, ProModel will convert the name-index
number to the actual name of the entity.
Valid In
Any logic where an entity name is normally used.
Components
Entity() Components
See Also
IF...THEN...ELSE.
Description
Returns the total entries to a location. This func-
tion returns an integer.
Valid In
Any logic and any field except those evaluated
only at translation. For a list of fields evaluated at
translation see the “Appendix A” on page 587.
Components
<location>
The location to examine.
Example
Exp()
Math Function
Syntax samples
EXP(<expression>)
Real1 = EXP(Real2)
Description
Returns the exponential of an expression. This
function is equivalent to ex.
Valid In
Any expression. This function returns a real num-
ber.
Components
<expression>
EXP() returns the exponential of this expression.
See Also
LN().
480 Chapter 14:
ForLocation()
Syntax samples
FORLOCATION()
IF FORLOCATION() THEN
INC Arr1 [1, 2]
ELSE
INC Arr1 [2, 2]
Description
This function returns TRUE if the object execut-
ing the shift or break logic is a location.
Valid In
Shift or break logic.
Example
Components
<expression>
This expression will be evaluated and converted to a
string. If the expression results in an integer, it will be
converted to a real.
<total number of characters in expression>
This expression formats the number so that it occupies
a total space equal to the number of digits before +
number of digits after the decimal + one character for
the decimal point. For example if you were to do the
following logic: XWRITE file1 Format (10.0 4 1)
XWRITE file1 Format (1.0 4 1), it will show up in
the file as 10.0 1.0 with a space before the 1.0.
482 Chapter 14:
ForResource()
ForResource()
Shift & Break System Function
Syntax samples
FORRESOURCE()
IF FORRESOURCE() THEN GET Res1
Description
This function returns TRUE if the object execut-
ing the shift or break logic is a resource.
Valid In
All Shift or Break logic.
Example
See Also
FORLOCATION(). Also see “Shift & Break
Logic” on page 305.
ProModel 483
User Guide
Free Example
Resource-Related Operation Statement In the following example, EntA arrives at Loc1 for
a multi-step process requiring the use of
resources Res1 and Res2. The first step requires
Syntax samples the simultaneous use of Res1 and Res2 for a nor-
mally distributed amount of time. ProModel then
FREE {<quantity>} <resource>, {{quantity} frees Res1while Res2 performs the second step of
<resource>...} the process according to a Lognormal distribu-
tion.
FREE Res1, 2 Res2, 5 Res3A
FREE ALL
FREE RES(Attr1)
Process Table
Entity Location Operation (min)
EntA Loc1 JOINTLY GET Res1 AND
Description Res2
WAIT N(4.5,.2)
Frees resources which are currently “owned” by FREE Res1
the current entity. These resources must have WAIT L(3.4,.23)
been captured through a GET or JOINTLY GET FREE Res2
statement.
Routing Table
Valid In
Blk Output Destination Rule Move Logic
Location processing logic and downtime logic. 1 EntA Loc2 FIRST 1 MOVE FOR 5
FreeCap() Example
General System Function Suppose the entities, Plates and Cams, travel
through an assembly line. The location, Assembly
(capacity=1) joins Cams with the Plates. When a
Syntax samples Cam finishes processing at Station2, it should not
enter Station3 unless a Plate is waiting to join with
FREECAP(<location>) it further down the assembly line at Assembly. If
there is no Plate at Assembly, another location,
SEND FREECAP(Loc1) EntA TO Loc1 Buffer, sends one. The logic for Cam at Station2 is
as follows:
IF FREECAP(Assembly) = 1 THEN
Description SEND 1 Plate TO Assembly
Returns the available capacity of a location. This
function returns an integer.
Components
<location>
The name of the location to examine. The LOC() func-
tion may also be used here.
ProModel 485
User Guide
Components
<location>
The name of the location to examine.
<resource>
The name of the resource to examine.
Example