ruby-cbc 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/Rakefile +0 -2
- data/lib/ruby-cbc.rb +1 -1
- data/lib/ruby-cbc/problem.rb +6 -8
- data/lib/ruby-cbc/version.rb +1 -1
- data/ruby-cbc.gemspec +3 -2
- metadata +17 -287
- data/ext/ruby-cbc/cbc.i +0 -15
- data/ext/ruby-cbc/cbc_wrap.c +0 -4618
- data/ext/ruby-cbc/extconf.rb +0 -60
- data/ext/ruby-cbc/install/bin/cbc +0 -0
- data/ext/ruby-cbc/install/bin/clp +0 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +0 -24
- data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +0 -62
- data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +0 -78
- data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +0 -100
- data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +0 -242
- data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +0 -236
- data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +0 -303
- data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +0 -39
- data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +0 -120
- data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +0 -47
- data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcConfig.h +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +0 -168
- data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +0 -482
- data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +0 -57
- data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +0 -137
- data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +0 -169
- data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +0 -56
- data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +0 -67
- data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +0 -207
- data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +0 -161
- data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +0 -682
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +0 -309
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +0 -192
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +0 -340
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +0 -271
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +0 -77
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +0 -102
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +0 -1406
- data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +0 -2952
- data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +0 -351
- data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +0 -4134
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +0 -532
- data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +0 -286
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +0 -564
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +0 -114
- data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +0 -447
- data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +0 -258
- data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +0 -490
- data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +0 -372
- data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +0 -381
- data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +0 -464
- data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +0 -115
- data/ext/ruby-cbc/install/include/coin/CglClique.hpp +0 -308
- data/ext/ruby-cbc/install/include/coin/CglConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +0 -121
- data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +0 -189
- data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +0 -371
- data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +0 -364
- data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +0 -313
- data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +0 -204
- data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +0 -306
- data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +0 -130
- data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +0 -104
- data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +0 -50
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +0 -429
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +0 -427
- data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +0 -160
- data/ext/ruby-cbc/install/include/coin/CglParam.hpp +0 -93
- data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +0 -492
- data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +0 -543
- data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +0 -448
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +0 -494
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +0 -495
- data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +0 -240
- data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +0 -174
- data/ext/ruby-cbc/install/include/coin/CglStored.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +0 -180
- data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +0 -565
- data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +0 -133
- data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +0 -113
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +0 -294
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +0 -162
- data/ext/ruby-cbc/install/include/coin/ClpConfig.h +0 -17
- data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +0 -108
- data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +0 -119
- data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +0 -71
- data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +0 -153
- data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +0 -186
- data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +0 -381
- data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +0 -432
- data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +0 -358
- data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +0 -570
- data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +0 -524
- data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +0 -131
- data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +0 -1307
- data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +0 -229
- data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +0 -401
- data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +0 -134
- data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +0 -638
- data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +0 -126
- data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +0 -290
- data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +0 -299
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +0 -72
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +0 -1797
- data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +0 -300
- data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +0 -277
- data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +0 -244
- data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +0 -446
- data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +0 -525
- data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +0 -176
- data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +0 -149
- data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +0 -419
- data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +0 -383
- data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CoinError.hpp +0 -257
- data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +0 -2044
- data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +0 -177
- data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +0 -1111
- data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +0 -1164
- data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +0 -805
- data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +0 -666
- data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +0 -1054
- data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +0 -441
- data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +0 -1056
- data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +0 -947
- data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +0 -657
- data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +0 -269
- data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +0 -644
- data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +0 -73
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +0 -85
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +0 -226
- data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +0 -116
- data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +0 -181
- data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +0 -61
- data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +0 -51
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +0 -1842
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +0 -105
- data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +0 -112
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +0 -101
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +0 -63
- data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +0 -44
- data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +0 -465
- data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +0 -148
- data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +0 -431
- data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +0 -528
- data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +0 -476
- data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +0 -678
- data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +0 -19
- data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +0 -456
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +0 -211
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +0 -488
- data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +0 -115
- data/ext/ruby-cbc/install/include/coin/Idiot.hpp +0 -298
- data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +0 -1005
- data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +0 -764
- data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +0 -534
- data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +0 -1509
- data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +0 -35
- data/ext/ruby-cbc/install/include/coin/OsiConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +0 -474
- data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +0 -252
- data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +0 -331
- data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +0 -152
- data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +0 -2143
- data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +0 -374
- data/ext/ruby-cbc/install/lib/libCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.la +0 -35
- data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.la +0 -35
- data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +0 -12
@@ -1,805 +0,0 @@
|
|
1
|
-
/* $Id: CoinLpIO.hpp 1749 2014-10-24 20:00:14Z tkr $ */
|
2
|
-
// Last edit: 11/5/08
|
3
|
-
//
|
4
|
-
// Name: CoinLpIO.hpp; Support for Lp files
|
5
|
-
// Author: Francois Margot
|
6
|
-
// Tepper School of Business
|
7
|
-
// Carnegie Mellon University, Pittsburgh, PA 15213
|
8
|
-
// email: fmargot@andrew.cmu.edu
|
9
|
-
// Date: 12/28/03
|
10
|
-
//-----------------------------------------------------------------------------
|
11
|
-
// Copyright (C) 2003, Francois Margot, International Business Machines
|
12
|
-
// Corporation and others. All Rights Reserved.
|
13
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
14
|
-
|
15
|
-
#ifndef CoinLpIO_H
|
16
|
-
#define CoinLpIO_H
|
17
|
-
|
18
|
-
#include <cstdio>
|
19
|
-
|
20
|
-
#include "CoinPackedMatrix.hpp"
|
21
|
-
#include "CoinMessage.hpp"
|
22
|
-
class CoinSet;
|
23
|
-
|
24
|
-
const int MAX_OBJECTIVES = 2;
|
25
|
-
|
26
|
-
typedef int COINColumnIndex;
|
27
|
-
|
28
|
-
/** Class to read and write Lp files
|
29
|
-
|
30
|
-
Lp file format:
|
31
|
-
|
32
|
-
/ this is a comment <BR>
|
33
|
-
\ this too <BR>
|
34
|
-
Min<BR>
|
35
|
-
obj: x0 + x1 + 3 x2 - 4.5 xyr + 1 <BR>
|
36
|
-
s.t. <BR>
|
37
|
-
cons1: x0 - x2 - 2.3 x4 <= 4.2 / this is another comment <BR>
|
38
|
-
c2: x1 + x2 >= 1 <BR>
|
39
|
-
cc: x1 + x2 + xyr = 2 <BR>
|
40
|
-
Bounds <BR>
|
41
|
-
0 <= x1 <= 3 <BR>
|
42
|
-
1 >= x2 <BR>
|
43
|
-
x3 = 1 <BR>
|
44
|
-
-2 <= x4 <= Inf <BR>
|
45
|
-
xyr free <BR>
|
46
|
-
Integers <BR>
|
47
|
-
x0 <BR>
|
48
|
-
Generals <BR>
|
49
|
-
x1 xyr <BR>
|
50
|
-
Binaries <BR>
|
51
|
-
x2 <BR>
|
52
|
-
End
|
53
|
-
|
54
|
-
Notes: <UL>
|
55
|
-
<LI> Keywords are: Min, Max, Minimize, Maximize, s.t., Subject To,
|
56
|
-
Bounds, Integers, Generals, Binaries, End, Free, Inf.
|
57
|
-
<LI> Keywords are not case sensitive and may be in plural or singular form.
|
58
|
-
They should not be used as objective, row or column names.
|
59
|
-
<LI> Bounds, Integers, Generals, Binaries sections are optional.
|
60
|
-
<LI> Generals and Integers are synonymous.
|
61
|
-
<LI> Bounds section (if any) must come before Integers, Generals, and
|
62
|
-
Binaries sections.
|
63
|
-
<LI> Row names must be followed by ':' without blank space.
|
64
|
-
Row names are optional. If row names are present,
|
65
|
-
they must be distinct (if the k-th constraint has no given name, its name
|
66
|
-
is set automatically to "consk" for k=0,...,).
|
67
|
-
For valid row names, see the method is_invalid_name().
|
68
|
-
<LI> Column names must be followed by a blank space. They must be distinct.
|
69
|
-
For valid column names, see the method is_invalid_name().
|
70
|
-
<LI> Multiple objectives may be specified, but when there are multiple
|
71
|
-
objectives, they must have names (to indicate where each one starts).
|
72
|
-
<LI> The objective function names must be followed by ':' without blank space.
|
73
|
-
If there is a single objective, the objective function name is optional.
|
74
|
-
If no name is given, the name is set to "obj" by default.
|
75
|
-
For valid objective function names, see the method is_invalid_name().
|
76
|
-
<LI> Ranged constraints are written as two constraints.
|
77
|
-
If a name is given for a ranged constraint, the upper bound constraint
|
78
|
-
has that name and the lower bound constraint has that name with "_low"
|
79
|
-
as suffix. This should be kept in mind when assigning names to ranged
|
80
|
-
constraint, as the resulting name must be distinct from all the other
|
81
|
-
names and be considered valid by the method is_invalid_name().
|
82
|
-
<LI> At most one term related to any single variable may appear in the
|
83
|
-
objective function; if more than one term are present, only the last
|
84
|
-
one is taken into account.
|
85
|
-
At most one constant term may appear in the objective function;
|
86
|
-
if present, it must appear last.
|
87
|
-
<LI> Default bounds are 0 for lower bound and +infinity for upper bound.
|
88
|
-
<LI> Free variables get default lower bound -infinity and
|
89
|
-
default upper bound +infinity. Writing "x0 Free" in an
|
90
|
-
LP file means "set lower bound on x0 to -infinity".
|
91
|
-
<LI> If more than one upper (resp. lower) bound on a variable appears in
|
92
|
-
the Bounds section, the last one is the one taken into
|
93
|
-
account. The bounds for a binary variable are set to 0/1 only if this
|
94
|
-
bound is stronger than the bound obtained from the Bounds section.
|
95
|
-
<LI> Numbers larger than DBL_MAX (or larger than 1e+400) in the input file
|
96
|
-
might crash the code.
|
97
|
-
<LI> A comment must start with '\' or '/'. That symbol must either be
|
98
|
-
the first character of a line or be preceded by a blank space. The
|
99
|
-
comment ends at the end of the
|
100
|
-
line. Comments are skipped while reading an Lp file and they may be
|
101
|
-
inserted anywhere.
|
102
|
-
</UL>
|
103
|
-
*/
|
104
|
-
class CoinLpIO {
|
105
|
-
friend void CoinLpIOUnitTest(const std::string & lpDir);
|
106
|
-
public:
|
107
|
-
|
108
|
-
/**@name Constructor and Destructor */
|
109
|
-
//@{
|
110
|
-
/// Default Constructor
|
111
|
-
CoinLpIO();
|
112
|
-
|
113
|
-
/// Does the heavy lifting for destruct and assignment.
|
114
|
-
void gutsOfDestructor();
|
115
|
-
|
116
|
-
/// Does the heavy lifting for copy and assignment
|
117
|
-
void gutsOfCopy(const CoinLpIO &);
|
118
|
-
|
119
|
-
/// assignment operator
|
120
|
-
CoinLpIO & operator = (const CoinLpIO& rhs) ;
|
121
|
-
|
122
|
-
/// Copy constructor
|
123
|
-
CoinLpIO (const CoinLpIO &);
|
124
|
-
|
125
|
-
/// Destructor
|
126
|
-
~CoinLpIO();
|
127
|
-
|
128
|
-
/** Free the vector previous_names_[section] and set
|
129
|
-
card_previous_names_[section] to 0.
|
130
|
-
section = 0 for row names,
|
131
|
-
section = 1 for column names.
|
132
|
-
*/
|
133
|
-
void freePreviousNames(const int section);
|
134
|
-
|
135
|
-
/// Free all memory (except memory related to hash tables and objName_).
|
136
|
-
void freeAll();
|
137
|
-
//@}
|
138
|
-
|
139
|
-
/** A quick inlined function to convert from lb/ub style constraint
|
140
|
-
definition to sense/rhs/range style */
|
141
|
-
inline void
|
142
|
-
convertBoundToSense(const double lower, const double upper,
|
143
|
-
char& sense, double& right, double& range) const;
|
144
|
-
|
145
|
-
/**@name Queries */
|
146
|
-
//@{
|
147
|
-
|
148
|
-
/// Get the problem name
|
149
|
-
const char * getProblemName() const;
|
150
|
-
|
151
|
-
/// Set problem name
|
152
|
-
void setProblemName(const char *name);
|
153
|
-
|
154
|
-
/// Get number of columns
|
155
|
-
int getNumCols() const;
|
156
|
-
|
157
|
-
/// Get number of rows
|
158
|
-
int getNumRows() const;
|
159
|
-
|
160
|
-
/// Get number of nonzero elements
|
161
|
-
int getNumElements() const;
|
162
|
-
|
163
|
-
/// Get pointer to array[getNumCols()] of column lower bounds
|
164
|
-
const double * getColLower() const;
|
165
|
-
|
166
|
-
/// Get pointer to array[getNumCols()] of column upper bounds
|
167
|
-
const double * getColUpper() const;
|
168
|
-
|
169
|
-
/// Get pointer to array[getNumRows()] of row lower bounds
|
170
|
-
const double * getRowLower() const;
|
171
|
-
|
172
|
-
/// Get pointer to array[getNumRows()] of row upper bounds
|
173
|
-
const double * getRowUpper() const;
|
174
|
-
/** Get pointer to array[getNumRows()] of constraint senses.
|
175
|
-
<ul>
|
176
|
-
<li>'L': <= constraint
|
177
|
-
<li>'E': = constraint
|
178
|
-
<li>'G': >= constraint
|
179
|
-
<li>'R': ranged constraint
|
180
|
-
<li>'N': free constraint
|
181
|
-
</ul>
|
182
|
-
*/
|
183
|
-
const char * getRowSense() const;
|
184
|
-
|
185
|
-
/** Get pointer to array[getNumRows()] of constraint right-hand sides.
|
186
|
-
|
187
|
-
Given constraints with upper (rowupper) and/or lower (rowlower) bounds,
|
188
|
-
the constraint right-hand side (rhs) is set as
|
189
|
-
<ul>
|
190
|
-
<li> if rowsense()[i] == 'L' then rhs()[i] == rowupper()[i]
|
191
|
-
<li> if rowsense()[i] == 'G' then rhs()[i] == rowlower()[i]
|
192
|
-
<li> if rowsense()[i] == 'R' then rhs()[i] == rowupper()[i]
|
193
|
-
<li> if rowsense()[i] == 'N' then rhs()[i] == 0.0
|
194
|
-
</ul>
|
195
|
-
*/
|
196
|
-
const double * getRightHandSide() const;
|
197
|
-
|
198
|
-
/** Get pointer to array[getNumRows()] of row ranges.
|
199
|
-
|
200
|
-
Given constraints with upper (rowupper) and/or lower (rowlower) bounds,
|
201
|
-
the constraint range (rowrange) is set as
|
202
|
-
<ul>
|
203
|
-
<li> if rowsense()[i] == 'R' then
|
204
|
-
rowrange()[i] == rowupper()[i] - rowlower()[i]
|
205
|
-
<li> if rowsense()[i] != 'R' then
|
206
|
-
rowrange()[i] is 0.0
|
207
|
-
</ul>
|
208
|
-
Put another way, only ranged constraints have a nontrivial value for
|
209
|
-
rowrange.
|
210
|
-
*/
|
211
|
-
const double * getRowRange() const;
|
212
|
-
|
213
|
-
/// Get pointer to array[getNumCols()] of objective function coefficients
|
214
|
-
const int getNumObjectives() const;
|
215
|
-
|
216
|
-
/// Get pointer to array[getNumCols()] of objective function coefficients
|
217
|
-
const double * getObjCoefficients() const;
|
218
|
-
|
219
|
-
/// Get pointer to array[getNumCols()] of objective function coefficients for objective j
|
220
|
-
const double * getObjCoefficients(int j) const;
|
221
|
-
|
222
|
-
/// Get pointer to row-wise copy of the coefficient matrix
|
223
|
-
const CoinPackedMatrix * getMatrixByRow() const;
|
224
|
-
|
225
|
-
/// Get pointer to column-wise copy of the coefficient matrix
|
226
|
-
const CoinPackedMatrix * getMatrixByCol() const;
|
227
|
-
|
228
|
-
/// Get objective function name
|
229
|
-
const char * getObjName() const;
|
230
|
-
|
231
|
-
/// Get objective function name for objective j
|
232
|
-
const char * getObjName(int j) const;
|
233
|
-
|
234
|
-
/// Get pointer to array[*card_prev] of previous row names.
|
235
|
-
/// The value of *card_prev might be different than getNumRows()+1 if
|
236
|
-
/// non distinct
|
237
|
-
/// row names were present or if no previous names were saved or if
|
238
|
-
/// the object was holding a different problem before.
|
239
|
-
void getPreviousRowNames(char const * const * prev,
|
240
|
-
int *card_prev) const;
|
241
|
-
|
242
|
-
/// Get pointer to array[*card_prev] of previous column names.
|
243
|
-
/// The value of *card_prev might be different than getNumCols() if non
|
244
|
-
/// distinct column names were present of if no previous names were saved,
|
245
|
-
/// or if the object was holding a different problem before.
|
246
|
-
void getPreviousColNames(char const * const * prev,
|
247
|
-
int *card_prev) const;
|
248
|
-
|
249
|
-
/// Get pointer to array[getNumRows()+1] of row names, including
|
250
|
-
/// objective function name as last entry.
|
251
|
-
char const * const * getRowNames() const;
|
252
|
-
|
253
|
-
/// Get pointer to array[getNumCols()] of column names
|
254
|
-
char const * const *getColNames() const;
|
255
|
-
|
256
|
-
/// Return the row name for the specified index.
|
257
|
-
/// Return the objective function name if index = getNumRows().
|
258
|
-
/// Return 0 if the index is out of range or if row names are not defined.
|
259
|
-
const char * rowName(int index) const;
|
260
|
-
|
261
|
-
/// Return the column name for the specified index.
|
262
|
-
/// Return 0 if the index is out of range or if column names are not
|
263
|
-
/// defined.
|
264
|
-
const char * columnName(int index) const;
|
265
|
-
|
266
|
-
/// Return the index for the specified row name.
|
267
|
-
/// Return getNumRows() for the objective function name.
|
268
|
-
/// Return -1 if the name is not found.
|
269
|
-
int rowIndex(const char * name) const;
|
270
|
-
|
271
|
-
/// Return the index for the specified column name.
|
272
|
-
/// Return -1 if the name is not found.
|
273
|
-
int columnIndex(const char * name) const;
|
274
|
-
|
275
|
-
///Returns the (constant) objective offset
|
276
|
-
double objectiveOffset() const;
|
277
|
-
|
278
|
-
///Returns the (constant) objective offset for objective j
|
279
|
-
double objectiveOffset(int j) const;
|
280
|
-
|
281
|
-
/// Set objective offset
|
282
|
-
inline void setObjectiveOffset(double value)
|
283
|
-
{ objectiveOffset_[0] = value;}
|
284
|
-
|
285
|
-
/// Set objective offset
|
286
|
-
inline void setObjectiveOffset(double value, int j)
|
287
|
-
{ objectiveOffset_[j] = value;}
|
288
|
-
|
289
|
-
/// Return true if a column is an integer (binary or general
|
290
|
-
/// integer) variable
|
291
|
-
bool isInteger(int columnNumber) const;
|
292
|
-
|
293
|
-
/// Get characteristic vector of integer variables
|
294
|
-
const char * integerColumns() const;
|
295
|
-
//@}
|
296
|
-
|
297
|
-
/**@name Parameters */
|
298
|
-
//@{
|
299
|
-
/// Get infinity
|
300
|
-
double getInfinity() const;
|
301
|
-
|
302
|
-
/// Set infinity. Any number larger is considered infinity.
|
303
|
-
/// Default: DBL_MAX
|
304
|
-
void setInfinity(const double);
|
305
|
-
|
306
|
-
/// Get epsilon
|
307
|
-
double getEpsilon() const;
|
308
|
-
|
309
|
-
/// Set epsilon.
|
310
|
-
/// Default: 1e-5.
|
311
|
-
void setEpsilon(const double);
|
312
|
-
|
313
|
-
/// Get numberAcross, the number of monomials to be printed per line
|
314
|
-
int getNumberAcross() const;
|
315
|
-
|
316
|
-
/// Set numberAcross.
|
317
|
-
/// Default: 10.
|
318
|
-
void setNumberAcross(const int);
|
319
|
-
|
320
|
-
/// Get decimals, the number of digits to write after the decimal point
|
321
|
-
int getDecimals() const;
|
322
|
-
|
323
|
-
/// Set decimals.
|
324
|
-
/// Default: 5
|
325
|
-
void setDecimals(const int);
|
326
|
-
//@}
|
327
|
-
|
328
|
-
/**@name Public methods */
|
329
|
-
//@{
|
330
|
-
/** Set the data of the object.
|
331
|
-
Set it from the coefficient matrix m, the lower bounds
|
332
|
-
collb, the upper bounds colub, objective function obj_coeff,
|
333
|
-
integrality vector integrality, lower/upper bounds on the constraints.
|
334
|
-
The sense of optimization of the objective function is assumed to be
|
335
|
-
a minimization.
|
336
|
-
Numbers larger than DBL_MAX (or larger than 1e+400)
|
337
|
-
might crash the code. There are two version. The second one is for
|
338
|
-
setting multiple objectives.
|
339
|
-
*/
|
340
|
-
void setLpDataWithoutRowAndColNames(
|
341
|
-
const CoinPackedMatrix& m,
|
342
|
-
const double* collb, const double* colub,
|
343
|
-
const double* obj_coeff,
|
344
|
-
const char* integrality,
|
345
|
-
const double* rowlb, const double* rowub);
|
346
|
-
|
347
|
-
void setLpDataWithoutRowAndColNames(
|
348
|
-
const CoinPackedMatrix& m,
|
349
|
-
const double* collb, const double* colub,
|
350
|
-
const double* obj_coeff[MAX_OBJECTIVES],
|
351
|
-
int num_objectives,
|
352
|
-
const char* integrality,
|
353
|
-
const double* rowlb, const double* rowub);
|
354
|
-
|
355
|
-
/** Return 0 if buff is a valid name for a row, a column or objective
|
356
|
-
function, return a positive number otherwise.
|
357
|
-
If parameter ranged = true, the name is intended for a ranged
|
358
|
-
constraint. <BR>
|
359
|
-
Return 1 if the name has more than 100 characters (96 characters
|
360
|
-
for a ranged constraint name, as "_low" will be added to the name).<BR>
|
361
|
-
Return 2 if the name starts with a number.<BR>
|
362
|
-
Return 3 if the name is not built with
|
363
|
-
the letters a to z, A to Z, the numbers 0 to 9 or the characters
|
364
|
-
" ! # $ % & ( ) . ; ? @ _ ' ` { } ~ <BR>
|
365
|
-
Return 4 if the name is a keyword.<BR>
|
366
|
-
Return 5 if the name is empty or NULL. */
|
367
|
-
int is_invalid_name(const char *buff, const bool ranged) const;
|
368
|
-
|
369
|
-
/** Return 0 if each of the card_vnames entries of vnames is a valid name,
|
370
|
-
return a positive number otherwise. The return value, if not 0, is the
|
371
|
-
return value of is_invalid_name() for the last invalid name
|
372
|
-
in vnames. If check_ranged = true, the names are row names and
|
373
|
-
names for ranged constaints must be checked for additional restrictions
|
374
|
-
since "_low" will be added to the name if an Lp file is written.
|
375
|
-
When check_ranged = true, card_vnames must have getNumRows()+1 entries,
|
376
|
-
with entry vnames[getNumRows()] being the
|
377
|
-
name of the objective function.
|
378
|
-
For a description of valid names and return values, see the method
|
379
|
-
is_invalid_name().
|
380
|
-
|
381
|
-
This method must not be called with check_ranged = true before
|
382
|
-
setLpDataWithoutRowAndColNames() has been called, since access
|
383
|
-
to the indices of all the ranged constraints is required.
|
384
|
-
*/
|
385
|
-
int are_invalid_names(char const * const *vnames,
|
386
|
-
const int card_vnames,
|
387
|
-
const bool check_ranged) const;
|
388
|
-
|
389
|
-
/// Set objective function name to the default "obj" and row
|
390
|
-
/// names to the default "cons0", "cons1", ...
|
391
|
-
void setDefaultRowNames();
|
392
|
-
|
393
|
-
/// Set column names to the default "x0", "x1", ...
|
394
|
-
void setDefaultColNames();
|
395
|
-
|
396
|
-
/** Set the row and column names.
|
397
|
-
The array rownames must either be NULL or have exactly getNumRows()+1
|
398
|
-
distinct entries,
|
399
|
-
each of them being a valid name (see is_invalid_name()) and the
|
400
|
-
last entry being the intended name for the objective function.
|
401
|
-
If rownames is NULL, existing row names and objective function
|
402
|
-
name are not changed.
|
403
|
-
If rownames is deemed invalid, default row names and objective function
|
404
|
-
name are used (see setDefaultRowNames()). The memory location of
|
405
|
-
array rownames (or its entries) should not be related
|
406
|
-
to the memory location of the array (or entries) obtained from
|
407
|
-
getRowNames() or getPreviousRowNames(), as the call to
|
408
|
-
setLpDataRowAndColNames() modifies the corresponding arrays.
|
409
|
-
Unpredictable results
|
410
|
-
are obtained if this requirement is ignored.
|
411
|
-
|
412
|
-
Similar remarks apply to the array colnames, which must either be
|
413
|
-
NULL or have exactly getNumCols() entries.
|
414
|
-
*/
|
415
|
-
void setLpDataRowAndColNames(char const * const * const rownames,
|
416
|
-
char const * const * const colnames);
|
417
|
-
|
418
|
-
/** Write the data in Lp format in the file with name filename.
|
419
|
-
Coefficients with value less than epsilon away from an integer value
|
420
|
-
are written as integers.
|
421
|
-
Write at most numberAcross monomials on a line.
|
422
|
-
Write non integer numbers with decimals digits after the decimal point.
|
423
|
-
Write objective function name and row names if useRowNames = true.
|
424
|
-
|
425
|
-
Ranged constraints are written as two constraints.
|
426
|
-
If row names are used, the upper bound constraint has the
|
427
|
-
name of the original ranged constraint and the
|
428
|
-
lower bound constraint has for name the original name with
|
429
|
-
"_low" as suffix. If doing so creates two identical row names,
|
430
|
-
default row names are used (see setDefaultRowNames()).
|
431
|
-
*/
|
432
|
-
int writeLp(const char *filename,
|
433
|
-
const double epsilon,
|
434
|
-
const int numberAcross,
|
435
|
-
const int decimals,
|
436
|
-
const bool useRowNames = true);
|
437
|
-
|
438
|
-
/** Write the data in Lp format in the file pointed to by the paramater fp.
|
439
|
-
Coefficients with value less than epsilon away from an integer value
|
440
|
-
are written as integers.
|
441
|
-
Write at most numberAcross monomials on a line.
|
442
|
-
Write non integer numbers with decimals digits after the decimal point.
|
443
|
-
Write objective function name and row names if useRowNames = true.
|
444
|
-
|
445
|
-
Ranged constraints are written as two constraints.
|
446
|
-
If row names are used, the upper bound constraint has the
|
447
|
-
name of the original ranged constraint and the
|
448
|
-
lower bound constraint has for name the original name with
|
449
|
-
"_low" as suffix. If doing so creates two identical row names,
|
450
|
-
default row names are used (see setDefaultRowNames()).
|
451
|
-
*/
|
452
|
-
int writeLp(FILE *fp,
|
453
|
-
const double epsilon,
|
454
|
-
const int numberAcross,
|
455
|
-
const int decimals,
|
456
|
-
const bool useRowNames = true);
|
457
|
-
|
458
|
-
/// Write the data in Lp format in the file with name filename.
|
459
|
-
/// Write objective function name and row names if useRowNames = true.
|
460
|
-
int writeLp(const char *filename, const bool useRowNames = true);
|
461
|
-
|
462
|
-
/// Write the data in Lp format in the file pointed to by the parameter fp.
|
463
|
-
/// Write objective function name and row names if useRowNames = true.
|
464
|
-
int writeLp(FILE *fp, const bool useRowNames = true);
|
465
|
-
|
466
|
-
/// Read the data in Lp format from the file with name filename, using
|
467
|
-
/// the given value for epsilon. If the original problem is
|
468
|
-
/// a maximization problem, the objective function is immediadtly
|
469
|
-
/// flipped to get a minimization problem.
|
470
|
-
void readLp(const char *filename, const double epsilon);
|
471
|
-
|
472
|
-
/// Read the data in Lp format from the file with name filename.
|
473
|
-
/// If the original problem is
|
474
|
-
/// a maximization problem, the objective function is immediadtly
|
475
|
-
/// flipped to get a minimization problem.
|
476
|
-
void readLp(const char *filename);
|
477
|
-
|
478
|
-
/// Read the data in Lp format from the file stream, using
|
479
|
-
/// the given value for epsilon.
|
480
|
-
/// If the original problem is
|
481
|
-
/// a maximization problem, the objective function is immediadtly
|
482
|
-
/// flipped to get a minimization problem.
|
483
|
-
void readLp(FILE *fp, const double epsilon);
|
484
|
-
|
485
|
-
/// Read the data in Lp format from the file stream.
|
486
|
-
/// If the original problem is
|
487
|
-
/// a maximization problem, the objective function is immediadtly
|
488
|
-
/// flipped to get a minimization problem.
|
489
|
-
void readLp(FILE *fp);
|
490
|
-
|
491
|
-
/// Dump the data. Low level method for debugging.
|
492
|
-
void print() const;
|
493
|
-
|
494
|
-
/// Load in SOS stuff
|
495
|
-
void loadSOS(int numberSets,const CoinSet * sets);
|
496
|
-
|
497
|
-
/// Load in SOS stuff
|
498
|
-
void loadSOS(int numberSets,const CoinSet ** sets);
|
499
|
-
|
500
|
-
/// Number of SOS sets
|
501
|
-
inline int numberSets() const
|
502
|
-
{ return numberSets_;}
|
503
|
-
|
504
|
-
/// Set information
|
505
|
-
inline CoinSet ** setInformation() const
|
506
|
-
{ return set_;}
|
507
|
-
//@}
|
508
|
-
/**@name Message handling */
|
509
|
-
//@{
|
510
|
-
/** Pass in Message handler
|
511
|
-
|
512
|
-
Supply a custom message handler. It will not be destroyed when the
|
513
|
-
CoinMpsIO object is destroyed.
|
514
|
-
*/
|
515
|
-
void passInMessageHandler(CoinMessageHandler * handler);
|
516
|
-
|
517
|
-
/// Set the language for messages.
|
518
|
-
void newLanguage(CoinMessages::Language language);
|
519
|
-
|
520
|
-
/// Set the language for messages.
|
521
|
-
inline void setLanguage(CoinMessages::Language language) {newLanguage(language);}
|
522
|
-
|
523
|
-
/// Return the message handler
|
524
|
-
inline CoinMessageHandler * messageHandler() const {return handler_;}
|
525
|
-
|
526
|
-
/// Return the messages
|
527
|
-
inline CoinMessages messages() {return messages_;}
|
528
|
-
/// Return the messages pointer
|
529
|
-
inline CoinMessages * messagesPointer() {return & messages_;}
|
530
|
-
//@}
|
531
|
-
|
532
|
-
protected:
|
533
|
-
/// Problem name
|
534
|
-
char * problemName_;
|
535
|
-
|
536
|
-
/// Message handler
|
537
|
-
CoinMessageHandler * handler_;
|
538
|
-
/** Flag to say if the message handler is the default handler.
|
539
|
-
|
540
|
-
If true, the handler will be destroyed when the CoinMpsIO
|
541
|
-
object is destroyed; if false, it will not be destroyed.
|
542
|
-
*/
|
543
|
-
bool defaultHandler_;
|
544
|
-
/// Messages
|
545
|
-
CoinMessages messages_;
|
546
|
-
|
547
|
-
/// Number of rows
|
548
|
-
int numberRows_;
|
549
|
-
|
550
|
-
/// Number of columns
|
551
|
-
int numberColumns_;
|
552
|
-
|
553
|
-
/// Number of elements
|
554
|
-
int numberElements_;
|
555
|
-
|
556
|
-
/// Pointer to column-wise copy of problem matrix coefficients.
|
557
|
-
mutable CoinPackedMatrix *matrixByColumn_;
|
558
|
-
|
559
|
-
/// Pointer to row-wise copy of problem matrix coefficients.
|
560
|
-
CoinPackedMatrix *matrixByRow_;
|
561
|
-
|
562
|
-
/// Pointer to dense vector of row lower bounds
|
563
|
-
double * rowlower_;
|
564
|
-
|
565
|
-
/// Pointer to dense vector of row upper bounds
|
566
|
-
double * rowupper_;
|
567
|
-
|
568
|
-
/// Pointer to dense vector of column lower bounds
|
569
|
-
double * collower_;
|
570
|
-
|
571
|
-
/// Pointer to dense vector of column upper bounds
|
572
|
-
double * colupper_;
|
573
|
-
|
574
|
-
/// Pointer to dense vector of row rhs
|
575
|
-
mutable double * rhs_;
|
576
|
-
|
577
|
-
/** Pointer to dense vector of slack variable upper bounds for ranged
|
578
|
-
constraints (undefined for non-ranged constraints)
|
579
|
-
*/
|
580
|
-
mutable double *rowrange_;
|
581
|
-
|
582
|
-
/// Pointer to dense vector of row senses
|
583
|
-
mutable char * rowsense_;
|
584
|
-
|
585
|
-
/// Pointer to dense vector of objective coefficients
|
586
|
-
double * objective_[MAX_OBJECTIVES];
|
587
|
-
|
588
|
-
/// Number of objectives
|
589
|
-
int num_objectives_;
|
590
|
-
|
591
|
-
/// Constant offset for objective value
|
592
|
-
double objectiveOffset_[MAX_OBJECTIVES];
|
593
|
-
|
594
|
-
/// Pointer to dense vector specifying if a variable is continuous
|
595
|
-
/// (0) or integer (1).
|
596
|
-
char * integerType_;
|
597
|
-
|
598
|
-
/// Pointer to sets
|
599
|
-
CoinSet ** set_;
|
600
|
-
|
601
|
-
/// Number of sets
|
602
|
-
int numberSets_;
|
603
|
-
|
604
|
-
/// Current file name
|
605
|
-
char * fileName_;
|
606
|
-
|
607
|
-
/// Value to use for infinity
|
608
|
-
double infinity_;
|
609
|
-
|
610
|
-
/// Value to use for epsilon
|
611
|
-
double epsilon_;
|
612
|
-
|
613
|
-
/// Number of monomials printed in a row
|
614
|
-
int numberAcross_;
|
615
|
-
|
616
|
-
/// Number of decimals printed for coefficients
|
617
|
-
int decimals_;
|
618
|
-
|
619
|
-
/// Objective function name
|
620
|
-
char *objName_[MAX_OBJECTIVES];
|
621
|
-
|
622
|
-
/** Row names (including objective function name)
|
623
|
-
and column names when stopHash() for the corresponding
|
624
|
-
section was last called or for initial names (deemed invalid)
|
625
|
-
read from a file.<BR>
|
626
|
-
section = 0 for row names,
|
627
|
-
section = 1 for column names. */
|
628
|
-
char **previous_names_[2];
|
629
|
-
|
630
|
-
/// card_previous_names_[section] holds the number of entries in the vector
|
631
|
-
/// previous_names_[section].
|
632
|
-
/// section = 0 for row names,
|
633
|
-
/// section = 1 for column names.
|
634
|
-
int card_previous_names_[2];
|
635
|
-
|
636
|
-
/// Row names (including objective function name)
|
637
|
-
/// and column names (linked to Hash tables).
|
638
|
-
/// section = 0 for row names,
|
639
|
-
/// section = 1 for column names.
|
640
|
-
char **names_[2];
|
641
|
-
|
642
|
-
typedef struct {
|
643
|
-
int index, next;
|
644
|
-
} CoinHashLink;
|
645
|
-
|
646
|
-
/// Maximum number of entries in a hash table section.
|
647
|
-
/// section = 0 for row names,
|
648
|
-
/// section = 1 for column names.
|
649
|
-
int maxHash_[2];
|
650
|
-
|
651
|
-
/// Number of entries in a hash table section.
|
652
|
-
/// section = 0 for row names,
|
653
|
-
/// section = 1 for column names.
|
654
|
-
int numberHash_[2];
|
655
|
-
|
656
|
-
/// Hash tables with two sections.
|
657
|
-
/// section = 0 for row names (including objective function name),
|
658
|
-
/// section = 1 for column names.
|
659
|
-
mutable CoinHashLink *hash_[2];
|
660
|
-
|
661
|
-
/// Build the hash table for the given names. The parameter number is
|
662
|
-
/// the cardinality of parameter names. Remove duplicate names.
|
663
|
-
///
|
664
|
-
/// section = 0 for row names,
|
665
|
-
/// section = 1 for column names.
|
666
|
-
void startHash(char const * const * const names,
|
667
|
-
const COINColumnIndex number,
|
668
|
-
int section);
|
669
|
-
|
670
|
-
/// Delete hash storage. If section = 0, it also frees objName_.
|
671
|
-
/// section = 0 for row names,
|
672
|
-
/// section = 1 for column names.
|
673
|
-
void stopHash(int section);
|
674
|
-
|
675
|
-
/// Return the index of the given name, return -1 if the name is not found.
|
676
|
-
/// Return getNumRows() for the objective function name.
|
677
|
-
/// section = 0 for row names (including objective function name),
|
678
|
-
/// section = 1 for column names.
|
679
|
-
COINColumnIndex findHash(const char *name, int section) const;
|
680
|
-
|
681
|
-
/// Insert thisName in the hash table if not present yet; does nothing
|
682
|
-
/// if the name is already in.
|
683
|
-
/// section = 0 for row names,
|
684
|
-
/// section = 1 for column names.
|
685
|
-
void insertHash(const char *thisName, int section);
|
686
|
-
|
687
|
-
/// Write a coefficient.
|
688
|
-
/// print_1 = 0 : do not print the value 1.
|
689
|
-
void out_coeff(FILE *fp, double v, int print_1) const;
|
690
|
-
|
691
|
-
/// Locate the objective function.
|
692
|
-
/// Return 1 if found the keyword "Minimize" or one of its variants,
|
693
|
-
/// -1 if found keyword "Maximize" or one of its variants.
|
694
|
-
int find_obj(FILE *fp) const;
|
695
|
-
|
696
|
-
/// Return an integer indicating if the keyword "subject to" or one
|
697
|
-
/// of its variants has been read.
|
698
|
-
/// Return 1 if buff is the keyword "s.t" or one of its variants.
|
699
|
-
/// Return 2 if buff is the keyword "subject" or one of its variants.
|
700
|
-
/// Return 0 otherwise.
|
701
|
-
int is_subject_to(const char *buff) const;
|
702
|
-
|
703
|
-
/// Return 1 if the first character of buff is a number.
|
704
|
-
/// Return 0 otherwise.
|
705
|
-
int first_is_number(const char *buff) const;
|
706
|
-
|
707
|
-
/// Return 1 if the first character of buff is '/' or '\'.
|
708
|
-
/// Return 0 otherwise.
|
709
|
-
int is_comment(const char *buff) const;
|
710
|
-
|
711
|
-
/// Read the file fp until buff contains an end of line
|
712
|
-
void skip_comment(char *buff, FILE *fp) const;
|
713
|
-
|
714
|
-
/// Put in buff the next string that is not part of a comment
|
715
|
-
void scan_next(char *buff, FILE *fp) const;
|
716
|
-
|
717
|
-
/// Return 1 if buff is the keyword "free" or one of its variants.
|
718
|
-
/// Return 0 otherwise.
|
719
|
-
int is_free(const char *buff) const;
|
720
|
-
|
721
|
-
/// Return 1 if buff is the keyword "inf" or one of its variants.
|
722
|
-
/// Return 0 otherwise.
|
723
|
-
int is_inf(const char *buff) const;
|
724
|
-
|
725
|
-
/// Return an integer indicating the inequality sense read.
|
726
|
-
/// Return 0 if buff is '<='.
|
727
|
-
/// Return 1 if buff is '='.
|
728
|
-
/// Return 2 if buff is '>='.
|
729
|
-
/// Return -1 otherwise.
|
730
|
-
int is_sense(const char *buff) const;
|
731
|
-
|
732
|
-
/// Return an integer indicating if one of the keywords "Bounds", "Integers",
|
733
|
-
/// "Generals", "Binaries", "Semi-continuous", "Sos", "End", or one
|
734
|
-
/// of their variants has been read. (note Semi-continuous not coded)
|
735
|
-
/// Return 1 if buff is the keyword "Bounds" or one of its variants.
|
736
|
-
/// Return 2 if buff is the keyword "Integers" or "Generals" or one of their
|
737
|
-
/// variants.
|
738
|
-
/// Return 3 if buff is the keyword "Binaries" or one of its variants.
|
739
|
-
/// Return 4 if buff is the keyword "Semi-continuous" or one of its variants.
|
740
|
-
/// Return 5 if buff is the keyword "Sos" or one of its variants.
|
741
|
-
/// Return 6 if buff is the keyword "End" or one of its variants.
|
742
|
-
/// Return 0 otherwise.
|
743
|
-
int is_keyword(const char *buff) const;
|
744
|
-
|
745
|
-
/// Read a monomial of the objective function.
|
746
|
-
/// Return 1 if "subject to" or one of its variants has been read.
|
747
|
-
int read_monom_obj(FILE *fp, double *coeff, char **name, int *cnt,
|
748
|
-
char **obj_name, int *num_objectives, int *obj_starts);
|
749
|
-
|
750
|
-
/// Read a monomial of a constraint.
|
751
|
-
/// Return a positive number if the sense of the inequality has been
|
752
|
-
/// read (see method is_sense() for the return code).
|
753
|
-
/// Return -1 otherwise.
|
754
|
-
int read_monom_row(FILE *fp, char *start_str, double *coeff, char **name,
|
755
|
-
int cnt_coeff) const;
|
756
|
-
|
757
|
-
/// Reallocate vectors related to number of coefficients.
|
758
|
-
void realloc_coeff(double **coeff, char ***colNames, int *maxcoeff) const;
|
759
|
-
|
760
|
-
/// Reallocate vectors related to rows.
|
761
|
-
void realloc_row(char ***rowNames, int **start, double **rhs,
|
762
|
-
double **rowlow, double **rowup, int *maxrow) const;
|
763
|
-
|
764
|
-
/// Reallocate vectors related to columns.
|
765
|
-
void realloc_col(double **collow, double **colup, char **is_int,
|
766
|
-
int *maxcol) const;
|
767
|
-
|
768
|
-
/// Read a constraint.
|
769
|
-
void read_row(FILE *fp, char *buff, double **pcoeff, char ***pcolNames,
|
770
|
-
int *cnt_coeff, int *maxcoeff,
|
771
|
-
double *rhs, double *rowlow, double *rowup,
|
772
|
-
int *cnt_row, double inf) const;
|
773
|
-
|
774
|
-
/** Check that current objective name and all row names are distinct
|
775
|
-
including row names obtained by adding "_low" for ranged constraints.
|
776
|
-
If there is a conflict in the names, they are replaced by default
|
777
|
-
row names (see setDefaultRowNames()).
|
778
|
-
|
779
|
-
This method must not be called before
|
780
|
-
setLpDataWithoutRowAndColNames() has been called, since access
|
781
|
-
to the indices of all the ranged constraints is required.
|
782
|
-
|
783
|
-
This method must not be called before
|
784
|
-
setLpDataRowAndColNames() has been called, since access
|
785
|
-
to all the row names is required.
|
786
|
-
*/
|
787
|
-
void checkRowNames();
|
788
|
-
|
789
|
-
/** Check that current column names are distinct.
|
790
|
-
If not, they are replaced by default
|
791
|
-
column names (see setDefaultColNames()).
|
792
|
-
|
793
|
-
This method must not be called before
|
794
|
-
setLpDataRowAndColNames() has been called, since access
|
795
|
-
to all the column names is required.
|
796
|
-
*/
|
797
|
-
void checkColNames();
|
798
|
-
|
799
|
-
};
|
800
|
-
|
801
|
-
void
|
802
|
-
CoinLpIOUnitTest(const std::string& lpDir);
|
803
|
-
|
804
|
-
|
805
|
-
#endif
|