Get
Resource-Related Operation/Move Logic Statement
The Get statement captures a specified number of Resources as they become available and attaches them to an Entity. The Resources are then considered "owned" by the Entity. Use the Get statement to simulate a Resource helping to process an Entity.
Syntax
Get {<quantity>} <resource> {,<priority>}
{And or Or {<quantity>} <resource> {,<priority>}...}
Syntax Examples
Get Res1
Get 3 Res1, 5
Get 2 Res1OR 3 Res2
Get Res1, 3 And (Res2 Or Res3)
Get Res(Skill_required)
Parameters
<quantity>
The number of Resource units to capture. If the quantity field is left blank, ProModel assumes that the quantity is 1. Note that if the Entity already owns the requested Resource type, the Entity looks for an additional amount of Resources equal to the quantity requested, which can cause problems if the number of that Resource's units is not high enough to satisfy the request.
<resource>
The Resource's name to Get. You can substitute Res() for the Resource name.
<priority>
An optional part of the statement that defines the Entity's priority in regards to how quickly it receives its requested Resources. This should be a number between 1 and 999. The Entities with a higher number in receives Resources before Entities with a lower number. If the priority field is left blank for all Entities, ProModel distributes Resources on a first come, first served basis.
Example
If the statement...
Get Inspector
...is defined in an inspection Location, each Entity that arrives at the Location request's one Inspector Resource. Once an Inspector Resource is available, it travels to the Location (this is visible in the simulation if a Path Network is defined for it) and become "owned" by the Entity. It then travels with the Entity until it is freed.
Suppose there are two inspection Locations rather than one, and each Entity needs two Inspector Resources before it can move on, but you only have a total of three units of the Inspector Resource. You could then define the statement...
Get 2 Inspector, 2
...at the most important inspection Location, and...
Get 2 Inspector, 1
...at the least important inspection Location. These statements ensure that an Entity requests two Inspectors when they reach either of the two inspection Locations. Since the first Location has a higher priority, the Inspectors always goes to it first if both Locations are requesting Inspectors.
If the Entities needed both an Inspector Resource and a Supervisor Resource before being processed, use the statement...
Get Inspector And Supervisor
If the Entities could use either an Inspector Resource or a Supervisor Resource to be able to process, use the statement...
Get Inspector Or Supervisor
ProModel uses whichever Resource was available first.
Remarks
Note that if an Entity still owns a Resource when it leaves the system, the simulation stops with an error. For more information on how to free an owned Resource using the Free statement, see [Free](Grouping.md# free).
Get is valid in operation, downtime, move, and shift logic. A Get statement cannot follow a move-related statement in move logic.