How do I use FreeUnits() function?

Returns the free units of an activity or resource (an integer).

Example

The example below demonstrates the use of the FREEUNITS() function to adjust the processing time for an entity based on the number of units of a resource available to process it. Once a Plane arrives at a passenger gate, it captures a certain number of resources named BH (Baggage Handlers). Operation logic at the gate determines how many BH resources have been captured and, accordingly, how long it will take to service the Plane. The more Baggage Handlers a Plane captures, the less time it takes to service it.

WHILE FREEUNITS(BH) <3
{
DO TIME(2 min)
}
IF FREEUNITS(BH)>=5 THEN {GET 5 BH}
ELSE
{
GET FREEUNITS(BH) BH
TIME(60/RESQTY(BH) min)
}

Functions

Was this article helpful?

Need Support?

Can't find the answer you're looking for?
Contact Support
Go to Top