Network Formulations
Type Hierarchy
We begin with the top of the hierarchy, where we can distinguish between gas flow models. Currently, there are two variations of the weymouth equations, one where the directions of flux are known and one where they are unknown.
AbstractDirectedGasFormulation <: AbstractGasFormulation
AbstractUndirectedGasFormulation <: AbstractGasFormulation
Each of these have a disjunctive form of the weymouth equations: The full non convex formulation and its conic relaxation.
AbstractMINLPForm <: AbstractUndirectedGasFormulation
AbstractMISOCPForm <: AbstractUndirectedGasFormulation
AbstractMINLPDirectedForm <: AbstractDirectedGasFormulation
AbstractMISOCPDirectedForm <: AbstractDirectedGasFormulation
Gas Models
Each of these forms can be used as the type parameter for a GasModel, i.e.:
MINLPGasModel = GenericGasModel(StandardMINLPForm)
MISOCPGasModel = GenericGasModel(StandardMISOCPForm)
For details on GenericGasModel
, see the section on Gas Model.
User-Defined Abstractions
The user-defined abstractions begin from a root abstract like the AbstractGasFormulation
abstract type, i.e.
AbstractMyFooForm <: AbstractGasFormulation
StandardMyFooForm <: AbstractFooForm
FooGasModel = GenericGasModel{StandardFooForm}
Directed Models
constraints on flow across compressors when directions are constants
constraints on flow across compressors when the directions are constants
on/off constraint for compressors when the flow direction is constant
constraints on flow across control valves when directions are constants
constraints on pressure drop across control valves when directions are constants
constraints on flow across pipes where the directions are fixed
constraints on flow across pipes when directions are fixed
constraints on pressure drop across pipes
constraints on pressure drop across pipes when the direction is fixed
constraints on flow across short pipes when the directions are constants
constraints on flow across valves when directions are constants
Undirected Models
GasModels.constraint_conserve_flow
— Method.This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
GasModels.constraint_conserve_flow_ne
— Method.This constraint is intended to ensure that flow is on direction through a node with degree 2 and no production or consumption
constraints on flow across compressors
constraints on flow across compressors
enforces pressure changes bounds that obey compression ratios
constraints on flow across control valves
constraints on pressure drop across control valves
constraints on flow across pipes
constraints on flow across pipes
constraints on pressure drop across pipes
constraints on pressure drop across pipes
constraints on flow across short pipes
constraints on flow across valves
GasModels.constraint_parallel_flow
— Method.ensures that parallel lines have flow in the same direction
GasModels.constraint_parallel_flow_ne
— Method.ensures that parallel lines have flow in the same direction
GasModels.constraint_sink_flow
— Method.Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
GasModels.constraint_sink_flow_ne
— Method.Make sure there is at least one direction set to take flow to a junction (typically used on sink nodes)
GasModels.constraint_source_flow
— Method.Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
GasModels.constraint_source_flow_ne
— Method.Make sure there is at least one direction set to take flow away from a junction (typically used on source nodes)
GasModels.variable_connection_direction
— Method.variables associated with direction of flow on the connections. yp = 1 imples flow goes from fjunction to tjunction. yn = 1 imples flow goes from tjunction to fjunction
variables associated with direction of flow on the connections
MINLP
GasModels.constraint_weymouth
— Method.Weymouth equation with fixed direction variables
GasModels.constraint_weymouth
— Method.Weymouth equation with discrete direction variables
GasModels.constraint_weymouth_ne
— Method.Weymouth equation with fixed directions for MINLP
GasModels.constraint_weymouth_ne
— Method.Weymouth equation with discrete direction variables for MINLP
MISOCP
GasModels.constraint_weymouth
— Method.Weymouth equation with directed flow
GasModels.constraint_weymouth
— Method.Weymouth equation with discrete direction variables
GasModels.constraint_weymouth_ne
— Method.Weymouth equation with fixed direction
GasModels.constraint_weymouth_ne
— Method.Weymouth equation with discrete direction variables for MINLP
GasModels.variable_flow
— Method.GasModels.variable_mass_flow
— Method.GasModels.variable_mass_flow_ne
— Method.