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,543 @@
|
|
1
|
+
// $Id: CglProbing.hpp 1201 2014-03-07 17:24:04Z 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
|
+
#ifndef CglProbing_H
|
7
|
+
#define CglProbing_H
|
8
|
+
|
9
|
+
#include <string>
|
10
|
+
|
11
|
+
#include "CglCutGenerator.hpp"
|
12
|
+
/** Only useful type of disaggregation is most normal
|
13
|
+
For now just done for 0-1 variables
|
14
|
+
Can be used for building cliques
|
15
|
+
*/
|
16
|
+
typedef struct {
|
17
|
+
//unsigned int zeroOne:1; // nonzero if affected variable is 0-1
|
18
|
+
//unsigned int whenAtUB:1; // nonzero if fixing happens when this variable at 1
|
19
|
+
//unsigned int affectedToUB:1; // nonzero if affected variable fixed to UB
|
20
|
+
//unsigned int affected:29; // If 0-1 then 0-1 sequence, otherwise true
|
21
|
+
unsigned int affected;
|
22
|
+
} disaggregationAction;
|
23
|
+
|
24
|
+
/** Probing Cut Generator Class */
|
25
|
+
class CglProbing : public CglCutGenerator {
|
26
|
+
friend void CglProbingUnitTest(const OsiSolverInterface * siP,
|
27
|
+
const std::string mpdDir );
|
28
|
+
|
29
|
+
public:
|
30
|
+
|
31
|
+
|
32
|
+
/**@name Generate Cuts */
|
33
|
+
//@{
|
34
|
+
/** Generate probing/disaggregation cuts for the model of the
|
35
|
+
solver interface, si.
|
36
|
+
|
37
|
+
This is a simplification of probing ideas put into OSL about
|
38
|
+
ten years ago. The only known documentation is a copy of a
|
39
|
+
talk handout - we think Robin Lougee-Heimer has a copy!
|
40
|
+
|
41
|
+
For selected integer variables (e.g. unsatisfied ones) the effect of
|
42
|
+
setting them up or down is investigated. Setting a variable up
|
43
|
+
may in turn set other variables (continuous as well as integer).
|
44
|
+
There are various possible results:
|
45
|
+
|
46
|
+
1) It is shown that problem is infeasible (this may also be
|
47
|
+
because objective function or reduced costs show worse than
|
48
|
+
best solution). If the other way is feasible we can generate
|
49
|
+
a column cut (and continue probing), if not feasible we can
|
50
|
+
say problem infeasible.
|
51
|
+
|
52
|
+
2) If both ways are feasible, it can happen that x to 0 implies y to 1
|
53
|
+
** and x to 1 implies y to 1 (again a column cut). More common
|
54
|
+
is that x to 0 implies y to 1 and x to 1 implies y to 0 so we could
|
55
|
+
substitute for y which might lead later to more powerful cuts.
|
56
|
+
** This is not done in this code as there is no mechanism for
|
57
|
+
returning information.
|
58
|
+
|
59
|
+
3) When x to 1 a constraint went slack by c. We can tighten the
|
60
|
+
constraint ax + .... <= b (where a may be zero) to
|
61
|
+
(a+c)x + .... <= b. If this cut is violated then it is
|
62
|
+
generated.
|
63
|
+
|
64
|
+
4) Similarly we can generate implied disaggregation cuts
|
65
|
+
|
66
|
+
Note - differences to cuts in OSL.
|
67
|
+
|
68
|
+
a) OSL had structures intended to make this faster.
|
69
|
+
b) The "chaining" in 2) was done
|
70
|
+
c) Row cuts modified original constraint rather than adding cut
|
71
|
+
b) This code can cope with general integer variables.
|
72
|
+
|
73
|
+
Insert the generated cuts into OsiCut, cs.
|
74
|
+
|
75
|
+
If a "snapshot" of a matrix exists then this will be used.
|
76
|
+
Presumably this will give global cuts and will be faster.
|
77
|
+
No check is done to see if cuts will be global.
|
78
|
+
|
79
|
+
Otherwise use current matrix.
|
80
|
+
|
81
|
+
Both row cuts and column cuts may be returned
|
82
|
+
|
83
|
+
The mode options are:
|
84
|
+
0) Only unsatisfied integer variables will be looked at.
|
85
|
+
If no information exists for that variable then
|
86
|
+
probing will be done so as a by-product you "may" get a fixing
|
87
|
+
or infeasibility. This will be fast and is only available
|
88
|
+
if a snapshot exists (otherwise as 1).
|
89
|
+
The bounds in the snapshot are the ones used.
|
90
|
+
1) Look at unsatisfied integer variables, using current bounds.
|
91
|
+
Probing will be done on all looked at.
|
92
|
+
2) Look at all integer variables, using current bounds.
|
93
|
+
Probing will be done on all
|
94
|
+
|
95
|
+
** If generateCutsAndModify is used then new relaxed
|
96
|
+
row bounds and tightened column bounds are generated
|
97
|
+
Returns number of infeasibilities
|
98
|
+
*/
|
99
|
+
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
|
100
|
+
const CglTreeInfo info = CglTreeInfo());
|
101
|
+
int generateCutsAndModify( const OsiSolverInterface & si, OsiCuts & cs,
|
102
|
+
CglTreeInfo * info);
|
103
|
+
//@}
|
104
|
+
|
105
|
+
/**@name snapshot etc */
|
106
|
+
//@{
|
107
|
+
/** Create a copy of matrix which is to be used
|
108
|
+
this is to speed up process and to give global cuts
|
109
|
+
Can give an array with 1 set to select, 0 to ignore
|
110
|
+
column bounds are tightened
|
111
|
+
If array given then values of 1 will be set to 0 if redundant.
|
112
|
+
Objective may be added as constraint
|
113
|
+
Returns 1 if infeasible otherwise 0
|
114
|
+
*/
|
115
|
+
int snapshot ( const OsiSolverInterface & si,
|
116
|
+
char * possible=NULL,
|
117
|
+
bool withObjective=true);
|
118
|
+
/// Deletes snapshot
|
119
|
+
void deleteSnapshot ( );
|
120
|
+
/** Creates cliques for use by probing.
|
121
|
+
Only cliques >= minimumSize and < maximumSize created
|
122
|
+
Can also try and extend cliques as a result of probing (root node).
|
123
|
+
Returns number of cliques found.
|
124
|
+
*/
|
125
|
+
int createCliques( OsiSolverInterface & si,
|
126
|
+
int minimumSize=2, int maximumSize=100);
|
127
|
+
/// Delete all clique information
|
128
|
+
void deleteCliques();
|
129
|
+
/** Create a fake model by adding cliques
|
130
|
+
if type&4 then delete rest of model first,
|
131
|
+
if 1 then add proper cliques, 2 add fake cliques */
|
132
|
+
OsiSolverInterface * cliqueModel(const OsiSolverInterface * model,
|
133
|
+
int type);
|
134
|
+
//@}
|
135
|
+
|
136
|
+
/**@name Get tighter column bounds */
|
137
|
+
//@{
|
138
|
+
/// Lower
|
139
|
+
const double * tightLower() const;
|
140
|
+
/// Upper
|
141
|
+
const double * tightUpper() const;
|
142
|
+
/// Array which says tighten continuous
|
143
|
+
const char * tightenBounds() const
|
144
|
+
{ return tightenBounds_;}
|
145
|
+
//@}
|
146
|
+
|
147
|
+
/**@name Get possible freed up row bounds - only valid after mode==3 */
|
148
|
+
//@{
|
149
|
+
/// Lower
|
150
|
+
const double * relaxedRowLower() const;
|
151
|
+
/// Upper
|
152
|
+
const double * relaxedRowUpper() const;
|
153
|
+
//@}
|
154
|
+
|
155
|
+
/**@name Change mode */
|
156
|
+
//@{
|
157
|
+
/// Set
|
158
|
+
void setMode(int mode);
|
159
|
+
/// Get
|
160
|
+
int getMode() const;
|
161
|
+
//@}
|
162
|
+
|
163
|
+
/**@name Change maxima */
|
164
|
+
//@{
|
165
|
+
/// Set maximum number of passes per node
|
166
|
+
void setMaxPass(int value);
|
167
|
+
/// Get maximum number of passes per node
|
168
|
+
int getMaxPass() const;
|
169
|
+
/// Set log level - 0 none, 1 - a bit, 2 - more details
|
170
|
+
void setLogLevel(int value);
|
171
|
+
/// Get log level
|
172
|
+
int getLogLevel() const;
|
173
|
+
/// Set maximum number of unsatisfied variables to look at
|
174
|
+
void setMaxProbe(int value);
|
175
|
+
/// Get maximum number of unsatisfied variables to look at
|
176
|
+
int getMaxProbe() const;
|
177
|
+
/// Set maximum number of variables to look at in one probe
|
178
|
+
void setMaxLook(int value);
|
179
|
+
/// Get maximum number of variables to look at in one probe
|
180
|
+
int getMaxLook() const;
|
181
|
+
/// Set maximum number of elements in row for it to be considered
|
182
|
+
void setMaxElements(int value);
|
183
|
+
/// Get maximum number of elements in row for it to be considered
|
184
|
+
int getMaxElements() const;
|
185
|
+
/// Set maximum number of passes per node (root node)
|
186
|
+
void setMaxPassRoot(int value);
|
187
|
+
/// Get maximum number of passes per node (root node)
|
188
|
+
int getMaxPassRoot() const;
|
189
|
+
/// Set maximum number of unsatisfied variables to look at (root node)
|
190
|
+
void setMaxProbeRoot(int value);
|
191
|
+
/// Get maximum number of unsatisfied variables to look at (root node)
|
192
|
+
int getMaxProbeRoot() const;
|
193
|
+
/// Set maximum number of variables to look at in one probe (root node)
|
194
|
+
void setMaxLookRoot(int value);
|
195
|
+
/// Get maximum number of variables to look at in one probe (root node)
|
196
|
+
int getMaxLookRoot() const;
|
197
|
+
/// Set maximum number of elements in row for it to be considered (root node)
|
198
|
+
void setMaxElementsRoot(int value);
|
199
|
+
/// Get maximum number of elements in row for it to be considered (root node)
|
200
|
+
int getMaxElementsRoot() const;
|
201
|
+
/**
|
202
|
+
Returns true if may generate Row cuts in tree (rather than root node).
|
203
|
+
Used so know if matrix will change in tree. Really
|
204
|
+
meant so column cut generators can still be active
|
205
|
+
without worrying code.
|
206
|
+
Default is true
|
207
|
+
*/
|
208
|
+
virtual bool mayGenerateRowCutsInTree() const;
|
209
|
+
//@}
|
210
|
+
|
211
|
+
/**@name Get information back from probing */
|
212
|
+
//@{
|
213
|
+
/// Number looked at this time
|
214
|
+
inline int numberThisTime() const
|
215
|
+
{ return numberThisTime_;}
|
216
|
+
/// Which ones looked at this time
|
217
|
+
inline const int * lookedAt() const
|
218
|
+
{ return lookedAt_;}
|
219
|
+
//@}
|
220
|
+
|
221
|
+
/**@name Stop or restart row cuts (otherwise just fixing from probing) */
|
222
|
+
//@{
|
223
|
+
/// Set
|
224
|
+
/// 0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both)
|
225
|
+
void setRowCuts(int type);
|
226
|
+
/// Get
|
227
|
+
int rowCuts() const;
|
228
|
+
//@}
|
229
|
+
/// Clique type
|
230
|
+
typedef struct {
|
231
|
+
unsigned int equality:1; // nonzero if clique is ==
|
232
|
+
} CliqueType;
|
233
|
+
|
234
|
+
/**@name Information on cliques */
|
235
|
+
//@{
|
236
|
+
/// Number of cliques
|
237
|
+
inline int numberCliques() const
|
238
|
+
{ return numberCliques_;}
|
239
|
+
/// Clique type
|
240
|
+
inline CliqueType * cliqueType() const
|
241
|
+
{ return cliqueType_;}
|
242
|
+
/// Start of each clique
|
243
|
+
inline int * cliqueStart() const
|
244
|
+
{ return cliqueStart_;}
|
245
|
+
/// Entries for clique
|
246
|
+
inline CliqueEntry * cliqueEntry() const
|
247
|
+
{ return cliqueEntry_;}
|
248
|
+
//@}
|
249
|
+
|
250
|
+
/**@name Whether use objective as constraint */
|
251
|
+
//@{
|
252
|
+
/** Set
|
253
|
+
0 don't
|
254
|
+
1 do
|
255
|
+
-1 don't even think about it
|
256
|
+
*/
|
257
|
+
void setUsingObjective(int yesNo);
|
258
|
+
/// Get
|
259
|
+
int getUsingObjective() const;
|
260
|
+
//@}
|
261
|
+
|
262
|
+
/**@name Mark which continuous variables are to be tightened */
|
263
|
+
//@{
|
264
|
+
/// Mark variables to be tightened
|
265
|
+
void tightenThese(const OsiSolverInterface & solver, int number, const int * which);
|
266
|
+
//@}
|
267
|
+
|
268
|
+
/**@name Constructors and destructors */
|
269
|
+
//@{
|
270
|
+
/// Default constructor
|
271
|
+
CglProbing ();
|
272
|
+
|
273
|
+
/// Copy constructor
|
274
|
+
CglProbing (
|
275
|
+
const CglProbing &);
|
276
|
+
|
277
|
+
/// Clone
|
278
|
+
virtual CglCutGenerator * clone() const;
|
279
|
+
|
280
|
+
/// Assignment operator
|
281
|
+
CglProbing &
|
282
|
+
operator=(
|
283
|
+
const CglProbing& rhs);
|
284
|
+
|
285
|
+
/// Destructor
|
286
|
+
virtual
|
287
|
+
~CglProbing ();
|
288
|
+
|
289
|
+
/// This can be used to refresh any inforamtion
|
290
|
+
virtual void refreshSolver(OsiSolverInterface * solver);
|
291
|
+
/// Create C++ lines to get to current state
|
292
|
+
virtual std::string generateCpp( FILE * fp);
|
293
|
+
//@}
|
294
|
+
|
295
|
+
private:
|
296
|
+
|
297
|
+
// Private member methods
|
298
|
+
/**@name probe */
|
299
|
+
//@{
|
300
|
+
/// Does probing and adding cuts (without cliques and mode_!=0)
|
301
|
+
int probe( const OsiSolverInterface & si,
|
302
|
+
const OsiRowCutDebugger * debugger,
|
303
|
+
OsiCuts & cs,
|
304
|
+
double * colLower, double * colUpper, CoinPackedMatrix *rowCopy,
|
305
|
+
CoinPackedMatrix *columnCopy,const CoinBigIndex * rowStartPos,
|
306
|
+
const int * realRow, const double * rowLower, const double * rowUpper,
|
307
|
+
const char * intVar, double * minR, double * maxR, int * markR,
|
308
|
+
CglTreeInfo * info);
|
309
|
+
/// Does probing and adding cuts (with cliques)
|
310
|
+
int probeCliques( const OsiSolverInterface & si,
|
311
|
+
const OsiRowCutDebugger * debugger,
|
312
|
+
OsiCuts & cs,
|
313
|
+
double * colLower, double * colUpper, CoinPackedMatrix *rowCopy,
|
314
|
+
CoinPackedMatrix *columnCopy, const int * realRow,
|
315
|
+
double * rowLower, double * rowUpper,
|
316
|
+
char * intVar, double * minR, double * maxR, int * markR,
|
317
|
+
CglTreeInfo * info);
|
318
|
+
/// Does probing and adding cuts for clique slacks
|
319
|
+
int probeSlacks( const OsiSolverInterface & si,
|
320
|
+
const OsiRowCutDebugger * debugger,
|
321
|
+
OsiCuts & cs,
|
322
|
+
double * colLower, double * colUpper, CoinPackedMatrix *rowCopy,
|
323
|
+
CoinPackedMatrix *columnCopy,
|
324
|
+
double * rowLower, double * rowUpper,
|
325
|
+
char * intVar, double * minR, double * maxR,int * markR,
|
326
|
+
CglTreeInfo * info);
|
327
|
+
/** Does most of work of generateCuts
|
328
|
+
Returns number of infeasibilities */
|
329
|
+
int gutsOfGenerateCuts( const OsiSolverInterface & si,
|
330
|
+
OsiCuts & cs,
|
331
|
+
double * rowLower, double * rowUpper,
|
332
|
+
double * colLower, double * colUpper,
|
333
|
+
CglTreeInfo * info);
|
334
|
+
/// Sets up clique information for each row
|
335
|
+
void setupRowCliqueInformation(const OsiSolverInterface & si);
|
336
|
+
/** This tightens column bounds (and can declare infeasibility)
|
337
|
+
It may also declare rows to be redundant */
|
338
|
+
int tighten(double *colLower, double * colUpper,
|
339
|
+
const int *column, const double *rowElements,
|
340
|
+
const CoinBigIndex *rowStart,const CoinBigIndex * rowStartPos,
|
341
|
+
const int * rowLength,
|
342
|
+
double *rowLower, double *rowUpper,
|
343
|
+
int nRows,int nCols,char * intVar,int maxpass,
|
344
|
+
double tolerance);
|
345
|
+
/// This just sets minima and maxima on rows
|
346
|
+
void tighten2(double *colLower, double * colUpper,
|
347
|
+
const int *column, const double *rowElements,
|
348
|
+
const CoinBigIndex *rowStart,
|
349
|
+
const int * rowLength,
|
350
|
+
double *rowLower, double *rowUpper,
|
351
|
+
double * minR, double * maxR, int * markR,
|
352
|
+
int nRows);
|
353
|
+
//@}
|
354
|
+
|
355
|
+
// Private member data
|
356
|
+
|
357
|
+
struct disaggregation_struct_tag ;
|
358
|
+
friend struct CglProbing::disaggregation_struct_tag ;
|
359
|
+
|
360
|
+
/**@name Private member data */
|
361
|
+
//@{
|
362
|
+
/// Row copy (only if snapshot)
|
363
|
+
CoinPackedMatrix * rowCopy_;
|
364
|
+
/// Column copy (only if snapshot)
|
365
|
+
CoinPackedMatrix * columnCopy_;
|
366
|
+
/// Lower bounds on rows
|
367
|
+
double * rowLower_;
|
368
|
+
/// Upper bounds on rows
|
369
|
+
double * rowUpper_;
|
370
|
+
/// Lower bounds on columns
|
371
|
+
double * colLower_;
|
372
|
+
/// Upper bounds on columns
|
373
|
+
double * colUpper_;
|
374
|
+
/// Number of rows in snapshot (or when cliqueRow stuff computed)
|
375
|
+
int numberRows_;
|
376
|
+
/// Number of columns in problem ( must == current)
|
377
|
+
int numberColumns_;
|
378
|
+
/// Tolerance to see if infeasible
|
379
|
+
double primalTolerance_;
|
380
|
+
/** Mode - 0 lazy using snapshot, 1 just unsatisfied, 2 all.
|
381
|
+
16 bit set if want to extend cliques at root node
|
382
|
+
*/
|
383
|
+
int mode_;
|
384
|
+
/** Row cuts flag
|
385
|
+
0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both), 4 just column cuts
|
386
|
+
-n as +n but just fixes variables unless at root
|
387
|
+
*/
|
388
|
+
int rowCuts_;
|
389
|
+
/// Maximum number of passes to do in probing
|
390
|
+
int maxPass_;
|
391
|
+
/// Log level - 0 none, 1 - a bit, 2 - more details
|
392
|
+
int logLevel_;
|
393
|
+
/// Maximum number of unsatisfied variables to probe
|
394
|
+
int maxProbe_;
|
395
|
+
/// Maximum number of variables to look at in one probe
|
396
|
+
int maxStack_;
|
397
|
+
/// Maximum number of elements in row for scan
|
398
|
+
int maxElements_;
|
399
|
+
/// Maximum number of passes to do in probing at root
|
400
|
+
int maxPassRoot_;
|
401
|
+
/// Maximum number of unsatisfied variables to probe at root
|
402
|
+
int maxProbeRoot_;
|
403
|
+
/// Maximum number of variables to look at in one probe at root
|
404
|
+
int maxStackRoot_;
|
405
|
+
/// Maximum number of elements in row for scan at root
|
406
|
+
int maxElementsRoot_;
|
407
|
+
/// Whether to include objective as constraint
|
408
|
+
int usingObjective_;
|
409
|
+
/// Number of integer variables
|
410
|
+
int numberIntegers_;
|
411
|
+
/// Number of 0-1 integer variables
|
412
|
+
int number01Integers_;
|
413
|
+
/// Number looked at this time
|
414
|
+
int numberThisTime_;
|
415
|
+
/// Total number of times called
|
416
|
+
int totalTimesCalled_;
|
417
|
+
/// Which ones looked at this time
|
418
|
+
int * lookedAt_;
|
419
|
+
/// Disaggregation cuts and for building cliques
|
420
|
+
typedef struct disaggregation_struct_tag {
|
421
|
+
int sequence; // integer variable
|
422
|
+
// index will be NULL if no probing done yet
|
423
|
+
int length; // length of newValue
|
424
|
+
disaggregationAction * index; // columns whose bounds will be changed
|
425
|
+
} disaggregation;
|
426
|
+
disaggregation * cutVector_;
|
427
|
+
/// Cliques
|
428
|
+
/// Number of cliques
|
429
|
+
int numberCliques_;
|
430
|
+
/// Clique type
|
431
|
+
CliqueType * cliqueType_;
|
432
|
+
/// Start of each clique
|
433
|
+
int * cliqueStart_;
|
434
|
+
/// Entries for clique
|
435
|
+
CliqueEntry * cliqueEntry_;
|
436
|
+
/** Start of oneFixes cliques for a column in matrix or -1 if not
|
437
|
+
in any clique */
|
438
|
+
int * oneFixStart_;
|
439
|
+
/** Start of zeroFixes cliques for a column in matrix or -1 if not
|
440
|
+
in any clique */
|
441
|
+
int * zeroFixStart_;
|
442
|
+
/// End of fixes for a column
|
443
|
+
int * endFixStart_;
|
444
|
+
/// Clique numbers for one or zero fixes
|
445
|
+
int * whichClique_;
|
446
|
+
/** For each column with nonzero in row copy this gives a clique "number".
|
447
|
+
So first clique mentioned in row is always 0. If no entries for row
|
448
|
+
then no cliques. If sequence > numberColumns then not in clique.
|
449
|
+
*/
|
450
|
+
CliqueEntry * cliqueRow_;
|
451
|
+
/// cliqueRow_ starts for each row
|
452
|
+
int * cliqueRowStart_;
|
453
|
+
/// If not null and [i] !=0 then also tighten even if continuous
|
454
|
+
char * tightenBounds_;
|
455
|
+
//@}
|
456
|
+
};
|
457
|
+
inline int affectedInDisaggregation(const disaggregationAction & dis)
|
458
|
+
{ return dis.affected&0x1fffffff;}
|
459
|
+
inline void setAffectedInDisaggregation(disaggregationAction & dis,
|
460
|
+
int affected)
|
461
|
+
{ dis.affected = affected|(dis.affected&0xe0000000);}
|
462
|
+
#ifdef NDEBUG
|
463
|
+
inline bool zeroOneInDisaggregation(const disaggregationAction & )
|
464
|
+
{ return true;}
|
465
|
+
#else
|
466
|
+
inline bool zeroOneInDisaggregation(const disaggregationAction & dis)
|
467
|
+
//{ return (dis.affected&0x80000000)!=0;}
|
468
|
+
{ assert ((dis.affected&0x80000000)!=0); return true;}
|
469
|
+
#endif
|
470
|
+
inline void setZeroOneInDisaggregation(disaggregationAction & dis,bool zeroOne)
|
471
|
+
{ dis.affected = (zeroOne ? 0x80000000 : 0)|(dis.affected&0x7fffffff);}
|
472
|
+
inline bool whenAtUBInDisaggregation(const disaggregationAction & dis)
|
473
|
+
{ return (dis.affected&0x40000000)!=0;}
|
474
|
+
inline void setWhenAtUBInDisaggregation(disaggregationAction & dis,bool whenAtUB)
|
475
|
+
{ dis.affected = (whenAtUB ? 0x40000000 : 0)|(dis.affected&0xbfffffff);}
|
476
|
+
inline bool affectedToUBInDisaggregation(const disaggregationAction & dis)
|
477
|
+
{ return (dis.affected&0x20000000)!=0;}
|
478
|
+
inline void setAffectedToUBInDisaggregation(disaggregationAction & dis,bool affectedToUB)
|
479
|
+
{ dis.affected = (affectedToUB ? 0x20000000 : 0)|(dis.affected&0xdfffffff);}
|
480
|
+
|
481
|
+
//#############################################################################
|
482
|
+
/** A function that tests the methods in the CglProbing class. The
|
483
|
+
only reason for it not to be a member method is that this way it doesn't
|
484
|
+
have to be compiled into the library. And that's a gain, because the
|
485
|
+
library should be compiled with optimization on, but this method should be
|
486
|
+
compiled with debugging. */
|
487
|
+
void CglProbingUnitTest(const OsiSolverInterface * siP,
|
488
|
+
const std::string mpdDir );
|
489
|
+
/// This just uses implication info
|
490
|
+
class CglImplication : public CglCutGenerator {
|
491
|
+
|
492
|
+
public:
|
493
|
+
|
494
|
+
/**@name Generate Cuts */
|
495
|
+
//@{
|
496
|
+
/** Generate cuts from implication table
|
497
|
+
Insert generated cuts into the cut set cs.
|
498
|
+
*/
|
499
|
+
virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
|
500
|
+
const CglTreeInfo info = CglTreeInfo());
|
501
|
+
//@}
|
502
|
+
|
503
|
+
/**@name Constructors and destructors */
|
504
|
+
//@{
|
505
|
+
/// Default constructor
|
506
|
+
CglImplication ();
|
507
|
+
|
508
|
+
/// Constructor with info
|
509
|
+
CglImplication (CglTreeProbingInfo * info);
|
510
|
+
|
511
|
+
/// Copy constructor
|
512
|
+
CglImplication (
|
513
|
+
const CglImplication &);
|
514
|
+
|
515
|
+
/// Clone
|
516
|
+
virtual CglCutGenerator * clone() const;
|
517
|
+
|
518
|
+
/// Assignment operator
|
519
|
+
CglImplication &
|
520
|
+
operator=(
|
521
|
+
const CglImplication& rhs);
|
522
|
+
|
523
|
+
/// Destructor
|
524
|
+
virtual
|
525
|
+
~CglImplication ();
|
526
|
+
/// Create C++ lines to get to current state
|
527
|
+
virtual std::string generateCpp( FILE * fp);
|
528
|
+
//@}
|
529
|
+
/**@name Set implication */
|
530
|
+
//@{
|
531
|
+
/// Set implication
|
532
|
+
inline void setProbingInfo(CglTreeProbingInfo * info)
|
533
|
+
{ probingInfo_=info;}
|
534
|
+
//@}
|
535
|
+
|
536
|
+
private:
|
537
|
+
/**@name Private member data */
|
538
|
+
//@{
|
539
|
+
/// Pointer to tree probing info
|
540
|
+
CglTreeProbingInfo * probingInfo_;
|
541
|
+
//@}
|
542
|
+
};
|
543
|
+
#endif
|