Simple Gas Transportation Model.
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:
Definition in file gastrans.c.
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 |
#define nnodes 20 |
number of nodes (towns)
Definition at line 65 of file gastrans.c.
Referenced by addBoundCutSepa(), addEdgeToAuxGraph(), addNodesInformation(), applyRepair(), checkLeavesBelowIncumbent(), compSubcliques(), computeMinDistance(), createClique(), createMIP(), createNewSol(), depthFirstSearch(), ensureSuccessorsSize(), exprgraphMoveNode(), findCumulativeConss(), findPrecedenceConss(), findSubtour(), generateBoundInequalityFromSOS1Nodes(), presolveCons(), reopttreeGetNNodes(), SCIP_DECL_CONCSOLVEREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NODESELSELECT(), SCIP_DECL_READERREAD(), SCIPaddNNodes(), SCIPbtPrintGml(), SCIPdigraphAddArc(), SCIPdigraphAddArcSafe(), SCIPdigraphComputeDirectedComponents(), SCIPdigraphCopy(), SCIPdigraphCreate(), SCIPdigraphGetNodeData(), SCIPdigraphGetNSuccessors(), SCIPdigraphGetSuccessors(), SCIPdigraphGetSuccessorsData(), SCIPdigraphResize(), SCIPdigraphSetNodeData(), SCIPdigraphSetNSuccessors(), SCIPnodeGetAncestorBranchingPath(), SCIPprintNodeRootPath(), SCIPsolveCIP(), SCIPtreeGetAvgLowerbound(), selectBestNode(), setupProblem(), sortGenVBounds(), tarjan(), TCLIQUE_ISEDGE(), TCLIQUE_NEWSOL(), TCLIQUE_SELECTADJNODES(), tcliqueAddEdge(), tcliqueFlush(), tcliqueGetFirstAdjedge(), tcliqueGetLastAdjedge(), tcliquegraphConstructCliqueTable(), tcliqueMaxClique(), transitiveClosure(), treeNodesToQueue(), and tsp::ReaderTSP::~ReaderTSP().
#define narcs 24 |
number of arcs
Definition at line 68 of file gastrans.c.
Referenced by addGLSCliques(), createMIP(), SCIPdigraphGetNArcs(), separateGLS(), and setupProblem().
#define infinity 1e+20 |
value we use to represent infinity
Definition at line 71 of file gastrans.c.
Referenced by abs(), cos(), exp(), exprEvalUser(), log(), operator*(), operator+(), operator-(), operator/(), pow(), resolvePropagation(), SCIP_DECL_EXPRCURV(), SCIP_DECL_EXPRINTEVAL(), SCIPexprintEvalInt(), SCIPintervalAddInf(), SCIPintervalAddScalar(), SCIPintervalAddSup(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalExp(), SCIPintervalIsEntire(), SCIPintervalLog(), SCIPintervalMulInf(), SCIPintervalMulScalarInf(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPowerScalar(), SCIPintervalQuadBivar(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalarsInf(), SCIPintervalScalprodScalarsSup(), SCIPintervalSetEntire(), SCIPintervalSignPowerScalar(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), SCIPintervalSquareRoot(), SCIPintervalSub(), SCIPlpiInfinity(), SCIPlpiIsInfinity(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPnlpiOraclePrintProblem(), SCIPnlpiOraclePrintProblemGams(), SCIPnlpiOracleSetInfinity(), setupProblem(), sign(), signpow(), sin(), sqrt(), and square().
|
static |
sets up problem
scip | SCIP data structure |
Definition at line 145 of file gastrans.c.
References active, compressibility, NodeData::cost, density, gastemp, infinity, ArcData::length, NodeData::name, narcs, nnodes, ArcData::node1, NULL, pow(), NodeData::pressurelower, NodeData::pressureupper, rugosity, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPcreateConsBasicAbspower(), SCIPcreateConsBasicLinear(), SCIPcreateProbBasic(), SCIPcreateVarBasic(), SCIPinfinity(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), NodeData::supplylower, and NodeData::supplyupper.
Referenced by runGastrans().
|
static |
Definition at line 313 of file gastrans.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPfree(), SCIPfreeTransform(), SCIPincludeDefaultPlugins(), SCIPinfoMessage(), SCIPpresolve(), SCIPprintOrigProblem(), SCIPsolve(), and setupProblem().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
main method starting SCIP
argc | number of arguments from the shell |
argv | array of shell arguments |
Definition at line 358 of file gastrans.c.
References runGastrans(), SCIP_OKAY, and SCIPprintError().
|
static |
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().
|
static |
data of arcs
Definition at line 100 of file gastrans.c.
|
static |
|
static |
|
static |
density of gas relative to air
Definition at line 136 of file gastrans.c.
Referenced by setupProblem(), and tcliquegraphConstructCliqueTable().
|
static |