osier.equations.objective_from_energy#
- osier.equations.objective_from_energy(technology_list, attribute, solved_dispatch_model)[source]#
This function calculates a general objective for a given set of technologies and their corresponding dispatch on a per-unit-energy basis.
The general objective function is
\[\mathcal{X} = \sum_g^G \xi_g \sum_t^T x_{g,t},\]\[x_{g,t} = \text{the energy produced by the g-th technology at time t}\quad \left[MWh\right]\]\[\xi_g = \text{the energy density of the g-th technology}\quad \left[\frac{-}{MWh}\right].\]Warning
User-defined attributes are not validated by
osier. Verify the units are accurate and uniform across all technologies before running a simulation with this function.- Parameters:
technology_list (list of
osier.Technologyobjects) – The list of technologies.solved_dispatch_model (
osier.DispatchModel) – A _solved_ dispatch model (i.e. with model results and objective attributes).attribute (string) – The technology attribute to measure.
- Returns:
objective_value – The objective value for a particular energy mix.
- Return type:
Examples
The simplest way to employ this function is with functools.partial.
>>> import functools >>> from osier import per_unit_capacity >>> objectives_list = [functools.partial(objective_from_energy, attribute='water_use'), ... functools.partial(objective_from_energy, attribute='death_rate')]