Allocate a resource to an activity and define its resource demand.
An activity is linked to a resource by requesting a certain portion of that resource. Activity resource costs are then calculated according to the formulas explained in the P2Schedule:get_total_activity_cost function.
The demand for a renewable resource is defined as the use of the resource for each time unit along the activity duration, and hence, resource use can be defined as a resource demand (P2Schedule:set_resource_demand) or as a resource work content (P2Schedule:set_resource_work). The relation between work and demand is equal to work = activity duration x resource demand. Consequently, upon calling this function, the renewable resource work content of the activity is automatically updated as work = activity duration x resource demand.
I/O | Type | Name | Description |
---|---|---|---|
input | integer | ID | activity ID |
input | integer | ID | resource ID |
input | float | demand | resource demand |
Step inside PMKC.