actor package

The actor modelling is based on a main actor class defined on the actor module. Then, the actors are divided in two categories: the “operator actors” who operates energy units and the “regulator actors” who unable to create regulation constraints.

Actor module

This modules define the basic Actor object

Few methods are available:

  • add_external_constraint
  • add_external_dynamic_constraint
  • add_objective
class omegalpes.actor.actor.Actor(name, no_warn=True, verbose=True)[source]

Bases: omegalpes.general.optimisation.core.OptObject

Description

Actor class is the basic class to model an actor. The basic actor is defined by its name and description. An actor is then defined by its constraints and objectives.

Attributes

  • description : description as an Actor OptObject
add_actor_constraint(cst_name, exp)[source]

Enable to add an external constraint linked with an actor

Parameters:
  • cst_name – name of the constraint
  • exp – expression of the constraint
add_actor_dynamic_constraint(cst_name, exp_t, t_range='for t in time.I')[source]

Enable to add an external dynamic constraint linked with an actor. A dynamic constraint changes over time

Parameters:
  • cst_name – name of the constraint
  • exp – expression of the constraint depending on the time
  • t_range – expression of time for the constraint
add_objective(obj_name, exp)[source]

Enable to add an objective linked with an actor

Parameters:
  • obj_name – name of the objective
  • exp – expression of the objective
remove_actor_constraints(ext_cst_name_list=None)[source]

Enable to remove an external constraint linked with an actor

Parameters:ext_cst_name_list – list of external constraint that would be removed

Operator_actors module

This module defines the operator_actor and its scope of responsibility

class omegalpes.actor.operator_actors.operator_actors.OperatorActor(name, operated_unit_type_tuple, operated_unit_list=None, operated_node_list=None, verbose=True)[source]

Bases: omegalpes.actor.actor.Actor

Description

OperatorActor class inherits from the the basic class Actor. It enables one to model an actor who operates energy units which is part of its scope of responsibility. An operator actor has objectives and constraints which are linked to the energy units he operates.

Attributes

  • name : name of the actor
  • operated_unit_list: list of the energy units operated by the actor or more precisely in its scope of responsibility

Consumer_actors module

This module describes the Consumer actor

Few objectives and constraints are available.

Objectives :
  • maximize_consumption
  • minimize_consumption
  • minimize_co2_consumption
  • minimize_consumption_costs
Constraints :
  • energy_consumption_minimum
  • energy_consumption_maximum
  • power_consumption_minimum
  • power_consumption_maximum
class omegalpes.actor.operator_actors.consumer_actors.Consumer(name, operated_unit_list, operated_node_list=None, verbose=True)[source]

Bases: omegalpes.actor.operator_actors.operator_actors.OperatorActor

Description

