Instruction Manual#
manual contains Instruction to handle input parameters.
from energia import Model, Resource
Accessing Instructions#
m = Model()
m.manual
{'capex': capex,
'opex': opex,
'invcapex': invcapex,
'inventory_cost': inventory_cost,
'price': price}
Instruction Information#
An Instruction directs what Aspect a parameter will be multiplied with to get another.
For example capex is an Operational parameter which has:
capacity as the deciding variable
spend as the dependant variable
a default resource key if needed
m.manual['capex'].__dict__
{'label': 'Capital Expenditure',
'name': 'capex',
'kind': energia.components.operations.operation.Operation,
'deciding': 'capacity',
'depending': 'spend',
'default': 'money',
'model': None,
'latex': 'Capex'}
Creating Your Own Instruction#
Your own Instruction can be added as shown:
m.Instruction(
name='gravity', kind=Resource, deciding='mass', depending='weight', default="g"
)