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_demand_flow
— MethodInstantiates demand flow variables for all dispatchable demands in the network, i.e., demand[i]
for i
in dispatchable_demand
.
WaterModels.variable_des_pipe_indicator
— MethodCreates binary variables for all design pipes in the network, i.e., z_des_pipe[a]
for a
in des_pipe
, where one denotes that the pipe is selected within the design, and zero denotes that the pipe is not selected.
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_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_regulator_indicator
— MethodCreates binary variables for all regulators in the network, i.e., z_regulator[a]
for a
in regulator
, where one denotes that the pressure reducing is currently open and zero otherwise.
WaterModels.variable_reservoir_flow
— MethodInstantiates outgoing flow variables for all reservoirs in the network, i.e., q_reservoir[i]
for i
in reservoir
. Note that these variables are always nonnegative, since for each reservoir, there will never be incoming flow.
WaterModels.variable_tank_flow
— MethodCreates outgoing flow variables for all tanks in the network, i.e., q_tank[i]
for i
in tank
. Note that, unlike reservoirs, tanks can have inflow.
WaterModels.variable_valve_indicator
— MethodCreates binary variables for valves in the network, i.e., z_valve[a]
for a
in valve
, where one denotes that the valve is open and zero denotes that the valve is closed.
Link Variables
WaterModels.variable_flow
— FunctionCreate flow-related variables common to all directed flow models for edge-type components.
Create flow-related variables common to all directed flow models for node-connecting components.
Creates flow variables for LA
formulations (q
, lambda
, x_pw
).
Create flow-related variables common to all directed flow models for node-connecting components.