09.04.2018 Views

Variables Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1 • VARIABLES<br />

expression when using autostates. For example, STATE(Resource ID) == IDLE_RES<br />

returns true if Resource ID is currently in the idle autostate.<br />

IDLE_RES—Resource state constant. The IDLE_RESource is used in an expression<br />

to check whether a resource is currently in the idle state. A resource is in the idle state<br />

when all units are idle and the resource is not failed or inactive. (The numerical<br />

equivalent of this variable is -1.)<br />

BUSY_RES—Resource state constant. The BUSY_RESource is used in an expression<br />

to check whether a resource is currently in the busy state. A resource is in the busy<br />

state when it has one or more busy units. (The numerical equivalent of this variable is<br />

-2.)<br />

INACTIVE_RES—Resource state constant. The INACTIVE_RESource is used in an<br />

expression to check whether a resource is currently in the inactive state. A resource is<br />

in the inactive state when it has 0 capacity and is not failed. (The numerical equivalent<br />

of this variable is -3.)<br />

FAILED_RES—Resource state constant. The FAILED_RESource is used in an<br />

expression to check whether a resource is currently in the failed state. A resource is in<br />

the failed state when a failure is currently acting on the resource. (The numerical<br />

equivalent of this variable is -4.)<br />

Resource cost variables<br />

One major component of costs in many models is the cost associated with resources.<br />

These costs are in three categories: costs applied during the time a resource is busy,<br />

costs applied during the time a resource is idle (scheduled, but not busy), and costs<br />

applied each time a resource is used (regardless of how long it is used).<br />

If both the costing statistics and the resource statistics options are enabled on the Run<br />

> Setup > Project Parameters property page, resource costs will be calculated and<br />

reported automatically. The following variables are supplied if you instead want to<br />

calculate resource costs manually. Note that you should not do both manual and<br />

automatic calculations concurrently or both may report incorrect results.<br />

ResBusyCost ( Resource ID )—Resource busy cost rate. This returns the busy cost<br />

rate specified in the resource module. This rate is the cost per time unit to be applied<br />

during the entire time a resource is busy. Note that although this rate is entered as a<br />

cost per hour, this variable always returns the rate as a cost per base time unit (for<br />

example, TNOW units). So regardless of the current settings for base time units, this<br />

rate can be used without conversion.<br />

17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!