cronian.objective_func

Functions

set_model_objective_function(→ pyomo.environ.AbstractModel)

Set the objective function of the sector-coupled co-optimization model.

Module Contents

cronian.objective_func.set_model_objective_function(model: pyomo.environ.AbstractModel, prosumers: dict[str, dict], price_timeseries: pandas.DataFrame) pyomo.environ.AbstractModel

Set the objective function of the sector-coupled co-optimization model.

The objective is to minimize the cost of electricity generation and the consumption costs of other energy carriers e.g., methane, hydrogen, biomass.

Parameters:
  • model – Pyomo AbstractModel to which the objective function is added.

  • prosumers – Dictionary containing all prosumers (excludes explicitly modeled prosumers).

  • price_timeseries – Dataframe containing the prices of energy carriers.

Returns:

Pyomo AbstractModel with objective function added.

Requires model attributes:

  • time

  • gens

  • gen_marginal_cost_quadratic

  • gen_marginal_cost_linear

  • gen_power

  • built_prosumers

  • <prosumer_id>_<asset_name>_<energy_carrier>_consumption

  • <energy_carrier>_price (incl. 'methane')

  • EXHSO_chp_methane_consumption

Creates model attributes:

  • objective_func (Objective): Objective function: minimize sum of generator cost, costs for other carriers by prosumers and EXHSO gas consumption