IncResCost
Cost Related Statement
The IncResCost statement increments the Resource cost (positively or negatively) by a given amount every time the Resource is "owned" by an Entity in a Location or Route where the IncResCost statement is defined in the Logic.
Syntax
IncResCost <cost expression> {,<resource>}
Syntax Example
IncResCost 10
IncResCost GetResRate(Operator1)***20, Operator1
Parameters
<cost expression>
The positive or negative amount to apply. This field cannot be blank.
{,<resource>}
A Resource currently owned by the Entity executing the statement. When used without the parameter, this statement increments the cost rate of the Entity's most recently captured, owned Resource.
Parameter Examples
Suppose a Resource called Rec1 has a hourly cost of 10 and a Location that Rec1 is able to interface with has the following statements defined in its Logic:
Get Rec1
Wait 10 min
IncRecCost 5
Free Rec1
If the simulation runs for 12 hours and 10 Entities pass through this particular Location, Rec1's total cost is 170.
12 (hours in simulation) *** 10 (hourly cost) + 10 (Entities) *** 5 (IncRecCost value) = 170
Similarly, suppose a Resource called Rec2 has an hourly cost of 10 and a Location that Rec2 is able to interface with has the following statements defined in its Logic:
Get Rec2
Wait 10 min
IncRecCost -2
Free Rec2
If the simulation runs for 24 hours and 15 Entities pass through this particular Location, Rec2's total cost is 210.
24 (hours in simulation) *** 10 (hourly cost) + 15 (Entities) *** (-2) (IncRecCost value) = 210
Remarks
A Resource must be "owned" by the Entity in a Location or Route in order to execute the IncResCost statement. For more information on the Get statement, which can be used to have Entities "own" Resources, see [Get](Grouping.md# get).
IncResCost is valid in operation and move logic.