Energy Market

Note

This is the complete exposed API. Not all classes and functions are meant for the End-user, the documentation is a work in progress

Core

Shyft Open Source Energy Market model core

class shyft.energy_market.core.IdBase

Bases: instance

The IdBase class provides common properties of the energy_market objects. This includes, the identifier, name, json type properties, and also the python object handle ‘obj’, as well as custom time-series and any type attributes This class can not be constructed, but serves as base class for most objects.

See also

Model,ModelArea,PowerModule,HydroPowerSystem

__init__()

Raises an exception This class cannot be instantiated from Python

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

get_tsm_object((IdBase)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property id

The unique id of the component

Type:

int

property json

json string with info

Type:

str

property name

The name of the component

Type:

str

property obj

a python object

Type:

object

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

class shyft.energy_market.core.Catchment

Bases: IdBase

Catchment descriptive component, suitable for energy market long-term and/or short term managment. This component usually would contain usable view of the much more details shyft.hydrology region model

__init__((Catchment)arg1) None
__init__( (Catchment)self, (object)id, (object)name, (object)json, (HydroPowerSystem)hps) -> None :

tbd

property hps

returns the hydro power system this Catchment is a part of

Type:

HydroPowerSystem

class shyft.energy_market.core.CatchmentList

Bases: instance

Strongly typed list of catchments

__init__((CatchmentList)arg1) None
__init__( (CatchmentList)arg1, (CatchmentList)clone) -> None :

Create a clone.

append((CatchmentList)arg1, (object)arg2) None
extend((CatchmentList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.Client

Bases: instance

The client-api for the energy_market

__init__((Client)self, (object)host_port, (object)timeout_ms) None :

Creates a python client that can communicate with the corresponding server

close((Client)self) None :

Close the connection. It will automatically reopen if needed.

get_model_infos((Client)self, (IntVector)mids[, (UtcPeriod)created_in=[not-valid-period>]) ModelInfoVector :

returns all or selected model-info objects based on model-identifiers(mids)

Parameters:
  • mids (IntVector) – empty = all, or a list of known exisiting model-identifiers

  • created_in (UtcPeriod) – For which period you are interested in model-infos.

Returns:

model_infos. Strongly typed list of ModelInfo

Return type:

ModelInfoVector

property host_port

Endpoint network address of the remote server.

Type:

str

property is_open

If the connection to the remote server is (still) open.

Type:

bool

read_model((Client)self, (object)mid) Model :

Read and return the model for specified model-identifier (mid)

Parameters:

mid (int) – the model-identifer for the wanted model

Returns:

  1. The resulting model from the server

Return type:

Model

read_models((Client)self, (IntVector)mids) ModelList :

Read and return the model for specified model-identifier (mid)

Parameters:

mids (Int64Vector) – A strongly typed list of ints, the model-identifers for the wanted models

Returns:

  1. The resulting model from the server

Return type:

Model

property reconnect_count

Number of reconnects to the remote server that have been performed.

Type:

int

remove_model((Client)self, (object)mid) int :

Remove the specified model bymodel-identifier (mid)

Parameters:

mid (int) – the model-identifer for the wanted model

Returns:

ec. 0 or error-code?

Return type:

int

store_model((Client)self, (Model)m, (ModelInfo)mi) int :

Store the model to backend, if m.id==0 then a new unique model-info is created and used

Parameters:
  • m (Model) – The model to store

  • mi (ModelInfo) – The model-info to store for the model

Returns:

mid. model-identifier for the stored model and model-info

Return type:

int

property timeout_ms

Timout for remote server operations, in number milliseconds.

Type:

int

update_model_info((Client)self, (object)mid, (ModelInfo)mi) bool :

Update the model-info for specified model-identifier(mid)

Parameters:
  • mid (int) – model-identifer

  • mi (ModelInfo) – The new updated model-info

Returns:

ok. true if success

Return type:

bool

class shyft.energy_market.core.ConnectionRole

Bases: enum

bypass = shyft.energy_market.core._core.ConnectionRole.bypass
flood = shyft.energy_market.core._core.ConnectionRole.flood
input = shyft.energy_market.core._core.ConnectionRole.input
main = shyft.energy_market.core._core.ConnectionRole.main
names = {'bypass': shyft.energy_market.core._core.ConnectionRole.bypass, 'flood': shyft.energy_market.core._core.ConnectionRole.flood, 'input': shyft.energy_market.core._core.ConnectionRole.input, 'main': shyft.energy_market.core._core.ConnectionRole.main}
values = {0: shyft.energy_market.core._core.ConnectionRole.main, 1: shyft.energy_market.core._core.ConnectionRole.bypass, 2: shyft.energy_market.core._core.ConnectionRole.flood, 3: shyft.energy_market.core._core.ConnectionRole.input}
class shyft.energy_market.core.Gate

Bases: IdBase

A gate controls the amount of flow into the waterway by the gate-opening. In the case of tunnels, it’s usually either closed or open. For reservoir flood-routes, the gate should be used to model the volume-flood characteristics. The resulting flow through a waterway is a function of many factors, most imporant:

  • gate opening and gate-characteristics

  • upstream water-level

  • downstrem water-level(in some-cases)

  • waterway properties(might be state dependent)

__init__((Gate)arg1) None
__init__( (Gate)self, (object)id, (object)name, (object)json) -> None :

construct a new gate

property water_route

use waterway

Type:

Waterway

Type:

deprecated

property waterway

ref. to the waterway where this gate controls the flow

Type:

Waterway

class shyft.energy_market.core.GateList

Bases: instance

Strongly typed list of gates

__init__((GateList)arg1) None
__init__( (GateList)arg1, (GateList)clone) -> None :

Create a clone.

append((GateList)arg1, (object)arg2) None
extend((GateList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.HydroComponent

Bases: IdBase

A hydro component keeps the common attributes and relational properties common for all components that can contain water

__init__()

Raises an exception This class cannot be instantiated from Python

disconnect_from((HydroComponent)self, (HydroComponent)other) None :

disconnect from another component

property downstreams

list of hydro-components that are conceptually downstreams

Type:

HydroComponentList

equal_structure((HydroComponent)self, (HydroComponent)other) bool :

Returns true if the other object have the same interconnections to the close neighbors as self. The neighbors are identified by their .id attribute, and they must appear in the same role to be considered equal. E.g. if for a reservoir, a waterway is in role flood for self, and in role bypass for other, they are different connections.

Parameters:

() (other) – the other object, of same type, hydro component, to compare.

Returns:

bool. True if the other have same interconnections as self

property hps

returns the hydro-power-system this component is a part of

Type:

HydroPowerSystem

property upstreams

list of hydro-components that are conceptually upstreams

Type:

HydroComponentList

class shyft.energy_market.core.HydroComponentList

Bases: instance

Strongly typed list of HydroComponents

__init__((HydroComponentList)arg1) None
__init__( (HydroComponentList)arg1, (HydroComponentList)clone) -> None :

Create a clone.

append((HydroComponentList)arg1, (object)arg2) None
extend((HydroComponentList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.HydroConnection

Bases: instance

A hydro connection is the connection object that relate one hydro component to another. A hydro component have zero or more hydro connections, contained in upstream and downstream lists. If you are using the hydro system builder, there will always be a mutual/two way connection. That is, if a reservoir connects downstream to a tunell (in role main), then the tunell will have a upstream connection pointing to the reservoir (as in role input)

__init__()

Raises an exception This class cannot be instantiated from Python

property has_target

true if valid/available target

Type:

bool

property role

role like main,bypass,flood,input

Type:

ConnectionRole

property target

target of the hydro-connection, Reservoir|Unit|Waterway

Type:

HydroComponent

class shyft.energy_market.core.HydroConnectionList

Bases: instance

__init__((HydroConnectionList)arg1) None
append((HydroConnectionList)arg1, (object)arg2) None
extend((HydroConnectionList)arg1, (object)arg2) None
class shyft.energy_market.core.HydroGraphTraversal

Bases: instance

A collection of hydro operations

__init__()

Raises an exception This class cannot be instantiated from Python

static extract_water_courses((HydroPowerSystem)hps) HydroPowerSystemList :

extracts the sub-hydro system from a given hydro system

static get_path_between((HydroComponent)arg1, (HydroComponent)arg2[, (ConnectionRole)arg3]) HydroComponentList :

finds path between two hydro components

static get_path_to_ocean((HydroComponent)arg1[, (ConnectionRole)arg2]) HydroComponentList :

finds path to ocean for a given hydro component

static is_connected((HydroComponent)arg1, (HydroComponent)arg2[, (ConnectionRole)arg3]) bool :

finds whether two hydro components are connected

static path_to_ocean((HydroComponentList)arg1[, (ConnectionRole)arg2]) None :

finds path to ocean for a given hydro component

class shyft.energy_market.core.HydroPowerSystem

Bases: IdBase

__init__((HydroPowerSystem)arg1, (object)name) None :

creates an empty hydro power system with the specified name

__init__( (HydroPowerSystem)arg1, (object)id, (object)name [, (object)json]) -> None :

creates a an empty new hydro power system with specified id and name and json str info

property aggregates

use units

Type:

UnitList

Type:

deprecated

property catchments

all the catchments for the system

Type:

CatchmentList

create_aggregate(uid, name, json='')
create_catchment(uid, name, json='')
create_gate(uid, name, json='')
create_power_plant(uid, name, json='')
create_power_station(uid, name, json='')
create_reservoir(uid, name, json='')
create_river(uid, name, json='')
create_tunnel(uid, name, json='')
create_unit(uid, name, json='')
property created

The time when this system was created(you should specify it when you create it)

Type:

time

equal_content((HydroPowerSystem)self, (HydroPowerSystem)other_hps) bool :

returns true if alle the content of the hps are equal, same as the equal == operator, except that .id, .name .created at the top level is not compared

equal_structure((HydroPowerSystem)self, (HydroPowerSystem)other_hps) bool :

returns true if equal structure of identified objects, using the .id, but not comparing .name, .attributes etc., to the other

find_aggregate_by_id((HydroPowerSystem)self, (object)id) Unit :

deprecated:use find_unit_by_id

find_aggregate_by_name((HydroPowerSystem)self, (object)name) Unit :

deprecated: use find_unit_by_name

find_gate_by_id((HydroPowerSystem)self, (object)id) Gate :

returns object with specified id

find_gate_by_name((HydroPowerSystem)self, (object)name) Gate :

returns object that exactly matches name

find_power_plant_by_id((HydroPowerSystem)self, (object)id) PowerPlant :

returns object with specified id

find_power_plant_by_name((HydroPowerSystem)self, (object)name) PowerPlant :

returns object that exactly matches name

find_power_station_by_id((HydroPowerSystem)self, (object)id) PowerPlant :

deprecated:use find_power_plant_by_id

find_power_station_by_name((HydroPowerSystem)self, (object)name) PowerPlant :

deprecated:use find_power_plant_by_name

find_reservoir_by_id((HydroPowerSystem)self, (object)id) Reservoir :

returns object with specified id

find_reservoir_by_name((HydroPowerSystem)self, (object)name) Reservoir :

returns object that exactly matches name

find_unit_by_id((HydroPowerSystem)self, (object)id) Unit :

returns object with specified id

find_unit_by_name((HydroPowerSystem)self, (object)name) Unit :

returns object that exactly matches name

find_water_route_by_id((HydroPowerSystem)self, (object)id) Waterway :

deprecated:use find_waterway_by_id

find_water_route_by_name((HydroPowerSystem)self, (object)name) Waterway :

deprecated:use find_waterway_by_name

find_waterway_by_id((HydroPowerSystem)self, (object)id) Waterway :

returns object with specified id

find_waterway_by_name((HydroPowerSystem)self, (object)name) Waterway :

returns object that exactly matches name

static from_blob((ByteVector)blob_string) HydroPowerSystem :

constructs a model from a blob_string previously created by the to_blob method

Parameters:

blob_string (string) – blob-formatted representation of the model, as create by the to_blob method

property gates

all the gates of the system

Type:

GateList

property model_area

returns the model area this hydro-power-system is a part of

See also

ModelArea

Type:

ModelArea

property power_plants

all power plants, each with references to its units

Type:

PowerPlantList

property power_stations

use power_plant

Type:

PowerPlantList

Type:

deprecated

property reservoirs

all the reservoirs

Type:

ReservoirList

to_blob()
static to_blob_ref((HydroPowerSystem)me) ByteVector :

serialize the model into an blob

Returns:

blob. blob-serialized version of the model

Return type:

string

See also

from_blob

property units

all the hydropower units in this system

Type:

UnitList

property water_routes

use waterways

Type:

WaterwayList

Type:

deprecated

property waterways

all the waterways(tunells,rivers) of the system

Type:

WaterwayList

class shyft.energy_market.core.HydroPowerSystemBuilder

Bases: instance

class to support building hydro-power-systems save and easy

__init__((HydroPowerSystemBuilder)arg1, (HydroPowerSystem)hydro_power_system) None
create_aggregate((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Unit :

deprecated:use create_unit

create_catchment((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Catchment :

create and add catchmment to the system

create_gate((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Gate :

create and add a gate to the system

create_power_plant((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) PowerPlant :

creates and adds a power plant to the system

create_power_station((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) PowerPlant :

deprecated: use create_power_plant

create_reservoir((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Reservoir :

creates and adds a reservoir to the system

create_river((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Waterway :

create and add river to the system

create_tunnel((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Waterway :

create and add river to the system

create_unit((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Unit :

creates a new unit with the specified parameters

create_water_route((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Waterway :

deprecated:use create_waterway

create_waterway((HydroPowerSystemBuilder)self, (object)id, (object)name, (object)json) Waterway :

create and add river to the system

class shyft.energy_market.core.HydroPowerSystemDict

Bases: instance

A dict of HydroPowerSystem, the key-value is the watercourse-name

__init__((HydroPowerSystemDict)arg1) None
items()
keys()
class shyft.energy_market.core.HydroPowerSystemList

Bases: instance

Strongly typed list of HydroPowerSystems

__init__((HydroPowerSystemList)arg1) None
__init__( (HydroPowerSystemList)arg1, (HydroPowerSystemList)clone) -> None :

Create a clone.

append((HydroPowerSystemList)arg1, (object)arg2) None
extend((HydroPowerSystemList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element names contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element names

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.IntStringDict

Bases: instance

A strongly typed dictionary with key type int and value type string.

__init__((IntStringDict)arg1) None
class shyft.energy_market.core.StringTimeSeriesDict

Bases: instance

A strongly typed dictionary with key type string and value type TimeSeries.

__init__((StringTimeSeriesDict)arg1) None
class shyft.energy_market.core.Model

Bases: IdBase

The Model class describes the LTM (persisted) model A model consists of model_areas and power-lines interconnecting them. To buid a model use the .add_area() and .add_power_line() methods

See also

ModelArea,PowerLine,PowerModule

__init__((Model)arg1) None
__init__( (Model)arg1, (object)id, (object)name [, (object)json]) -> None :

constructs a Model object with the specified parameters

Args:

id (int): a global unique identifier of the mode

name (string): the name of the model

json (string): extra info as json for the model

property area

a dict(area-name,area) for the model-areas

Type:

ModelAreaDict

create_model_area(uid, name, json='')
create_power_line(a, b, uid, name, json='')
create_power_module(area, uid, name, json='')
property created

The timestamp when the model was created, utc seconds 1970

Type:

time

equal_content((Model)self, (Model)other) bool :

Compare this model with other_model for equality, except for the .id, .name,`.created`, attributes of the model it self. This is the same as the equal,==, operation, except that the self model local attributes are not compared. This method can be used to determine that two models have the same content, even if they model.id etc. are different.

Parameters:

other (Model) – The model to compare with

Returns:

equal. true if other have exactly the same content as self(disregarding the model .id,.name,.created,.json attributes)

Return type:

bool

equal_structure((Model)self, (Model)other) bool :

Compare this model with other_model for equality in topology and interconnections. The comparison is using each object`.id` member to identify the same objects. Notice that the attributes of the objects are not considered, only the topology.

Parameters:

other (Model) – The model to compare with

Returns:

equal. true if other_model has structure and objects as self

Return type:

bool

static from_blob((ByteVector)blob) Model :

constructs a model from a blob previously created by the to_blob method

Parameters:

blob (ByteVector) – blob representation of the model, as create by the to_blob method

property power_lines

list of power-lines,each with connection to the areas they interconnect

Type:

PowerLineList

to_blob((Model)arg1) ByteVector :

serialize the model into a blob

Returns:

blob. serialized version of the model

Return type:

ByteVector

See also

from_blob

class shyft.energy_market.core.ModelArea

Bases: IdBase

The ModelArea class describes the EMPS LTM (persisted) model-area A model-area consists of power modules and hydro-power-system. To buid a model-are use the .add_power_module() and the hydro-power-system builder

See also

Model,PowerLine,PowerModule,HydroPowerSystem

__init__((ModelArea)arg1) None
__init__( (ModelArea)arg1, (Model)model, (object)id, (object)name [, (object)json]) -> None :

constructs a ModelArea object with the specified parameters

Args:

model (Model): the model owning the created model-area

id (int): a global unique identifier of the model-area

name (string): the name of the model-area

json (string): extra info as json

create_power_module(uid, name, json='')
property detailed_hydro

detailed hydro description.

See also

HydroPowerSystem

Type:

HydroPowerSystem

equal_structure((ModelArea)self, (ModelArea)other) bool :

Compare this model-area with other_model-area for equality in topology and interconnections. The comparison is using each object`.id` member to identify the same objects. Notice that the attributes of the objects are not considered, only the topology.

Parameters:

other (ModelArea) – The model-area to compare with

Returns:

equal. true if other_model has structure and objects as self

Return type:

bool

property model

the model for the area

Type:

Model

property power_modules

power-modules in this area, a dictionary using power-module unique id

Type:

PowerModuleDict

class shyft.energy_market.core.ModelAreaDict

Bases: instance

A dict of ModelArea, the key-value is the area-name

__init__((ModelAreaDict)arg1) None

__init__( (ModelAreaDict)arg1, (ModelAreaDict)clone_me) -> None

class shyft.energy_market.core.ModelBuilder

Bases: instance

This class helps building an EMPS model, step by step

__init__((ModelBuilder)arg1, (Model)model) None :

Make a model-builder for the model The model can be modified/built using the methods available in this class

Parameters:

model (Model) – the model to be built/modified

create_model_area((ModelBuilder)self, (object)id, (object)name[, (object)json='']) ModelArea :

create and add an area to the model. ensures that area_name, and that area_id is unique.

Parameters:
  • id (int) – unique identifier for the area, must be unique within model

  • name (string) – any valid area-name, must be unique within model

  • json (string) – json for the area

Returns:

area. a reference to the newly added area

Return type:

ModelArea

See also

add_area

create_power_line((ModelBuilder)self, (object)a, (object)b, (object)id, (ModelArea)name[, (ModelArea)json='']) PowerLine :

create and add a power line with capacity_MW between area a and b to the model

Parameters:
  • a (ModelArea) – from existing model-area, that is part of the current model

  • b (ModelArea) – to existing model-area, that is part of the current model

  • id (int) – unique ID of the power-line

  • name (string) – unique name of the power-line

  • json (string) – json for the power-line

Returns:

pl. the newly created power-line, that is now a part of the model

Return type:

PowerLine

create_power_module((ModelBuilder)self, (object)model_area, (object)id, (object)name, (ModelArea)json) PowerModule :

create and add power-module to the area, doing validity checks

Parameters:
  • model_area (ModelArea) – the model-area for which we create a power-module

  • id (string) – encoded power_type/load/wind module id

  • module_name (string) – unique module-name for each area

  • json (string) – json for the pm

Returns:

pm. a reference to the created and added power-module

Return type:

PowerModule

class shyft.energy_market.core.ModelInfo

Bases: instance

Provides model-information useful for selection and filtering

__init__((ModelInfo)arg1) None
__init__( (ModelInfo)self, (object)id, (object)name, (time)created [, (object)json=’’]) -> None :

Constructs ModelInfo with the supplied parameters

Args:

id (int): the unique model id

name (str): any useful name or description

created (time): time of creation

json (str): extra information, preferably a valid json

property created

the time of creation, or last modification of the model

Type:

time

property id

the unique model id, can be used to retrieve the real model

Type:

int

property json

a json formatted string to enable scripting and python to store more information

Type:

str

property name

any useful name or description

Type:

str

class shyft.energy_market.core.ModelInfoVector

Bases: instance

A strongly typed list of ModelInfo

__init__((ModelInfoVector)arg1) None
__init__( (ModelInfoVector)arg1, (ModelInfoVector)clone) -> None :

Create a clone.

append((ModelInfoVector)arg1, (object)arg2) None
extend((ModelInfoVector)arg1, (object)arg2) None
class shyft.energy_market.core.ModelList

Bases: instance

A strongly typed list, vector, of models

__init__((ModelList)arg1) None
append((ModelList)arg1, (object)arg2) None
extend((ModelList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.Point

Bases: instance

Simply a point (x,y)

__init__((Point)arg1) None
__init__( (Point)arg1, (object)x, (object)y) -> None :

construct a point with x and y

__init__( (Point)arg1, (Point)clone) -> None :

Create a clone.

property x

float:

property y

float:

class shyft.energy_market.core.PointList

Bases: instance

A strongly typed list of Point.

__init__((PointList)arg1) None
__init__( (PointList)arg1, (PointList)clone) -> None :

Create a clone.

append((PointList)arg1, (object)arg2) None
extend((PointList)arg1, (object)arg2) None
class shyft.energy_market.core.PowerLine

Bases: IdBase

The PowerLine class describes the LTM (persisted) power-line A power-line represents the transmission capacity between two model-areas. Use the ModelArea.create_power_line(a1,a2,id) to build a power line

See also

Model,ModelArea,PowerModule,HydroPowerSystem

__init__((PowerLine)arg1, (Model)model, (ModelArea)area_1, (ModelArea)area_2, (object)id, (object)name[, (object)json]) None :

constructs a PowerLine object between area 1 and 2 with the specified id

Parameters:
  • model (Model) – the model for the power-line

  • area_1 (ModelArea) – a reference to an existing area in the model

  • area_2 (ModelArea) – a reference to an existing area in the model

  • id (int) – a global unique identifier for the power-line

  • name (string) – a global unique name for the power-line

  • json (string) – extra json for the power-line

property area_1

reference to area-from

Type:

ModelArea

property area_2

reference to area-to

Type:

ModelArea

equal_structure((PowerLine)self, (PowerLine)other) bool :

Compare this power-line with the other for equality in topology and interconnections. The comparison is using each object`.id` member to identify the same objects. Notice that the attributes of the objects are not considered, only the topology.

Parameters:

() (other) – The model-area to compare with

Returns:

equal. true if other has structure equal to self

Return type:

bool

property model

the model for this power-line

Type:

Model

class shyft.energy_market.core.PowerLineList

Bases: instance

A dict of ModelArea, the key-value is the area-name

__init__((PowerLineList)arg1) None

__init__( (PowerLineList)arg1, (PowerLineList)clone_me) -> None

append((PowerLineList)arg1, (object)arg2) None
extend((PowerLineList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element names contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element names

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.PowerModule

Bases: IdBase

The PowerModule class describes the LTM (persisted) power-module A power-module represents an actor that consume/produces power for given price/volume characteristics. The user can influence this characteristics giving specific semantic load_type/power_type and extra data and/or relations to other power-modules within the same area.

See also

Model,ModelArea,PowerLine,HydroPowerSystem

__init__((PowerModule)arg1) None
__init__( (PowerModule)arg1, (ModelArea)area, (object)id, (object)name [, (object)json]) -> None :

constructs a PowerModule with specified mandatory name and module-id

Args:

area (ModelArea): the area for this power-module

id (int): unique pm-id for area

name (string): the name of the power-module

json (string): optional json

property area

the model-area for this power-module

Type:

ModelArea

class shyft.energy_market.core.PowerModuleDict

Bases: instance

A dict of PowerModule, the key-value is the power module id

__init__((PowerModuleDict)arg1) None

__init__( (PowerModuleDict)arg1, (PowerModuleDict)clone_me) -> None

get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.PowerPlant

Bases: IdBase

A hydro power plant is the site/building that contains a number of units. The attributes of the power plant, are typically sum-requirement and/or operations that applies all of the units.

__init__((PowerPlant)arg1) None
__init__( (PowerPlant)self, (object)id, (object)name, (object)json, (HydroPowerSystem)hps) -> None :

tbd

add_aggregate((PowerPlant)self, (Unit)aggregate) None :

deprecated:use add_unit

add_unit((PowerPlant)self, (Unit)unit) None :

add unit to plant

property aggregates

deprecated! use units

Type:

UnitList

property hps

returns the hydro-power-system this component is a part of

Type:

HydroPowerSystem

remove_aggregate((PowerPlant)self, (Unit)aggregate) None :

deprecated:use remove_unit

remove_unit((PowerPlant)self, (Unit)unit) None :

remove unit from plant

property units

associated units

Type:

UnitList

class shyft.energy_market.core.PowerPlantList

Bases: instance

Strongly typed list of PowerPlants

__init__((PowerPlantList)arg1) None
__init__( (PowerPlantList)arg1, (PowerPlantList)clone) -> None :

Create a clone.

append((PowerPlantList)arg1, (object)arg2) None
extend((PowerPlantList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.Reservoir

Bases: HydroComponent

__init__((Reservoir)self, (object)id, (object)name, (object)json, (HydroPowerSystem)hps) None :

tbd

input_from((Reservoir)self, (Waterway)other) Reservoir :

Connect the input of the reservoir to the output of the waterway.

output_to((Reservoir)self, (Waterway)other[, (ConnectionRole)role=shyft.energy_market.core._core.ConnectionRole.main]) Reservoir :

Connect the output of this reservoir to the input of the waterway, and assign the connection role

class shyft.energy_market.core.ReservoirList

Bases: instance

Strongly typed list of reservoirs

__init__((ReservoirList)arg1) None
__init__( (ReservoirList)arg1, (ReservoirList)clone) -> None :

Create a clone.

append((ReservoirList)arg1, (object)arg2) None
extend((ReservoirList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.Run

Bases: instance

Provides a Run concept, goes through states, created->prepinput->running->collect_result->frozen

__init__((Run)arg1) None
__init__( (Run)self, (object)id, (object)name, (time)created [, (object)json=’’ [, (object)mid=0]]) -> None :

create a run

property created

the time of creation, or last modification of the model

property id

the unique model id, can be used to retrieve the real model

property json

a json formatted string to enable scripting and python to store more information

property mid

model id (attached) for this run

property name

any useful name or description

property state

the current observed state for the run, like created, running,finished_run etc

class shyft.energy_market.core.RunClient

Bases: instance

The client-api for the generic run-repository

__init__((RunClient)self, (object)host_port, (object)timeout_ms) None :

Creates a python client that can communicate with the corresponding server

close((RunClient)self) None :

Close the connection. It will automatically reopen if needed.

get_model_infos((RunClient)self, (IntVector)mids[, (UtcPeriod)created_in=[not-valid-period>]) ModelInfoVector :

returns all or selected model-info objects based on model-identifiers(mids)

Parameters:
  • mids (IntVector) – empty = all, or a list of known exisiting model-identifiers

  • created_in (UtcPeriod) – For which period you are interested in model-infos.

Returns:

model_infos. Strongly typed list of ModelInfo

Return type:

ModelInfoVector

property host_port

Endpoint network address of the remote server.

Type:

str

property is_open

If the connection to the remote server is (still) open.

Type:

bool

read_model((RunClient)self, (object)mid) Run :

Read and return the model for specified model-identifier (mid)

Parameters:

mid (int) – the model-identifer for the wanted model

Returns:

  1. The resulting model from the server

Return type:

Model

read_models((RunClient)self, (IntVector)mids) RunVector :

Read and return the model for specified model-identifier (mid)

Parameters:

mids (Int64Vector) – A strongly typed list of ints, the model-identifers for the wanted models

Returns:

  1. The resulting model from the server

Return type:

Model

property reconnect_count

Number of reconnects to the remote server that have been performed.

Type:

int

remove_model((RunClient)self, (object)mid) int :

Remove the specified model bymodel-identifier (mid)

Parameters:

mid (int) – the model-identifer for the wanted model

Returns:

ec. 0 or error-code?

Return type:

int

store_model((RunClient)self, (Run)m, (ModelInfo)mi) int :

Store the model to backend, if m.id==0 then a new unique model-info is created and used

Parameters:
  • m (Model) – The model to store

  • mi (ModelInfo) – The model-info to store for the model

Returns:

mid. model-identifier for the stored model and model-info

Return type:

int

property timeout_ms

Timout for remote server operations, in number milliseconds.

Type:

int

update_model_info((RunClient)self, (object)mid, (ModelInfo)mi) bool :

Update the model-info for specified model-identifier(mid)

Parameters:
  • mid (int) – model-identifer

  • mi (ModelInfo) – The new updated model-info

Returns:

ok. true if success

Return type:

bool

class shyft.energy_market.core.RunServer

Bases: instance

The server-side component for the skeleton generic run repository

__init__((RunServer)self, (object)root_dir) None :

Creates a server object that serves models from root_dir. The root_dir will be create if it does not exsists.

Parameters:

root_dir (str) – Path to the root-directory that keeps/will keep the model-files

get_listening_port((RunServer)self) int :

returns the port number it’s listening at for serving incoming request

get_max_connections((RunServer)self) int :

returns the maximum number of connections to be served concurrently

is_running((RunServer)self) bool :

true if server is listening and running

See also

start_server()

set_listening_ip((RunServer)self, (object)ip) None :

set the listening port for the service

Parameters:

ip (str) – ip or host-name to start listening on

Returns:

nothing.

Return type:

None

set_listening_port((RunServer)self, (object)port_no) None :

set the listening port for the service

Parameters:
  • port_no (int) – a valid and available tcp-ip port number to listen on.

  • 20000 (typically it could be) –

Returns:

nothing.

Return type:

None

set_max_connections((RunServer)self, (object)max_connect) None :

limits simultaneous connections to the server (it’s multithreaded, and uses on thread pr. connect)

Parameters:

max_connect (int) – maximum number of connections before denying more connections

See also

get_max_connections()

start_server((RunServer)self) int :

start server listening in background, and processing messages

See also

set_listening_port(port_no),is_running

Returns:

port_no. the port used for listening operations, either the value as by set_listening_port, or if it was unspecified, a new available port

Return type:

in

stop_server((RunServer)self[, (object)timeout=1000]) None :

stop serving connections, gracefully.

See also

start_server()

class shyft.energy_market.core.RunVector

Bases: instance

A strongly typed list, vector, of Run

__init__((RunVector)arg1) None
append((RunVector)arg1, (object)arg2) None
extend((RunVector)arg1, (object)arg2) None
class shyft.energy_market.core.Server

Bases: instance

The server-side component for the skeleton energy_market model repository

__init__((Server)self, (object)root_dir) None :

Creates a server object that serves models from root_dir. The root_dir will be create if it does not exsists.

Parameters:

root_dir (str) – Path to the root-directory that keeps/will keep the model-files

get_listening_port((Server)self) int :

returns the port number it’s listening at for serving incoming request

get_max_connections((Server)self) int :

returns the maximum number of connections to be served concurrently

is_running((Server)self) bool :

true if server is listening and running

See also

start_server()

set_listening_ip((Server)self, (object)ip) None :

set the listening port for the service

Parameters:

ip (str) – ip or host-name to start listening on

Returns:

nothing.

Return type:

None

set_listening_port((Server)self, (object)port_no) None :

set the listening port for the service

Parameters:
  • port_no (int) – a valid and available tcp-ip port number to listen on.

  • 20000 (typically it could be) –

Returns:

nothing.

Return type:

None

set_max_connections((Server)self, (object)max_connect) None :

limits simultaneous connections to the server (it’s multithreaded, and uses on thread pr. connect)

Parameters:

max_connect (int) – maximum number of connections before denying more connections

See also

get_max_connections()

start_server((Server)self) int :

start server listening in background, and processing messages

See also

set_listening_port(port_no),is_running

Returns:

port_no. the port used for listening operations, either the value as by set_listening_port, or if it was unspecified, a new available port

Return type:

in

stop_server((Server)self[, (object)timeout=1000]) None :

stop serving connections, gracefully.

See also

start_server()

class shyft.energy_market.core.TurbineCapability

Bases: enum

Describes the capabilities of a turbine.

names = {'turbine_backward': shyft.energy_market.core._core.TurbineCapability.turbine_backward, 'turbine_forward': shyft.energy_market.core._core.TurbineCapability.turbine_forward, 'turbine_none': shyft.energy_market.core._core.TurbineCapability.turbine_none, 'turbine_reversible': shyft.energy_market.core._core.TurbineCapability.turbine_reversible}
turbine_backward = shyft.energy_market.core._core.TurbineCapability.turbine_backward
turbine_forward = shyft.energy_market.core._core.TurbineCapability.turbine_forward
turbine_none = shyft.energy_market.core._core.TurbineCapability.turbine_none
turbine_reversible = shyft.energy_market.core._core.TurbineCapability.turbine_reversible
values = {0: shyft.energy_market.core._core.TurbineCapability.turbine_none, 1: shyft.energy_market.core._core.TurbineCapability.turbine_forward, 2: shyft.energy_market.core._core.TurbineCapability.turbine_backward, 3: shyft.energy_market.core._core.TurbineCapability.turbine_reversible}
class shyft.energy_market.core.TurbineDescription

Bases: instance

Complete description of efficiencies a turbine for all operating zones.

Pelton turbines typically have multiple operating zones; one for each needle combination. Other turbines normally have only a single operating zone describing the entire turbine, but may have more than one to model different isolated operating zones. Each operating zone is described with a turbine efficiency object, which in turn may contain multiple efficiency curves; one for each net head.

__init__((TurbineDescription)arg1) None

__init__( (TurbineDescription)arg1, (TurbineOperatingZoneList)operating_zones) -> None

__init__( (TurbineDescription)arg1, (TurbineDescription)clone) -> None :

Create a clone.

capability((TurbineDescription)arg1) TurbineCapability :

Return the capability of the turbine

get_operating_zone((TurbineDescription)arg1, (object)p) TurbineOperatingZone :

Find operating zone for given production value p

Notes

If operating zones are overlapping then the zone with lowest value of production_min will be selected.

property operating_zones

list of TurbineOperatingZone.

Containing a single entry describing the entire turbine, or one entry for each isolated operating zone or Pelton needle combinations.

Type:

TurbineOperatingZoneList

class shyft.energy_market.core.TurbineOperatingZone

Bases: instance

A turbine efficiency.

Defined by a set of efficiency curves, one for each net head, with optional production limits. Part of the turbine description, to describe the efficiency of an entire turbine, or an isolated operating zone or a Pelton needle combination. Production limits are only relevant when representing an isolated operating zone or a Pelton needle combination.

__init__((TurbineOperatingZone)arg1) None

__init__( (TurbineOperatingZone)arg1, (XyPointCurveWithZList)efficiency_curves) -> None

__init__( (TurbineOperatingZone)arg1, (XyPointCurveWithZList)efficiency_curves, (object)production_min, (object)production_max) -> None

__init__( (TurbineOperatingZone)arg1, (XyPointCurveWithZList)efficiency_curves, (object)production_min, (object)production_max, (object)production_nominal, (object)fcr_min, (object)fcr_max) -> None

__init__( (TurbineOperatingZone)arg1, (TurbineOperatingZone)clone) -> None :

Create a clone.

property efficiency_curves

A list of XyPointCurveWithZ efficiency curves for the net head range of the entire turbine, or an isolated operating zone or a Pelton needle combination.

Type:

XyPointCurveWithZList

evaluate((TurbineOperatingZone)arg1, (object)x, (object)z) float :

Evaluate the efficiency curves at a point (x, z)

property fcr_max

The temporary maximum production allowed for this set of efficiency curves when delivering FCR.

Notes

Only relevant when representing an isolated operating zone or a Pelton needle combination.

Type:

float

property fcr_min

The temporary minimum production allowed for this set of efficiency curves when delivering FCR.

Notes

Only relevant when representing an isolated operating zone or a Pelton needle combination.

Type:

float

property production_max

The maximum production for which the efficiency curves are valid.

Notes

Only relevant when representing an isolated operating zone or a Pelton needle combination.

Type:

float

property production_min

The minimum production for which the efficiency curves are valid.

Notes

Only relevant when representing an isolated operating zone or a Pelton needle combination.

Type:

float

property production_nominal

The nominal production, or installed/rated/nameplate capacity, for which the efficiency curves are valid.

Notes

Only relevant when representing an isolated operating zone or a Pelton needle combination.

Type:

float

class shyft.energy_market.core.TurbineOperatingZoneList

Bases: instance

A strongly typed list of TurbineOperatingZone.

__init__((TurbineOperatingZoneList)arg1) None
__init__( (TurbineOperatingZoneList)arg1, (TurbineOperatingZoneList)clone) -> None :

Create a clone.

append((TurbineOperatingZoneList)arg1, (object)arg2) None
extend((TurbineOperatingZoneList)arg1, (object)arg2) None
class shyft.energy_market.core.Unit

Bases: HydroComponent

An Unit consist of a turbine and a connected generator. The turbine is hydrologically connected to upstream tunnel and downstream tunell/river. The generator part is connected to the electrical grid through a busbar. In the long term models, the entire power plant is represented by a virtual unit that represents the total capability of the power-plant.

The short-term detailed models, usually describes every aggratate up to a granularity that is relevant for the short-term optimization/simulation horizont.

A power plant is a collection of one or more units that are natural to group into one power plant.

__init__((Unit)arg1) None
__init__( (Unit)self, (object)id, (object)name, (object)json, (HydroPowerSystem)hps) -> None :

tbd

property downstream

returns downstream waterway(river/tunnel) object(if any)

Type:

Waterway

input_from((Unit)self, (Waterway)other) Unit :

Connect the input of this unit to the output of the waterway.

property is_pump

Returns true if the unit is a pump, otherwise, returns false

Type:

bool

output_to((Unit)self, (Waterway)other) Unit :

Connect the output of this unit to the input of the waterway.

property power_plant

return the hydro power plant associated with this unit

Type:

PowerPlant

property power_station

use power_plant

Type:

PowerPlant

Type:

deprecated

property upstream

returns upstream tunnel(water-route) object(if any)

Type:

Waterway

class shyft.energy_market.core.UnitList

Bases: instance

Strongly typed list of units

__init__((UnitList)arg1) None
__init__( (UnitList)arg1, (UnitList)clone) -> None :

Create a clone.

append((UnitList)arg1, (object)arg2) None
extend((UnitList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.Waterway

Bases: HydroComponent

The waterway can be a river or a tunnel, and connects the reservoirs, units(turbine).

__init__((Waterway)arg1) None
__init__( (Waterway)self, (object)id, (object)name, (object)json, (HydroPowerSystem)hps) -> None :

tbd

add_gate((Waterway)self, (Gate)gate) None :

add a gate to the waterway

property downstream

returns downstream object(if any)

Type:

HydroComponent

property gates

the gates attached to the inlet of the waterway

Type:

GateList

input_from((Waterway)self, (Waterway)other) Waterway :

Connect the input of this waterway to the output of the other waterway.

input_from( (Waterway)self, (Unit)other) -> Waterway :

Connect the input of this waterway to the output of the unit.

input_from( (Waterway)reservoir, (Reservoir)other [, (ConnectionRole)role=shyft.energy_market.core._core.ConnectionRole.main]) -> Waterway :

Connect the input of this waterway to the output of the reservoir, and assign the connection role.

output_to((Waterway)self, (Waterway)other) Waterway :

Connect the output of this waterway to the input of the other waterway.

output_to( (Waterway)self, (Reservoir)other) -> Waterway :

Connect the output of this waterway to the input of the reservoir.

output_to( (Waterway)self, (Unit)other) -> Waterway :

Connect the output of this waterway to the input of the unit.

remove_gate((Waterway)self, (Gate)gate) None :

remove a gate from the waterway

property upstream

returns upstream object(if any)

Type:

HydroComponent

property upstream_role

the role the water way has relative to the component above

class shyft.energy_market.core.WaterwayList

Bases: instance

Strongly typed list of waterways

__init__((WaterwayList)arg1) None
__init__( (WaterwayList)arg1, (WaterwayList)clone) -> None :

Create a clone.

append((WaterwayList)arg1, (object)arg2) None
extend((WaterwayList)arg1, (object)arg2) None
get_item_old()

__getitem__( (object)arg1, (object)arg2) -> object

items() Generator

Creates a generator of elements contained in self (a C++ std::vector). Solely implemented to imitate the items() method of a python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements and the corresponding element ids

keys() Generator

Creates a generator for the element ids contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the keys() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of element ids

values() Generator

Creates a generator for the elements contained in self, which is a C++ std::vector object. The purpose of this method is to imitate the values() method of a Python dictionary. :param self: A C++ std::vector object :return: A generator containing a tuple of elements

class shyft.energy_market.core.XyPointCurve

Bases: instance

A curve described using points, piecewise linear.

__init__((XyPointCurve)arg1) None

__init__( (XyPointCurve)arg1, (PointList)points) -> None

__init__( (object)arg1, (DoubleVector)x_vector, (DoubleVector)y_vector) -> object

__init__( (XyPointCurve)arg1, (XyPointCurve)clone) -> None :

Create a clone.

calculate_x((XyPointCurve)self, (object)x) float :

interpolating and extending

calculate_x( (XyPointCurve)self, (TimeSeries)x [, (interpolation_scheme)method=’linear’]) -> TimeSeries :

interpolating and extending

calculate_y((XyPointCurve)self, (object)x) float :

interpolating and extending

calculate_y( (XyPointCurve)self, (TimeSeries)x [, (interpolation_scheme)method=’linear’]) -> TimeSeries :

interpolating and extending

is_convex((XyPointCurve)arg1) bool :

true if y=f(x) is convex

is_mono_increasing((XyPointCurve)arg1) bool :

true if y=f(x) is monotone and increasing

property points

describing the curve

Type:

PointList

x_max((XyPointCurve)arg1) float :

returns largest value of x

x_min((XyPointCurve)arg1) float :

returns smallest value of x

y_max((XyPointCurve)arg1) float :

returns largest value of y

y_min((XyPointCurve)arg1) float :

returns smallest value of y

class shyft.energy_market.core.XyPointCurveList

Bases: instance

A strongly typed list of XyPointCurve.

__init__((XyPointCurveList)arg1) None
__init__( (XyPointCurveList)arg1, (XyPointCurveList)clone) -> None :

Create a clone.

append((XyPointCurveList)arg1, (object)arg2) None
extend((XyPointCurveList)arg1, (object)arg2) None
class shyft.energy_market.core.XyPointCurveWithZ

Bases: instance

A XyPointCurve with a reference value z.

__init__((XyPointCurveWithZ)arg1) None

__init__( (XyPointCurveWithZ)arg1, (XyPointCurve)xy_point_curve, (object)z) -> None

__init__( (XyPointCurveWithZ)arg1, (XyPointCurveWithZ)clone) -> None :

Create a clone.

property xy_point_curve

describes the function at z

Type:

XyPointCurve

property z

z value

Type:

float

class shyft.energy_market.core.XyPointCurveWithZList

Bases: instance

A strongly typed list of XyPointCurveWithZ.

__init__((XyPointCurveWithZList)arg1) None
__init__( (XyPointCurveWithZList)arg1, (XyPointCurveWithZList)clone) -> None :

Create a clone.

append((XyPointCurveWithZList)arg1, (object)arg2) None
evaluate((XyPointCurveWithZList)arg1, (object)x, (object)z) float :

Evaluate the curve at the point (x, z)

extend((XyPointCurveWithZList)arg1, (object)arg2) None
x_max((XyPointCurveWithZList)arg1) float :

returns largest value of x

x_min((XyPointCurveWithZList)arg1) float :

returns smallest value of x

y_max((XyPointCurveWithZList)arg1) float :

returns largest value of y

y_min((XyPointCurveWithZList)arg1) float :

returns smallest value of y

z_max((XyPointCurveWithZList)arg1) float :

returns largest value of z

z_min((XyPointCurveWithZList)arg1) float :

returns smallest value of z

class shyft.energy_market.core.XyzPointCurve

Bases: instance

A 3D curve consisting of one or more 2D curves parametrised over a third variable.

__init__((XyzPointCurve)arg1) None
__init__( (XyzPointCurve)arg1, (XyPointCurveWithZList)curves) -> None :

Create from a list.

property curves

list the contained curves with z values

Type:

XyPointCurveWithZList

evaluate((XyzPointCurve)arg1, (object)x, (object)z) float :

Evaluate the curve at the point (x, z)

get_curve((XyzPointCurve)arg1, (object)z) XyPointCurve :

get the curve assigned to the value

gradient((XyzPointCurve)arg1, (object)arg2, (object)arg3) object
set_curve((XyzPointCurve)arg1, (object)z, (XyPointCurve)xy) None :

Assign an XyzPointCurve to a z-value

shyft.energy_market.core.compressed_size((DoubleVector)double_vector, (object)accuracy) int

compressed_size( (object)float_vector, (float)accuracy) -> int

shyft.energy_market.core.points_from_x_y((DoubleVector)x, (DoubleVector)y) PointList
class shyft.energy_market.core.run_state

Bases: enum

Describes the possible state of the run

R_CREATED = shyft.energy_market.core._core.run_state.R_CREATED
R_FAILED = shyft.energy_market.core._core.run_state.R_FAILED
R_FINISHED_RUN = shyft.energy_market.core._core.run_state.R_FINISHED_RUN
R_FROZEN = shyft.energy_market.core._core.run_state.R_FROZEN
R_PREP_INPUT = shyft.energy_market.core._core.run_state.R_PREP_INPUT
R_READ_RESULT = shyft.energy_market.core._core.run_state.R_READ_RESULT
R_RUNNING = shyft.energy_market.core._core.run_state.R_RUNNING
names = {'R_CREATED': shyft.energy_market.core._core.run_state.R_CREATED, 'R_FAILED': shyft.energy_market.core._core.run_state.R_FAILED, 'R_FINISHED_RUN': shyft.energy_market.core._core.run_state.R_FINISHED_RUN, 'R_FROZEN': shyft.energy_market.core._core.run_state.R_FROZEN, 'R_PREP_INPUT': shyft.energy_market.core._core.run_state.R_PREP_INPUT, 'R_READ_RESULT': shyft.energy_market.core._core.run_state.R_READ_RESULT, 'R_RUNNING': shyft.energy_market.core._core.run_state.R_RUNNING}
values = {0: shyft.energy_market.core._core.run_state.R_CREATED, 1: shyft.energy_market.core._core.run_state.R_PREP_INPUT, 2: shyft.energy_market.core._core.run_state.R_RUNNING, 3: shyft.energy_market.core._core.run_state.R_FINISHED_RUN, 4: shyft.energy_market.core._core.run_state.R_READ_RESULT, 5: shyft.energy_market.core._core.run_state.R_FROZEN, 6: shyft.energy_market.core._core.run_state.R_FAILED}
shyft.energy_market.core.downstream_reservoirs((HydroComponent)component[, (object)max_dist=0]) ReservoirList :

Find all reservoirs upstream from component, stopping at max_dist traversals

Parameters:

max_dist (int) – max traversals

Returns:

reservoirs. The reservoirs within the specified distance

Return type:

ReservoirList

shyft.energy_market.core.downstream_units((HydroComponent)component[, (object)max_dist=0]) UnitList :

Find all units downstream from component, stopping at max_dist traversals

Parameters:

max_dist (int) – max traversals

Returns:

units. The units within the specified distance

Return type:

UnitList

shyft.energy_market.core.upstream_reservoirs((HydroComponent)component[, (object)max_dist=0]) ReservoirList :

Find all reservoirs upstream from component, stopping at max_dist traversals.

Parameters:

max_dist (int) – max traversals

Returns:

reservoirs. The reservoirs within the specified distance

Return type:

ReservoirList

shyft.energy_market.core.upstream_units((HydroComponent)component[, (object)max_dist=0]) UnitList :

Find units upstream from component, stopping at max_dist traversals

Parameters:

max_dist (int) – max traversals

Returns:

units. The units within the specified distance

Return type:

UnitList

shyft.energy_market.core.has_forward_capability((TurbineCapability)arg1) bool :

Checks if a turbine can support generating

shyft.energy_market.core.has_backward_capability((TurbineCapability)arg1) bool :

Checks if a turbine can support pumping

shyft.energy_market.core.has_reversible_capability((TurbineCapability)arg1) bool :

Checks if a turbine can support both generating and pumping

STM

The detailed energy market model contains all essential energy market objects, entities, that Shyft manages.

For example, power plants with units, unit-groups, reservoirs, waterways, market areas, power-modules, contracts, contract portfolios, network with transmission lines and bus-bars for electrical connections between the elements.

The module also provides ready made services, with clients and api’s, in python, as well as web/socket protocols for setting up a complete application system covering the energy management process tasks.

The design and architecture of the system utilizes the energy market models, combined with the DTSS, the distributed time-series services, and provides a model-driven approach with time-series expressions derived from the model, so that it scales and maintains well.

The Task Services also support the workflow that are operating on StmSystem, to be efficiently orchestrated, including running optimization tasks with Sintef SHOP engine. Generic python callback allows extensions to arbitrary tasks that can be performed using python.

The UI Services and classes completes the Task Services with a a framework for model and data-driven front end., that fits the task-workflow, showing relevant data/information at the workflow process. E.g: if you are planning a power plant, you can configure the Task and UI service to provide a suitable view, e.g. chart/tables with data-bindings, that works with the backend services, in real time.

The test-suites of Shyft for the energy-market includes ready made examples that includes starting up the services, adding energy-market models, running SHOP optimization and getting results back for testing/regressions.

E.g: https://gitlab.com/shyft-os/shyft/-/blob/master/python/test_suites/energy_market/stm/shop/test_dstm_with_shop.py#L114

Shyft Energy Market detailed model

class shyft.energy_market.stm.HydroPowerSystem

Bases: HydroPowerSystem

A hydro power system, with indataset.

The hydro power system consists of reservoirs, waterway (river/tunnel) and units. In addition, the power plant has the role of keeping related units together into a group that resembles what most people would think is a power plant in this context. The power plant has just references to the units (generator/turbine parts), but can keep sum-requirements/schedules and computations valid at power plant level.

__init__((HydroPowerSystem)arg1, (object)uid, (object)name) None :

Create hydro power system with unique uid.

create_aggregate()
create_unit( (HydroPowerSystem)self, (object)uid, (object)name [, (object)json=’’]) -> Unit :

Create stm unit.

Returns:

Unit: unit. The new unit.

create_gate((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Gate :

Create stm gate.

Returns:

gate. The new gate.

Return type:

Gate

create_power_plant((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) PowerPlant :

Create stm power plant that keeps units.

Returns:

power_plant. The new PowerPlant.

Return type:

PowerPlant

create_power_station()
create_power_plant( (HydroPowerSystem)self, (object)uid, (object)name [, (object)json=’’]) -> PowerPlant :

Create stm power plant that keeps units.

Returns:

PowerPlant: power_plant. The new PowerPlant.

create_reservoir((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Reservoir :

Create stm reservoir with unique uid.

Returns:

reservoir. The new reservoir.

Return type:

Reservoir

create_reservoir_aggregate((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) ReservoirAggregate :

Create stm reservoir aggregate with unique uid.

Returns:

reservoir_aggregate. The new ReservoirAggregate.

Return type:

ReservoirAggregate

create_river((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Waterway :

Create stm waterway (a tunnel or river).

Returns:

waterway. The new waterway.

Return type:

Waterway

create_tunnel((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Waterway :

Create stm waterway (a tunnel or river).

Returns:

waterway. The new waterway.

Return type:

Waterway

create_unit((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Unit :

Create stm unit.

Returns:

unit. The new unit.

Return type:

Unit

create_water_route()
create_waterway( (HydroPowerSystem)self, (object)uid, (object)name [, (object)json=’’]) -> Waterway :

Create stm waterway (a tunnel or river).

Returns:

Waterway: waterway. The new waterway.

create_waterway((HydroPowerSystem)self, (object)uid, (object)name[, (object)json='']) Waterway :

Create stm waterway (a tunnel or river).

Returns:

waterway. The new waterway.

Return type:

Waterway

find_catchment_by_id((HydroPowerSystem)arg1, (object)arg2) object
find_catchment_by_name((HydroPowerSystem)arg1, (object)arg2) object
find_gate_by_id((HydroPowerSystem)arg1, (object)arg2) Gate
find_gate_by_name((HydroPowerSystem)arg1, (object)arg2) Gate
find_power_plant_by_id((HydroPowerSystem)arg1, (object)arg2) PowerPlant
find_power_plant_by_name((HydroPowerSystem)arg1, (object)arg2) PowerPlant
find_reservoir_aggregate_by_id((HydroPowerSystem)arg1, (object)arg2) ReservoirAggregate
find_reservoir_aggregate_by_name((HydroPowerSystem)arg1, (object)arg2) ReservoirAggregate
find_reservoir_by_id((HydroPowerSystem)arg1, (object)arg2) Reservoir
find_reservoir_by_name((HydroPowerSystem)arg1, (object)arg2) Reservoir
find_unit_by_id((HydroPowerSystem)arg1, (object)arg2) Unit
find_unit_by_name((HydroPowerSystem)arg1, (object)arg2) Unit
find_waterway_by_id((HydroPowerSystem)arg1, (object)arg2) Waterway
find_waterway_by_name((HydroPowerSystem)arg1, (object)arg2) Waterway
static from_blob((ByteVector)blob) HydroPowerSystem :

Re-create a stm hps from a previously created blob.

Parameters:

blob (ByteVector) – The blob containing a previously stored hps.

Returns:

hps. A stm hydro-power-system including it’s attributes in the ids.

Return type:

HydroPowerSystem

static from_stripped_blob((ByteVector)blob) HydroPowerSystem :

Re-create a stm hps from a previously created stripped blob.

Parameters:

blob (ByteVector) – The blob containing a previously stripped stored hps.

Returns:

hps. A stripped stm hydro-power-system.

Return type:

HydroPowerSystem

property reservoir_aggregates

all the reservoir aggregates

Type:

ReservoirAggregateList

property system

The owning/parent system that keeps this hydro power system.

Type:

StmSystem

to_blob((HydroPowerSystem)self) ByteVector :

Serialize the model to a blob.

Returns:

blob. Blob form of the model.

Return type:

ByteVector

to_stripped_blob((HydroPowerSystem)self) ByteVector :

Serialize the model to a blob, stripping expressions, custom attributes and json.

Returns:

blob. Blob form of the stripped model.

Return type:

ByteVector

class shyft.energy_market.stm.HydroPowerSystemList

Bases: instance

A strongly typed list of HydroPowerSystem.

__init__((HydroPowerSystemList)arg1) None
__init__( (HydroPowerSystemList)arg1, (HydroPowerSystemList)clone) -> None :

Create a clone.

append((HydroPowerSystemList)arg1, (object)arg2) None
extend((HydroPowerSystemList)arg1, (object)arg2) None
class shyft.energy_market.stm.StmSystem

Bases: instance

A complete stm system, with market areas, and hydro power systems.

__init__((StmSystem)arg1, (object)uid, (object)name, (object)json) None :

Create stm system.

add_unit_group((StmSystem)self, (object)id, (object)name, (object)json[, (UnitGroupType)group_type=shyft.energy_market.stm._stm.UnitGroupType.UNSPECIFIED]) UnitGroup :

Add an empty named unit-group to the system.

Parameters:
  • id (int) – Unique id of the group.

  • name (str) – Unique name of the group.

  • json (str) – Json payload for py customization.

  • group_type (int) – One of UnitGroupType values, default 0.

Returns:

unit_group. The newly created unit-group.

Return type:

UnitGroup

property contract_portfolios

List of contract portfolios.

Type:

ContractPortfolioList

property contracts

List of contracts.

Type:

ContractList

create_hydro_power_system((StmSystem)self, (object)uid, (object)name[, (object)json='']) HydroPowerSystem :

Create hydro power system with unique uid.

Returns:

hps. The new hydro power system.

Return type:

HydroPowerSystem

create_market_area((StmSystem)self, (object)uid, (object)name[, (object)json='']) MarketArea :

Create stm energy market area with unique uid.

Returns:

market_area. The new market area.

Return type:

MarketArea

create_network((StmSystem)self, (object)uid, (object)name[, (object)json='']) Network :

Create stm network with unique uid.

Returns:

network. The new network.

Return type:

Network

create_power_module((StmSystem)self, (object)uid, (object)name[, (object)json='']) PowerModule :

Create stm power module with unique uid.

Returns:

power_module. The new power module.

Return type:

PowerModule

create_wind_farm((StmSystem)self, (object)uid, (object)name[, (object)json='']) WindFarm :

Create stm network with unique uid.

Returns:

wind_farm. The new wind farm.

Return type:

WindFarm

Ensure all members(hps,contracts etc.) refers to this system to enable easy py navigation. Usually only needed in cases where the stm-system is built without proper system refrences for child objects. side-effects: Missing uplinks are fixed.

Returns:

result. True if anything was changed in uplinks

static from_blob((ByteVector)blob) StmSystem :

Re-create a stm system from a previously create blob.

Returns:

stm_sys. A stm system including hydro-power-systems and markets.

Return type:

StmSystem

static from_stripped_blob((ByteVector)blob) StmSystem :

Re-create a stm system from a previously created stripped blob.

Returns:

stm_sys. A stripped stm system including hydro-power-systems and markets.

Return type:

StmSystem

property hydro_power_systems

List of hydro power systems.

Type:

HydroPowerSystemList

property id

Unique id for this object.

Type:

int

property json

Json keeping any extra data for this object.

Type:

str

property market_areas

List of market areas.

Type:

MarketAreaList

property name

Name for this object.

Type:

str

property networks

List of networks.

Type:

NetworkList

patch((StmSystem)self, (StmPatchOperation)op, (StmSystem)p) bool :

Patch self with patch p using operation op. If operation is ADD, the new objects in p that have id==0, will have auto assigned unique id`s For the value of the auto assigned `id is max(obj.id)+1, in the order of appearance. side-effects: The patch p is updated with these new object id values.

Parameters:
  • () (p) – Operation is one of ADD,REMOVE_RELATIONS,REMOVE_OBJECTS

  • () – The StmSystem describing the patch

Returns:

result. True if patch operation and type was applied, false if not supported operation

property power_modules

List of power modules.

Type:

PowerModuleList

result_ts_urls((StmSystem)self, (object)prefix) StringVector :

Generate and return all result time series urls for the specified model. Useful in the context of a dstm client, that have a get_ts method that accepts this list.

Parameters:

() (prefix) – Url prefix, like dstm://Mmodel_id.

Returns:

ts_urls. A strongly typed list of strings with ready to use ts-urls.

Return type:

StringVector

property run_parameters

Run parameters.

Type:

RunParameters

property summary

Key result values from simulations.

Type:

_OptimizationSummary

to_blob((StmSystem)self) ByteVector :

Serialize the model to a blob.

Returns:

blob. Blob form of the model.

Return type:

ByteVector

to_stripped_blob((StmSystem)self) ByteVector :

Serialize the model to a blob, stripping away expressions, json and custom attributes.

Returns:

blob. Blob form of the stripped model.

Return type:

ByteVector

property unit_groups

Unit groups with constraints. These groups holds a list of units, plus the constraints that apply to them. During optimisation, the groups along with their constraints, so that the optimization can take it into account when finding the optimal solution.

Type:

UnitGroupList

property wind_farms

List of wind parks.

Type:

WindFarmList

class shyft.energy_market.stm.StmSystemList

Bases: instance

Strongly typed list of StmSystem

__init__((StmSystemList)arg1) None
__init__( (StmSystemList)arg1, (StmSystemList)clone) -> None :

Create a clone.

append((StmSystemList)arg1, (object)arg2) None
extend((StmSystemList)arg1, (object)arg2) None
class shyft.energy_market.stm.StmPatchOperation

Bases: enum

Describes how a patch should be applied to the STM model

ADD = shyft.energy_market.stm._stm.StmPatchOperation.ADD
REMOVE_OBJECTS = shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_OBJECTS
REMOVE_RELATIONS = shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_RELATIONS
names = {'ADD': shyft.energy_market.stm._stm.StmPatchOperation.ADD, 'REMOVE_OBJECTS': shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_OBJECTS, 'REMOVE_RELATIONS': shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_RELATIONS}
values = {0: shyft.energy_market.stm._stm.StmPatchOperation.ADD, 1: shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_RELATIONS, 2: shyft.energy_market.stm._stm.StmPatchOperation.REMOVE_OBJECTS}
class shyft.energy_market.stm.MarketArea

Bases: IdBase

A market area, with load/price and other properties.

Within the market area, there are zero or more energy- producing/consuming units.

class Offering

Bases: instance

describes actors (supply/demand) offering into the market

__init__()

Raises an exception This class cannot be instantiated from Python

property bids

time dep x,y, x=price[Money/J],y=amount[W]

Type:

_t_xy_

property price

Given the usage, the effective price based on bids

Type:

TsTriplet

property usage

The amount consumed/used of the offering

Type:

TsTriplet

class TsTriplet

Bases: instance

describes .realised, .schedule and .result time-series

__init__()

Raises an exception This class cannot be instantiated from Python

property realised

SI-units, realised time-series, as in historical fact

Type:

_ts

property result

SI-units, result, as provided by optimisation

Type:

_ts

property schedule

SI-units, schedule, as in current schedule

Type:

_ts

class TsTripletResult

Bases: instance

describes .realised, .schedule and .result time-series

__init__()

Raises an exception This class cannot be instantiated from Python

property realised

SI-units, realised time-series, as in historical fact

Type:

_ts

property result

SI-units, result, as provided by optimisation

Type:

_ts

property schedule

SI-units, schedule, as in current schedule

Type:

_ts

__init__((MarketArea)arg1, (object)uid, (object)name, (object)json, (StmSystem)stm_sys) None :

Create market area for a stm system.

property busbars

List of busbars.

Type:

BusbarList

property buy

[W] Buy result.

Type:

_ts

property contracts

List of contracts.

Type:

ContractList

create_busbar_derived_unit_group((MarketArea)self, (object)id, (object)name, (object)json) UnitGroup :

Add a unit-group of type ‘production’ to the system and to the market area. The unit group will derive its units from the associated network busbars. Units are automatically added/removed if busbars are added/removed on the network.

Parameters:
  • id (int) – Unique id of the group.

  • name (str) – Unique name of the group.

  • json (str) – Json payload for py customization.

Returns:

unit_group. The newly created unit-group.

Return type:

UnitGroup

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

property demand

The demand side describing the buyers of energy

Type:

Offering

flattened_attributes((MarketArea)arg1) dict :

Flat dict containing all component attributes.

get_consumption((MarketArea)self) TsTripletResult :

Get the sum of consumption contribution for all busbars

Args: :returns: consumption. Consumption contribution sum, as triplet: result,realised,schedule :rtype: TsTripletResult

get_export((MarketArea)self) TsTripletResult :

Get the total export of the market area. (converted to positive value) If the actual sum of busbar flow is positive, export is 0.

Args: :returns: export. Market area export, as triplet: result,realised,schedule :rtype: TsTripletResult

get_import((MarketArea)self) TsTripletResult :

Get the total import of the market area. If the actual sum of busbar flow is negative, import is 0.

Args: :returns: import. Market area import, as triplet: result,realised,schedule :rtype: TsTripletResult

get_production((MarketArea)self) TsTripletResult :

Get the sum of production contribution for all busbars

Args: :returns: production. Production contribution sum, as triplet: result,realised,schedule :rtype: TsTripletResult

get_tsm_object((MarketArea)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property load

[W] Load.

Type:

_ts

property max_buy

[W] Maximum buy.

Type:

_ts

property max_sale

[W] Maximum sale.

Type:

_ts

property price

[Money/J] Price.

Type:

_ts

property production

[W] Production result.

Type:

_ts

remove_unit_group((MarketArea)self) UnitGroup :

Remove the unit group associated with this market if available.

Args: :returns: unit_group. The newly removed unit group. :rtype: UnitGroup

property reserve_obligation_penalty

[Money/x] Obligation penalty.

Type:

_ts

property sale

[W] Sale result.

Type:

_ts

property supply

The supply side describing the producers of energy

Type:

Offering

property system

The owning/parent system that keeps this area.

Type:

StmSystem

property tag

Url tag.

Type:

str

transmission_lines_from((MarketArea)self, (MarketArea)from_market) TransmissionLineList :

Remove the unit group associated with this market if available.

Parameters:

from (MarketArea) – MarketArea to get transmission lines from

Returns:

transmission_line_list. List of transmission lines from MarketArea

Return type:

TransmissionLineList

transmission_lines_to((MarketArea)self, (MarketArea)to_market) TransmissionLineList :

Get transmission lines (from this) to MarketArea

Parameters:

to (MarketArea) – MarketArea to get transmission lines to

Returns:

transmission_line_list. List of transmission lines to MarketArea

Return type:

TransmissionLineList

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

property unit_group

Getter and setter for unit group.

Type:

UnitGroup

class shyft.energy_market.stm.ModelState

Bases: enum

Describes the possible state of the STM model

FAILED = shyft.energy_market.stm._stm.ModelState.FAILED
FINISHED = shyft.energy_market.stm._stm.ModelState.FINISHED
IDLE = shyft.energy_market.stm._stm.ModelState.IDLE
RUNNING = shyft.energy_market.stm._stm.ModelState.RUNNING
TUNING = shyft.energy_market.stm._stm.ModelState.TUNING
names = {'FAILED': shyft.energy_market.stm._stm.ModelState.FAILED, 'FINISHED': shyft.energy_market.stm._stm.ModelState.FINISHED, 'IDLE': shyft.energy_market.stm._stm.ModelState.IDLE, 'RUNNING': shyft.energy_market.stm._stm.ModelState.RUNNING, 'TUNING': shyft.energy_market.stm._stm.ModelState.TUNING}
values = {0: shyft.energy_market.stm._stm.ModelState.IDLE, 1: shyft.energy_market.stm._stm.ModelState.RUNNING, 2: shyft.energy_market.stm._stm.ModelState.TUNING, 3: shyft.energy_market.stm._stm.ModelState.FINISHED, 4: shyft.energy_market.stm._stm.ModelState.FAILED}
class shyft.energy_market.stm.Unit

Bases: Unit

Stm unit (turbine and generator assembly).

class BestProfit

Bases: instance

Describes the best profit (BP) curves of the unit.

__init__()

Raises an exception This class cannot be instantiated from Python

property discharge

Optimal discharge for the generator given a certain production level of the plant.

Type:

_t_xy_

property discharge_production_ratio

Ratio between discharge and production for the generator given a certain production level of the plant.

Type:

_t_xy_

property operating_zone

Optimal operating zone or Pelton needle combination for the generator given a certain production level of the plant.

Type:

_t_xy_

property production

Optimal production for the unit given a certain production level of the plant.

Type:

_t_xy_

class Cost

Bases: instance

Unit.Cost contains the start/stop costs.

__init__()

Raises an exception This class cannot be instantiated from Python

property pump_start

[money] Start pump cost.

Type:

_ts

property pump_stop

[money] Stop pump cost.

Type:

_ts

property start

[money] Start cost.

Type:

_ts

property stop

[money] Stop cost.

Type:

_ts

class Discharge

Bases: instance

Unit.Discharge attributes, flow[m3/s].

class Constraint

Bases: instance

Constraints and limitations to the unit-flow.

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[m3/s] Discharge constraint maximum.

Type:

_ts

property max_from_downstream_level

Discharge maximum, as a function of downstream pressure/water level.

Type:

_t_xy_

property min

[m3/s] Discharge constraint minimum.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Constraint group.

Type:

Constraint

property realised

[m^3/s] Discharge realised, usually the result of non trivial computation based on the measured unit.production.realised.

Type:

_ts

property result

[m^3/s] Discharge result.

Type:

_ts

property schedule

[m^3/s] Discharge schedule.

Type:

_ts

class Production

Bases: instance

Unit.Production attributes, effect[W].

class Constraint

Bases: instance

Contains the effect constraints to the unit.

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[W] Production constraint maximum.

Type:

_ts

property min

[W] Production constraint minimum.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property commitment

Production commitment.

Type:

_ts

property constraint

Constraint group.

Type:

Constraint

property nominal

[W] Nominal production, or installed/rated/nameplate capacity, time-dependent attribute.

Type:

_ts

property pump_commitment

Consumption commitment.

Type:

_ts

property realised

[W] Historical production.

Type:

_ts

property result

[W] Production result, time series.

Type:

_ts

property schedule

[W] Production schedule.

Type:

_ts

property static_max

[W] Production maximum, time-dependent attribute.

Type:

_ts

property static_min

[W] Production minimum, time-dependent attribute.

Type:

_ts

class ProductionDischargeRelation

Bases: instance

Describes the production discharge relation (PQ) curves of the unit.

__init__()

Raises an exception This class cannot be instantiated from Python

property convex

Convexified PQ curve that includes all the time-dependent operating limits and removes all the nonconcave points of the original PQ curve, the slope of each segment is non-increasing, x=flow[m3/s], y=effect[W].

Type:

_t_xy_

property final

Final PQ curve that is the final form included into the MILP optimization problem, the first point of the convex PQ curve is extended to Q=0, x=flow[m3/s], y=effect[W].

Type:

_t_xy_

property original

Original PQ curve that includes non-convex regions, x=flow[m3/s], y=effect[W].

Type:

_t_xy_

class PumpConstraint

Bases: instance

Contains the pump constraints.

__init__()

Raises an exception This class cannot be instantiated from Python

property min_downstream_level

[masl] Minimum level downstream pump.

Type:

_ts

class Reserve

Bases: instance

Unit.Reserve contains all operational reserve related attributes.

class FcrDroop

Bases: instance

Per reserve type attributes

__init__()

Raises an exception This class cannot be instantiated from Python

property cost

Droop cost. test

Type:

_ts

property result

Droop result. test

Type:

_ts

property steps

General discrete droop steps, x=step number, y=droop settings value.

Type:

_t_xy_

class Pair

Bases: instance

Describes the up and down pair of reserve specification.

__init__()

Raises an exception This class cannot be instantiated from Python

property down

Down reserve specification.

Type:

Spec

property up

Up reserve specification.

Type:

Spec

class Spec

Bases: instance

Describes reserve specification, (.schedule, or min..result..max) SI-units is W.

__init__()

Raises an exception This class cannot be instantiated from Python

property cost

Reserve cost.

Type:

_ts

property max

Reserve minimum of range if no schedule.

Type:

_ts

property min

Reserve minimum of range if no schedule.

Type:

_ts

property penalty

Reserve penalty.

Type:

_ts

property realised

Reserve realised.

Type:

_ts

property result

Reserve result.

Type:

_ts

property schedule

Reserve schedule.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property afrr

aFRR up, down attributes.

Type:

Pair

property afrr_static_max

[W] Unit max-limit valid for aFRR calculations.

Type:

_ts

property afrr_static_min

[W] Unit min-limit valid for aFRR calculations.

Type:

_ts

property droop

Droop attributes, related/common to fcr settings.

Type:

_Droop

property droop_steps

General discrete droop steps, x=step number, y=droop settings value.

Type:

_t_xy_

property fcr_d

FCR_d up, down attributes.

Type:

Pair

property fcr_mip

FCR flag.

Type:

_ts

property fcr_n

FCR_n up, down attributes.

Type:

Pair

property fcr_static_max

[W] Unit max-limit valid for FCR calculations (otherwise long running max is used).

Type:

_ts

property fcr_static_min

[W] Unit min-limit valid for FCR calculations (otherwise long running min is used).

Type:

_ts

property frr

FRR up, down attributes.

Type:

Pair

property mfrr

mFRR up, down attributes.

Type:

Pair

property mfrr_static_min

[W] Unit max-limit valid for mFRR calculations.

Type:

_ts

property rr

RR up, down attributes.

Type:

Pair

__init__((Unit)arg1, (object)uid, (object)name, (object)json, (HydroPowerSystem)hps) None :

Create unit with unique id and name for a hydro power system.

property best_profit

BP curves.

Type:

BestProfit

property cost

Cost attributes.

Type:

Cost

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

property discharge

Discharge attributes.

Type:

Discharge

property effective_head

Effective head of the generator, time-dependent attribute.

Type:

_ts

flattened_attributes((Unit)arg1) dict :

Flat dict containing all component attributes.

property generator_description

Generator efficiency curve, time-dependent attribute.

Type:

_t_xy_

get_tsm_object((Unit)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property priority

Priority value for determining uploading order.

Type:

_ts

property production

Production attributes.

Type:

Production

property production_discharge_relation

PQ curves.

Type:

ProductionDischargeRelation

property pump_constraint

Pump constraint attributes.

Type:

PumpConstraint

property pump_description

Time-dependent description of pump efficiency.

Type:

_t_xy_z_list

property pump_unavailability

Time series where time steps the unit is unavailable are marked with value 1, while a value nan or 0 means it is available.

Type:

_ts

property reserve

Operational reserve attributes.

Type:

Reserve

property tag

Url tag.

Type:

str

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

property turbine_description

Time-dependent description of turbine efficiency.

Type:

_turbine_description

property unavailability

Time series where time steps the unit is unavailable are marked with value 1, while a value nan or 0 means it is available.

Type:

_ts

class shyft.energy_market.stm.UnitList

Bases: instance

A strongly typed list of Units.

__init__((UnitList)arg1) None
__init__( (UnitList)arg1, (UnitList)clone) -> None :

Create a clone.

append((UnitList)arg1, (object)arg2) None
extend((UnitList)arg1, (object)arg2) None
class shyft.energy_market.stm.Reservoir

Bases: Reservoir

Stm reservoir.

class Inflow

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property realised

[m3/s] Historical inflow, time series.

Type:

_ts

property result

[m3/s] Inflow result, time series.

Type:

_ts

property schedule

[m3/s] Inflow input, time series.

Type:

_ts

class Level

Bases: instance

class Constraints

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[masl] Level constraint maximum, time series.

Type:

_ts

property min

[masl] Level constraint minimum, time series.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Level constraint attributes.

Type:

Constraints

property realised

[masl] Historical water level, time series.

Type:

_ts

property regulation_max

[masl] Highest regulated water level, time-dependent attribute.

Type:

_ts

property regulation_min

[masl] Lowest regulated water level, time-dependent attribute.

Type:

_ts

property result

[masl] Level results, time series.

Type:

_ts

property schedule

[masl] Level schedule, time series.

Type:

_ts

class Ramping

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property amplitude_down

[s][m] Max level change down for a time period, duration vs m change.

Type:

_t_xy

property amplitude_up

[s][m] Max level change up for a time period, duration vs m change.

Type:

_t_xy

property level_down

[m/s] Max level change down, time series.

Type:

_ts

property level_up

[m/s] Max level change up, time series.

Type:

_ts

class Volume

Bases: instance

class Constraints

Bases: instance

class Tactical

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[masl],[money] Tactical maximum volume constraint.

Type:

PenaltyConstraint

property min

[masl],[money] Tactical minimum volume constraint.

Type:

PenaltyConstraint

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[m3] Volume constraint maximum, time series.

Type:

_ts

property min

[m3] Volume constraint minimum, time series.

Type:

_ts

property tactical

Tactical volume constraint attributes.

Type:

Tactical

class Cost

Bases: instance

class CostCurve

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property curve

[m3],[money/m3] Volume cost curve.

Type:

_t_xy_

property penalty

[money] Volume penalty, time series.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property flood

Cost applied to volume.

Type:

_CostCurve

property peak

Cost applied to the highest volume reached.

Type:

CostCurve

class Slack

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property lower

[m3] Lower volume slack

Type:

_ts

property upper

[m3] Upper volume slack

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Volume constraint attributes.

Type:

Constraints

property penalty

[m3] Volume penalty, time series.

Type:

_ts

property realised

[m3] Historical volume, time series.

Type:

_ts

property result

[m3] Volume results, time series.

Type:

_ts

property schedule

[m3] Volume schedule, time series.

Type:

_ts

property slack

Slack attributes.

Type:

Slack

property static_max

[m3] Maximum regulated volume, time-dependent attribute.

Type:

_ts

class WaterValue

Bases: instance

class Result

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property end_value

[money] Resulting water-value at the endpoint.

Type:

_ts

property global_volume

[money/m3] Resulting water-value.

Type:

_ts

property local_energy

[money/joule] Resulting water-value.

Type:

_ts

property local_volume

[money/m3] Resulting water-value.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property endpoint_desc

[money/joule] Fixed water-value endpoint.

Type:

_ts

property result

Optimizer detailed watervalue results.

Type:

Result

__init__((Reservoir)arg1, (object)uid, (object)name, (object)json, (HydroPowerSystem)hps) None :

Create reservoir with unique id and name for a hydro power system.

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

flattened_attributes((Reservoir)arg1) dict :

Flat dict containing all component attributes.

get_tsm_object((Reservoir)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property inflow

Inflow attributes.

Type:

Inflow

property level

Level attributes.

Type:

_Level

property ramping

Ramping attributes.

Type:

Ramping

property tag

Url tag.

Type:

str

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

property volume

Volume attributes.

Type:

Volume

property volume_level_mapping

Volume capacity description, time-dependent x=[masl], y=[m3].

Type:

_t_xy_

property water_value

water-value attributes.

Type:

WaterValue

class shyft.energy_market.stm.PowerPlant

Bases: PowerPlant

A power plant keeping stm units.

After creating the units, create the power plant, and add the units to the power plant.

class BestProfit

Bases: instance

Describes the best profit (BP) curves of the power plant.

__init__()

Raises an exception This class cannot be instantiated from Python

property cost_average

Average production cost after changing the production of the plant from the current operating point to a new point in the best profit curve of the plant.

Type:

_t_xy_

property cost_commitment

Sum of startup costs or shutdown costs after changing the production of the plant from the current operating point to a new point in the best profit curve of the plant.

Type:

_t_xy_

property cost_marginal

Marginal production cost after changing the production of the plant from the current operating point to a new point in the best profit curve of the plant.

Type:

_t_xy_

property discharge

Plant discharge after changing the production of the plant from the current operating point to a new point in the best profit curve of the plant.

Type:

_t_xy_

property dynamic_water_value

Flag determining whether water values in the best profit calculation should be based on dynamic results per time step from the optimization or the static end value description.

Type:

_ts

class Discharge

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint_max

[m3/s] Discharge maximum restriction, time series.

Type:

_ts

property constraint_min

[m3/s] Discharge minimum restriction, time series.

Type:

_ts

property downstream_level_constraint

Max discharge limited by downstream water level.

Type:

_t_xy_

property intake_loss_from_bypass_flag

Headloss of intake affected by bypass discharge.

Type:

_ts

property ramping_down

[m3/s] Constraint on decreasing discharge, time-dependent attribute.

Type:

_ts

property ramping_up

[m3/s] Constraint on increasing discharge, time-dependent attribute.

Type:

_ts

property realised

[m3/s] Discharge realised, usually related/or defined as unit.discharge.realised.

Type:

_ts

property result

[m3/s] Discharge result, time series.

Type:

_ts

property schedule

[m3/s] Discharge schedule, time series.

Type:

_ts

property upstream_level_constraint

Max discharge limited by upstream water level.

Type:

_t_xy_

class Fees

Bases: instance

Describes other costs when producing.

__init__()

Raises an exception This class cannot be instantiated from Python

property feeding_fee

Use nan for periods that should have no fee.

Type:

_ts

Type:

Extra cost for feeding electricity into the grid. The feeding fee is added as an extra production cost in the objective function. Tip

class Production

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint_max

[W] Production maximum restriction, time series.

Type:

_ts

property constraint_min

[W] Production minimum restriction, time series.

Type:

_ts

property instant_max

[W] Computed instant max production for the rotating units

Type:

_ts

property merge_tolerance

[W] Max deviation in production, time-dependent attribute.

Type:

_ts

property ramping_down

[W] Constraint on decreasing production, time-dependent attribute.

Type:

_ts

property ramping_up

[W] Constraint on increasing production, time-dependent attribute.

Type:

_ts

property realised

[W] Production realised, usually related to sum of unit.production.realised.

Type:

_ts

property result

[W] Production result, time series.

Type:

_ts

property schedule

[W] Production schedule, time series.

Type:

_ts

__init__((PowerPlant)arg1, (object)uid, (object)name, (object)json, (HydroPowerSystem)hps) None :

Create power plant with unique id and name for a hydro power system.

add_unit((PowerPlant)self, (Unit)unit) None :

Add unit to plant.

property best_profit

BP curves.

Type:

BestProfit

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

property discharge

Discharge attributes.

Type:

Discharge

property fees

other costs of production.

Type:

Fees

flattened_attributes((PowerPlant)arg1) dict :

Flat dict containing all component attributes.

get_tsm_object((PowerPlant)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property gross_head

[masl]Gross head, time-dependent attribute.

Type:

_ts

property mip

Mip flag.

Type:

_ts

property outlet_level

[masl] Outlet level, time-dependent attribute.

Type:

_ts

property production

Production attributes.

Type:

Production

property tag

Url tag.

Type:

str

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

property unavailability

Unavailability, time series.

Type:

_ts

class shyft.energy_market.stm.Gate

Bases: Gate

Stm gate.

class Discharge

Bases: instance

class Constraints

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property max

[masl] Discharge constraint maximum, time series.

Type:

_ts

property min

[masl] Discharge constraint minimum, time series.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Discharge constraint attributes.

Type:

Constraints

property merge_tolerance

[m3/s] Maximum deviation in discharge between two timesteps.

Type:

_ts

property realised

[m3/s] Historical discharge restriction.

Type:

_ts

property result

[m3/s] Discharge result.

Type:

_ts

property schedule

[m3/s] Discharge schedule restriction.

Type:

_ts

property static_max

[m3/s] Maximum discharge.

Type:

_ts

class Opening

Bases: instance

class Constraints

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property continuous

Flag determining whether the gate can be set to anything between predefined positions, time-dependent attribute.

Type:

_ts

property positions

Predefined gate positions mapped to gate opening.

Type:

_t_xy_

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Opening constraint attributes.

Type:

Constraints

property realised

Historical opening schedule, value between 0.0 and 1.0.

Type:

_ts

property result

Result opening schedule, value between 0.0 and 1.0.

Type:

_ts

property schedule

Planned opening schedule, value between 0.0 and 1.0.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property cost

Gate adjustment cost, time series.

Type:

_ts

property custom

Map keeping any_attr

Type:

StringAnyAttrDict

property discharge

Discharge attributes.

Type:

Discharge

flattened_attributes((Gate)arg1) dict :

Flat dict containing all component attributes.

property flow_description

Gate flow description. Flow [m^3/s] as a function of water level [m] for relative gate opening [%].

Type:

_t_xy_z_list

property flow_description_delta_h

Gate flow description. Flow [m^3/s] as a function of water level difference [m] for relative gate opening [%].

Type:

_t_xy_z_list

get_tsm_object((Gate)self, (object)key) _ts :

Get a specific extra time series for this object.

The returned time series is wrapped in an object which exposes method for retrieving url etc.

Parameters:

key (str) – The key in the tsm of the time series to get.

Raises:

runtime_error – If specified key does not exist.

property opening

Opening attributes.

Type:

Opening

property tag

Url tag.

Type:

str

property ts

Map keeping any extra time series for this object.

Type:

StringTimeSeriesDict

class shyft.energy_market.stm.Waterway

Bases: Waterway

Stm waterway.

class Discharge

Bases: instance

class Constraints

Bases: instance

The constraints for a waterway, provide means of controlling the flow, change of flow, or even accumulated volume of flow.

__init__()

Raises an exception This class cannot be instantiated from Python

property accumulated_max

[m3] allowed accumulated positive deviation volume, actual vs .reference. If set to nan at a timestep, the accumulator is reset to 0 starting from that timestep.

Type:

_ts

property accumulated_min

[m3] allowed accumulated negative deviation volume, actual vs .reference. If set to nan at a timestep, the accumulator is reset to 0 starting from that timestep.

Type:

_ts

property max

[m3/s] Discharge constraint max flow.

Type:

_ts

property max_average

[s][m3/s] maximum average discharge on waterway as a function of duration in seconds.

Type:

_t_xy

property min

[m3/s] Discharge constraint min flow.

Type:

_ts

property min_average

[s][m3/s] minimum average discharge on waterway as a function of duration in seconds.

Type:

_t_xy

property ramping_down

[m3/s] Discharge constraint ramping_down.

Type:

_ts

property ramping_up

[m3/s] Discharge constraint ramping_up.

Type:

_ts

class Penalties

Bases: instance

class Costs

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property accumulated_max

[money/m3] Penalty cost constraint accumulated_max.

Type:

_ts

property accumulated_min

[money/m3] Penalty cost accumulated_min.

Type:

_ts

property constraint_max

[m3/s] Penalty cost constraint_max.

Type:

_ts

property constraint_min

[m3/s] Penalty cost constraint_min.

Type:

_ts

property max_average

[(money/h)/(m3/s)] Penalty cost for constraint max_average_discharge.

Type:

_ts

property min_average

[(money/h)/(m3/s)] Penalty cost for constraint min_average_discharge.

Type:

_ts

property peak_curve

[m3/s][nok/m3/s] Cost of peak flow curve.

Type:

_t_xy

property ramping_down

[m3/s] Penalty cost ramping_down.

Type:

_ts

property ramping_up

[m3/s] Penalty cost ramping_up.

Type:

_ts

property rate

[money/(m3/s)] Penalty cost for rate of discharge.

Type:

_ts

class Results

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property accumulated_max

[money] Resulting penalty for violating accumulated_max.

Type:

_ts

property accumulated_min

[money] Resulting penalty for violating accumulated_min,

Type:

_ts

property constraint_max

[money] Resulting penalty for violating max constraint.

Type:

_ts

property constraint_min

[money] Resulting penalty for violating min constraint.

Type:

_ts

property ramping_down

[money] Resulting penalty for violating ramping down constraint.

property ramping_up

[money] Resulting penalty for violating ramping up constraint.

Type:

_ts

property rate

[money] Resulting penalty for discharge.

Type:

_ts

__init__()

Raises an exception This class cannot be instantiated from Python

property cost

Penalty cost attributes.

Type:

Costs

property result

Penalty result attributes.

Type:

Results

__init__()

Raises an exception This class cannot be instantiated from Python

property constraint

Discharge constraint attributes

Type:

Constraints

property penalty

Discharge penalty attributes.

Type:

Penalties

property realised

[m3/s] Discharge realised. - as in historical fact. For the case of constraint, used to establish initial accumulated deviation at the start of the optimisation period.

Type:

_ts

property reference

[m3/s] Discharge reference. Used as reference for the constraint criteria (might be different from .schedule).

Type:

_ts

property result

[m3/s] Discharge result. As computed by optimization/simulation process.

Type:

_ts

property schedule

[m3/s] Discharge schedule. As in wanted scheduled flow.

Type:

_ts

property static_max

[m3/s] Discharge maximum, time-dependent attribute, bi-directional value.

Type:

_ts

class FlowDescription

Bases: instance

class DeltaMeter

Bases: instance

Delta meter flow description of the waterway.

__init__()

Raises an exception This class cannot be instantiated from Python

property downstream_ref

x=difference between up- and downstream level [m], y=flow [m3/s]. z=downstream level [masl]

Type:

_t_xy_z_list

property upstream_ref

x=difference between up- and downstream level [m], y=flow [m3/s]. z=upstream level [masl]

Type:

_t_xy_z_list

__init__()

Raises an exception This class cannot be instantiated from Python

property delta_meter

Delta meter description.

Type:

DeltaMeter

property upstream_ref

[m3/s] Discharge constraint min flow.

Type:

_ts

class Geometry

Bases: instance

__init__()

Raises an exception This class cannot be instantiated from Python

property diameter

[m] Tunnel diameter, time-dependent attribute.

Type:

_ts

property length

[m] Tunnel length, time-dependent attribute.

Type:

_ts

property z0

[masl] Tunnel inlet level, time-dependent attribute.

Type:

_ts

property z1

[masl] Tunnel outlet level, time-dependent attribute.

Type:

_ts

__init__((Waterway)arg1, (object)uid, (object)name, (object)json, (HydroPowerSystem)hps) None :