get_total_activity_cost

Get the total cost of an activity.

The total baseline cost of an activity is equal to the sum of the activity (fixed and variable) costs and the costs of the renewable and consumable resources allocated to this activity.

Total activity cost 

fixed activity cost (cost is set P2Schedule:set_fixed_cost in function)

variable activity cost * duration (cost is set P2Schedule:set_variable_cost in function)

+

cost/use * renewable resource demand (cost is set P2Resource:set_resource_cost_use in function)

cost/unit * renewable work content (cost is set P2Resource:set_resource_cost_unit in function)

+

cost/use (for consumable resources where the cost is set P2Resource:set_resource_cost_use in function)

+

cost/unit * consumable resource demand * duration (variable consumable resource with units expressed in time units (hours) where the cost is set P2Resource:set_resource_cost_unit in function and the variable use in the P2Schedule:set_consumable_resource_fixed_variable function)

+

of cost/unit * #units (fixed consumable resource with units not expressed in time units where the cost is set P2Resource:set_resource_cost_unit in function and the variable use in the P2Schedule:set_consumable_resource_fixed_variable function))

Parameters: 
I/O Type Name Description
input integer ID activity ID
output float cost total activity cost
Learn More: 

Step inside PMKC.

Example: 
function ()
        io.write('\n')
end
Class: 
P2Schedule