ruby-cbc 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +203 -0
- data/Rakefile +40 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/ext/ruby-cbc/cbc.i +15 -0
- data/ext/ruby-cbc/cbc_wrap.c +4618 -0
- data/ext/ruby-cbc/extconf.rb +60 -0
- 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 +24 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +62 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +78 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +183 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +129 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +100 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +206 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +242 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +236 -0
- data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +303 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +39 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +14 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +142 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +120 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +47 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +48 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +49 -0
- data/ext/ruby-cbc/install/include/coin/CbcConfig.h +14 -0
- data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +49 -0
- data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +168 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +482 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +57 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +66 -0
- data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +83 -0
- data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +245 -0
- data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +137 -0
- data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +169 -0
- data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +56 -0
- data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +67 -0
- data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +207 -0
- data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +161 -0
- data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +279 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +682 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +96 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +309 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +192 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +340 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +280 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +271 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +77 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +102 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +1406 -0
- data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +26 -0
- data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +2952 -0
- data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +351 -0
- data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +349 -0
- data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +272 -0
- data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +64 -0
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +4134 -0
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +532 -0
- data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +324 -0
- data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +110 -0
- data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +279 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +286 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +564 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +114 -0
- data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +447 -0
- data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +258 -0
- data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +83 -0
- data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +490 -0
- data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +372 -0
- data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +381 -0
- data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +464 -0
- data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +115 -0
- data/ext/ruby-cbc/install/include/coin/CglClique.hpp +308 -0
- data/ext/ruby-cbc/install/include/coin/CglConfig.h +19 -0
- data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +121 -0
- data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +189 -0
- data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +371 -0
- data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +364 -0
- data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +313 -0
- data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +204 -0
- data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +310 -0
- data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +306 -0
- data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +130 -0
- data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +104 -0
- data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +50 -0
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +429 -0
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +427 -0
- data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +160 -0
- data/ext/ruby-cbc/install/include/coin/CglParam.hpp +93 -0
- data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +492 -0
- data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +543 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +448 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +494 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +495 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +272 -0
- data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +240 -0
- data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +174 -0
- data/ext/ruby-cbc/install/include/coin/CglStored.hpp +125 -0
- data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +180 -0
- data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +565 -0
- data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +133 -0
- data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +113 -0
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +294 -0
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +162 -0
- data/ext/ruby-cbc/install/include/coin/ClpConfig.h +17 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +125 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +108 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +110 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +119 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +71 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +129 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +153 -0
- data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +183 -0
- data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +186 -0
- data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +381 -0
- data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +187 -0
- data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +432 -0
- data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +358 -0
- data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +570 -0
- data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +103 -0
- data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +524 -0
- data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +131 -0
- data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +1307 -0
- data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +229 -0
- data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +349 -0
- data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +401 -0
- data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +134 -0
- data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +638 -0
- data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +126 -0
- data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +103 -0
- data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +290 -0
- data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +299 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +72 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +155 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +155 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +1797 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +300 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +117 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +277 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +244 -0
- data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +446 -0
- data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +525 -0
- data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +176 -0
- data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +149 -0
- data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +419 -0
- data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +383 -0
- data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +48 -0
- data/ext/ruby-cbc/install/include/coin/CoinError.hpp +257 -0
- data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +2044 -0
- data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +34 -0
- data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +177 -0
- data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +1111 -0
- data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +1164 -0
- data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +805 -0
- data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +96 -0
- data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +666 -0
- data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +1054 -0
- data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +441 -0
- data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +1056 -0
- data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +280 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +947 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +657 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +269 -0
- data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +644 -0
- data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +26 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +73 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +85 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +226 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +116 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +181 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +61 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +51 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +1842 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +105 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +112 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +101 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +55 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +66 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +63 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +44 -0
- data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +465 -0
- data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +148 -0
- data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +117 -0
- data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +431 -0
- data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +528 -0
- data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +476 -0
- data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +678 -0
- data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +310 -0
- data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +64 -0
- data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +19 -0
- data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +34 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +456 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +211 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +488 -0
- data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +115 -0
- data/ext/ruby-cbc/install/include/coin/Idiot.hpp +298 -0
- data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +206 -0
- data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +1005 -0
- data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +764 -0
- data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +534 -0
- data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +1509 -0
- data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +324 -0
- data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +35 -0
- data/ext/ruby-cbc/install/include/coin/OsiConfig.h +19 -0
- data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +245 -0
- data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +474 -0
- data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +252 -0
- data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +331 -0
- data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +187 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +152 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +2143 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +142 -0
- data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +374 -0
- data/ext/ruby-cbc/install/lib/libCbc.la +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +35 -0
- 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 +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +9 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +9 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +12 -0
- data/lib/ruby-cbc/ilp/constant.rb +44 -0
- data/lib/ruby-cbc/ilp/constraint.rb +32 -0
- data/lib/ruby-cbc/ilp/objective.rb +26 -0
- data/lib/ruby-cbc/ilp/term.rb +47 -0
- data/lib/ruby-cbc/ilp/term_array.rb +80 -0
- data/lib/ruby-cbc/ilp/var.rb +62 -0
- data/lib/ruby-cbc/model.rb +125 -0
- data/lib/ruby-cbc/problem.rb +170 -0
- data/lib/ruby-cbc/version.rb +3 -0
- data/lib/ruby-cbc.rb +21 -0
- data/ruby-cbc.gemspec +36 -0
- metadata +431 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/* $Id: CbcParam.hpp 1573 2011-01-05 01:12:36Z lou $ */
|
|
2
|
+
// Copyright (C) 2002, International Business Machines
|
|
3
|
+
// Corporation and others. All Rights Reserved.
|
|
4
|
+
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
|
5
|
+
|
|
6
|
+
#ifndef CbcParam_H
|
|
7
|
+
#define CbcParam_H
|
|
8
|
+
|
|
9
|
+
#include "OsiSolverInterface.hpp"
|
|
10
|
+
#include "CbcModel.hpp"
|
|
11
|
+
class ClpSimplex;
|
|
12
|
+
/*! \brief Parameter codes
|
|
13
|
+
|
|
14
|
+
Parameter type ranges are allocated as follows
|
|
15
|
+
<ul>
|
|
16
|
+
<li> 1 -- 100 double parameters
|
|
17
|
+
<li> 101 -- 200 integer parameters
|
|
18
|
+
<li> 201 -- 250 string parameters
|
|
19
|
+
<li> 251 -- 300 cuts etc(string but broken out for clarity)
|
|
20
|
+
<li> 301 -- 400 `actions'
|
|
21
|
+
</ul>
|
|
22
|
+
|
|
23
|
+
`Actions' do not necessarily invoke an immediate action; it's just that they
|
|
24
|
+
don't fit neatly into the parameters array.
|
|
25
|
+
|
|
26
|
+
This coding scheme is in flux.
|
|
27
|
+
CBC_PARAM_STR_NODESTRATEGY,
|
|
28
|
+
CBC_PARAM_STR_BRANCHSTRATEGY,
|
|
29
|
+
CBC_PARAM_NOTUSED_ADDCUTSSTRATEGY,
|
|
30
|
+
CLP_PARAM_ACTION_CLEARCUTS,
|
|
31
|
+
CBC_PARAM_NOTUSED_OSLSTUFF,
|
|
32
|
+
CBC_PARAM_NOTUSED_CBCSTUFF are not used at present (03.10.24).
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
enum CbcParameterType
|
|
36
|
+
|
|
37
|
+
{ CBC_PARAM_GENERALQUERY = -100,
|
|
38
|
+
CBC_PARAM_FULLGENERALQUERY,
|
|
39
|
+
|
|
40
|
+
CLP_PARAM_DBL_PRIMALTOLERANCE = 1,
|
|
41
|
+
CLP_PARAM_DBL_DUALTOLERANCE,
|
|
42
|
+
CBC_PARAM_DBL_CUTOFF,
|
|
43
|
+
CLP_PARAM_DBL_TIMELIMIT,
|
|
44
|
+
CLP_PARAM_DBL_DUALBOUND,
|
|
45
|
+
CLP_PARAM_DBL_PRIMALWEIGHT,
|
|
46
|
+
CLP_PARAM_DBL_OBJSCALE,
|
|
47
|
+
CLP_PARAM_DBL_RHSSCALE,
|
|
48
|
+
|
|
49
|
+
CBC_PARAM_DBL_INFEASIBILITYWEIGHT = 51,
|
|
50
|
+
CBC_PARAM_DBL_INTEGERTOLERANCE,
|
|
51
|
+
CBC_PARAM_DBL_INCREMENT,
|
|
52
|
+
CBC_PARAM_DBL_ALLOWABLEGAP,
|
|
53
|
+
|
|
54
|
+
CBC_PARAM_DBL_DJFIX = 81,
|
|
55
|
+
CBC_PARAM_DBL_GAPRATIO,
|
|
56
|
+
CBC_PARAM_DBL_TIGHTENFACTOR,
|
|
57
|
+
|
|
58
|
+
CLP_PARAM_INT_LOGLEVEL = 101,
|
|
59
|
+
CLP_PARAM_INT_SOLVERLOGLEVEL,
|
|
60
|
+
CBC_PARAM_INT_MAXNODES,
|
|
61
|
+
CBC_PARAM_INT_STRONGBRANCHING,
|
|
62
|
+
CLP_PARAM_INT_MAXFACTOR,
|
|
63
|
+
CLP_PARAM_INT_PERTVALUE,
|
|
64
|
+
CLP_PARAM_INT_MAXITERATION,
|
|
65
|
+
CLP_PARAM_INT_PRESOLVEPASS,
|
|
66
|
+
CLP_PARAM_INT_IDIOT,
|
|
67
|
+
CLP_PARAM_INT_SPRINT,
|
|
68
|
+
CLP_PARAM_INT_OUTPUTFORMAT,
|
|
69
|
+
CLP_PARAM_INT_SLPVALUE,
|
|
70
|
+
CLP_PARAM_INT_PRESOLVEOPTIONS,
|
|
71
|
+
CLP_PARAM_INT_PRINTOPTIONS,
|
|
72
|
+
CLP_PARAM_INT_SPECIALOPTIONS,
|
|
73
|
+
|
|
74
|
+
CLP_PARAM_STR_DIRECTION = 201,
|
|
75
|
+
CLP_PARAM_STR_DUALPIVOT,
|
|
76
|
+
CLP_PARAM_STR_SCALING,
|
|
77
|
+
CLP_PARAM_STR_ERRORSALLOWED,
|
|
78
|
+
CLP_PARAM_STR_KEEPNAMES,
|
|
79
|
+
CLP_PARAM_STR_SPARSEFACTOR,
|
|
80
|
+
CLP_PARAM_STR_PRIMALPIVOT,
|
|
81
|
+
CLP_PARAM_STR_PRESOLVE,
|
|
82
|
+
CLP_PARAM_STR_CRASH,
|
|
83
|
+
CLP_PARAM_STR_BIASLU,
|
|
84
|
+
CLP_PARAM_STR_PERTURBATION,
|
|
85
|
+
CLP_PARAM_STR_MESSAGES,
|
|
86
|
+
CLP_PARAM_STR_AUTOSCALE,
|
|
87
|
+
CLP_PARAM_STR_CHOLESKY,
|
|
88
|
+
CLP_PARAM_STR_KKT,
|
|
89
|
+
CLP_PARAM_STR_BARRIERSCALE,
|
|
90
|
+
CLP_PARAM_STR_GAMMA,
|
|
91
|
+
CLP_PARAM_STR_CROSSOVER,
|
|
92
|
+
CLP_PARAM_STR_PFI,
|
|
93
|
+
CLP_PARAM_NOTUSED_ALGORITHM,
|
|
94
|
+
|
|
95
|
+
CBC_PARAM_STR_NODESTRATEGY = 251,
|
|
96
|
+
CBC_PARAM_STR_BRANCHSTRATEGY,
|
|
97
|
+
CBC_PARAM_NOTUSED_ADDCUTSSTRATEGY,
|
|
98
|
+
CBC_PARAM_STR_GOMORYCUTS,
|
|
99
|
+
CBC_PARAM_STR_PROBINGCUTS,
|
|
100
|
+
CBC_PARAM_STR_KNAPSACKCUTS,
|
|
101
|
+
CBC_PARAM_NOTUSED_ODDHOLECUTS,
|
|
102
|
+
CBC_PARAM_STR_ROUNDING,
|
|
103
|
+
CBC_PARAM_STR_SOLVER,
|
|
104
|
+
CBC_PARAM_STR_CLIQUECUTS,
|
|
105
|
+
CBC_PARAM_STR_COSTSTRATEGY,
|
|
106
|
+
CBC_PARAM_STR_FLOWCUTS,
|
|
107
|
+
CBC_PARAM_STR_MIXEDCUTS,
|
|
108
|
+
CBC_PARAM_STR_TWOMIRCUTS,
|
|
109
|
+
CBC_PARAM_STR_PREPROCESS,
|
|
110
|
+
|
|
111
|
+
CLP_PARAM_ACTION_DIRECTORY = 301,
|
|
112
|
+
CLP_PARAM_ACTION_IMPORT,
|
|
113
|
+
CLP_PARAM_ACTION_EXPORT,
|
|
114
|
+
CLP_PARAM_ACTION_RESTORE,
|
|
115
|
+
CLP_PARAM_ACTION_SAVE,
|
|
116
|
+
CLP_PARAM_ACTION_DUALSIMPLEX,
|
|
117
|
+
CLP_PARAM_ACTION_PRIMALSIMPLEX,
|
|
118
|
+
CLP_PARAM_ACTION_MAXIMIZE,
|
|
119
|
+
CLP_PARAM_ACTION_MINIMIZE,
|
|
120
|
+
CLP_PARAM_ACTION_EXIT,
|
|
121
|
+
CLP_PARAM_ACTION_STDIN,
|
|
122
|
+
CLP_PARAM_ACTION_UNITTEST,
|
|
123
|
+
CLP_PARAM_ACTION_NETLIB_DUAL,
|
|
124
|
+
CLP_PARAM_ACTION_NETLIB_PRIMAL,
|
|
125
|
+
CLP_PARAM_ACTION_SOLUTION,
|
|
126
|
+
CLP_PARAM_ACTION_TIGHTEN,
|
|
127
|
+
CLP_PARAM_ACTION_FAKEBOUND,
|
|
128
|
+
CLP_PARAM_ACTION_HELP,
|
|
129
|
+
CLP_PARAM_ACTION_PLUSMINUS,
|
|
130
|
+
CLP_PARAM_ACTION_NETWORK,
|
|
131
|
+
CLP_PARAM_ACTION_ALLSLACK,
|
|
132
|
+
CLP_PARAM_ACTION_REVERSE,
|
|
133
|
+
CLP_PARAM_ACTION_BARRIER,
|
|
134
|
+
CLP_PARAM_ACTION_NETLIB_BARRIER,
|
|
135
|
+
CLP_PARAM_ACTION_REALLY_SCALE,
|
|
136
|
+
CLP_PARAM_ACTION_BASISIN,
|
|
137
|
+
CLP_PARAM_ACTION_BASISOUT,
|
|
138
|
+
CLP_PARAM_ACTION_SOLVECONTINUOUS,
|
|
139
|
+
CBC_PARAM_ACTION_BAB,
|
|
140
|
+
CBC_PARAM_ACTION_MIPLIB,
|
|
141
|
+
CLP_PARAM_ACTION_CLEARCUTS,
|
|
142
|
+
CLP_VERSION_NOTUSED_PRINTVERSION,
|
|
143
|
+
|
|
144
|
+
CBC_PARAM_NOTUSED_OSLSTUFF = 401,
|
|
145
|
+
CBC_PARAM_NOTUSED_CBCSTUFF,
|
|
146
|
+
|
|
147
|
+
CBC_PARAM_NOTUSED_INVALID = 1000
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/// Very simple class for setting parameters
|
|
152
|
+
|
|
153
|
+
class CbcParam {
|
|
154
|
+
|
|
155
|
+
public:
|
|
156
|
+
|
|
157
|
+
/**@name Constructor and destructor */
|
|
158
|
+
//@{
|
|
159
|
+
/// Constructors
|
|
160
|
+
CbcParam ( );
|
|
161
|
+
CbcParam (std::string name, std::string help,
|
|
162
|
+
double lower, double upper, CbcParameterType type, bool display = true);
|
|
163
|
+
CbcParam (std::string name, std::string help,
|
|
164
|
+
int lower, int upper, CbcParameterType type, bool display = true);
|
|
165
|
+
// Other strings will be added by insert
|
|
166
|
+
CbcParam (std::string name, std::string help, std::string firstValue,
|
|
167
|
+
CbcParameterType type, int defaultIndex = 0, bool display = true);
|
|
168
|
+
// Action
|
|
169
|
+
CbcParam (std::string name, std::string help,
|
|
170
|
+
CbcParameterType type, int indexNumber = -1, bool display = true);
|
|
171
|
+
/// Copy constructor.
|
|
172
|
+
CbcParam(const CbcParam &);
|
|
173
|
+
/// Assignment operator. This copies the data
|
|
174
|
+
CbcParam & operator=(const CbcParam & rhs);
|
|
175
|
+
/// Destructor
|
|
176
|
+
~CbcParam ( );
|
|
177
|
+
//@}
|
|
178
|
+
|
|
179
|
+
/**@name stuff */
|
|
180
|
+
//@{
|
|
181
|
+
/// Insert string (only valid for keywords)
|
|
182
|
+
void append(std::string keyWord);
|
|
183
|
+
/// Adds one help line
|
|
184
|
+
void addHelp(std::string keyWord);
|
|
185
|
+
/// Returns name
|
|
186
|
+
inline std::string name( ) const {
|
|
187
|
+
return name_;
|
|
188
|
+
};
|
|
189
|
+
/// Returns short help
|
|
190
|
+
inline std::string shortHelp( ) const {
|
|
191
|
+
return shortHelp_;
|
|
192
|
+
};
|
|
193
|
+
/// Sets a double parameter (nonzero code if error)
|
|
194
|
+
int setDoubleParameter(CbcModel & model, double value) const;
|
|
195
|
+
/// Gets a double parameter
|
|
196
|
+
double doubleParameter(CbcModel & model) const;
|
|
197
|
+
/// Sets a int parameter (nonzero code if error)
|
|
198
|
+
int setIntParameter(CbcModel & model, int value) const;
|
|
199
|
+
/// Gets a int parameter
|
|
200
|
+
int intParameter(CbcModel & model) const;
|
|
201
|
+
/// Sets a double parameter (nonzero code if error)
|
|
202
|
+
int setDoubleParameter(ClpSimplex * model, double value) const;
|
|
203
|
+
/// Gets a double parameter
|
|
204
|
+
double doubleParameter(ClpSimplex * model) const;
|
|
205
|
+
/// Sets a int parameter (nonzero code if error)
|
|
206
|
+
int setIntParameter(ClpSimplex * model, int value) const;
|
|
207
|
+
/// Gets a int parameter
|
|
208
|
+
int intParameter(ClpSimplex * model) const;
|
|
209
|
+
/// Sets a double parameter (nonzero code if error)
|
|
210
|
+
int setDoubleParameter(OsiSolverInterface * model, double value) const;
|
|
211
|
+
/// Gets a double parameter
|
|
212
|
+
double doubleParameter(OsiSolverInterface * model) const;
|
|
213
|
+
/// Sets a int parameter (nonzero code if error)
|
|
214
|
+
int setIntParameter(OsiSolverInterface * model, int value) const;
|
|
215
|
+
/// Gets a int parameter
|
|
216
|
+
int intParameter(OsiSolverInterface * model) const;
|
|
217
|
+
/// Checks a double parameter (nonzero code if error)
|
|
218
|
+
int checkDoubleParameter(double value) const;
|
|
219
|
+
/// Returns name which could match
|
|
220
|
+
std::string matchName ( ) const;
|
|
221
|
+
/// Returns parameter option which matches (-1 if none)
|
|
222
|
+
int parameterOption ( std::string check ) const;
|
|
223
|
+
/// Prints parameter options
|
|
224
|
+
void printOptions ( ) const;
|
|
225
|
+
/// Returns current parameter option
|
|
226
|
+
inline std::string currentOption ( ) const {
|
|
227
|
+
return definedKeyWords_[currentKeyWord_];
|
|
228
|
+
}
|
|
229
|
+
/// Sets current parameter option
|
|
230
|
+
inline void setCurrentOption ( int value ) {
|
|
231
|
+
currentKeyWord_ = value;
|
|
232
|
+
}
|
|
233
|
+
/// Sets int value
|
|
234
|
+
inline void setIntValue ( int value ) {
|
|
235
|
+
intValue_ = value;
|
|
236
|
+
}
|
|
237
|
+
inline int intValue () const {
|
|
238
|
+
return intValue_;
|
|
239
|
+
}
|
|
240
|
+
/// Sets double value
|
|
241
|
+
inline void setDoubleValue ( double value ) {
|
|
242
|
+
doubleValue_ = value;
|
|
243
|
+
}
|
|
244
|
+
inline double doubleValue () const {
|
|
245
|
+
return doubleValue_;
|
|
246
|
+
}
|
|
247
|
+
/// Sets string value
|
|
248
|
+
inline void setStringValue ( std::string value ) {
|
|
249
|
+
stringValue_ = value;
|
|
250
|
+
}
|
|
251
|
+
inline std::string stringValue () const {
|
|
252
|
+
return stringValue_;
|
|
253
|
+
}
|
|
254
|
+
/// Returns 1 if matches minimum, 2 if matches less, 0 if not matched
|
|
255
|
+
int matches (std::string input) const;
|
|
256
|
+
/// type
|
|
257
|
+
inline CbcParameterType type() const {
|
|
258
|
+
return type_;
|
|
259
|
+
}
|
|
260
|
+
/// whether to display
|
|
261
|
+
inline bool displayThis() const {
|
|
262
|
+
return display_;
|
|
263
|
+
}
|
|
264
|
+
/// Set Long help
|
|
265
|
+
inline void setLonghelp(const std::string help) {
|
|
266
|
+
longHelp_ = help;
|
|
267
|
+
}
|
|
268
|
+
/// Print Long help
|
|
269
|
+
void printLongHelp() const;
|
|
270
|
+
/// Print action and string
|
|
271
|
+
void printString() const;
|
|
272
|
+
/// type for classification
|
|
273
|
+
inline int indexNumber() const {
|
|
274
|
+
return indexNumber_;
|
|
275
|
+
}
|
|
276
|
+
private:
|
|
277
|
+
/// gutsOfConstructor
|
|
278
|
+
void gutsOfConstructor();
|
|
279
|
+
//@}
|
|
280
|
+
////////////////// data //////////////////
|
|
281
|
+
private:
|
|
282
|
+
|
|
283
|
+
/**@name data
|
|
284
|
+
We might as well throw all type data in - could derive?
|
|
285
|
+
*/
|
|
286
|
+
//@{
|
|
287
|
+
// Type see CbcParameterType
|
|
288
|
+
CbcParameterType type_;
|
|
289
|
+
/// If double == okay
|
|
290
|
+
double lowerDoubleValue_;
|
|
291
|
+
double upperDoubleValue_;
|
|
292
|
+
/// If int == okay
|
|
293
|
+
int lowerIntValue_;
|
|
294
|
+
int upperIntValue_;
|
|
295
|
+
// Length of name
|
|
296
|
+
unsigned int lengthName_;
|
|
297
|
+
// Minimum match
|
|
298
|
+
unsigned int lengthMatch_;
|
|
299
|
+
/// set of valid strings
|
|
300
|
+
std::vector<std::string> definedKeyWords_;
|
|
301
|
+
/// Name
|
|
302
|
+
std::string name_;
|
|
303
|
+
/// Short help
|
|
304
|
+
std::string shortHelp_;
|
|
305
|
+
/// Long help
|
|
306
|
+
std::string longHelp_;
|
|
307
|
+
/// Action
|
|
308
|
+
CbcParameterType action_;
|
|
309
|
+
/// Current keyWord (if a keyword parameter)
|
|
310
|
+
int currentKeyWord_;
|
|
311
|
+
/// Display on ?
|
|
312
|
+
bool display_;
|
|
313
|
+
/// Integer parameter - current value
|
|
314
|
+
int intValue_;
|
|
315
|
+
/// Double parameter - current value
|
|
316
|
+
double doubleValue_;
|
|
317
|
+
/// String parameter - current value
|
|
318
|
+
std::string stringValue_;
|
|
319
|
+
/// index number to use for display purposes
|
|
320
|
+
int indexNumber_;
|
|
321
|
+
//@}
|
|
322
|
+
};
|
|
323
|
+
#endif /* CbcParam_H */
|
|
324
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// $Id: CbcPartialNodeInfo.hpp 1899 2013-04-09 18:12:08Z stefan $
|
|
2
|
+
// Copyright (C) 2002, International Business Machines
|
|
3
|
+
// Corporation and others. All Rights Reserved.
|
|
4
|
+
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
|
5
|
+
|
|
6
|
+
// Edwin 11/24/09 carved from CbcNode
|
|
7
|
+
|
|
8
|
+
#ifndef CbcPartialNodeInfo_H
|
|
9
|
+
#define CbcPartialNodeInfo_H
|
|
10
|
+
|
|
11
|
+
#include <string>
|
|
12
|
+
#include <vector>
|
|
13
|
+
|
|
14
|
+
#include "CoinWarmStartBasis.hpp"
|
|
15
|
+
#include "CoinSearchTree.hpp"
|
|
16
|
+
#include "CbcBranchBase.hpp"
|
|
17
|
+
#include "CbcNodeInfo.hpp"
|
|
18
|
+
|
|
19
|
+
class OsiSolverInterface;
|
|
20
|
+
class OsiSolverBranch;
|
|
21
|
+
|
|
22
|
+
class OsiCuts;
|
|
23
|
+
class OsiRowCut;
|
|
24
|
+
class OsiRowCutDebugger;
|
|
25
|
+
class CoinWarmStartBasis;
|
|
26
|
+
class CbcCountRowCut;
|
|
27
|
+
class CbcModel;
|
|
28
|
+
class CbcNode;
|
|
29
|
+
class CbcSubProblem;
|
|
30
|
+
class CbcGeneralBranchingObject;
|
|
31
|
+
/** \brief Holds information for recreating a subproblem by incremental change
|
|
32
|
+
from the parent.
|
|
33
|
+
|
|
34
|
+
A CbcPartialNodeInfo object contains changes to the bounds and basis, and
|
|
35
|
+
additional cuts, required to recreate a subproblem by modifying and
|
|
36
|
+
augmenting the parent subproblem.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
class CbcPartialNodeInfo : public CbcNodeInfo {
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
|
|
43
|
+
/** \brief Modify model according to information at node
|
|
44
|
+
|
|
45
|
+
The routine modifies the model according to bound and basis change
|
|
46
|
+
information at node and adds any cuts to the addCuts array.
|
|
47
|
+
*/
|
|
48
|
+
virtual void applyToModel (CbcModel *model, CoinWarmStartBasis *&basis,
|
|
49
|
+
CbcCountRowCut **addCuts,
|
|
50
|
+
int ¤tNumberCuts) const ;
|
|
51
|
+
|
|
52
|
+
/// Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible)
|
|
53
|
+
virtual int applyBounds(int iColumn, double & lower, double & upper, int force) ;
|
|
54
|
+
/** Builds up row basis backwards (until original model).
|
|
55
|
+
Returns NULL or previous one to apply .
|
|
56
|
+
Depends on Free being 0 and impossible for cuts
|
|
57
|
+
*/
|
|
58
|
+
virtual CbcNodeInfo * buildRowBasis(CoinWarmStartBasis & basis ) const ;
|
|
59
|
+
// Default Constructor
|
|
60
|
+
CbcPartialNodeInfo ();
|
|
61
|
+
|
|
62
|
+
// Constructor from current state
|
|
63
|
+
CbcPartialNodeInfo (CbcNodeInfo * parent, CbcNode * owner,
|
|
64
|
+
int numberChangedBounds, const int * variables,
|
|
65
|
+
const double * boundChanges,
|
|
66
|
+
const CoinWarmStartDiff *basisDiff) ;
|
|
67
|
+
|
|
68
|
+
// Copy constructor
|
|
69
|
+
CbcPartialNodeInfo ( const CbcPartialNodeInfo &);
|
|
70
|
+
|
|
71
|
+
// Destructor
|
|
72
|
+
~CbcPartialNodeInfo ();
|
|
73
|
+
|
|
74
|
+
/// Clone
|
|
75
|
+
virtual CbcNodeInfo * clone() const;
|
|
76
|
+
/// Basis diff information
|
|
77
|
+
inline const CoinWarmStartDiff *basisDiff() const {
|
|
78
|
+
return basisDiff_ ;
|
|
79
|
+
}
|
|
80
|
+
/// Which variable (top bit if upper bound changing)
|
|
81
|
+
inline const int * variables() const {
|
|
82
|
+
return variables_;
|
|
83
|
+
}
|
|
84
|
+
// New bound
|
|
85
|
+
inline const double * newBounds() const {
|
|
86
|
+
return newBounds_;
|
|
87
|
+
}
|
|
88
|
+
/// Number of bound changes
|
|
89
|
+
inline int numberChangedBounds() const {
|
|
90
|
+
return numberChangedBounds_;
|
|
91
|
+
}
|
|
92
|
+
protected:
|
|
93
|
+
/* Data values */
|
|
94
|
+
|
|
95
|
+
/// Basis diff information
|
|
96
|
+
CoinWarmStartDiff *basisDiff_ ;
|
|
97
|
+
/// Which variable (top bit if upper bound changing)
|
|
98
|
+
int * variables_;
|
|
99
|
+
// New bound
|
|
100
|
+
double * newBounds_;
|
|
101
|
+
/// Number of bound changes
|
|
102
|
+
int numberChangedBounds_;
|
|
103
|
+
private:
|
|
104
|
+
|
|
105
|
+
/// Illegal Assignment operator
|
|
106
|
+
CbcPartialNodeInfo & operator=(const CbcPartialNodeInfo& rhs);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
#endif //CbcPartialNodeInfo_H
|
|
110
|
+
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// $Id: CbcSOS.hpp 2070 2014-09-08 09:24:45Z forrest $
|
|
2
|
+
// Copyright (C) 2002, International Business Machines
|
|
3
|
+
// Corporation and others. All Rights Reserved.
|
|
4
|
+
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
|
5
|
+
|
|
6
|
+
// Edwin 11/9/2009-- carved out of CbcBranchActual
|
|
7
|
+
|
|
8
|
+
#ifndef CbcSOS_H
|
|
9
|
+
#define CbcSOS_H
|
|
10
|
+
|
|
11
|
+
/** \brief Branching object for Special Ordered Sets of type 1 and 2.
|
|
12
|
+
|
|
13
|
+
SOS1 are an ordered set of variables where at most one variable can be
|
|
14
|
+
non-zero. SOS1 are commonly defined with binary variables (interpreted as
|
|
15
|
+
selection between alternatives) but this is not necessary. An SOS1 with
|
|
16
|
+
all binary variables is a special case of a clique (setting any one
|
|
17
|
+
variable to 1 forces all others to 0).
|
|
18
|
+
|
|
19
|
+
In theory, the implementation makes no assumptions about integrality in
|
|
20
|
+
Type 1 sets. In practice, there are places where the code seems to have been
|
|
21
|
+
written with a binary SOS mindset. Current development of SOS branching
|
|
22
|
+
objects is proceeding in OsiSOS.
|
|
23
|
+
|
|
24
|
+
SOS2 are an ordered set of variables in which at most two consecutive
|
|
25
|
+
variables can be non-zero and must sum to 1 (interpreted as interpolation
|
|
26
|
+
between two discrete values). By definition the variables are non-integer.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
class CbcSOS : public CbcObject {
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
|
|
33
|
+
// Default Constructor
|
|
34
|
+
CbcSOS ();
|
|
35
|
+
|
|
36
|
+
/** \brief Constructor with SOS type and member information
|
|
37
|
+
|
|
38
|
+
Type specifies SOS 1 or 2. Identifier is an arbitrary value.
|
|
39
|
+
|
|
40
|
+
Which should be an array of variable indices with numberMembers entries.
|
|
41
|
+
Weights can be used to assign arbitrary weights to variables, in the order
|
|
42
|
+
they are specified in which. If no weights are provided, a default array of
|
|
43
|
+
0, 1, 2, ... is generated.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
CbcSOS (CbcModel * model, int numberMembers,
|
|
47
|
+
const int * which, const double * weights, int identifier,
|
|
48
|
+
int type = 1);
|
|
49
|
+
|
|
50
|
+
// Copy constructor
|
|
51
|
+
CbcSOS ( const CbcSOS &);
|
|
52
|
+
|
|
53
|
+
/// Clone
|
|
54
|
+
virtual CbcObject * clone() const;
|
|
55
|
+
|
|
56
|
+
// Assignment operator
|
|
57
|
+
CbcSOS & operator=( const CbcSOS& rhs);
|
|
58
|
+
|
|
59
|
+
// Destructor
|
|
60
|
+
virtual ~CbcSOS ();
|
|
61
|
+
|
|
62
|
+
/// Infeasibility - large is 0.5
|
|
63
|
+
virtual double infeasibility(const OsiBranchingInformation * info,
|
|
64
|
+
int &preferredWay) const;
|
|
65
|
+
|
|
66
|
+
using CbcObject::feasibleRegion ;
|
|
67
|
+
/// This looks at solution and sets bounds to contain solution
|
|
68
|
+
virtual void feasibleRegion();
|
|
69
|
+
|
|
70
|
+
/// Creates a branching object
|
|
71
|
+
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/** Pass in information on branch just done and create CbcObjectUpdateData instance.
|
|
76
|
+
If object does not need data then backward pointer will be NULL.
|
|
77
|
+
Assumes can get information from solver */
|
|
78
|
+
virtual CbcObjectUpdateData createUpdateInformation(const OsiSolverInterface * solver,
|
|
79
|
+
const CbcNode * node,
|
|
80
|
+
const CbcBranchingObject * branchingObject);
|
|
81
|
+
/// Update object by CbcObjectUpdateData
|
|
82
|
+
virtual void updateInformation(const CbcObjectUpdateData & data) ;
|
|
83
|
+
using CbcObject::solverBranch ;
|
|
84
|
+
/** Create an OsiSolverBranch object
|
|
85
|
+
|
|
86
|
+
This returns NULL if branch not represented by bound changes
|
|
87
|
+
*/
|
|
88
|
+
virtual OsiSolverBranch * solverBranch() const;
|
|
89
|
+
/// Redoes data when sequence numbers change
|
|
90
|
+
virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
|
|
91
|
+
|
|
92
|
+
/// Construct an OsiSOS object
|
|
93
|
+
OsiSOS * osiObject(const OsiSolverInterface * solver) const;
|
|
94
|
+
/// Number of members
|
|
95
|
+
inline int numberMembers() const {
|
|
96
|
+
return numberMembers_;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/// Members (indices in range 0 ... numberColumns-1)
|
|
100
|
+
inline const int * members() const {
|
|
101
|
+
return members_;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// SOS type
|
|
105
|
+
inline int sosType() const {
|
|
106
|
+
return sosType_;
|
|
107
|
+
}
|
|
108
|
+
/// Down number times
|
|
109
|
+
inline int numberTimesDown() const {
|
|
110
|
+
return numberTimesDown_;
|
|
111
|
+
}
|
|
112
|
+
/// Up number times
|
|
113
|
+
inline int numberTimesUp() const {
|
|
114
|
+
return numberTimesUp_;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Array of weights */
|
|
118
|
+
inline const double * weights() const {
|
|
119
|
+
return weights_;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// Set number of members
|
|
123
|
+
inline void setNumberMembers(int n) {
|
|
124
|
+
numberMembers_ = n;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/// Members (indices in range 0 ... numberColumns-1)
|
|
128
|
+
inline int * mutableMembers() const {
|
|
129
|
+
return members_;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Array of weights */
|
|
133
|
+
inline double * mutableWeights() const {
|
|
134
|
+
return weights_;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** \brief Return true if object can take part in normal heuristics
|
|
138
|
+
*/
|
|
139
|
+
virtual bool canDoHeuristics() const {
|
|
140
|
+
return (sosType_ == 1 && integerValued_);
|
|
141
|
+
}
|
|
142
|
+
/// Set whether set is integer valued or not
|
|
143
|
+
inline void setIntegerValued(bool yesNo) {
|
|
144
|
+
integerValued_ = yesNo;
|
|
145
|
+
}
|
|
146
|
+
private:
|
|
147
|
+
/// data
|
|
148
|
+
|
|
149
|
+
/// Members (indices in range 0 ... numberColumns-1)
|
|
150
|
+
int * members_;
|
|
151
|
+
/** \brief Weights for individual members
|
|
152
|
+
|
|
153
|
+
Arbitrary weights for members. Can be used to attach meaning to variable
|
|
154
|
+
values independent of objective coefficients. For example, if the SOS set
|
|
155
|
+
comprises binary variables used to choose a facility of a given size, the
|
|
156
|
+
weight could be the corresponding facilty size. Fractional values of the
|
|
157
|
+
SOS variables can then be used to estimate ideal facility size.
|
|
158
|
+
|
|
159
|
+
Weights cannot be completely arbitrary. From the code, they must be
|
|
160
|
+
differ by at least 1.0e-7
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
double * weights_;
|
|
164
|
+
/// Current pseudo-shadow price estimate down
|
|
165
|
+
mutable double shadowEstimateDown_;
|
|
166
|
+
/// Current pseudo-shadow price estimate up
|
|
167
|
+
mutable double shadowEstimateUp_;
|
|
168
|
+
/// Down pseudo ratio
|
|
169
|
+
double downDynamicPseudoRatio_;
|
|
170
|
+
/// Up pseudo ratio
|
|
171
|
+
double upDynamicPseudoRatio_;
|
|
172
|
+
/// Number of times we have gone down
|
|
173
|
+
int numberTimesDown_;
|
|
174
|
+
/// Number of times we have gone up
|
|
175
|
+
int numberTimesUp_;
|
|
176
|
+
/// Number of members
|
|
177
|
+
int numberMembers_;
|
|
178
|
+
/// SOS type
|
|
179
|
+
int sosType_;
|
|
180
|
+
/// Whether integer valued
|
|
181
|
+
bool integerValued_;
|
|
182
|
+
/// Whether odd values e.g. negative
|
|
183
|
+
bool oddValues_;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/** Branching object for Special ordered sets
|
|
187
|
+
|
|
188
|
+
Variable_ is the set id number (redundant, as the object also holds a
|
|
189
|
+
pointer to the set.
|
|
190
|
+
*/
|
|
191
|
+
class CbcSOSBranchingObject : public CbcBranchingObject {
|
|
192
|
+
|
|
193
|
+
public:
|
|
194
|
+
|
|
195
|
+
// Default Constructor
|
|
196
|
+
CbcSOSBranchingObject ();
|
|
197
|
+
|
|
198
|
+
// Useful constructor
|
|
199
|
+
CbcSOSBranchingObject (CbcModel * model, const CbcSOS * clique,
|
|
200
|
+
int way,
|
|
201
|
+
double separator);
|
|
202
|
+
|
|
203
|
+
// Copy constructor
|
|
204
|
+
CbcSOSBranchingObject ( const CbcSOSBranchingObject &);
|
|
205
|
+
|
|
206
|
+
// Assignment operator
|
|
207
|
+
CbcSOSBranchingObject & operator=( const CbcSOSBranchingObject& rhs);
|
|
208
|
+
|
|
209
|
+
/// Clone
|
|
210
|
+
virtual CbcBranchingObject * clone() const;
|
|
211
|
+
|
|
212
|
+
// Destructor
|
|
213
|
+
virtual ~CbcSOSBranchingObject ();
|
|
214
|
+
|
|
215
|
+
using CbcBranchingObject::branch ;
|
|
216
|
+
/// Does next branch and updates state
|
|
217
|
+
virtual double branch();
|
|
218
|
+
/** Update bounds in solver as in 'branch' and update given bounds.
|
|
219
|
+
branchState is -1 for 'down' +1 for 'up' */
|
|
220
|
+
virtual void fix(OsiSolverInterface * solver,
|
|
221
|
+
double * lower, double * upper,
|
|
222
|
+
int branchState) const ;
|
|
223
|
+
|
|
224
|
+
/** Reset every information so that the branching object appears to point to
|
|
225
|
+
the previous child. This method does not need to modify anything in any
|
|
226
|
+
solver. */
|
|
227
|
+
virtual void previousBranch() {
|
|
228
|
+
CbcBranchingObject::previousBranch();
|
|
229
|
+
computeNonzeroRange();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
using CbcBranchingObject::print ;
|
|
233
|
+
/** \brief Print something about branch - only if log level high
|
|
234
|
+
*/
|
|
235
|
+
virtual void print();
|
|
236
|
+
|
|
237
|
+
/** Return the type (an integer identifier) of \c this */
|
|
238
|
+
virtual CbcBranchObjType type() const {
|
|
239
|
+
return SoSBranchObj;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** Compare the original object of \c this with the original object of \c
|
|
243
|
+
brObj. Assumes that there is an ordering of the original objects.
|
|
244
|
+
This method should be invoked only if \c this and brObj are of the same
|
|
245
|
+
type.
|
|
246
|
+
Return negative/0/positive depending on whether \c this is
|
|
247
|
+
smaller/same/larger than the argument.
|
|
248
|
+
*/
|
|
249
|
+
virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
|
|
250
|
+
|
|
251
|
+
/** Compare the \c this with \c brObj. \c this and \c brObj must be os the
|
|
252
|
+
same type and must have the same original object, but they may have
|
|
253
|
+
different feasible regions.
|
|
254
|
+
Return the appropriate CbcRangeCompare value (first argument being the
|
|
255
|
+
sub/superset if that's the case). In case of overlap (and if \c
|
|
256
|
+
replaceIfOverlap is true) replace the current branching object with one
|
|
257
|
+
whose feasible region is the overlap.
|
|
258
|
+
*/
|
|
259
|
+
virtual CbcRangeCompare compareBranchingObject
|
|
260
|
+
(const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
|
|
261
|
+
|
|
262
|
+
/** Fill out the \c firstNonzero_ and \c lastNonzero_ data members */
|
|
263
|
+
void computeNonzeroRange();
|
|
264
|
+
|
|
265
|
+
private:
|
|
266
|
+
/// data
|
|
267
|
+
const CbcSOS * set_;
|
|
268
|
+
/// separator
|
|
269
|
+
double separator_;
|
|
270
|
+
/** The following two members describe the range in the members_ of the
|
|
271
|
+
original object that whose upper bound is not fixed to 0. This is not
|
|
272
|
+
necessary for Cbc to function correctly, this is there for heuristics so
|
|
273
|
+
that separate branching decisions on the same object can be pooled into
|
|
274
|
+
one branching object. */
|
|
275
|
+
int firstNonzero_;
|
|
276
|
+
int lastNonzero_;
|
|
277
|
+
};
|
|
278
|
+
#endif
|
|
279
|
+
|