ruby-cbc 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- 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,96 @@
|
|
1
|
+
// $Id: CbcHeuristicDINS.hpp 1899 2013-04-09 18:12:08Z stefan $
|
2
|
+
// Copyright (C) 2006, 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 12/5/09 carved out of CbcHeuristicRINS
|
7
|
+
|
8
|
+
#ifndef CbcHeuristicDINS_H
|
9
|
+
#define CbcHeuristicDINS_H
|
10
|
+
|
11
|
+
#include "CbcHeuristic.hpp"
|
12
|
+
|
13
|
+
|
14
|
+
class CbcHeuristicDINS : public CbcHeuristic {
|
15
|
+
public:
|
16
|
+
|
17
|
+
// Default Constructor
|
18
|
+
CbcHeuristicDINS ();
|
19
|
+
|
20
|
+
/* Constructor with model - assumed before cuts
|
21
|
+
Initial version does not do Lps
|
22
|
+
*/
|
23
|
+
CbcHeuristicDINS (CbcModel & model);
|
24
|
+
|
25
|
+
// Copy constructor
|
26
|
+
CbcHeuristicDINS ( const CbcHeuristicDINS &);
|
27
|
+
|
28
|
+
// Destructor
|
29
|
+
~CbcHeuristicDINS ();
|
30
|
+
|
31
|
+
/// Clone
|
32
|
+
virtual CbcHeuristic * clone() const;
|
33
|
+
|
34
|
+
|
35
|
+
/// Assignment operator
|
36
|
+
CbcHeuristicDINS & operator=(const CbcHeuristicDINS& rhs);
|
37
|
+
|
38
|
+
/// Create C++ lines to get to current state
|
39
|
+
virtual void generateCpp( FILE * fp) ;
|
40
|
+
|
41
|
+
/// Resets stuff if model changes
|
42
|
+
virtual void resetModel(CbcModel * model);
|
43
|
+
|
44
|
+
/// update model (This is needed if cliques update matrix etc)
|
45
|
+
virtual void setModel(CbcModel * model);
|
46
|
+
|
47
|
+
using CbcHeuristic::solution ;
|
48
|
+
/** returns 0 if no solution, 1 if valid solution.
|
49
|
+
Sets solution values if good, sets objective value (only if good)
|
50
|
+
This does Relaxation Induced Neighborhood Search
|
51
|
+
*/
|
52
|
+
virtual int solution(double & objectiveValue,
|
53
|
+
double * newSolution);
|
54
|
+
/// This version fixes stuff and does IP
|
55
|
+
int solutionFix(double & objectiveValue,
|
56
|
+
double * newSolution,
|
57
|
+
const int * keep);
|
58
|
+
|
59
|
+
/// Sets how often to do it
|
60
|
+
inline void setHowOften(int value) {
|
61
|
+
howOften_ = value;
|
62
|
+
}
|
63
|
+
/// Sets maximum number of solutions kept
|
64
|
+
inline void setMaximumKeep(int value) {
|
65
|
+
maximumKeepSolutions_ = value;
|
66
|
+
}
|
67
|
+
/// Sets tightness of extra constraint
|
68
|
+
inline void setConstraint(int value) {
|
69
|
+
localSpace_ = value;
|
70
|
+
}
|
71
|
+
|
72
|
+
protected:
|
73
|
+
// Data
|
74
|
+
|
75
|
+
/// Number of solutions so we can do something at solution
|
76
|
+
int numberSolutions_;
|
77
|
+
/// How often to do (code can change)
|
78
|
+
int howOften_;
|
79
|
+
/// Number of successes
|
80
|
+
int numberSuccesses_;
|
81
|
+
/// Number of tries
|
82
|
+
int numberTries_;
|
83
|
+
/// Maximum number of solutions to keep
|
84
|
+
int maximumKeepSolutions_;
|
85
|
+
/// Number of solutions kept
|
86
|
+
int numberKeptSolutions_;
|
87
|
+
/// Number of integer variables
|
88
|
+
int numberIntegers_;
|
89
|
+
/// Local parameter
|
90
|
+
int localSpace_;
|
91
|
+
/// Values of integer variables
|
92
|
+
int ** values_;
|
93
|
+
};
|
94
|
+
|
95
|
+
#endif
|
96
|
+
|
@@ -0,0 +1,309 @@
|
|
1
|
+
// $Id: CbcHeuristicDW.hpp 1899 2013-04-09 18:12:08Z stefan $
|
2
|
+
// Copyright (C) 2006, 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
|
+
|
7
|
+
#ifndef CbcHeuristicDW_H
|
8
|
+
#define CbcHeuristicDW_H
|
9
|
+
|
10
|
+
#include "CbcHeuristic.hpp"
|
11
|
+
|
12
|
+
/**
|
13
|
+
This is unlike the other heuristics in that it is very very compute intensive.
|
14
|
+
It tries to find a DW structure and use that
|
15
|
+
*/
|
16
|
+
|
17
|
+
class CbcHeuristicDW : public CbcHeuristic {
|
18
|
+
public:
|
19
|
+
|
20
|
+
// Default Constructor
|
21
|
+
CbcHeuristicDW ();
|
22
|
+
|
23
|
+
/* Constructor with model - assumed before cuts
|
24
|
+
*/
|
25
|
+
CbcHeuristicDW (CbcModel & model, int keepContinuous=0);
|
26
|
+
|
27
|
+
/* Constructor with model - assumed before cuts
|
28
|
+
*/
|
29
|
+
CbcHeuristicDW (CbcModel & model,
|
30
|
+
int callBack(CbcHeuristicDW * currentHeuristic,
|
31
|
+
CbcModel * thisModel,
|
32
|
+
int whereFrom),
|
33
|
+
int keepContinuous=0);
|
34
|
+
|
35
|
+
// Copy constructor
|
36
|
+
CbcHeuristicDW ( const CbcHeuristicDW &);
|
37
|
+
|
38
|
+
// Destructor
|
39
|
+
~CbcHeuristicDW ();
|
40
|
+
|
41
|
+
/// Clone
|
42
|
+
virtual CbcHeuristic * clone() const;
|
43
|
+
|
44
|
+
|
45
|
+
/// Assignment operator
|
46
|
+
CbcHeuristicDW & operator=(const CbcHeuristicDW& rhs);
|
47
|
+
|
48
|
+
/// Create C++ lines to get to current state
|
49
|
+
virtual void generateCpp( FILE * fp) ;
|
50
|
+
|
51
|
+
/// Resets stuff if model changes
|
52
|
+
virtual void resetModel(CbcModel * model);
|
53
|
+
|
54
|
+
/// update model (This is needed if cliques update matrix etc)
|
55
|
+
virtual void setModel(CbcModel * model);
|
56
|
+
using CbcHeuristic::solution ;
|
57
|
+
/** returns 0 if no solution, 1 if valid solution.
|
58
|
+
Sets solution values if good, sets objective value (only if good)
|
59
|
+
This does Relaxation Induced Neighborhood Search
|
60
|
+
*/
|
61
|
+
virtual int solution(double & objectiveValue,
|
62
|
+
double * newSolution);
|
63
|
+
/** Return number of blocks
|
64
|
+
<=0 - no usable structure */
|
65
|
+
inline int numberBlocks() const
|
66
|
+
{ return numberBlocks_;}
|
67
|
+
/// Pass in a solution
|
68
|
+
void passInSolution(const double * solution);
|
69
|
+
/// Pass in continuous solution
|
70
|
+
void passInContinuousSolution(const double * solution);
|
71
|
+
/** DW Proposal actions
|
72
|
+
fullDWEverySoOften -
|
73
|
+
0 - off
|
74
|
+
k - every k times solution gets better
|
75
|
+
*/
|
76
|
+
void setProposalActions(int fullDWEverySoOften);
|
77
|
+
/// Objective value when whichDw created
|
78
|
+
double objectiveValueWhen(int whichDW) const;
|
79
|
+
/// Number of columns in DW
|
80
|
+
int numberColumnsDW(int whichDW) const;
|
81
|
+
/// Solver
|
82
|
+
inline OsiSolverInterface * solver() const
|
83
|
+
{ return solver_;}
|
84
|
+
/// DW model (user must delete)
|
85
|
+
OsiSolverInterface * DWModel(int whichDW) const;
|
86
|
+
/// Best objective value
|
87
|
+
inline double bestObjective() const
|
88
|
+
{ return bestObjective_;}
|
89
|
+
/// Best solution found so far
|
90
|
+
inline const double * bestSolution() const
|
91
|
+
{ return bestSolution_;}
|
92
|
+
/// Continuous solution
|
93
|
+
inline const double * continuousSolution() const
|
94
|
+
{ return continuousSolution_;}
|
95
|
+
/// Reduced costs of fixed solution
|
96
|
+
inline const double * fixedDj() const
|
97
|
+
{ return fixedDj_;}
|
98
|
+
/// Objective at which DW updated
|
99
|
+
inline const double * objectiveDW() const
|
100
|
+
{ return objectiveDW_;}
|
101
|
+
/// Number of times we have added to DW model
|
102
|
+
inline int numberDWTimes() const
|
103
|
+
{ return numberDWTimes_;}
|
104
|
+
/// Number of columns in DW
|
105
|
+
inline const int * numberColumnsDW() const
|
106
|
+
{ return numberColumnsDW_;}
|
107
|
+
/// Set number of passes
|
108
|
+
inline void setNumberPasses(int value)
|
109
|
+
{ numberPasses_ = value;}
|
110
|
+
/// Set number of passes without better solution
|
111
|
+
inline void setNumberBadPasses(int value)
|
112
|
+
{ numberBadPasses_ = value;}
|
113
|
+
/// Set number free integers needed (Base value)
|
114
|
+
inline void setNumberNeeded(int value)
|
115
|
+
{ nNeededBase_ = value;}
|
116
|
+
/// Get number free integers needed (Base value)
|
117
|
+
inline int getNumberNeeded() const
|
118
|
+
{return nNeededBase_;}
|
119
|
+
/// Set number free integers needed (Current value)
|
120
|
+
inline void setCurrentNumberNeeded(int value)
|
121
|
+
{ nNeeded_ = value;}
|
122
|
+
/// Get number free integers needed (Current value)
|
123
|
+
inline int getCurrentNumberNeeded() const
|
124
|
+
{return nNeeded_;}
|
125
|
+
/// Set number nodes (could be done in callback) (Base value)
|
126
|
+
inline void setNumberNodes(int value)
|
127
|
+
{ nNodesBase_ = value;}
|
128
|
+
/// Get number nodes (could be done in callback) (Base value)
|
129
|
+
inline int getNumberNodes() const
|
130
|
+
{return nNodesBase_;}
|
131
|
+
/// Set number nodes (could be done in callback) (Current value)
|
132
|
+
inline void setCurrentNumberNodes(int value)
|
133
|
+
{ nNodes_ = value;}
|
134
|
+
/// Get number nodes (could be done in callback) (Current value)
|
135
|
+
inline int getCurrentNumberNodes() const
|
136
|
+
{return nNodes_;}
|
137
|
+
/// Set target objective
|
138
|
+
inline void setTargetObjective(double value)
|
139
|
+
{ targetObjective_ = value;}
|
140
|
+
/// Sets how often to do it
|
141
|
+
inline void setHowOften(int value) {
|
142
|
+
howOften_ = value;
|
143
|
+
}
|
144
|
+
/// Block for every row
|
145
|
+
inline const int * whichRowBlock() const
|
146
|
+
{ return whichRowBlock_;}
|
147
|
+
/// Block for every column
|
148
|
+
inline const int * whichColumnBlock() const
|
149
|
+
{ return whichColumnBlock_;}
|
150
|
+
/// Initial Lower bounds
|
151
|
+
inline double * initialLower() const
|
152
|
+
{ return saveLower_;}
|
153
|
+
/// Initial Upper bounds
|
154
|
+
inline double * initialUpper() const
|
155
|
+
{ return saveUpper_;}
|
156
|
+
/// Local integer arrays (each numberBlocks_ long)
|
157
|
+
inline int * intArrays() const
|
158
|
+
{ return intArray_;}
|
159
|
+
/// Local double arrays (each numberBlocks_ long)
|
160
|
+
inline double * doubleArrays() const
|
161
|
+
{ return doubleArray_;}
|
162
|
+
/// Phase of solution
|
163
|
+
inline int phase() const
|
164
|
+
{ return phase_;}
|
165
|
+
/// Pass number
|
166
|
+
inline int pass() const
|
167
|
+
{ return pass_;}
|
168
|
+
/// Which columns are in block
|
169
|
+
inline const int * columnsInBlock() const
|
170
|
+
{ return columnsInBlock_;}
|
171
|
+
/// Starts for columnsInBlock
|
172
|
+
inline const int * startColumnBlock() const
|
173
|
+
{ return startColumnBlock_;}
|
174
|
+
/// Number of integer variables in each block
|
175
|
+
inline const int * intsInBlock() const
|
176
|
+
{ return intsInBlock_;}
|
177
|
+
/// Objective value (could also check validity)
|
178
|
+
double objectiveValue(const double * solution);
|
179
|
+
private:
|
180
|
+
/// Guts of copy
|
181
|
+
void gutsOfCopy(const CbcHeuristicDW & rhs);
|
182
|
+
/// Guts of delete
|
183
|
+
void gutsOfDelete();
|
184
|
+
/// Set default values
|
185
|
+
void setDefaults();
|
186
|
+
/// Find structure
|
187
|
+
void findStructure();
|
188
|
+
/// Set up DW structure
|
189
|
+
void setupDWStructures();
|
190
|
+
/// Add DW proposals
|
191
|
+
int addDW(const double * solution,int numberBlocksUsed,
|
192
|
+
const int * whichBlocks);
|
193
|
+
protected:
|
194
|
+
typedef int (*heuristicCallBack) (CbcHeuristicDW * ,CbcModel *, int) ;
|
195
|
+
// Data
|
196
|
+
/// Target objective
|
197
|
+
double targetObjective_;
|
198
|
+
/// Best objective value
|
199
|
+
double bestObjective_;
|
200
|
+
/// Objective value last time
|
201
|
+
double lastObjective_;
|
202
|
+
/** Call back
|
203
|
+
whereFrom -
|
204
|
+
0 - after blocks found but before data setup
|
205
|
+
1 - after blocks sorted but before used
|
206
|
+
2 - just before normal branch and bound
|
207
|
+
3 - after DW has been updated
|
208
|
+
4 - if better solution found
|
209
|
+
5 - every time a block might be used
|
210
|
+
next few for adjustment of nNeeded etc
|
211
|
+
6 - complete search done - no solution
|
212
|
+
7 - stopped on nodes - no improvement
|
213
|
+
8 - improving (same as 4 but after nNeeded changed
|
214
|
+
Pointers to local data given by following pointers
|
215
|
+
*/
|
216
|
+
heuristicCallBack functionPointer_;
|
217
|
+
/// Local integer arrays (each numberBlocks_ long)
|
218
|
+
int * intArray_;
|
219
|
+
/// Local double arrays (each numberBlocks_ long)
|
220
|
+
double * doubleArray_;
|
221
|
+
/// Base solver
|
222
|
+
OsiSolverInterface * solver_;
|
223
|
+
/// DW solver
|
224
|
+
OsiSolverInterface * dwSolver_;
|
225
|
+
/// Best solution found so far
|
226
|
+
double * bestSolution_;
|
227
|
+
/// Continuous solution
|
228
|
+
double * continuousSolution_;
|
229
|
+
/// Reduced costs of fixed solution
|
230
|
+
double * fixedDj_;
|
231
|
+
/// Original lower bounds
|
232
|
+
double * saveLower_;
|
233
|
+
/// Original Upper bounds
|
234
|
+
double * saveUpper_;
|
235
|
+
/// random numbers for master rows
|
236
|
+
double * random_;
|
237
|
+
/// Weights for each proposal
|
238
|
+
double * weights_;
|
239
|
+
/// Objective at which DW updated
|
240
|
+
double * objectiveDW_;
|
241
|
+
/// Number of columns in each DW
|
242
|
+
int * numberColumnsDW_;
|
243
|
+
/// Block for every row
|
244
|
+
int * whichRowBlock_;
|
245
|
+
/// Block for every column
|
246
|
+
int * whichColumnBlock_;
|
247
|
+
/// Block number for each proposal
|
248
|
+
int * dwBlock_;
|
249
|
+
/// Points back to master rows
|
250
|
+
int * backwardRow_;
|
251
|
+
/// Which rows are in blocke
|
252
|
+
int * rowsInBlock_;
|
253
|
+
/// Which columns are in block
|
254
|
+
int * columnsInBlock_;
|
255
|
+
/// Starts for rowsInBlock
|
256
|
+
int * startRowBlock_;
|
257
|
+
/// Starts for columnsInBlock
|
258
|
+
int * startColumnBlock_;
|
259
|
+
/// Number of integer variables in each block
|
260
|
+
int * intsInBlock_;
|
261
|
+
/// Bits set for 1 integers in each block
|
262
|
+
unsigned int * fingerPrint_;
|
263
|
+
/// Affinity each block has for other (will be triangular?)
|
264
|
+
unsigned short * affinity_;
|
265
|
+
/** DW Proposal actions
|
266
|
+
fullDWEverySoOften -
|
267
|
+
0 - off
|
268
|
+
k - every k times solution gets better
|
269
|
+
*/
|
270
|
+
int fullDWEverySoOften_;
|
271
|
+
/// Number of passes
|
272
|
+
int numberPasses_;
|
273
|
+
/// How often to do (code can change)
|
274
|
+
int howOften_;
|
275
|
+
/// Current maximum number of DW proposals
|
276
|
+
int maximumDW_;
|
277
|
+
/// Number of DW proposals
|
278
|
+
int numberDW_;
|
279
|
+
/// Number of times we have added to DW model
|
280
|
+
int numberDWTimes_;
|
281
|
+
/// Number of unsigned ints needed for each block of fingerPrint
|
282
|
+
int sizeFingerPrint_;
|
283
|
+
/// Number of columns in master
|
284
|
+
int numberMasterColumns_;
|
285
|
+
/// Number of rows in master
|
286
|
+
int numberMasterRows_;
|
287
|
+
/// Number of blocks
|
288
|
+
int numberBlocks_;
|
289
|
+
/// Action on decomposition - 1 keep continuous, 0 don't
|
290
|
+
int keepContinuous_;
|
291
|
+
/// Phase of solution
|
292
|
+
int phase_;
|
293
|
+
/// Pass number
|
294
|
+
int pass_;
|
295
|
+
/// Base number of integers needed
|
296
|
+
int nNeededBase_;
|
297
|
+
/// Base number of nodes needed
|
298
|
+
int nNodesBase_;
|
299
|
+
/// Base number of integers needed
|
300
|
+
int nNeeded_;
|
301
|
+
/// Base number of nodes needed
|
302
|
+
int nNodes_;
|
303
|
+
/// Number of passes without better solution
|
304
|
+
int numberBadPasses_;
|
305
|
+
// 0 - fine, 1 can't be better, 2 max node
|
306
|
+
int solveState_;
|
307
|
+
};
|
308
|
+
|
309
|
+
#endif
|
@@ -0,0 +1,192 @@
|
|
1
|
+
/* $Id: CbcHeuristicDive.hpp 2093 2014-11-06 16:17:38Z forrest $ */
|
2
|
+
// Copyright (C) 2008, 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 CbcHeuristicDive_H
|
7
|
+
#define CbcHeuristicDive_H
|
8
|
+
|
9
|
+
#include "CbcHeuristic.hpp"
|
10
|
+
class CbcSubProblem;
|
11
|
+
class OsiRowCut;
|
12
|
+
struct PseudoReducedCost {
|
13
|
+
int var;
|
14
|
+
double pseudoRedCost;
|
15
|
+
};
|
16
|
+
|
17
|
+
|
18
|
+
/** Dive class
|
19
|
+
*/
|
20
|
+
|
21
|
+
class CbcHeuristicDive : public CbcHeuristic {
|
22
|
+
public:
|
23
|
+
|
24
|
+
// Default Constructor
|
25
|
+
CbcHeuristicDive ();
|
26
|
+
|
27
|
+
// Constructor with model - assumed before cuts
|
28
|
+
CbcHeuristicDive (CbcModel & model);
|
29
|
+
|
30
|
+
// Copy constructor
|
31
|
+
CbcHeuristicDive ( const CbcHeuristicDive &);
|
32
|
+
|
33
|
+
// Destructor
|
34
|
+
~CbcHeuristicDive ();
|
35
|
+
|
36
|
+
/// Clone
|
37
|
+
virtual CbcHeuristicDive * clone() const = 0;
|
38
|
+
|
39
|
+
/// Assignment operator
|
40
|
+
CbcHeuristicDive & operator=(const CbcHeuristicDive& rhs);
|
41
|
+
|
42
|
+
/// Create C++ lines to get to current state
|
43
|
+
virtual void generateCpp( FILE * ) {}
|
44
|
+
|
45
|
+
/// Create C++ lines to get to current state - does work for base class
|
46
|
+
void generateCpp( FILE * fp, const char * heuristic);
|
47
|
+
|
48
|
+
/// Resets stuff if model changes
|
49
|
+
virtual void resetModel(CbcModel * model);
|
50
|
+
|
51
|
+
/// update model (This is needed if cliques update matrix etc)
|
52
|
+
virtual void setModel(CbcModel * model);
|
53
|
+
|
54
|
+
// REMLOVE using CbcHeuristic::solution ;
|
55
|
+
/** returns 0 if no solution, 1 if valid solution
|
56
|
+
with better objective value than one passed in
|
57
|
+
Sets solution values if good, sets objective value (only if good)
|
58
|
+
This is called after cuts have been added - so can not add cuts
|
59
|
+
This does Fractional Diving
|
60
|
+
*/
|
61
|
+
virtual int solution(double & objectiveValue,
|
62
|
+
double * newSolution);
|
63
|
+
/// inner part of dive
|
64
|
+
int solution(double & objectiveValue, int & numberNodes,
|
65
|
+
int & numberCuts, OsiRowCut ** cuts,
|
66
|
+
CbcSubProblem ** & nodes,
|
67
|
+
double * newSolution);
|
68
|
+
/** returns 0 if no solution, 1 if valid solution
|
69
|
+
with better objective value than one passed in
|
70
|
+
also returns list of nodes
|
71
|
+
This does Fractional Diving
|
72
|
+
*/
|
73
|
+
int fathom(CbcModel * model, int & numberNodes,CbcSubProblem ** & nodes);
|
74
|
+
|
75
|
+
/// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
76
|
+
virtual void validate();
|
77
|
+
|
78
|
+
/// Sets priorities if any
|
79
|
+
void setPriorities();
|
80
|
+
|
81
|
+
/// Select candidate binary variables for fixing
|
82
|
+
void selectBinaryVariables();
|
83
|
+
|
84
|
+
/// Set percentage of integer variables to fix at bounds
|
85
|
+
void setPercentageToFix(double value) {
|
86
|
+
percentageToFix_ = value;
|
87
|
+
}
|
88
|
+
|
89
|
+
/// Set maximum number of iterations
|
90
|
+
void setMaxIterations(int value) {
|
91
|
+
maxIterations_ = value;
|
92
|
+
}
|
93
|
+
|
94
|
+
/// Set maximum number of simplex iterations
|
95
|
+
void setMaxSimplexIterations(int value) {
|
96
|
+
maxSimplexIterations_ = value;
|
97
|
+
}
|
98
|
+
/// Get maximum number of simplex iterations
|
99
|
+
inline int maxSimplexIterations() const {
|
100
|
+
return maxSimplexIterations_;
|
101
|
+
}
|
102
|
+
|
103
|
+
/// Set maximum number of simplex iterations at root node
|
104
|
+
void setMaxSimplexIterationsAtRoot(int value) {
|
105
|
+
maxSimplexIterationsAtRoot_ = value;
|
106
|
+
}
|
107
|
+
|
108
|
+
/// Set maximum time allowed
|
109
|
+
void setMaxTime(double value) {
|
110
|
+
maxTime_ = value;
|
111
|
+
}
|
112
|
+
|
113
|
+
/// Tests if the heuristic can run
|
114
|
+
virtual bool canHeuristicRun();
|
115
|
+
|
116
|
+
/** Selects the next variable to branch on
|
117
|
+
Returns true if all the fractional variables can be trivially
|
118
|
+
rounded. Returns false, if there is at least one fractional variable
|
119
|
+
that is not trivially roundable. In this case, the bestColumn
|
120
|
+
returned will not be trivially roundable.
|
121
|
+
*/
|
122
|
+
virtual bool selectVariableToBranch(OsiSolverInterface* solver,
|
123
|
+
const double* newSolution,
|
124
|
+
int& bestColumn,
|
125
|
+
int& bestRound) = 0;
|
126
|
+
/** Initializes any data which is going to be used repeatedly
|
127
|
+
in selectVariableToBranch */
|
128
|
+
virtual void initializeData() {}
|
129
|
+
|
130
|
+
/// Perform reduced cost fixing on integer variables
|
131
|
+
int reducedCostFix (OsiSolverInterface* solver);
|
132
|
+
/// Fix other variables at bounds
|
133
|
+
virtual int fixOtherVariables(OsiSolverInterface * solver,
|
134
|
+
const double * solution,
|
135
|
+
PseudoReducedCost * candidate,
|
136
|
+
const double * random);
|
137
|
+
|
138
|
+
protected:
|
139
|
+
// Data
|
140
|
+
|
141
|
+
// Original matrix by column
|
142
|
+
CoinPackedMatrix matrix_;
|
143
|
+
|
144
|
+
// Original matrix by
|
145
|
+
CoinPackedMatrix matrixByRow_;
|
146
|
+
|
147
|
+
// Down locks
|
148
|
+
unsigned short * downLocks_;
|
149
|
+
|
150
|
+
// Up locks
|
151
|
+
unsigned short * upLocks_;
|
152
|
+
|
153
|
+
/// Extra down array (number Integers long)
|
154
|
+
double * downArray_;
|
155
|
+
|
156
|
+
/// Extra up array (number Integers long)
|
157
|
+
double * upArray_;
|
158
|
+
|
159
|
+
/// Array of priorities
|
160
|
+
typedef struct {
|
161
|
+
unsigned int direction:3; // 0 bit off, 1 bit (0 down first, 1 up first) 2 bit non zero don't try other way
|
162
|
+
unsigned int priority:29;
|
163
|
+
} PriorityType;
|
164
|
+
PriorityType * priority_;
|
165
|
+
// Indexes of binary variables with 0 objective coefficient
|
166
|
+
// and in variable bound constraints
|
167
|
+
std::vector<int> binVarIndex_;
|
168
|
+
|
169
|
+
// Indexes of variable bound rows for each binary variable
|
170
|
+
std::vector<int> vbRowIndex_;
|
171
|
+
|
172
|
+
// Percentage of integer variables to fix at bounds
|
173
|
+
double percentageToFix_;
|
174
|
+
|
175
|
+
// Maximum time allowed
|
176
|
+
double maxTime_;
|
177
|
+
|
178
|
+
// Small objective (i.e. treat zero objective as this)
|
179
|
+
double smallObjective_;
|
180
|
+
|
181
|
+
// Maximum number of major iterations
|
182
|
+
int maxIterations_;
|
183
|
+
|
184
|
+
// Maximum number of simplex iterations
|
185
|
+
int maxSimplexIterations_;
|
186
|
+
|
187
|
+
// Maximum number of simplex iterations at root node
|
188
|
+
int maxSimplexIterationsAtRoot_;
|
189
|
+
|
190
|
+
};
|
191
|
+
#endif
|
192
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* $Id: CbcHeuristicDiveCoefficient.hpp 1899 2013-04-09 18:12:08Z stefan $ */
|
2
|
+
// Copyright (C) 2008, 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 CbcHeuristicDiveCoefficient_H
|
7
|
+
#define CbcHeuristicDiveCoefficient_H
|
8
|
+
|
9
|
+
#include "CbcHeuristicDive.hpp"
|
10
|
+
|
11
|
+
/** DiveCoefficient class
|
12
|
+
*/
|
13
|
+
|
14
|
+
class CbcHeuristicDiveCoefficient : public CbcHeuristicDive {
|
15
|
+
public:
|
16
|
+
|
17
|
+
// Default Constructor
|
18
|
+
CbcHeuristicDiveCoefficient ();
|
19
|
+
|
20
|
+
// Constructor with model - assumed before cuts
|
21
|
+
CbcHeuristicDiveCoefficient (CbcModel & model);
|
22
|
+
|
23
|
+
// Copy constructor
|
24
|
+
CbcHeuristicDiveCoefficient ( const CbcHeuristicDiveCoefficient &);
|
25
|
+
|
26
|
+
// Destructor
|
27
|
+
~CbcHeuristicDiveCoefficient ();
|
28
|
+
|
29
|
+
/// Clone
|
30
|
+
virtual CbcHeuristicDiveCoefficient * clone() const;
|
31
|
+
|
32
|
+
/// Assignment operator
|
33
|
+
CbcHeuristicDiveCoefficient & operator=(const CbcHeuristicDiveCoefficient& rhs);
|
34
|
+
|
35
|
+
/// Create C++ lines to get to current state
|
36
|
+
virtual void generateCpp( FILE * fp) ;
|
37
|
+
|
38
|
+
/// Selects the next variable to branch on
|
39
|
+
/** Returns true if all the fractional variables can be trivially
|
40
|
+
rounded. Returns false, if there is at least one fractional variable
|
41
|
+
that is not trivially roundable. In this case, the bestColumn
|
42
|
+
returned will not be trivially roundable.
|
43
|
+
*/
|
44
|
+
virtual bool selectVariableToBranch(OsiSolverInterface* solver,
|
45
|
+
const double* newSolution,
|
46
|
+
int& bestColumn,
|
47
|
+
int& bestRound);
|
48
|
+
|
49
|
+
};
|
50
|
+
|
51
|
+
#endif
|
52
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* $Id: CbcHeuristicDiveFractional.hpp 1899 2013-04-09 18:12:08Z stefan $ */
|
2
|
+
// Copyright (C) 2008, 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 CbcHeuristicDiveFractional_H
|
7
|
+
#define CbcHeuristicDiveFractional_H
|
8
|
+
|
9
|
+
#include "CbcHeuristicDive.hpp"
|
10
|
+
|
11
|
+
/** DiveFractional class
|
12
|
+
*/
|
13
|
+
|
14
|
+
class CbcHeuristicDiveFractional : public CbcHeuristicDive {
|
15
|
+
public:
|
16
|
+
|
17
|
+
// Default Constructor
|
18
|
+
CbcHeuristicDiveFractional ();
|
19
|
+
|
20
|
+
// Constructor with model - assumed before cuts
|
21
|
+
CbcHeuristicDiveFractional (CbcModel & model);
|
22
|
+
|
23
|
+
// Copy constructor
|
24
|
+
CbcHeuristicDiveFractional ( const CbcHeuristicDiveFractional &);
|
25
|
+
|
26
|
+
// Destructor
|
27
|
+
~CbcHeuristicDiveFractional ();
|
28
|
+
|
29
|
+
/// Clone
|
30
|
+
virtual CbcHeuristicDiveFractional * clone() const;
|
31
|
+
|
32
|
+
/// Assignment operator
|
33
|
+
CbcHeuristicDiveFractional & operator=(const CbcHeuristicDiveFractional& rhs);
|
34
|
+
|
35
|
+
/// Create C++ lines to get to current state
|
36
|
+
virtual void generateCpp( FILE * fp) ;
|
37
|
+
|
38
|
+
/// Selects the next variable to branch on
|
39
|
+
/** Returns true if all the fractional variables can be trivially
|
40
|
+
rounded. Returns false, if there is at least one fractional variable
|
41
|
+
that is not trivially roundable. In this case, the bestColumn
|
42
|
+
returned will not be trivially roundable.
|
43
|
+
*/
|
44
|
+
virtual bool selectVariableToBranch(OsiSolverInterface* solver,
|
45
|
+
const double* newSolution,
|
46
|
+
int& bestColumn,
|
47
|
+
int& bestRound);
|
48
|
+
|
49
|
+
};
|
50
|
+
|
51
|
+
#endif
|
52
|
+
|