Network Formulations

The network formulations for joint gas-power modeling use the formulations defined in GasModels.jl and PowerModels.jl.

GasPowerModels Types

Specification of a GasPowerModel requires the specification of both a GasModels.AbstractGasModel and a PowerModels.AbstractPowerModel, respectively. For example, to specify a formulation that leverages the CRDWPGasModel and SOCWRPowerModel types, the corresponding GasPowerModel type would be

GasPowerModel{CRDWPGasModel, SOCWRPowerModel}

GasPowerModels then utilizes the following (internal) function to construct a GasPowerModel object:

GasPowerModels.instantiate_modelFunction
instantiate_model(g_file, p_file, link_file, model_type, build_method; kwargs...)

Instantiates and returns a GasPowerModels modeling object from gas and power input
files `g_file` and `p_file`. Additionally, `link_file` is an input file that links
gas and power networks, `model_type` is the gas-power modeling type, and
`build_method` is the build method for the problem specification being considered.
source

Type Hierarchy

GasPowerModels inherits the type hierarchies of GasModels and PowerModels. Constraint and objective functions are then dispatched based on the choice of types for each of the models. An example is seen in the function

GasPowerModels.constraint_heat_rateFunction

Constraint for coupling the production of power at natural gas generators with the gas consumption required to produce this power. The full nonconvex constraint is stated as

\[fl = e \rho \sum_{i \in \Gamma} (h_{i}^{0} pg_{i}^2 + h_{i}^{1} pg_{i} + h_{i}^{2}),\]

where $h$ is a quadratic function used to convert MW ($pg$) into Joules consumed per second (J/s). $h$ is in units of (J/MW^2, J/MW, J). This is then converted to mass flow, $fl$, (kg/s) of gas consumed to produce this energy. Here, $e$ is an energy factor (m^3/J) and $\rho$ is standard density (kg/m^3). This constraint can be relaxed to a convex quadratic of the form

\[fl \geq e \rho \sum_{i \in \Gamma} (h_{i}^{0} pg_{i}^2 + h_{i}^{1} pg_{i} + h_{i}^{2}),\]

source
GasPowerModels.constraint_heat_rate_on_offFunction

Constraint for coupling the production of power at dispatchable natural gas generators with the gas consumption required to produce this power. The full nonconvex constraint is stated as

\[fl = e \rho \sum_{i \in \Gamma} (h_{i}^{0} pg_{i}^2 + h_{i}^{1} pg_{i} + h_{i}^{2} z_{i}),\]

where $h$ is a quadratic function used to convert MW ($pg$) into Joules consumed per second (J/s). $h$ is in units of (J/MW^2, J/MW, J). This is then converted to mass flow, $fl$, (kg/s) of gas consumed to produce this energy. Here, $e$ is an energy factor (m^3/J) and $\rho$ is standard density (kg/m^3). $z$ is a discrete variable indicating the status of the generator. This constraint can be relaxed to a convex quadratic of the form

\[fl \geq e \rho \sum_{i \in \Gamma} (h_{i}^{0} pg_{i}^2 + h_{i}^{1} pg_{i} + h_{i}^{2} z_{i}),\]

source

The convention is that, if a relaxation or approximation of a nonconvex constraint is used in a natural gas and/or electric power model, the linking constraint will also be similarly relaxed or approximated according to the most "complex" independent infrastructure modeling formulation. For example, if the natural gas formulation uses a linear representation, and the electric power model uses a quadratic representation, then the linking constraint uses the tightest possible relaxation using linear and quadratic interdependency equations.