pycity_scheduling.classes.grids package¶
Submodules¶
pycity_scheduling.classes.grids.district_heating_grid module¶
- class pycity_scheduling.classes.grids.district_heating_grid.TwoPipeDHGrid(e_dh: Environment, *args, **kwargs)¶
Bases:
EntityContainerMethods
Yield all lower-level entities.
populate_model([mode])Add entity block and lower entities blocks to pyomo ConcreteModel.
Update block parameters and bounds.
add_edge
create_endpoint
nodes
volume
- Parameters:
e_dh (Environment) –
- add_edge(node_a, node_b, line)¶
- create_endpoint(e: Environment, location=None, ts=None)¶
- Parameters:
e (Environment) –
- get_lower_entities()¶
Yield all lower-level entities.
- Yields:
All contained entities.
- nodes()¶
- populate_model(mode='power_flow')¶
Add entity block and lower entities blocks to pyomo ConcreteModel.
Call both parent’s populate_model methods and set variables lower bounds to None. Then call populate_model method of all contained entities and add constraints that the sum of their variables for each period equals the corresponding own variable.
- Parameters:
model (pyomo.ConcreteModel) –
mode (str, optional) –
Specifies which set of constraints to use.
convex : Use linear constraints
integer : Use same constraints as convex mode
- update_model()¶
Update block parameters and bounds.
Set parameters and bounds according to the current situation of the device according to the previous schedule and the current forecasts.
- Parameters:
mode (str, optional) –
Specifies which set of constraints to use.
convex : Use linear constraints
integer : Use integer variables representing discrete control decisions
- volume()¶
pycity_scheduling.classes.grids.electrical_grid module¶
- class pycity_scheduling.classes.grids.electrical_grid.ElectricalGrid(e_e: Environment, subs: dict = {}, ts: TimeSampler | None = None)¶
Bases:
GridMethods
populate_model([mode])Add entity block to pyomo ConcreteModel.
add_edge
consensus_variables
create_endpoint
exchange_variables
nodes
- Parameters:
e_e (Environment) –
subs (dict) –
ts (TimeSampler) –
- add_edge(node_a, node_b, resistance=0, inductance=0)¶
- consensus_variables(m)¶
- create_endpoint(e: Environment, location=None, ts=None)¶
- Parameters:
e (Environment) –
- exchange_variables(m)¶
- nodes()¶
- populate_model(mode='energy')¶
Add entity block to pyomo ConcreteModel.
Places the block with the name of the entity in the ConcreteModel.
- Parameters:
model (pyomo.ConcreteModel) –
mode (str, optional) –
Specifies which set of constraints to use.
convex : Use linear constraints
integer : May use integer variables
pycity_scheduling.classes.grids.endpoint module¶
pycity_scheduling.classes.grids.fluid_grid module¶
- class pycity_scheduling.classes.grids.fluid_grid.FluidGrid(environment, subs: dict = {}, ts: TimeSampler | None = None)¶
Bases:
GridMethods
populate_model(model[, mode])Add entity block to pyomo ConcreteModel.
add_edge
consensus_variables
exchange_variables
volume
- Parameters:
subs (dict) –
ts (TimeSampler) –
- add_edge(node_a, node_b, length, diameter)¶
- consensus_variables(m)¶
- exchange_variables(m)¶
- populate_model(model, mode='flow')¶
Add entity block to pyomo ConcreteModel.
Places the block with the name of the entity in the ConcreteModel.
- Parameters:
model (pyomo.ConcreteModel) –
mode (str, optional) –
Specifies which set of constraints to use.
convex : Use linear constraints
integer : May use integer variables
- volume()¶
pycity_scheduling.classes.grids.grid module¶
- class pycity_scheduling.classes.grids.grid.Grid(environment, subs: dict = {}, ts: TimeSampler | None = None)¶
Bases:
OptimizationEntity- Attributes:
- resource
- Parameters:
subs (dict) –
ts (TimeSampler) –
Methods
add_edge
add_endpoint
consensus_variables
exchange_variables
- add_edge(node_a, node_b, line)¶
- add_endpoint()¶
- consensus_variables(m)¶
- exchange_variables(m)¶
- property resource¶
pycity_scheduling.classes.grids.junction module¶
pycity_scheduling.classes.grids.node module¶
- class pycity_scheduling.classes.grids.node.Node(environment, location, *args, **kwargs)¶
Bases:
OptimizationEntity
pycity_scheduling.classes.grids.valve module¶
Module contents¶
The pycity_scheduling framework
Copyright (C) 2022, Institute for Automation of Complex Power Systems (ACS), E.ON Energy Research Center (E.ON ERC), RWTH Aachen University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.