-
Notifications
You must be signed in to change notification settings - Fork 3
Condition: Resource
jwvanderbeck edited this page Mar 28, 2015
·
1 revision
Gives the resource a resource consumption. The consumption can be one time only, or ongoing.
conditionType
: Resource
resourceName - string - default=ElectricCharge
initialConsumption - float - default=1
usagePerSecond - float - default=1
initialOnly - bool - default=false
validIfEmpty - bool - default=false
initialConsumption occurs on the first evaluation, then every evaluation after uses the usagePerSecond value. If initialOnly is true then only the initial consumption will occur, and every evaluation thereafter will be valid regardless of resource amounts available.
If validIfEmpty is true, then the condition will evaluate to valid even if the required resource isn't available. This allows you to drain resources when they are available, but not terminate the experiment should they run out.