Detailed Description
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:
- 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.
Go to the source code of this file.
Data Structures | |
struct | NodeData |
struct | ArcData |
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
#define nnodes 20 |
number of nodes (towns)
Definition at line 65 of file gastrans.c.
Referenced by addBoundCutSepa(), addNodesInformation(), applyRepair(), buildsolgraph(), checkLeavesBelowIncumbent(), COLORprobGetComplementaryGraph(), COLORprobSetUpArrayOfCons(), compEdges(), compSubcliques(), computeBranchingPriorities(), computeDegConsTree(), computeMinDistance(), computeNewSols(), computeNextAdjacency(), computeSteinerTree(), computeSteinerTreeDijk(), computeSteinerTreeVnoi(), createClique(), createConsStoreGraphAtRoot(), createConstraints(), createDegreeConstraints(), createMIP(), createNewSol(), createVariables(), depthFirstSearch(), dualascent_init(), dualCostIsValid(), dualcostVarfixing(), ensureSuccessorsSize(), exprgraphMoveNode(), fillGraphByColoredCoefficients(), findCumulativeConss(), findDaRoots(), findPrecedenceConss(), findSubtour(), generateBoundInequalityFromSOS1Nodes(), getcloseterms(), getlecloseterms(), getNViolatedEdges(), getRSD(), globalrelabel(), graph_get2next(), graph_get3next(), graph_get4next(), graph_get4nextTTerms(), graph_get_csr(), graph_grid_create(), graph_init_history(), graph_mincut_exec(), graph_mincut_exit(), graph_obstgrid_create(), graph_pack(), graph_path_exec(), graph_path_execX(), graph_path_invroot(), graph_path_st(), graph_path_st_pcmw(), graph_path_st_pcmw_extend(), graph_path_st_pcmw_full(), graph_path_st_rmw(), graph_path_st_rpc(), graph_pc_2mw(), graph_pc_2org(), graph_pc_2pc(), graph_pc_2rmw(), graph_pc_2rpc(), graph_pc_2trans(), graph_pc_getRsap(), graph_pc_getSap(), graph_pc_getSapShift(), graph_sol_markPcancestors(), graph_sol_reroot(), graph_sol_valid(), graph_termsReachable(), graph_trail_arr(), graph_valid(), graph_voronoiMw(), graph_voronoiWithDist(), graph_voronoiWithRadius(), graph_voronoiWithRadiusMw(), greedyInitialColoring(), greedyStableSet(), hasUncoloredNode(), index2nodes(), initialise(), initReceivedSubproblem(), level0(), level0save(), nodes2index(), pertubateEdgeCosts(), presolveCons(), readCol(), reduce_ans(), reduce_ansAdv(), reduce_ansAdv2(), reduce_bd34(), reduce_bdr(), reduce_bound(), reduce_boundHop(), reduce_boundHopR(), reduce_boundHopRc(), reduce_boundMw(), reduce_boundPrune(), reduce_chain2(), reduce_check3Tree(), reduce_cnsAdv(), reduce_da(), reduce_daPcMw(), reduce_daSlackPrune(), reduce_daSlackPruneMw(), reduce_extendedEdge(), reduce_getSd(), reduce_getSdPcMw(), reduce_ledge(), reduce_nnp(), reduce_npv(), reduce_nts(), reduce_nv(), reduce_nvAdv(), reduce_rpt(), reduce_sd(), reduce_sdPc(), reduce_sdsp(), reduce_sdspSap(), reduce_simple(), reduce_simple_hc(), reduce_simple_mw(), reduce_simple_pc(), reduce_simple_sap(), reduce_sl(), reduceCheckEdge(), reduceHc(), reduceMw(), reduceNw(), reducePc(), reducePcMw(), reduceRedcostExtended(), reduceSap(), reduceSPG(), reduceStp(), reduceWithEdgeFixingBounds(), reduceWithNodeFixingBounds(), reduceWithNodeReplaceBounds(), reinitialise(), reopttreeGetNNodes(), runTabuCol(), scale_coords(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONCSOLVEREXEC(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSPROP(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NODESELSELECT(), SCIP_DECL_PRICERFARKAS(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIPaddNNodes(), SCIPbtPrintGml(), SCIPcreateProbColoring(), SCIPdigraphAddArc(), SCIPdigraphAddArcSafe(), SCIPdigraphComputeDirectedComponents(), SCIPdigraphCopy(), SCIPdigraphCreate(), SCIPdigraphGetNodeData(), SCIPdigraphGetNSuccessors(), SCIPdigraphGetSuccessors(), SCIPdigraphGetSuccessorsData(), SCIPdigraphResize(), SCIPdigraphSetNodeData(), SCIPdigraphSetNSuccessors(), SCIPnodeGetAncestorBranchingPath(), SCIPprintNodeRootPath(), SCIPprobdataCreate(), SCIPrealHashCode(), SCIPsolveCIP(), SCIPStpBranchruleInitNodeState(), SCIPStpDualAscent(), SCIPStpDualAscentPcMw(), SCIPStpHeurAscendPruneRun(), SCIPStpHeurLocalExtendPcMw(), SCIPStpHeurLocalRun(), SCIPStpHeurPruneRun(), SCIPStpHeurPruneUpdateSols(), SCIPStpHeurRecExclude(), SCIPStpHeurRecRun(), SCIPStpHeurSlackPruneRun(), SCIPStpHeurSlackPruneRunPcMw(), SCIPStpHeurTMBuildTree(), SCIPStpHeurTMBuildTreeDc(), SCIPStpHeurTMBuildTreePcMw(), SCIPStpHeurTMCompStarts(), SCIPStpHeurTMPrune(), SCIPStpHeurTMPrunePc(), SCIPStpHeurTMRun(), SCIPStpHeurTMRunLP(), SCIPtreeGetAvgLowerbound(), sddeltable(), selectBestNode(), selectBranchingVertexByDegree(), selectBranchingVertexByLp(), selectBranchingVertexByLp2Flow(), selectBranchingVertexBySol(), sep_2cut(), setNodeSolArray(), setupProblem(), setVnoiDistances(), sortGenVBounds(), sortNodes(), SYMcomputeSymmetryGenerators(), tarjan(), TCLIQUE_ISEDGE(), TCLIQUE_NEWSOL(), TCLIQUE_SELECTADJNODES(), tcliqueAddEdge(), tcliqueFlush(), tcliqueGetFirstAdjedge(), tcliqueGetLastAdjedge(), tcliquegraphConstructCliqueTable(), tcliqueMaxClique(), transitiveClosure(), treeNodesToQueue(), updateEdgeFixingBounds(), updateFixingBounds(), updateNodeFixingBounds(), updateNodeReplaceBounds(), updateSolNodeArray(), utdist(), wrapperRins(), and tsp::ReaderTSP::~ReaderTSP().
◆ narcs
#define narcs 24 |
number of arcs
Definition at line 68 of file gastrans.c.
Referenced by addGLSCliques(), createMIP(), SCIPdigraphGetNArcs(), separateGLS(), and setupProblem().
◆ infinity
#define infinity 1e+20 |
value we use to represent infinity
Definition at line 71 of file gastrans.c.
Referenced by abs(), cos(), exp(), exprEvalUser(), fabs(), log(), operator*(), operator+(), operator-(), operator/(), pow(), resolvePropagation(), SCIP_DECL_EXPRCURV(), SCIP_DECL_EXPRINTEVAL(), SCIP_DECL_NLPICOPY(), SCIP_DECL_NLPISOLVE(), 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(), SCIPnlpiOraclePrintProblem(), SCIPnlpiOraclePrintProblemGams(), SCIPnlpiOracleSetInfinity(), setupProblem(), sign(), signpow(), sin(), sqrt(), and square().
Typedef Documentation
◆ NodeData
◆ ArcData
Function Documentation
◆ setupProblem()
|
static |
sets up problem
- Parameters
-
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().
◆ runGastrans()
|
static |
Definition at line 313 of file gastrans.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPfree(), SCIPincludeDefaultPlugins(), SCIPinfoMessage(), SCIPpresolve(), SCIPprintOrigProblem(), SCIPsolve(), and setupProblem().
Referenced by main().
◆ main()
int main | ( | int | argc, |
char ** | argv | ||
) |
main method starting SCIP
- Parameters
-
argc number of arguments from the shell argv array of shell arguments
Definition at line 356 of file gastrans.c.
References runGastrans(), SCIP_OKAY, and SCIPprintError().
Variable Documentation
◆ nodedata
|
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().
◆ arcdata
|
static |
data of arcs
Definition at line 100 of file gastrans.c.
◆ gastemp
|
static |
◆ rugosity
|
static |
◆ density
|
static |
density of gas relative to air
Definition at line 136 of file gastrans.c.
Referenced by setupProblem(), and tcliquegraphConstructCliqueTable().
◆ compressibility
|
static |