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.
add_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.
add_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.
add_power_consumption_by_unit_maximum(max_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of power consumption for each unit.

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.
add_power_consumption_by_unit_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a minimum of power consumption for each unit.

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.
add_power_consumption_total_maximum(max_p, time, cst_operated_unit_list=None)[source]

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

Parameters:
  • max_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.
add_power_consumption_total_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the constraint of a minimum of power consumption considering all the units.

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.
maximize_consumption(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_co2_consumption(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_consumption(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_consumption_cost(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)

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.
add_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.
add_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.
add_power_production_by_unit_maximum(max_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a maximum of power production for each unit.

Parameters:
  • max_p – Maximum 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.
add_power_production_by_unit_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the actor constraint of a minimum of power production for each unit.

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.
add_power_production_total_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.
add_power_production_total_minimum(min_p, time, cst_operated_unit_list=None)[source]

To create the constraint of a minimum of power production considering all the units.

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.
add_temporary_stop(time, start='YYYY-MM-DD HH:MM:SS', end='YYYY-MM-DD HH:MM:SS', period_index=None, cst_production_unit_list=None)[source]

To create the actor constraint giving the possibility to stop the production during a period.

Parameters:
  • start – start of the stop period
  • end – end of the stop period
  • period_index – period index for the stop period, to use instead of start and end
  • cst_production_unit_list – List of units on which the constraint will be applied. Might be empty.
maximize_production(obj_operated_unit_list=None, weight=1, pareto=False)[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, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_costs(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_operating_cost(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_production(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_starting_cost(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
minimize_time_of_use(obj_operated_unit_list=None, weight=1, pareto=False)[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
  • pareto – if True, OMEGAlpes calculates a pareto front based on this objective (two objectives needed)
power_consumption_maximum(max_p, time, cst_operated_unit_list=None)[source]
DEPRECATED: please use

add_power_production_total_maximum or

add_power_production_by_units_maximum instead

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]
DEPRECATED: please use

add_power_production_total_minimum or

add_power_production_by_units_minimum instead

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.

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.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
add_co2_emission_maximum(time, co2_max, cst_production_list)[source]

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

Parameters:
  • co2_max – Maximum 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_production_list – List of production units on which the

constraint will be applied.

add_particles_emission_maximum(time, particle_max, cst_production_list)[source]

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

Parameters:
  • particle_max – Maximum of the particle emission. May be an int, float or a list with the size of the period study
  • time – period of the study
  • cst_production_list – List of production units on which the

constraint will be applied.

class omegalpes.actor.regulator_actors.regulator_actors.StateAuthorities(name)[source]

Bases: omegalpes.actor.regulator_actors.regulator_actors.RegulatorActor

Description

StateAuthorities class inherits from the basic class RegulatorActor. It focuses on local Authorities constraints