Scippy

SCIP

Solving Constraint Integer Programs

gastrans.c File Reference

Detailed Description

Simple Gas Transportation Model.

Author
Stefan Vigerske

This example shows how to setup abspower constraints in SCIP when using SCIP as callable library. The example implements a model for the distribution of gas through a network of pipelines, which is formulated as a cost minimization subject to nonlinear flow-pressure relations, material balances, and pressure bounds. The Belgian gas network is used as an example.

The model is taken from the GAMS model library: http://www.gams.com/modlib/libhtml/gastrans.htm

Original model source:

D. de Wolf and Y. Smeers
The Gas Transmission Problem Solved by and Extension of the Simplex Algorithm
Management Science 46, 11 (2000), 1454-1465

Definition in file gastrans.c.

#include <stdio.h>
#include <math.h>
#include "scip/scip.h"
#include "scip/scipdefplugins.h"

Go to the source code of this file.

Macros

#define nnodes   20
 
#define narcs   24
 
#define infinity   1e+20
 

Typedefs

typedef struct NodeData NodeData
 
typedef struct ArcData ArcData
 

Functions

static SCIP_RETCODE setupProblem (SCIP *scip)
 
static SCIP_RETCODE runGastrans (void)
 
int main (int argc, char **argv)
 

Variables

static const NodeData nodedata []
 
static const ArcData arcdata []
 
static const SCIP_Real gastemp = 281.15
 
static const SCIP_Real rugosity = 0.05
 
static const SCIP_Real density = 0.616
 
static const SCIP_Real compressibility = 0.8
 

Macro Definition Documentation

◆ nnodes

◆ narcs

#define narcs   24

number of arcs

Definition at line 68 of file gastrans.c.

Referenced by addGLSCliques(), createMIP(), SCIPdigraphGetNArcs(), separateGLS(), and setupProblem().

◆ infinity

Typedef Documentation

◆ NodeData

typedef struct NodeData NodeData

node data structure

◆ ArcData

typedef struct ArcData ArcData

arc data structure

Function Documentation

◆ setupProblem()

◆ runGastrans()

◆ main()

int main ( int  argc,
char **  argv 
)

main method starting SCIP

Parameters
argcnumber of arguments from the shell
argvarray of shell arguments

Definition at line 358 of file gastrans.c.

References runGastrans(), SCIP_OKAY, and SCIPprintError().

Variable Documentation

◆ nodedata

const NodeData nodedata[]
static
Initial value:
=
{
{"Anderlues", 0.0, 1.2, 0.0, 66.2, 0.0 },
{"Antwerpen", -infinity, -4.034, 30.0, 80.0, 0.0 },
{"Arlon", -infinity, -0.222, 0.0, 66.2, 0.0 },
{"Berneau", 0.0, 0.0, 0.0, 66.2, 0.0 },
{"Blaregnies", -infinity, -15.616, 50.0, 66.2, 0.0 },
{"Brugge", -infinity, -3.918, 30.0, 80.0, 0.0 },
{"Dudzele", 0.0, 8.4, 0.0, 77.0, 2.28 },
{"Gent", -infinity, -5.256, 30.0, 80.0, 0.0 },
{"Liege", -infinity, -6.385, 30.0, 66.2, 0.0 },
{"Loenhout", 0.0, 4.8, 0.0, 77.0, 2.28 },
{"Mons", -infinity, -6.848, 0.0, 66.2, 0.0 },
{"Namur", -infinity, -2.120, 0.0, 66.2, 0.0 },
{"Petange", -infinity, -1.919, 25.0, 66.2, 0.0 },
{"Peronnes", 0.0, 0.96, 0.0, 66.2, 1.68 },
{"Sinsin", 0.0, 0.0, 0.0, 63.0, 0.0 },
{"Voeren", 20.344, 22.012, 50.0, 66.2, 1.68 },
{"Wanze", 0.0, 0.0, 0.0, 66.2, 0.0 },
{"Warnand", 0.0, 0.0, 0.0, 66.2, 0.0 },
{"Zeebrugge", 8.87, 11.594, 0.0, 77.0, 2.28 },
{"Zomergem", 0.0, 0.0, 0.0, 80.0, 0.0 }
}
#define infinity
Definition: gastrans.c:71

