Python API¶
Pumping Station Mixin¶
-
class
rtctools_hydraulic_structures.pumping_station_mixin.Pump(optimization_problem, symbol)[source]¶ Bases:
rtctools_hydraulic_structures.util._ObjectParameterWrapperPython Pump object as an interface to the
Pumpobject in the model.
-
class
rtctools_hydraulic_structures.pumping_station_mixin.Resistance(optimization_problem, symbol)[source]¶ Bases:
rtctools_hydraulic_structures.util._ObjectParameterWrapperPython Resistance object as an interface to the
Resistanceobject in the model.
-
class
rtctools_hydraulic_structures.pumping_station_mixin.PumpingStation(optimization_problem, symbol, pump_symbols=None, **kwargs)[source]¶ Bases:
rtctools_hydraulic_structures.util._ObjectParameterWrapperPython PumpingStation object as an interface to the
PumpingStationobject in the model.-
__init__(optimization_problem, symbol, pump_symbols=None, **kwargs)[source]¶ Initialize the pumping station object.
Parameters: - optimization_problem –
OptimizationProbleminstance. - symbol – Symbol name of the pumping station in the model.
- pump_symbols – Symbol names of the pumps in the pumping station.
- optimization_problem –
-
pumps()[source]¶ Get a list of
Pumpobjects that are part of this pumping station in the model.Returns: List of Pumpobjects.
-
resistances()[source]¶ Get a list of
Resistanceobjects that are part of this pumping station in the model.Returns: List of Resistanceobjects.
-
-
class
rtctools_hydraulic_structures.pumping_station_mixin.PumpingStationMixin(*args, **kwargs)[source]¶ Bases:
rtctools.optimization.optimization_problem.OptimizationProblemAdds handling of PumpingStation objects in your model to your optimization problem.
Relevant parameters and variables are read from the model, and from this data a set of constraints and objectives are automatically generated to minimize cost.
-
pumping_stations()[source]¶ User problem returns list of
PumpingStationobjects.Returns: A list of pumping stations.
-
Weir Mixin¶
-
class
rtctools_hydraulic_structures.weir_mixin.Weir(optimization_problem, name)[source]¶ Bases:
rtctools_hydraulic_structures.util._ObjectParameterWrapperPython Weir object as an interface to the Weir object in the model.
In the optimization, the weir flow is implemented as constraints. It means that the optimization calculated a flow (not weir height!), that is forced by the constraints to be a physically possible weir flow.
-
class
rtctools_hydraulic_structures.weir_mixin.WeirMixin(*args, **kwargs)[source]¶ Bases:
rtctools.optimization.optimization_problem.OptimizationProblemAdds handling of Weir objects in your model to your optimization problem.