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.variable_check_valve_indicatorMethod

Creates 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.

source
WaterModels.variable_headMethod

Creates 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.

source
WaterModels.variable_head_gainMethod

Creates 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.

source
WaterModels.variable_pump_indicatorMethod

Creates 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).

source
WaterModels.variable_reservoirMethod

Creates 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.

source
WaterModels.variable_resistanceMethod

Creates 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.

source
WaterModels.variable_shutoff_valve_indicatorMethod

Creates 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.

source
WaterModels.variable_tankMethod

Creates 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.

source
WaterModels.variable_volumeMethod

Creates bounded (by default) or unbounded (but still nonnegative) volume variables for all tanks in the network, i.e., V[i] for i in tank.

source
WaterModels.variable_flowFunction

Create flow variables for formulations with binary direction variables.

source

Creates flow variables for MILP formulations (q, lambda, x_pw).

source

Creates flow variables for NLP formulations (q).

source
WaterModels.variable_flow_desFunction

Create network design flow variables for directed flow formulations.

source

Creates network design flow variables for MILP formulations (q_des, lambda, x_pw).

source

Creates network design flow variables for NLP formulations (q_des, x_des).

source