data of nodes

Definition at line 74 of file gastrans.c.

Referenced by addBranchingComplementaritiesSOS1(), analyzeConflictOverload(), checkConComponentsVarbound(), checkOverloadViaThetaTree(), collectThetaSubtree(), computeEnergyContribution(), deleteLambdaLeaf(), detectVarboundSOS1(), findResponsibleLambdaLeafTraceEnergy(), findResponsibleLambdaLeafTraceEnvelop(), freeConflictgraph(), freeNodedata(), generateBoundInequalityFromSOS1Nodes(), getBoundConsFromVertices(), inferboundsEdgeFinding(), initConflictgraph(), initImplGraphSOS1(), insertThetanode(), moveNodeToLambda(), nodeGetSolvalVarboundLbSOS1(), nodeGetSolvalVarboundUbSOS1(), passConComponentVarbound(), propVariableNonzero(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), SCIPexprgraphGetSumTreesNSummands(), sepaImplBoundCutsSOS1(), traceLambdaEnergy(), traceLambdaEnvelop(), traceThetaEnvelop(), updateEnvelop(), and updateKeyOnTrace().

◆ arcdata

const ArcData arcdata[]
static
Initial value:
=
{
{ 18, 6, 890.0, 4.0, FALSE },
{ 18, 6, 890.0, 4.0, FALSE },
{ 6, 5, 890.0, 6.0, FALSE },
{ 6, 5, 890.0, 6.0, FALSE },
{ 5, 19, 890.0, 26.0, FALSE },
{ 9, 1, 590.1, 43.0, FALSE },
{ 1, 7, 590.1, 29.0, FALSE },
{ 7, 19, 590.1, 19.0, FALSE },
{ 19, 13, 890.0, 55.0, FALSE },
{ 15, 3, 890.0, 5.0, TRUE },
{ 15, 3, 395.0, 5.0, TRUE },
{ 3, 8, 890.0, 20.0, FALSE },
{ 3, 8, 395.0, 20.0, FALSE },
{ 8, 17, 890.0, 25.0, FALSE },
{ 8, 17, 395.0, 25.0, FALSE },
{ 17, 11, 890.0, 42.0, FALSE },
{ 11, 0, 890.0, 40.0, FALSE },
{ 0, 13, 890.0, 5.0, FALSE },
{ 13, 10, 890.0, 10.0, FALSE },
{ 10, 4, 890.0, 25.0, FALSE },
{ 17, 16, 395.5, 10.5, FALSE },
{ 16, 14, 315.5, 26.0, TRUE },
{ 14, 2, 315.5, 98.0, FALSE },
{ 2, 12, 315.5, 6.0, FALSE }
}
#define FALSE
Definition: def.h:64
#define TRUE
Definition: def.h:63

data of arcs

Definition at line 100 of file gastrans.c.

◆ gastemp

const SCIP_Real gastemp = 281.15
static

gas temperatur (K)

Definition at line 130 of file gastrans.c.

Referenced by setupProblem().

◆ rugosity

const SCIP_Real rugosity = 0.05
static

absolute rugosity (mm)

Definition at line 133 of file gastrans.c.

Referenced by setupProblem().

◆ density

const SCIP_Real density = 0.616
static

density of gas relative to air

Definition at line 136 of file gastrans.c.

Referenced by setupProblem(), and tcliquegraphConstructCliqueTable().

◆ compressibility

const SCIP_Real compressibility = 0.8
static

compressibility factor

Definition at line 139 of file gastrans.c.

Referenced by setupProblem().