consumable_resource

class pyrecodes.resource.consumable_resource.ConsumableResource(name: str, parameters: dict, default_relation='Constant')

Bases: ConcreteResource

Class to simulate a resource whose supply decreases when it is consumed.
Both initial and current amounts are reduced by the consumption amount.
The reason is that the initial amount represents the amount that the component provides when

functionality level is 1 and this value is also decreased for a consumable resource.

update_based_on_consumption(consumption: float) None
Concrete Resource is assumed to be non-consumable.
Use ConsumableResource class for consumable resources.