Variables
The following methods provide a compositional approach for defining common variables used in water network optimization models. These methods are always defined over AbstractWaterModel
.
WaterModels.comp_start_value
— FunctionSets the start value for a given variable.
WaterModels.comp_start_value
— FunctionSets the start value for a given variable.
WaterModels.sol_component_value
— MethodGiven a variable that is indexed by component IDs, builds the standard solution structure.
WaterModels.variable_check_valve_indicator
— MethodCreates binary variables for all check valves in the network, i.e., z_check_valve[a]
for a
in check_valve
, where one denotes that the check valve is open and zero denotes that the check valve is closed.
WaterModels.variable_head
— MethodCreates bounded (by default) or unbounded total hydraulic head (or head) variables for all nodes in the network, i.e., h[i]
for i
in node
.
WaterModels.variable_head_gain
— MethodCreates head gain variables corresponding to all pumps in the network, i.e., g[a]
for a
in pump
. These denote head gains between nodes i and j.
WaterModels.variable_pressure_reducing_valve_indicator
— MethodCreates binary variables for all PRVs in the network, i.e., z_pressure_reducing_valve[a]
for a
in pressure_reducing_valve
, where one denotes that the pressure reducing is currently open and zero otherwise.
WaterModels.variable_pump_indicator
— MethodCreates binary variables for all pumps in the network, i.e., z_pump[a]
for a
in pump
, where one denotes that the pump is currently operating (i.e., on), and zero indicates that the pump is not operating (i.e., off).
WaterModels.variable_reservoir
— MethodCreates outgoing flow variables for all reservoirs in the network, i.e., qr[i]
for i
in reservoir
. Note that these variables are always nonnegative, as there is never incoming flow to a reservoir.
WaterModels.variable_resistance
— MethodCreates binary variables for all network design or design resistances in the network, i.e., x_res[a]
for a
in pipe
, for r
in resistance[a]
, where one denotes that the given resistance is active in the design.
WaterModels.variable_shutoff_valve_indicator
— MethodCreates binary variables for all shutoff valves in the network, i.e., z_shutoff_valve[a]
for a
in sv
, where one denotes that the shutoff valve is open and zero denotes that the shutoff valve is closed.
WaterModels.variable_tank
— MethodCreates outgoing flow variables for all tanks in the network, i.e., qt[i]
for i
in tank
. Note that, unlike reservoirs, tanks can have inflow.
WaterModels.variable_volume
— MethodCreates bounded (by default) or unbounded (but still nonnegative) volume variables for all tanks in the network, i.e., V[i]
for i
in tank
.
Link Variables
WaterModels.variable_flow
— FunctionCreate flow variables for formulations with binary direction variables.
Creates flow variables for MILP
formulations (q
, lambda
, x_pw
).
Creates flow variables for NLP
formulations (q
).
WaterModels.variable_flow_des
— FunctionCreate network design flow variables for directed flow formulations.
Creates network design flow variables for MILP
formulations (q_des
, lambda
, x_pw
).
Creates network design flow variables for NLP
formulations (q_des
, x_des
).