Constraints
Constraint Templates
Constraint templates help simplify data wrangling across multiple Gas Flow formulations by providing an abstraction layer between the network data and network constraint definitions. The constraint template's job is to extract the required parameters from a given network data structure and pass the data as named arguments to the Gas Flow formulations.
These templates should be defined over GenericGasModel
and should not refer to model variables. For more details, see the files: core/constraint_template.jl
and core/constraint.jl
.
Junction Constraints
Flow Balance Constraints
Missing docstring for constraint_junction_flow_balance
. Check Documenter's build log for details.
Load Shedding Constraints
Missing docstring for constraint_junction_flow_balance_ls
. Check Documenter's build log for details.
Network Expansion Constraints
Missing docstring for constraint_junction_flow_balance_ne
. Check Documenter's build log for details.
Missing docstring for constraint_junction_flow_balance_ne_ls
. Check Documenter's build log for details.
Pipe Constraints
Weymouth's Law Constraints
GasModels.constraint_weymouth
— Function.Weymouth equation with discrete direction variables
Weymouth equation with discrete direction variables
Weymouth equation with discrete direction variables
Weymouth equation for an undirected pipe
Weymouth equation for a pipe
Direction On/off Constraints
GasModels.constraint_on_off_pressure_drop
— Function.constraints on pressure drop across pipes
constraints on pressure drop across an undirected pipe
constraints on pressure drop across an undirected pipe
GasModels.constraint_on_off_pipe_flow
— Function.constraint on flow across an undirected pipe
constraint on flow across an undirected pipe
generic constraint on flow across the pipe where direction is passed in as a variable or constant
Network Expansion Constraints
GasModels.constraint_weymouth_ne
— Function.Weymouth equation for undirected expansion pipes
Weymouth equation for an undirected expansion pipe
Weymouth equation for an uexpansion pipe
Weymouth equation for an undirected expansion pipe
Weymouth equation for an expansion pipe
GasModels.constraint_on_off_pressure_drop_ne
— Function.constraints on pressure drop across pipes
constraints on pressure drop across an undirected expansion pipe
constraints on pressure drop across a pipe
GasModels.constraint_on_off_pipe_flow_ne
— Function.constraints on flow across an expansion pipe that is undirected
constraints on flow across an expansion undirected pipe
constraints on flow across an expansion pipe
Compressor Constraints
Direction On/off Constraints
GasModels.constraint_on_off_compressor_flow
— Function.constraints on flow across an undirected compressor
constraints on flow across an undirected compressor
constraints on flow across a compressor
GasModels.constraint_on_off_compressor_ratios
— Function.enforces pressure changes bounds that obey compression ratios for an undirected compressor
enforces pressure changes bounds that obey compression ratios for an undirected compressor
enforces pressure changes bounds that obey compression ratios for a compressor
Network Expansion Constraints
GasModels.constraint_on_off_compressor_flow_ne
— Function.constraints on flow across an undirected compressor
constraints on flow across undirected compressors
constraints on flow across compressors
GasModels.constraint_on_off_compressor_ratios_ne
— Function.constraints on pressure drop across an undirected compressor
constraints on pressure drop across an undirected compressor
constraints on pressure drop across a compressor
Control Valve Constraints
Direction On/off Constraints
GasModels.constraint_on_off_control_valve_flow
— Function.constraints on flow across an undirected control valve
constraints on flow across control valves that are undirected
constraints on flow across control valves
constraints on pressure drop across control valves that are undirected
constraints on pressure drop across control valves that are undirected
constraints on pressure drop across control valves
Valve Constraints
Direction On/off Constraints
GasModels.constraint_on_off_valve_flow
— Function.constraints on flow across an undirected valve
constraints on flow across undirected valves
constraints on flow across undirected valves
GasModels.constraint_on_off_valve_pressure_drop
— Function.constraints on pressure drop across valves
constraints on pressure drop across valves
Short Pipes
Direction On/off Constraints
GasModels.constraint_on_off_short_pipe_flow
— Function.constraints on flow across a short pipe
constraints on flow across an undirected short pipe
constraints on flow across an undirected short pipe
GasModels.constraint_short_pipe_pressure_drop
— Function.constraints on pressure drop across pipes
constraints on pressure drop across pipes
Direction Cutting Constraints
GasModels.constraint_source_flow
— Function.Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
GasModels.constraint_sink_flow
— Function.Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
GasModels.constraint_conserve_flow
— Function.This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
GasModels.constraint_parallel_flow
— Function.ensures that parallel lines have flow in the same direction
ensures that parallel lines have flow in the same direction
Network Expansion Constraints
GasModels.constraint_source_flow_ne
— Function.Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
GasModels.constraint_sink_flow_ne
— Function.Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
GasModels.constraint_conserve_flow_ne
— Function.This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
GasModels.constraint_parallel_flow_ne
— Function.ensures that parallel lines have flow in the same direction
ensures that parallel lines have flow in the same direction