Consumer class inherits from the the class OperatorActor. It enables one to model a consumer actor.
energy_consumption_maximum(max_e_tot, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of energy consumption.

Parameters:
  • max_e_tot – Maximum of the total energy consumption over the study period
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
energy_consumption_minimum(min_e_tot, cst_operated_unit_list=None)[source]

To create the actor constraint of a minimum of energy consumption.

Parameters:
  • min_e_tot – Minimum of the total energy consumption over the study period
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
maximize_consumption(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to maximize the consumption of the consumer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty
  • weight – Weight coefficient for the objective
minimize_co2_consumption(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the co2 emissions due to the consumer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty
  • weight – Weight coefficient for the objective
minimize_consumption(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the consumption of the consumer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty
  • weight – Weight coefficient for the objective
minimize_consumption_cost(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the expenses due to the consumer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty
  • weight – Weight coefficient for the objective
power_consumption_maximum(max_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of power consumption.

Parameters:
  • max_p – Maximum of the power consumption. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
power_consumption_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a minimum of power consumption.

Parameters:
  • min_p – Minimum of the power consumption. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.

Producer_actors module

This module describes the Producer actor

Few objectives and constraints are available.

Objectives :
  • maximize_production
  • minimize_production
  • minimize_time_of_use
  • minimize_co2_emissions
  • minimize_costs
  • minimize_operating_cost
  • minimize_starting_cost
Constraints :
  • energy_production_minimum
  • energy_production_maximum
  • power_production_minimum
  • power_production_maximum
class omegalpes.actor.operator_actors.producer_actors.Producer(name, operated_unit_list, operated_node_list=None, verbose=True)[source]

Bases: omegalpes.actor.operator_actors.operator_actors.OperatorActor

Description

Producer class inherits from the the class OperatorActor. It enables one to model an energy producer actor.
energy_production_maximum(max_e_tot, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of energy production.

Parameters:
  • max_e_tot – Maximum of the total energy production over the period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
energy_production_minimum(min_e_tot, cst_operated_unit_list=None)[source]

To create the actor constraint of a minimum of energy production.

Parameters:
  • min_e_tot – Minimum of the total energy production over the period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
maximize_production(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to maximize the production of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
minimize_co2_emissions(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the co2 emissions of the producer’s units (all or part of them). based on the quantity “co2_emission”

Parameters:
  • obj_operated_unit_list – list of the operated energy units on which the objective will be applied
  • weight – weight of the objective
minimize_costs(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the cost of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – list of the operated energy units on which the objective will be applied
  • weight – weight of the objective
minimize_operating_cost(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the operating costs of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – list of the operated energy units on which the objective will be applied
  • weight – weight of the objective
minimize_production(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the production of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
minimize_starting_cost(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the starting costs of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – list of the operated energy units on which the objective will be applied
  • weight – weight of the objective
minimize_time_of_use(obj_operated_unit_list=None, weight=1)[source]

To create the objective in order to minimize the time of use of the producer’s units (all or part of them).

Parameters:
  • obj_operated_unit_list – List of units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
power_production_maximum(max_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of power production.

Parameters:
  • max_p – Minimum of the power production. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.
power_production_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the constraint of a minimum of power production.

Parameters:
  • min_p – Minimum of the power production. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_operated_unit_list – List of units on which the constraint will be applied. Might be empty.

Consumer_producer_actors module

This module describes the Prosumer (producer and consumer) actor

class omegalpes.actor.operator_actors.consumer_producer_actors.Prosumer(name, operated_consumption_unit_list, operated_production_unit_list, operated_node_list=None, verbose=True)[source]

Bases: omegalpes.actor.operator_actors.consumer_actors.Consumer, omegalpes.actor.operator_actors.producer_actors.Producer

Description

Prosumer class inherits from the the class OperatorActor, Consumer and Producer. It enables one to model an actor which is at the same time an energy producer and consumer
maximize_conso_prod_match(time, obj_operated_consumption_unit_list=None, obj_operated_production_unit_list=None, weight=1)[source]

To create the objective in order to match at each time the consumption with the local production of the prosumer’s units (all or part of them).

Parameters:
  • obj_operated_consumption_unit_list – List of consumption units on which the objective will be applied. Might be empty.
  • obj_operated_production_unit_list – List of production units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
maximize_selfconsumption_rate(time, obj_operated_production_unit_list=None, obj_operated_consumption_unit_list=None, obj_operated_selfconsummed_production_export_list=None, obj_operated_selfconsummed_production_unit_list=None, weight=1)[source]

To create the objective in order to maximize the selfconsumption rate of the prosumer’s units (all or part of them) WHILE maximizing the load matching selfconsummed production is calculated with the export nodes.

Selfconsumption rate = selfconsummed production / total production

Parameters:
  • obj_operated_production_unit_list – List of production units on which the objective will be applied. Might be empty.
  • obj_operated_selfconsummed_production_export_list – List of production exports from nodes on which the objective will be applied. Might be empty.
  • obj_operated_selfconsummed_production_unit_list – List of production units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
maximize_selfproduction_rate(time, obj_operated_consumption_unit_list=None, obj_operated_production_unit_list=None, obj_operated_selfproduced_consumption_export_list=None, obj_operated_selfproduced_consumption_unit_list=None, weight=1)[source]

To create the objective in order to maximize the selfproduction rate of the prosumer’s units (all or part of them) WHILE maximizing the load matching selfproduced consumption may required export nodes

Selfproduction rate = selfproduced consumption / total consumption

Parameters:
  • obj_operated_consumption_unit_list – List of consumption units on which the objective will be applied. Might be empty.
  • obj_operated_selfproduced_consumption_export_list – List of production exports from nodes on which the objective will be applied. Might be empty.
  • obj_operated_selfproduced_consumption_unit_list – List of production units on which the objective will be applied. Might be empty.
  • weight – Weight coefficient for the objective
class omegalpes.actor.operator_actors.consumer_producer_actors.Supplier(name, operated_consumption_unit_list, operated_production_unit_list, verbose=True)[source]

Bases: omegalpes.actor.operator_actors.consumer_actors.Consumer, omegalpes.actor.operator_actors.producer_actors.Producer

Description

Supplier class inherits from the the class OperatorActor, Consumer and Producer. It enables one to model a supplier.

Regulator_actors module

This module defines the operator_actor and its scope of responsibility

One constraint is available :
  • co2_emission_maximum
class omegalpes.actor.regulator_actors.regulator_actors.LocalAuthorities(name)[source]

Bases: omegalpes.actor.regulator_actors.regulator_actors.RegulatorActor

Description

LocalAuthorities class inherits from the basic class RegulatorActor. It focuses on local Authorities constraints
class omegalpes.actor.regulator_actors.regulator_actors.PublicAuthorities(name)[source]

Bases: omegalpes.actor.regulator_actors.regulator_actors.RegulatorActor

Description

PublicAuthorities class inherits from the basic class RegulatorActor. It focuses on local Authorities constraints
class omegalpes.actor.regulator_actors.regulator_actors.RegulatorActor(name, verbose=True)[source]

Bases: omegalpes.actor.actor.Actor

Description

RegulatorActor class inherits from the the basic class Actor. It enables one to model an actor who can add constraints on all energy units of the study case.

Attributes

  • name : name of the actor
co2_emission_maximum(max_co2, time, cst_production_list)[source]

To create the actor constraint of a maximum of CO2 emission.

Parameters:
  • max_co2 – Minimum of the CO2 emission. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_unit_list – List of units on which the constraint will be applied.