cronian.generators

This builds all generator agents at once.

Unlike build_prosumer function that builds a single prosumer agent at a time. This is because the focus of DEMOSES is on modeling prosumers in detail. Moreover, generator agents here are all modeled with a similar structure and only differ in their parameters.

Functions

add_all_generators(→ pyomo.environ.AbstractModel)

Build and add all generator agents' to the optimization model.

Module Contents

cronian.generators.add_all_generators(model: pyomo.environ.AbstractModel, generator_agents: dict, timeseries_data: pandas.DataFrame) pyomo.environ.AbstractModel

Build and add all generator agents’ to the optimization model.

Parameters:
  • model – Pyomo AbstractModel to which generators are added.

  • generator_agents – Dictionary containing generator agents’ details.

  • timeseries_data – Timeseries data containing the availability factors for VRE generators and EVs doing V2G, demand profiles for prosumers, …

Returns:

Pyomo AbstractModel with generators added.

Requires model attributes:

  • time

Creates model attributes:

  • gens (Set): Set of generators, initialized from generator_agents’s keys

  • gen_marginal_cost_quadratic (Param[gens]): Quadratic costs of generators

  • gen_marginal_cost_linear (Param[gens]): Linear costs of generators

  • gen_available_cap (Expression[gens, time]): Maximum generator capacity

  • gen_power (Var[gens, time]): Dispatched generator power

  • gen_capacity_limit_constraint (Constraint[gens, time]): Constraint limiting gen_power to <= gen_available_cap