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,432 @@
|
|
1
|
+
/* $Id: ClpFactorization.hpp 2078 2015-01-05 12:39:49Z 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 ClpFactorization_H
|
7
|
+
#define ClpFactorization_H
|
8
|
+
|
9
|
+
|
10
|
+
#include "CoinPragma.hpp"
|
11
|
+
|
12
|
+
#include "CoinFactorization.hpp"
|
13
|
+
class ClpMatrixBase;
|
14
|
+
class ClpSimplex;
|
15
|
+
class ClpNetworkBasis;
|
16
|
+
class CoinOtherFactorization;
|
17
|
+
#ifndef CLP_MULTIPLE_FACTORIZATIONS
|
18
|
+
#define CLP_MULTIPLE_FACTORIZATIONS 4
|
19
|
+
#endif
|
20
|
+
#ifdef CLP_MULTIPLE_FACTORIZATIONS
|
21
|
+
#include "CoinDenseFactorization.hpp"
|
22
|
+
#include "ClpSimplex.hpp"
|
23
|
+
#endif
|
24
|
+
#ifndef COIN_FAST_CODE
|
25
|
+
#define COIN_FAST_CODE
|
26
|
+
#endif
|
27
|
+
#ifndef CLP_FACTORIZATION_NEW_TIMING
|
28
|
+
#define CLP_FACTORIZATION_NEW_TIMING 1
|
29
|
+
#endif
|
30
|
+
|
31
|
+
/** This just implements CoinFactorization when an ClpMatrixBase object
|
32
|
+
is passed. If a network then has a dummy CoinFactorization and
|
33
|
+
a genuine ClpNetworkBasis object
|
34
|
+
*/
|
35
|
+
class ClpFactorization
|
36
|
+
#ifndef CLP_MULTIPLE_FACTORIZATIONS
|
37
|
+
: public CoinFactorization
|
38
|
+
#endif
|
39
|
+
{
|
40
|
+
|
41
|
+
//friend class CoinFactorization;
|
42
|
+
|
43
|
+
public:
|
44
|
+
/**@name factorization */
|
45
|
+
//@{
|
46
|
+
/** When part of LP - given by basic variables.
|
47
|
+
Actually does factorization.
|
48
|
+
Arrays passed in have non negative value to say basic.
|
49
|
+
If status is okay, basic variables have pivot row - this is only needed
|
50
|
+
if increasingRows_ >1.
|
51
|
+
Allows scaling
|
52
|
+
If status is singular, then basic variables have pivot row
|
53
|
+
and ones thrown out have -1
|
54
|
+
returns 0 -okay, -1 singular, -2 too many in basis, -99 memory */
|
55
|
+
int factorize (ClpSimplex * model, int solveType, bool valuesPass);
|
56
|
+
//@}
|
57
|
+
|
58
|
+
|
59
|
+
/**@name Constructors, destructor */
|
60
|
+
//@{
|
61
|
+
/** Default constructor. */
|
62
|
+
ClpFactorization();
|
63
|
+
/** Destructor */
|
64
|
+
~ClpFactorization();
|
65
|
+
//@}
|
66
|
+
|
67
|
+
/**@name Copy method */
|
68
|
+
//@{
|
69
|
+
/** The copy constructor from an CoinFactorization. */
|
70
|
+
ClpFactorization(const CoinFactorization&);
|
71
|
+
/** The copy constructor. */
|
72
|
+
ClpFactorization(const ClpFactorization&, int denseIfSmaller = 0);
|
73
|
+
#ifdef CLP_MULTIPLE_FACTORIZATIONS
|
74
|
+
/** The copy constructor from an CoinOtherFactorization. */
|
75
|
+
ClpFactorization(const CoinOtherFactorization&);
|
76
|
+
#endif
|
77
|
+
ClpFactorization& operator=(const ClpFactorization&);
|
78
|
+
//@}
|
79
|
+
|
80
|
+
/* **** below here is so can use networkish basis */
|
81
|
+
/**@name rank one updates which do exist */
|
82
|
+
//@{
|
83
|
+
|
84
|
+
/** Replaces one Column to basis,
|
85
|
+
returns 0=OK, 1=Probably OK, 2=singular, 3=no room
|
86
|
+
If checkBeforeModifying is true will do all accuracy checks
|
87
|
+
before modifying factorization. Whether to set this depends on
|
88
|
+
speed considerations. You could just do this on first iteration
|
89
|
+
after factorization and thereafter re-factorize
|
90
|
+
partial update already in U */
|
91
|
+
int replaceColumn ( const ClpSimplex * model,
|
92
|
+
CoinIndexedVector * regionSparse,
|
93
|
+
CoinIndexedVector * tableauColumn,
|
94
|
+
int pivotRow,
|
95
|
+
double pivotCheck ,
|
96
|
+
bool checkBeforeModifying = false,
|
97
|
+
double acceptablePivot = 1.0e-8);
|
98
|
+
//@}
|
99
|
+
|
100
|
+
/**@name various uses of factorization (return code number elements)
|
101
|
+
which user may want to know about */
|
102
|
+
//@{
|
103
|
+
/** Updates one column (FTRAN) from region2
|
104
|
+
Tries to do FT update
|
105
|
+
number returned is negative if no room
|
106
|
+
region1 starts as zero and is zero at end */
|
107
|
+
int updateColumnFT ( CoinIndexedVector * regionSparse,
|
108
|
+
CoinIndexedVector * regionSparse2);
|
109
|
+
/** Updates one column (FTRAN) from region2
|
110
|
+
region1 starts as zero and is zero at end */
|
111
|
+
int updateColumn ( CoinIndexedVector * regionSparse,
|
112
|
+
CoinIndexedVector * regionSparse2,
|
113
|
+
bool noPermute = false) const;
|
114
|
+
/** Updates one column (FTRAN) from region2
|
115
|
+
Tries to do FT update
|
116
|
+
number returned is negative if no room.
|
117
|
+
Also updates region3
|
118
|
+
region1 starts as zero and is zero at end */
|
119
|
+
int updateTwoColumnsFT ( CoinIndexedVector * regionSparse1,
|
120
|
+
CoinIndexedVector * regionSparse2,
|
121
|
+
CoinIndexedVector * regionSparse3,
|
122
|
+
bool noPermuteRegion3 = false) ;
|
123
|
+
/// For debug (no statistics update)
|
124
|
+
int updateColumnForDebug ( CoinIndexedVector * regionSparse,
|
125
|
+
CoinIndexedVector * regionSparse2,
|
126
|
+
bool noPermute = false) const;
|
127
|
+
/** Updates one column (BTRAN) from region2
|
128
|
+
region1 starts as zero and is zero at end */
|
129
|
+
int updateColumnTranspose ( CoinIndexedVector * regionSparse,
|
130
|
+
CoinIndexedVector * regionSparse2) const;
|
131
|
+
//@}
|
132
|
+
#ifdef CLP_MULTIPLE_FACTORIZATIONS
|
133
|
+
/**@name Lifted from CoinFactorization */
|
134
|
+
//@{
|
135
|
+
/// Total number of elements in factorization
|
136
|
+
inline int numberElements ( ) const {
|
137
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberElements();
|
138
|
+
else return coinFactorizationB_->numberElements() ;
|
139
|
+
}
|
140
|
+
/// Returns address of permute region
|
141
|
+
inline int *permute ( ) const {
|
142
|
+
if (coinFactorizationA_) return coinFactorizationA_->permute();
|
143
|
+
else return coinFactorizationB_->permute() ;
|
144
|
+
}
|
145
|
+
/// Returns address of pivotColumn region (also used for permuting)
|
146
|
+
inline int *pivotColumn ( ) const {
|
147
|
+
if (coinFactorizationA_) return coinFactorizationA_->pivotColumn();
|
148
|
+
else return coinFactorizationB_->permute() ;
|
149
|
+
}
|
150
|
+
/// Maximum number of pivots between factorizations
|
151
|
+
inline int maximumPivots ( ) const {
|
152
|
+
if (coinFactorizationA_) return coinFactorizationA_->maximumPivots();
|
153
|
+
else return coinFactorizationB_->maximumPivots() ;
|
154
|
+
}
|
155
|
+
/// Set maximum number of pivots between factorizations
|
156
|
+
inline void maximumPivots ( int value) {
|
157
|
+
if (coinFactorizationA_) coinFactorizationA_->maximumPivots(value);
|
158
|
+
else coinFactorizationB_->maximumPivots(value);
|
159
|
+
}
|
160
|
+
/// Returns number of pivots since factorization
|
161
|
+
inline int pivots ( ) const {
|
162
|
+
if (coinFactorizationA_) return coinFactorizationA_->pivots();
|
163
|
+
else return coinFactorizationB_->pivots() ;
|
164
|
+
}
|
165
|
+
/// Whether larger areas needed
|
166
|
+
inline double areaFactor ( ) const {
|
167
|
+
if (coinFactorizationA_) return coinFactorizationA_->areaFactor();
|
168
|
+
else return 0.0 ;
|
169
|
+
}
|
170
|
+
/// Set whether larger areas needed
|
171
|
+
inline void areaFactor ( double value) {
|
172
|
+
if (coinFactorizationA_) coinFactorizationA_->areaFactor(value);
|
173
|
+
}
|
174
|
+
/// Zero tolerance
|
175
|
+
inline double zeroTolerance ( ) const {
|
176
|
+
if (coinFactorizationA_) return coinFactorizationA_->zeroTolerance();
|
177
|
+
else return coinFactorizationB_->zeroTolerance() ;
|
178
|
+
}
|
179
|
+
/// Set zero tolerance
|
180
|
+
inline void zeroTolerance ( double value) {
|
181
|
+
if (coinFactorizationA_) coinFactorizationA_->zeroTolerance(value);
|
182
|
+
else coinFactorizationB_->zeroTolerance(value);
|
183
|
+
}
|
184
|
+
/// Set tolerances to safer of existing and given
|
185
|
+
void saferTolerances ( double zeroTolerance, double pivotTolerance);
|
186
|
+
/** get sparse threshold */
|
187
|
+
inline int sparseThreshold ( ) const {
|
188
|
+
if (coinFactorizationA_) return coinFactorizationA_->sparseThreshold();
|
189
|
+
else return 0 ;
|
190
|
+
}
|
191
|
+
/** Set sparse threshold */
|
192
|
+
inline void sparseThreshold ( int value) {
|
193
|
+
if (coinFactorizationA_) coinFactorizationA_->sparseThreshold(value);
|
194
|
+
}
|
195
|
+
/// Returns status
|
196
|
+
inline int status ( ) const {
|
197
|
+
if (coinFactorizationA_) return coinFactorizationA_->status();
|
198
|
+
else return coinFactorizationB_->status() ;
|
199
|
+
}
|
200
|
+
/// Sets status
|
201
|
+
inline void setStatus ( int value) {
|
202
|
+
if (coinFactorizationA_) coinFactorizationA_->setStatus(value);
|
203
|
+
else coinFactorizationB_->setStatus(value) ;
|
204
|
+
}
|
205
|
+
/// Returns number of dense rows
|
206
|
+
inline int numberDense() const {
|
207
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberDense();
|
208
|
+
else return 0 ;
|
209
|
+
}
|
210
|
+
#if 1
|
211
|
+
/// Returns number in U area
|
212
|
+
inline CoinBigIndex numberElementsU ( ) const {
|
213
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberElementsU();
|
214
|
+
else return -1 ;
|
215
|
+
}
|
216
|
+
/// Returns number in L area
|
217
|
+
inline CoinBigIndex numberElementsL ( ) const {
|
218
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberElementsL();
|
219
|
+
else return -1 ;
|
220
|
+
}
|
221
|
+
/// Returns number in R area
|
222
|
+
inline CoinBigIndex numberElementsR ( ) const {
|
223
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberElementsR();
|
224
|
+
else return 0 ;
|
225
|
+
}
|
226
|
+
#endif
|
227
|
+
bool timeToRefactorize() const;
|
228
|
+
#if CLP_FACTORIZATION_NEW_TIMING>1
|
229
|
+
void statsRefactor(char when) const;
|
230
|
+
#endif
|
231
|
+
/// Level of detail of messages
|
232
|
+
inline int messageLevel ( ) const {
|
233
|
+
if (coinFactorizationA_) return coinFactorizationA_->messageLevel();
|
234
|
+
else return 1 ;
|
235
|
+
}
|
236
|
+
/// Set level of detail of messages
|
237
|
+
inline void messageLevel ( int value) {
|
238
|
+
if (coinFactorizationA_) coinFactorizationA_->messageLevel(value);
|
239
|
+
}
|
240
|
+
/// Get rid of all memory
|
241
|
+
inline void clearArrays() {
|
242
|
+
if (coinFactorizationA_)
|
243
|
+
coinFactorizationA_->clearArrays();
|
244
|
+
else if (coinFactorizationB_)
|
245
|
+
coinFactorizationB_->clearArrays();
|
246
|
+
}
|
247
|
+
/// Number of Rows after factorization
|
248
|
+
inline int numberRows ( ) const {
|
249
|
+
if (coinFactorizationA_) return coinFactorizationA_->numberRows();
|
250
|
+
else return coinFactorizationB_->numberRows() ;
|
251
|
+
}
|
252
|
+
/// Gets dense threshold
|
253
|
+
inline int denseThreshold() const {
|
254
|
+
if (coinFactorizationA_) return coinFactorizationA_->denseThreshold();
|
255
|
+
else return 0 ;
|
256
|
+
}
|
257
|
+
/// Sets dense threshold
|
258
|
+
inline void setDenseThreshold(int value) {
|
259
|
+
if (coinFactorizationA_) coinFactorizationA_->setDenseThreshold(value);
|
260
|
+
}
|
261
|
+
/// Pivot tolerance
|
262
|
+
inline double pivotTolerance ( ) const {
|
263
|
+
if (coinFactorizationA_) return coinFactorizationA_->pivotTolerance();
|
264
|
+
else if (coinFactorizationB_) return coinFactorizationB_->pivotTolerance();
|
265
|
+
return 1.0e-8 ;
|
266
|
+
}
|
267
|
+
/// Set pivot tolerance
|
268
|
+
inline void pivotTolerance ( double value) {
|
269
|
+
if (coinFactorizationA_) coinFactorizationA_->pivotTolerance(value);
|
270
|
+
else if (coinFactorizationB_) coinFactorizationB_->pivotTolerance(value);
|
271
|
+
}
|
272
|
+
/// Allows change of pivot accuracy check 1.0 == none >1.0 relaxed
|
273
|
+
inline void relaxAccuracyCheck(double value) {
|
274
|
+
if (coinFactorizationA_) coinFactorizationA_->relaxAccuracyCheck(value);
|
275
|
+
}
|
276
|
+
/** Array persistence flag
|
277
|
+
If 0 then as now (delete/new)
|
278
|
+
1 then only do arrays if bigger needed
|
279
|
+
2 as 1 but give a bit extra if bigger needed
|
280
|
+
*/
|
281
|
+
inline int persistenceFlag() const {
|
282
|
+
if (coinFactorizationA_) return coinFactorizationA_->persistenceFlag();
|
283
|
+
else return 0 ;
|
284
|
+
}
|
285
|
+
inline void setPersistenceFlag(int value) {
|
286
|
+
if (coinFactorizationA_) coinFactorizationA_->setPersistenceFlag(value);
|
287
|
+
}
|
288
|
+
/// Delete all stuff (leaves as after CoinFactorization())
|
289
|
+
inline void almostDestructor() {
|
290
|
+
if (coinFactorizationA_)
|
291
|
+
coinFactorizationA_->almostDestructor();
|
292
|
+
else if (coinFactorizationB_)
|
293
|
+
coinFactorizationB_->clearArrays();
|
294
|
+
}
|
295
|
+
/// Returns areaFactor but adjusted for dense
|
296
|
+
inline double adjustedAreaFactor() const {
|
297
|
+
if (coinFactorizationA_) return coinFactorizationA_->adjustedAreaFactor();
|
298
|
+
else return 0.0 ;
|
299
|
+
}
|
300
|
+
inline void setBiasLU(int value) {
|
301
|
+
if (coinFactorizationA_) coinFactorizationA_->setBiasLU(value);
|
302
|
+
}
|
303
|
+
/// true if Forrest Tomlin update, false if PFI
|
304
|
+
inline void setForrestTomlin(bool value) {
|
305
|
+
if (coinFactorizationA_) coinFactorizationA_->setForrestTomlin(value);
|
306
|
+
}
|
307
|
+
/// Sets default values
|
308
|
+
inline void setDefaultValues() {
|
309
|
+
if (coinFactorizationA_) {
|
310
|
+
// row activities have negative sign
|
311
|
+
#ifndef COIN_FAST_CODE
|
312
|
+
coinFactorizationA_->slackValue(-1.0);
|
313
|
+
#endif
|
314
|
+
coinFactorizationA_->zeroTolerance(1.0e-13);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
/// If nonzero force use of 1,dense 2,small 3,osl
|
318
|
+
void forceOtherFactorization(int which);
|
319
|
+
/// Get switch to osl if number rows <= this
|
320
|
+
inline int goOslThreshold() const {
|
321
|
+
return goOslThreshold_;
|
322
|
+
}
|
323
|
+
/// Set switch to osl if number rows <= this
|
324
|
+
inline void setGoOslThreshold(int value) {
|
325
|
+
goOslThreshold_ = value;
|
326
|
+
}
|
327
|
+
/// Get switch to dense if number rows <= this
|
328
|
+
inline int goDenseThreshold() const {
|
329
|
+
return goDenseThreshold_;
|
330
|
+
}
|
331
|
+
/// Set switch to dense if number rows <= this
|
332
|
+
inline void setGoDenseThreshold(int value) {
|
333
|
+
goDenseThreshold_ = value;
|
334
|
+
}
|
335
|
+
/// Get switch to small if number rows <= this
|
336
|
+
inline int goSmallThreshold() const {
|
337
|
+
return goSmallThreshold_;
|
338
|
+
}
|
339
|
+
/// Set switch to small if number rows <= this
|
340
|
+
inline void setGoSmallThreshold(int value) {
|
341
|
+
goSmallThreshold_ = value;
|
342
|
+
}
|
343
|
+
/// Go over to dense or small code if small enough
|
344
|
+
void goDenseOrSmall(int numberRows) ;
|
345
|
+
/// Sets factorization
|
346
|
+
void setFactorization(ClpFactorization & factorization);
|
347
|
+
/// Return 1 if dense code
|
348
|
+
inline int isDenseOrSmall() const {
|
349
|
+
return coinFactorizationB_ ? 1 : 0;
|
350
|
+
}
|
351
|
+
#else
|
352
|
+
inline bool timeToRefactorize() const {
|
353
|
+
return (pivots() * 3 > maximumPivots() * 2 &&
|
354
|
+
numberElementsR() * 3 > (numberElementsL() + numberElementsU()) * 2 + 1000 &&
|
355
|
+
!numberDense());
|
356
|
+
}
|
357
|
+
/// Sets default values
|
358
|
+
inline void setDefaultValues() {
|
359
|
+
// row activities have negative sign
|
360
|
+
#ifndef COIN_FAST_CODE
|
361
|
+
slackValue(-1.0);
|
362
|
+
#endif
|
363
|
+
zeroTolerance(1.0e-13);
|
364
|
+
}
|
365
|
+
/// Go over to dense code
|
366
|
+
inline void goDense() {}
|
367
|
+
#endif
|
368
|
+
//@}
|
369
|
+
|
370
|
+
/**@name other stuff */
|
371
|
+
//@{
|
372
|
+
/** makes a row copy of L for speed and to allow very sparse problems */
|
373
|
+
void goSparse();
|
374
|
+
/// Cleans up i.e. gets rid of network basis
|
375
|
+
void cleanUp();
|
376
|
+
/// Says whether to redo pivot order
|
377
|
+
bool needToReorder() const;
|
378
|
+
#ifndef SLIM_CLP
|
379
|
+
/// Says if a network basis
|
380
|
+
inline bool networkBasis() const {
|
381
|
+
return (networkBasis_ != NULL);
|
382
|
+
}
|
383
|
+
#else
|
384
|
+
/// Says if a network basis
|
385
|
+
inline bool networkBasis() const {
|
386
|
+
return false;
|
387
|
+
}
|
388
|
+
#endif
|
389
|
+
/// Fills weighted row list
|
390
|
+
void getWeights(int * weights) const;
|
391
|
+
//@}
|
392
|
+
|
393
|
+
////////////////// data //////////////////
|
394
|
+
private:
|
395
|
+
|
396
|
+
/**@name data */
|
397
|
+
//@{
|
398
|
+
/// Pointer to network basis
|
399
|
+
#ifndef SLIM_CLP
|
400
|
+
ClpNetworkBasis * networkBasis_;
|
401
|
+
#endif
|
402
|
+
#ifdef CLP_MULTIPLE_FACTORIZATIONS
|
403
|
+
/// Pointer to CoinFactorization
|
404
|
+
CoinFactorization * coinFactorizationA_;
|
405
|
+
/// Pointer to CoinOtherFactorization
|
406
|
+
CoinOtherFactorization * coinFactorizationB_;
|
407
|
+
#ifdef CLP_REUSE_ETAS
|
408
|
+
/// Pointer to model
|
409
|
+
ClpSimplex * model_;
|
410
|
+
#endif
|
411
|
+
/// If nonzero force use of 1,dense 2,small 3,osl
|
412
|
+
int forceB_;
|
413
|
+
/// Switch to osl if number rows <= this
|
414
|
+
int goOslThreshold_;
|
415
|
+
/// Switch to small if number rows <= this
|
416
|
+
int goSmallThreshold_;
|
417
|
+
/// Switch to dense if number rows <= this
|
418
|
+
int goDenseThreshold_;
|
419
|
+
#endif
|
420
|
+
#ifdef CLP_FACTORIZATION_NEW_TIMING
|
421
|
+
/// For guessing when to re-factorize
|
422
|
+
mutable double shortestAverage_;
|
423
|
+
mutable double totalInR_;
|
424
|
+
mutable double totalInIncreasingU_;
|
425
|
+
mutable int endLengthU_;
|
426
|
+
mutable int lastNumberPivots_;
|
427
|
+
mutable int effectiveStartNumberU_;
|
428
|
+
#endif
|
429
|
+
//@}
|
430
|
+
};
|
431
|
+
|
432
|
+
#endif
|
@@ -0,0 +1,247 @@
|
|
1
|
+
/* $Id: ClpGubDynamicMatrix.hpp 1665 2011-01-04 17:55:54Z lou $ */
|
2
|
+
// Copyright (C) 2003, 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 ClpGubDynamicMatrix_H
|
7
|
+
#define ClpGubDynamicMatrix_H
|
8
|
+
|
9
|
+
|
10
|
+
#include "CoinPragma.hpp"
|
11
|
+
|
12
|
+
#include "ClpGubMatrix.hpp"
|
13
|
+
/** This implements Gub rows plus a ClpPackedMatrix.
|
14
|
+
This a dynamic version which stores the gub part and dynamically creates matrix.
|
15
|
+
All bounds are assumed to be zero and infinity
|
16
|
+
|
17
|
+
This is just a simple example for real column generation
|
18
|
+
*/
|
19
|
+
|
20
|
+
class ClpGubDynamicMatrix : public ClpGubMatrix {
|
21
|
+
|
22
|
+
public:
|
23
|
+
/**@name Main functions provided */
|
24
|
+
//@{
|
25
|
+
/// Partial pricing
|
26
|
+
virtual void partialPricing(ClpSimplex * model, double start, double end,
|
27
|
+
int & bestSequence, int & numberWanted);
|
28
|
+
/** This is local to Gub to allow synchronization:
|
29
|
+
mode=0 when status of basis is good
|
30
|
+
mode=1 when variable is flagged
|
31
|
+
mode=2 when all variables unflagged (returns number flagged)
|
32
|
+
mode=3 just reset costs (primal)
|
33
|
+
mode=4 correct number of dual infeasibilities
|
34
|
+
mode=5 return 4 if time to re-factorize
|
35
|
+
mode=8 - make sure set is clean
|
36
|
+
mode=9 - adjust lower, upper on set by incoming
|
37
|
+
*/
|
38
|
+
virtual int synchronize(ClpSimplex * model, int mode);
|
39
|
+
/// Sets up an effective RHS and does gub crash if needed
|
40
|
+
virtual void useEffectiveRhs(ClpSimplex * model, bool cheapest = true);
|
41
|
+
/**
|
42
|
+
update information for a pivot (and effective rhs)
|
43
|
+
*/
|
44
|
+
virtual int updatePivot(ClpSimplex * model, double oldInValue, double oldOutValue);
|
45
|
+
/// Add a new variable to a set
|
46
|
+
void insertNonBasic(int sequence, int iSet);
|
47
|
+
/** Returns effective RHS offset if it is being used. This is used for long problems
|
48
|
+
or big gub or anywhere where going through full columns is
|
49
|
+
expensive. This may re-compute */
|
50
|
+
virtual double * rhsOffset(ClpSimplex * model, bool forceRefresh = false,
|
51
|
+
bool check = false);
|
52
|
+
|
53
|
+
using ClpPackedMatrix::times ;
|
54
|
+
/** Return <code>y + A * scalar *x</code> in <code>y</code>.
|
55
|
+
@pre <code>x</code> must be of size <code>numColumns()</code>
|
56
|
+
@pre <code>y</code> must be of size <code>numRows()</code> */
|
57
|
+
virtual void times(double scalar,
|
58
|
+
const double * x, double * y) const;
|
59
|
+
/** Just for debug
|
60
|
+
Returns sum and number of primal infeasibilities. Recomputes keys
|
61
|
+
*/
|
62
|
+
virtual int checkFeasible(ClpSimplex * model, double & sum) const;
|
63
|
+
/// Cleans data after setWarmStart
|
64
|
+
void cleanData(ClpSimplex * model);
|
65
|
+
//@}
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
/**@name Constructors, destructor */
|
70
|
+
//@{
|
71
|
+
/** Default constructor. */
|
72
|
+
ClpGubDynamicMatrix();
|
73
|
+
/** Destructor */
|
74
|
+
virtual ~ClpGubDynamicMatrix();
|
75
|
+
//@}
|
76
|
+
|
77
|
+
/**@name Copy method */
|
78
|
+
//@{
|
79
|
+
/** The copy constructor. */
|
80
|
+
ClpGubDynamicMatrix(const ClpGubDynamicMatrix&);
|
81
|
+
/** This is the real constructor.
|
82
|
+
It assumes factorization frequency will not be changed.
|
83
|
+
This resizes model !!!!
|
84
|
+
*/
|
85
|
+
ClpGubDynamicMatrix(ClpSimplex * model, int numberSets,
|
86
|
+
int numberColumns, const int * starts,
|
87
|
+
const double * lower, const double * upper,
|
88
|
+
const int * startColumn, const int * row,
|
89
|
+
const double * element, const double * cost,
|
90
|
+
const double * lowerColumn = NULL, const double * upperColumn = NULL,
|
91
|
+
const unsigned char * status = NULL);
|
92
|
+
|
93
|
+
ClpGubDynamicMatrix& operator=(const ClpGubDynamicMatrix&);
|
94
|
+
/// Clone
|
95
|
+
virtual ClpMatrixBase * clone() const ;
|
96
|
+
//@}
|
97
|
+
/**@name gets and sets */
|
98
|
+
//@{
|
99
|
+
/// enums for status of various sorts
|
100
|
+
enum DynamicStatus {
|
101
|
+
inSmall = 0x01,
|
102
|
+
atUpperBound = 0x02,
|
103
|
+
atLowerBound = 0x03
|
104
|
+
};
|
105
|
+
/// Whether flagged
|
106
|
+
inline bool flagged(int i) const {
|
107
|
+
return (dynamicStatus_[i] & 8) != 0;
|
108
|
+
}
|
109
|
+
inline void setFlagged(int i) {
|
110
|
+
dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] | 8);
|
111
|
+
}
|
112
|
+
inline void unsetFlagged(int i) {
|
113
|
+
dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] & ~8);
|
114
|
+
}
|
115
|
+
inline void setDynamicStatus(int sequence, DynamicStatus status) {
|
116
|
+
unsigned char & st_byte = dynamicStatus_[sequence];
|
117
|
+
st_byte = static_cast<unsigned char>(st_byte & ~7);
|
118
|
+
st_byte = static_cast<unsigned char>(st_byte | status);
|
119
|
+
}
|
120
|
+
inline DynamicStatus getDynamicStatus(int sequence) const {
|
121
|
+
return static_cast<DynamicStatus> (dynamicStatus_[sequence] & 7);
|
122
|
+
}
|
123
|
+
/// Saved value of objective offset
|
124
|
+
inline double objectiveOffset() const {
|
125
|
+
return objectiveOffset_;
|
126
|
+
}
|
127
|
+
/// Starts of each column
|
128
|
+
inline CoinBigIndex * startColumn() const {
|
129
|
+
return startColumn_;
|
130
|
+
}
|
131
|
+
/// rows
|
132
|
+
inline int * row() const {
|
133
|
+
return row_;
|
134
|
+
}
|
135
|
+
/// elements
|
136
|
+
inline double * element() const {
|
137
|
+
return element_;
|
138
|
+
}
|
139
|
+
/// costs
|
140
|
+
inline double * cost() const {
|
141
|
+
return cost_;
|
142
|
+
}
|
143
|
+
/// full starts
|
144
|
+
inline int * fullStart() const {
|
145
|
+
return fullStart_;
|
146
|
+
}
|
147
|
+
/// ids of active columns (just index here)
|
148
|
+
inline int * id() const {
|
149
|
+
return id_;
|
150
|
+
}
|
151
|
+
/// Optional lower bounds on columns
|
152
|
+
inline double * lowerColumn() const {
|
153
|
+
return lowerColumn_;
|
154
|
+
}
|
155
|
+
/// Optional upper bounds on columns
|
156
|
+
inline double * upperColumn() const {
|
157
|
+
return upperColumn_;
|
158
|
+
}
|
159
|
+
/// Optional true lower bounds on sets
|
160
|
+
inline double * lowerSet() const {
|
161
|
+
return lowerSet_;
|
162
|
+
}
|
163
|
+
/// Optional true upper bounds on sets
|
164
|
+
inline double * upperSet() const {
|
165
|
+
return upperSet_;
|
166
|
+
}
|
167
|
+
/// size
|
168
|
+
inline int numberGubColumns() const {
|
169
|
+
return numberGubColumns_;
|
170
|
+
}
|
171
|
+
/// first free
|
172
|
+
inline int firstAvailable() const {
|
173
|
+
return firstAvailable_;
|
174
|
+
}
|
175
|
+
/// set first free
|
176
|
+
inline void setFirstAvailable(int value) {
|
177
|
+
firstAvailable_ = value;
|
178
|
+
}
|
179
|
+
/// first dynamic
|
180
|
+
inline int firstDynamic() const {
|
181
|
+
return firstDynamic_;
|
182
|
+
}
|
183
|
+
/// number of columns in dynamic model
|
184
|
+
inline int lastDynamic() const {
|
185
|
+
return lastDynamic_;
|
186
|
+
}
|
187
|
+
/// size of working matrix (max)
|
188
|
+
inline int numberElements() const {
|
189
|
+
return numberElements_;
|
190
|
+
}
|
191
|
+
/// Status region for gub slacks
|
192
|
+
inline unsigned char * gubRowStatus() const {
|
193
|
+
return status_;
|
194
|
+
}
|
195
|
+
/// Status region for gub variables
|
196
|
+
inline unsigned char * dynamicStatus() const {
|
197
|
+
return dynamicStatus_;
|
198
|
+
}
|
199
|
+
/// Returns which set a variable is in
|
200
|
+
int whichSet (int sequence) const;
|
201
|
+
//@}
|
202
|
+
|
203
|
+
|
204
|
+
protected:
|
205
|
+
/**@name Data members
|
206
|
+
The data members are protected to allow access for derived classes. */
|
207
|
+
//@{
|
208
|
+
/// Saved value of objective offset
|
209
|
+
double objectiveOffset_;
|
210
|
+
/// Starts of each column
|
211
|
+
CoinBigIndex * startColumn_;
|
212
|
+
/// rows
|
213
|
+
int * row_;
|
214
|
+
/// elements
|
215
|
+
double * element_;
|
216
|
+
/// costs
|
217
|
+
double * cost_;
|
218
|
+
/// full starts
|
219
|
+
int * fullStart_;
|
220
|
+
/// ids of active columns (just index here)
|
221
|
+
int * id_;
|
222
|
+
/// for status and which bound
|
223
|
+
unsigned char * dynamicStatus_;
|
224
|
+
/// Optional lower bounds on columns
|
225
|
+
double * lowerColumn_;
|
226
|
+
/// Optional upper bounds on columns
|
227
|
+
double * upperColumn_;
|
228
|
+
/// Optional true lower bounds on sets
|
229
|
+
double * lowerSet_;
|
230
|
+
/// Optional true upper bounds on sets
|
231
|
+
double * upperSet_;
|
232
|
+
/// size
|
233
|
+
int numberGubColumns_;
|
234
|
+
/// first free
|
235
|
+
int firstAvailable_;
|
236
|
+
/// saved first free
|
237
|
+
int savedFirstAvailable_;
|
238
|
+
/// first dynamic
|
239
|
+
int firstDynamic_;
|
240
|
+
/// number of columns in dynamic model
|
241
|
+
int lastDynamic_;
|
242
|
+
/// size of working matrix (max)
|
243
|
+
int numberElements_;
|
244
|
+
//@}
|
245
|
+
};
|
246
|
+
|
247
|
+
#endif
|