Constraints

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.

Missing docstring for constraint_junction_flow_balance. Check Documenter's build log for details.

Load Shedding Constraints

Missing docstring.

Missing docstring for constraint_junction_flow_balance_ls. Check Documenter's build log for details.

Network Expansion Constraints

Missing docstring.

Missing docstring for constraint_junction_flow_balance_ne. Check Documenter's build log for details.

Missing docstring.

Missing docstring for constraint_junction_flow_balance_ne_ls. Check Documenter's build log for details.

Pipe Constraints

Weymouth's Law Constraints

Weymouth equation with discrete direction variables

source

Weymouth equation with discrete direction variables

source

Weymouth equation with discrete direction variables

source

Weymouth equation for an undirected pipe

source

Weymouth equation for a pipe

source

Direction On/off Constraints

constraints on pressure drop across pipes

source

constraints on pressure drop across an undirected pipe

source

constraints on pressure drop across an undirected pipe

source

constraint on flow across an undirected pipe

source

constraint on flow across an undirected pipe

source

generic constraint on flow across the pipe where direction is passed in as a variable or constant

source

Network Expansion Constraints

Weymouth equation for undirected expansion pipes

source

Weymouth equation for an undirected expansion pipe

source

Weymouth equation for an uexpansion pipe

source

Weymouth equation for an undirected expansion pipe

source

Weymouth equation for an expansion pipe

source

constraints on pressure drop across pipes

source

constraints on pressure drop across an undirected expansion pipe

source

constraints on pressure drop across a pipe

source

constraints on flow across an expansion pipe that is undirected

source

constraints on flow across an expansion undirected pipe

source

constraints on flow across an expansion pipe

source

Compressor Constraints

Direction On/off Constraints

constraints on flow across an undirected compressor

source

constraints on flow across an undirected compressor

source

constraints on flow across a compressor

source

enforces pressure changes bounds that obey compression ratios for an undirected compressor

source

enforces pressure changes bounds that obey compression ratios for an undirected compressor

source

enforces pressure changes bounds that obey compression ratios for a compressor

source

Network Expansion Constraints

constraints on flow across an undirected compressor

source

constraints on flow across undirected compressors

source

constraints on flow across compressors

source

constraints on pressure drop across an undirected compressor

source

constraints on pressure drop across an undirected compressor

source

constraints on pressure drop across a compressor

source

Control Valve Constraints

Direction On/off Constraints

constraints on flow across an undirected control valve

source

constraints on flow across control valves that are undirected

source

constraints on flow across control valves

source

constraints on pressure drop across control valves that are undirected

source

constraints on pressure drop across control valves that are undirected

source

constraints on pressure drop across control valves

source

Valve Constraints

Direction On/off Constraints

constraints on flow across an undirected valve

source

constraints on flow across undirected valves

source

constraints on flow across undirected valves

source

constraints on pressure drop across valves

source

constraints on pressure drop across valves

source

Short Pipes

Direction On/off Constraints

constraints on flow across a short pipe

source

constraints on flow across an undirected short pipe

source

constraints on flow across an undirected short pipe

source

constraints on pressure drop across pipes

source

constraints on pressure drop across pipes

source

Direction Cutting Constraints

Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)

source

Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)

source

Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)

source

Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)

source

This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption

source

This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption

source

ensures that parallel lines have flow in the same direction

source

ensures that parallel lines have flow in the same direction

source

Network Expansion Constraints

Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)

source

Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)

source

Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)

source

Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)

source

This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption

source

This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption

source

ensures that parallel lines have flow in the same direction

source

ensures that parallel lines have flow in the same direction

source