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,524 @@
|
|
1
|
+
/* $Id: ClpMatrixBase.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 ClpMatrixBase_H
|
7
|
+
#define ClpMatrixBase_H
|
8
|
+
|
9
|
+
#include "CoinPragma.hpp"
|
10
|
+
#include "CoinTypes.hpp"
|
11
|
+
|
12
|
+
#include "CoinPackedMatrix.hpp"
|
13
|
+
class CoinIndexedVector;
|
14
|
+
class ClpSimplex;
|
15
|
+
class ClpModel;
|
16
|
+
// Compilers can produce better code if they know about __restrict
|
17
|
+
#ifndef COIN_RESTRICT
|
18
|
+
#ifdef COIN_USE_RESTRICT
|
19
|
+
#define COIN_RESTRICT __restrict
|
20
|
+
#else
|
21
|
+
#define COIN_RESTRICT
|
22
|
+
#endif
|
23
|
+
#endif
|
24
|
+
|
25
|
+
/** Abstract base class for Clp Matrices
|
26
|
+
|
27
|
+
Since this class is abstract, no object of this type can be created.
|
28
|
+
|
29
|
+
If a derived class provides all methods then all Clp algorithms
|
30
|
+
should work. Some can be very inefficient e.g. getElements etc is
|
31
|
+
only used for tightening bounds for dual and the copies are
|
32
|
+
deleted. Many methods can just be dummy i.e. abort(); if not
|
33
|
+
all features are being used. So if column generation was being done
|
34
|
+
then it makes no sense to do steepest edge so there would be
|
35
|
+
no point providing subsetTransposeTimes.
|
36
|
+
*/
|
37
|
+
|
38
|
+
class ClpMatrixBase {
|
39
|
+
|
40
|
+
public:
|
41
|
+
/**@name Virtual methods that the derived classes must provide */
|
42
|
+
//@{
|
43
|
+
/// Return a complete CoinPackedMatrix
|
44
|
+
virtual CoinPackedMatrix * getPackedMatrix() const = 0;
|
45
|
+
/** Whether the packed matrix is column major ordered or not. */
|
46
|
+
virtual bool isColOrdered() const = 0;
|
47
|
+
/** Number of entries in the packed matrix. */
|
48
|
+
virtual CoinBigIndex getNumElements() const = 0;
|
49
|
+
/** Number of columns. */
|
50
|
+
virtual int getNumCols() const = 0;
|
51
|
+
/** Number of rows. */
|
52
|
+
virtual int getNumRows() const = 0;
|
53
|
+
|
54
|
+
/** A vector containing the elements in the packed matrix. Note that there
|
55
|
+
might be gaps in this list, entries that do not belong to any
|
56
|
+
major-dimension vector. To get the actual elements one should look at
|
57
|
+
this vector together with vectorStarts and vectorLengths. */
|
58
|
+
virtual const double * getElements() const = 0;
|
59
|
+
/** A vector containing the minor indices of the elements in the packed
|
60
|
+
matrix. Note that there might be gaps in this list, entries that do not
|
61
|
+
belong to any major-dimension vector. To get the actual elements one
|
62
|
+
should look at this vector together with vectorStarts and
|
63
|
+
vectorLengths. */
|
64
|
+
virtual const int * getIndices() const = 0;
|
65
|
+
|
66
|
+
virtual const CoinBigIndex * getVectorStarts() const = 0;
|
67
|
+
/** The lengths of the major-dimension vectors. */
|
68
|
+
virtual const int * getVectorLengths() const = 0 ;
|
69
|
+
/** The length of a single major-dimension vector. */
|
70
|
+
virtual int getVectorLength(int index) const ;
|
71
|
+
/** Delete the columns whose indices are listed in <code>indDel</code>. */
|
72
|
+
virtual void deleteCols(const int numDel, const int * indDel) = 0;
|
73
|
+
/** Delete the rows whose indices are listed in <code>indDel</code>. */
|
74
|
+
virtual void deleteRows(const int numDel, const int * indDel) = 0;
|
75
|
+
#ifndef CLP_NO_VECTOR
|
76
|
+
/// Append Columns
|
77
|
+
virtual void appendCols(int number, const CoinPackedVectorBase * const * columns);
|
78
|
+
/// Append Rows
|
79
|
+
virtual void appendRows(int number, const CoinPackedVectorBase * const * rows);
|
80
|
+
#endif
|
81
|
+
/** Modify one element of packed matrix. An element may be added.
|
82
|
+
This works for either ordering If the new element is zero it will be
|
83
|
+
deleted unless keepZero true */
|
84
|
+
virtual void modifyCoefficient(int row, int column, double newElement,
|
85
|
+
bool keepZero = false);
|
86
|
+
/** Append a set of rows/columns to the end of the matrix. Returns number of errors
|
87
|
+
i.e. if any of the new rows/columns contain an index that's larger than the
|
88
|
+
number of columns-1/rows-1 (if numberOther>0) or duplicates
|
89
|
+
If 0 then rows, 1 if columns */
|
90
|
+
virtual int appendMatrix(int number, int type,
|
91
|
+
const CoinBigIndex * starts, const int * index,
|
92
|
+
const double * element, int numberOther = -1);
|
93
|
+
|
94
|
+
/** Returns a new matrix in reverse order without gaps
|
95
|
+
Is allowed to return NULL if doesn't want to have row copy */
|
96
|
+
virtual ClpMatrixBase * reverseOrderedCopy() const {
|
97
|
+
return NULL;
|
98
|
+
}
|
99
|
+
|
100
|
+
/// Returns number of elements in column part of basis
|
101
|
+
virtual CoinBigIndex countBasis(const int * whichColumn,
|
102
|
+
int & numberColumnBasic) = 0;
|
103
|
+
/// Fills in column part of basis
|
104
|
+
virtual void fillBasis(ClpSimplex * model,
|
105
|
+
const int * whichColumn,
|
106
|
+
int & numberColumnBasic,
|
107
|
+
int * row, int * start,
|
108
|
+
int * rowCount, int * columnCount,
|
109
|
+
CoinFactorizationDouble * element) = 0;
|
110
|
+
/** Creates scales for column copy (rowCopy in model may be modified)
|
111
|
+
default does not allow scaling
|
112
|
+
returns non-zero if no scaling done */
|
113
|
+
virtual int scale(ClpModel * , const ClpSimplex * = NULL) const {
|
114
|
+
return 1;
|
115
|
+
}
|
116
|
+
/** Scales rowCopy if column copy scaled
|
117
|
+
Only called if scales already exist */
|
118
|
+
virtual void scaleRowCopy(ClpModel * ) const { }
|
119
|
+
/// Returns true if can create row copy
|
120
|
+
virtual bool canGetRowCopy() const {
|
121
|
+
return true;
|
122
|
+
}
|
123
|
+
/** Realy really scales column copy
|
124
|
+
Only called if scales already exist.
|
125
|
+
Up to user to delete */
|
126
|
+
inline virtual ClpMatrixBase * scaledColumnCopy(ClpModel * ) const {
|
127
|
+
return this->clone();
|
128
|
+
}
|
129
|
+
|
130
|
+
/** Checks if all elements are in valid range. Can just
|
131
|
+
return true if you are not paranoid. For Clp I will
|
132
|
+
probably expect no zeros. Code can modify matrix to get rid of
|
133
|
+
small elements.
|
134
|
+
check bits (can be turned off to save time) :
|
135
|
+
1 - check if matrix has gaps
|
136
|
+
2 - check if zero elements
|
137
|
+
4 - check and compress duplicates
|
138
|
+
8 - report on large and small
|
139
|
+
*/
|
140
|
+
virtual bool allElementsInRange(ClpModel * ,
|
141
|
+
double , double ,
|
142
|
+
int = 15) {
|
143
|
+
return true;
|
144
|
+
}
|
145
|
+
/** Set the dimensions of the matrix. In effect, append new empty
|
146
|
+
columns/rows to the matrix. A negative number for either dimension
|
147
|
+
means that that dimension doesn't change. Otherwise the new dimensions
|
148
|
+
MUST be at least as large as the current ones otherwise an exception
|
149
|
+
is thrown. */
|
150
|
+
virtual void setDimensions(int numrows, int numcols);
|
151
|
+
/** Returns largest and smallest elements of both signs.
|
152
|
+
Largest refers to largest absolute value.
|
153
|
+
If returns zeros then can't tell anything */
|
154
|
+
virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
|
155
|
+
double & smallestPositive, double & largestPositive);
|
156
|
+
|
157
|
+
/** Unpacks a column into an CoinIndexedvector
|
158
|
+
*/
|
159
|
+
virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
|
160
|
+
int column) const = 0;
|
161
|
+
/** Unpacks a column into an CoinIndexedvector
|
162
|
+
** in packed format
|
163
|
+
Note that model is NOT const. Bounds and objective could
|
164
|
+
be modified if doing column generation (just for this variable) */
|
165
|
+
virtual void unpackPacked(ClpSimplex * model,
|
166
|
+
CoinIndexedVector * rowArray,
|
167
|
+
int column) const = 0;
|
168
|
+
/** Purely for column generation and similar ideas. Allows
|
169
|
+
matrix and any bounds or costs to be updated (sensibly).
|
170
|
+
Returns non-zero if any changes.
|
171
|
+
*/
|
172
|
+
virtual int refresh(ClpSimplex * ) {
|
173
|
+
return 0;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Really scale matrix
|
177
|
+
virtual void reallyScale(const double * rowScale, const double * columnScale);
|
178
|
+
/** Given positive integer weights for each row fills in sum of weights
|
179
|
+
for each column (and slack).
|
180
|
+
Returns weights vector
|
181
|
+
Default returns vector of ones
|
182
|
+
*/
|
183
|
+
virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model, int * inputWeights) const;
|
184
|
+
/** Adds multiple of a column into an CoinIndexedvector
|
185
|
+
You can use quickAdd to add to vector */
|
186
|
+
virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
|
187
|
+
int column, double multiplier) const = 0;
|
188
|
+
/** Adds multiple of a column into an array */
|
189
|
+
virtual void add(const ClpSimplex * model, double * array,
|
190
|
+
int column, double multiplier) const = 0;
|
191
|
+
/// Allow any parts of a created CoinPackedMatrix to be deleted
|
192
|
+
virtual void releasePackedMatrix() const = 0;
|
193
|
+
/// Says whether it can do partial pricing
|
194
|
+
virtual bool canDoPartialPricing() const;
|
195
|
+
/// Returns number of hidden rows e.g. gub
|
196
|
+
virtual int hiddenRows() const;
|
197
|
+
/// Partial pricing
|
198
|
+
virtual void partialPricing(ClpSimplex * model, double start, double end,
|
199
|
+
int & bestSequence, int & numberWanted);
|
200
|
+
/** expands an updated column to allow for extra rows which the main
|
201
|
+
solver does not know about and returns number added.
|
202
|
+
|
203
|
+
This will normally be a no-op - it is in for GUB but may get extended to
|
204
|
+
general non-overlapping and embedded networks.
|
205
|
+
|
206
|
+
mode 0 - extend
|
207
|
+
mode 1 - delete etc
|
208
|
+
*/
|
209
|
+
virtual int extendUpdated(ClpSimplex * model, CoinIndexedVector * update, int mode);
|
210
|
+
/**
|
211
|
+
utility primal function for dealing with dynamic constraints
|
212
|
+
mode=0 - Set up before "update" and "times" for primal solution using extended rows
|
213
|
+
mode=1 - Cleanup primal solution after "times" using extended rows.
|
214
|
+
mode=2 - Check (or report on) primal infeasibilities
|
215
|
+
*/
|
216
|
+
virtual void primalExpanded(ClpSimplex * model, int mode);
|
217
|
+
/**
|
218
|
+
utility dual function for dealing with dynamic constraints
|
219
|
+
mode=0 - Set up before "updateTranspose" and "transposeTimes" for duals using extended
|
220
|
+
updates array (and may use other if dual values pass)
|
221
|
+
mode=1 - Update dual solution after "transposeTimes" using extended rows.
|
222
|
+
mode=2 - Compute all djs and compute key dual infeasibilities
|
223
|
+
mode=3 - Report on key dual infeasibilities
|
224
|
+
mode=4 - Modify before updateTranspose in partial pricing
|
225
|
+
*/
|
226
|
+
virtual void dualExpanded(ClpSimplex * model, CoinIndexedVector * array,
|
227
|
+
double * other, int mode);
|
228
|
+
/**
|
229
|
+
general utility function for dealing with dynamic constraints
|
230
|
+
mode=0 - Create list of non-key basics in pivotVariable_ using
|
231
|
+
number as numberBasic in and out
|
232
|
+
mode=1 - Set all key variables as basic
|
233
|
+
mode=2 - return number extra rows needed, number gives maximum number basic
|
234
|
+
mode=3 - before replaceColumn
|
235
|
+
mode=4 - return 1 if can do primal, 2 if dual, 3 if both
|
236
|
+
mode=5 - save any status stuff (when in good state)
|
237
|
+
mode=6 - restore status stuff
|
238
|
+
mode=7 - flag given variable (normally sequenceIn)
|
239
|
+
mode=8 - unflag all variables
|
240
|
+
mode=9 - synchronize costs and bounds
|
241
|
+
mode=10 - return 1 if there may be changing bounds on variable (column generation)
|
242
|
+
mode=11 - make sure set is clean (used when a variable rejected - but not flagged)
|
243
|
+
mode=12 - after factorize but before permute stuff
|
244
|
+
mode=13 - at end of simplex to delete stuff
|
245
|
+
|
246
|
+
*/
|
247
|
+
virtual int generalExpanded(ClpSimplex * model, int mode, int & number);
|
248
|
+
/**
|
249
|
+
update information for a pivot (and effective rhs)
|
250
|
+
*/
|
251
|
+
virtual int updatePivot(ClpSimplex * model, double oldInValue, double oldOutValue);
|
252
|
+
/** Creates a variable. This is called after partial pricing and may modify matrix.
|
253
|
+
May update bestSequence.
|
254
|
+
*/
|
255
|
+
virtual void createVariable(ClpSimplex * model, int & bestSequence);
|
256
|
+
/** Just for debug if odd type matrix.
|
257
|
+
Returns number of primal infeasibilities. */
|
258
|
+
virtual int checkFeasible(ClpSimplex * model, double & sum) const ;
|
259
|
+
/// Returns reduced cost of a variable
|
260
|
+
double reducedCost(ClpSimplex * model, int sequence) const;
|
261
|
+
/// Correct sequence in and out to give true value (if both -1 maybe do whole matrix)
|
262
|
+
virtual void correctSequence(const ClpSimplex * model, int & sequenceIn, int & sequenceOut) ;
|
263
|
+
//@}
|
264
|
+
|
265
|
+
//---------------------------------------------------------------------------
|
266
|
+
/**@name Matrix times vector methods
|
267
|
+
They can be faster if scalar is +- 1
|
268
|
+
Also for simplex I am not using basic/non-basic split */
|
269
|
+
//@{
|
270
|
+
/** Return <code>y + A * x * scalar</code> in <code>y</code>.
|
271
|
+
@pre <code>x</code> must be of size <code>numColumns()</code>
|
272
|
+
@pre <code>y</code> must be of size <code>numRows()</code> */
|
273
|
+
virtual void times(double scalar,
|
274
|
+
const double * COIN_RESTRICT x, double * COIN_RESTRICT y) const = 0;
|
275
|
+
/** And for scaling - default aborts for when scaling not supported
|
276
|
+
(unless pointers NULL when as normal)
|
277
|
+
*/
|
278
|
+
virtual void times(double scalar,
|
279
|
+
const double * COIN_RESTRICT x, double * COIN_RESTRICT y,
|
280
|
+
const double * COIN_RESTRICT rowScale,
|
281
|
+
const double * COIN_RESTRICT columnScale) const;
|
282
|
+
/** Return <code>y + x * scalar * A</code> in <code>y</code>.
|
283
|
+
@pre <code>x</code> must be of size <code>numRows()</code>
|
284
|
+
@pre <code>y</code> must be of size <code>numColumns()</code> */
|
285
|
+
virtual void transposeTimes(double scalar,
|
286
|
+
const double * COIN_RESTRICT x, double * COIN_RESTRICT y) const = 0;
|
287
|
+
/** And for scaling - default aborts for when scaling not supported
|
288
|
+
(unless pointers NULL when as normal)
|
289
|
+
*/
|
290
|
+
virtual void transposeTimes(double scalar,
|
291
|
+
const double * COIN_RESTRICT x, double * COIN_RESTRICT y,
|
292
|
+
const double * COIN_RESTRICT rowScale,
|
293
|
+
const double * COIN_RESTRICT columnScale,
|
294
|
+
double * COIN_RESTRICT spare = NULL) const;
|
295
|
+
#if COIN_LONG_WORK
|
296
|
+
// For long double versions (aborts if not supported)
|
297
|
+
virtual void times(CoinWorkDouble scalar,
|
298
|
+
const CoinWorkDouble * COIN_RESTRICT x, CoinWorkDouble * COIN_RESTRICT y) const ;
|
299
|
+
virtual void transposeTimes(CoinWorkDouble scalar,
|
300
|
+
const CoinWorkDouble * COIN_RESTRICT x, CoinWorkDouble * COIN_RESTRICT y) const ;
|
301
|
+
#endif
|
302
|
+
/** Return <code>x * scalar *A + y</code> in <code>z</code>.
|
303
|
+
Can use y as temporary array (will be empty at end)
|
304
|
+
Note - If x packed mode - then z packed mode
|
305
|
+
Squashes small elements and knows about ClpSimplex */
|
306
|
+
virtual void transposeTimes(const ClpSimplex * model, double scalar,
|
307
|
+
const CoinIndexedVector * x,
|
308
|
+
CoinIndexedVector * y,
|
309
|
+
CoinIndexedVector * z) const = 0;
|
310
|
+
/** Return <code>x *A</code> in <code>z</code> but
|
311
|
+
just for indices in y.
|
312
|
+
This is only needed for primal steepest edge.
|
313
|
+
Note - z always packed mode */
|
314
|
+
virtual void subsetTransposeTimes(const ClpSimplex * model,
|
315
|
+
const CoinIndexedVector * x,
|
316
|
+
const CoinIndexedVector * y,
|
317
|
+
CoinIndexedVector * z) const = 0;
|
318
|
+
/** Returns true if can combine transposeTimes and subsetTransposeTimes
|
319
|
+
and if it would be faster */
|
320
|
+
virtual bool canCombine(const ClpSimplex * ,
|
321
|
+
const CoinIndexedVector * ) const {
|
322
|
+
return false;
|
323
|
+
}
|
324
|
+
/// Updates two arrays for steepest and does devex weights (need not be coded)
|
325
|
+
virtual void transposeTimes2(const ClpSimplex * model,
|
326
|
+
const CoinIndexedVector * pi1, CoinIndexedVector * dj1,
|
327
|
+
const CoinIndexedVector * pi2,
|
328
|
+
CoinIndexedVector * spare,
|
329
|
+
double referenceIn, double devex,
|
330
|
+
// Array for exact devex to say what is in reference framework
|
331
|
+
unsigned int * reference,
|
332
|
+
double * weights, double scaleFactor);
|
333
|
+
/// Updates second array for steepest and does devex weights (need not be coded)
|
334
|
+
virtual void subsetTimes2(const ClpSimplex * model,
|
335
|
+
CoinIndexedVector * dj1,
|
336
|
+
const CoinIndexedVector * pi2, CoinIndexedVector * dj2,
|
337
|
+
double referenceIn, double devex,
|
338
|
+
// Array for exact devex to say what is in reference framework
|
339
|
+
unsigned int * reference,
|
340
|
+
double * weights, double scaleFactor);
|
341
|
+
/** Return <code>x *A</code> in <code>z</code> but
|
342
|
+
just for number indices in y.
|
343
|
+
Default cheats with fake CoinIndexedVector and
|
344
|
+
then calls subsetTransposeTimes */
|
345
|
+
virtual void listTransposeTimes(const ClpSimplex * model,
|
346
|
+
double * x,
|
347
|
+
int * y,
|
348
|
+
int number,
|
349
|
+
double * z) const;
|
350
|
+
//@}
|
351
|
+
//@{
|
352
|
+
///@name Other
|
353
|
+
/// Clone
|
354
|
+
virtual ClpMatrixBase * clone() const = 0;
|
355
|
+
/** Subset clone (without gaps). Duplicates are allowed
|
356
|
+
and order is as given.
|
357
|
+
Derived classes need not provide this as it may not always make
|
358
|
+
sense */
|
359
|
+
virtual ClpMatrixBase * subsetClone (
|
360
|
+
int numberRows, const int * whichRows,
|
361
|
+
int numberColumns, const int * whichColumns) const;
|
362
|
+
/// Gets rid of any mutable by products
|
363
|
+
virtual void backToBasics() {}
|
364
|
+
/** Returns type.
|
365
|
+
The types which code may need to know about are:
|
366
|
+
1 - ClpPackedMatrix
|
367
|
+
11 - ClpNetworkMatrix
|
368
|
+
12 - ClpPlusMinusOneMatrix
|
369
|
+
*/
|
370
|
+
inline int type() const {
|
371
|
+
return type_;
|
372
|
+
}
|
373
|
+
/// Sets type
|
374
|
+
void setType(int newtype) {
|
375
|
+
type_ = newtype;
|
376
|
+
}
|
377
|
+
/// Sets up an effective RHS
|
378
|
+
void useEffectiveRhs(ClpSimplex * model);
|
379
|
+
/** Returns effective RHS offset if it is being used. This is used for long problems
|
380
|
+
or big gub or anywhere where going through full columns is
|
381
|
+
expensive. This may re-compute */
|
382
|
+
virtual double * rhsOffset(ClpSimplex * model, bool forceRefresh = false,
|
383
|
+
bool check = false);
|
384
|
+
/// If rhsOffset used this is iteration last refreshed
|
385
|
+
inline int lastRefresh() const {
|
386
|
+
return lastRefresh_;
|
387
|
+
}
|
388
|
+
/// If rhsOffset used this is refresh frequency (0==off)
|
389
|
+
inline int refreshFrequency() const {
|
390
|
+
return refreshFrequency_;
|
391
|
+
}
|
392
|
+
inline void setRefreshFrequency(int value) {
|
393
|
+
refreshFrequency_ = value;
|
394
|
+
}
|
395
|
+
/// whether to skip dual checks most of time
|
396
|
+
inline bool skipDualCheck() const {
|
397
|
+
return skipDualCheck_;
|
398
|
+
}
|
399
|
+
inline void setSkipDualCheck(bool yes) {
|
400
|
+
skipDualCheck_ = yes;
|
401
|
+
}
|
402
|
+
/** Partial pricing tuning parameter - minimum number of "objects" to scan.
|
403
|
+
e.g. number of Gub sets but could be number of variables */
|
404
|
+
inline int minimumObjectsScan() const {
|
405
|
+
return minimumObjectsScan_;
|
406
|
+
}
|
407
|
+
inline void setMinimumObjectsScan(int value) {
|
408
|
+
minimumObjectsScan_ = value;
|
409
|
+
}
|
410
|
+
/// Partial pricing tuning parameter - minimum number of negative reduced costs to get
|
411
|
+
inline int minimumGoodReducedCosts() const {
|
412
|
+
return minimumGoodReducedCosts_;
|
413
|
+
}
|
414
|
+
inline void setMinimumGoodReducedCosts(int value) {
|
415
|
+
minimumGoodReducedCosts_ = value;
|
416
|
+
}
|
417
|
+
/// Current start of search space in matrix (as fraction)
|
418
|
+
inline double startFraction() const {
|
419
|
+
return startFraction_;
|
420
|
+
}
|
421
|
+
inline void setStartFraction(double value) {
|
422
|
+
startFraction_ = value;
|
423
|
+
}
|
424
|
+
/// Current end of search space in matrix (as fraction)
|
425
|
+
inline double endFraction() const {
|
426
|
+
return endFraction_;
|
427
|
+
}
|
428
|
+
inline void setEndFraction(double value) {
|
429
|
+
endFraction_ = value;
|
430
|
+
}
|
431
|
+
/// Current best reduced cost
|
432
|
+
inline double savedBestDj() const {
|
433
|
+
return savedBestDj_;
|
434
|
+
}
|
435
|
+
inline void setSavedBestDj(double value) {
|
436
|
+
savedBestDj_ = value;
|
437
|
+
}
|
438
|
+
/// Initial number of negative reduced costs wanted
|
439
|
+
inline int originalWanted() const {
|
440
|
+
return originalWanted_;
|
441
|
+
}
|
442
|
+
inline void setOriginalWanted(int value) {
|
443
|
+
originalWanted_ = value;
|
444
|
+
}
|
445
|
+
/// Current number of negative reduced costs which we still need
|
446
|
+
inline int currentWanted() const {
|
447
|
+
return currentWanted_;
|
448
|
+
}
|
449
|
+
inline void setCurrentWanted(int value) {
|
450
|
+
currentWanted_ = value;
|
451
|
+
}
|
452
|
+
/// Current best sequence
|
453
|
+
inline int savedBestSequence() const {
|
454
|
+
return savedBestSequence_;
|
455
|
+
}
|
456
|
+
inline void setSavedBestSequence(int value) {
|
457
|
+
savedBestSequence_ = value;
|
458
|
+
}
|
459
|
+
//@}
|
460
|
+
|
461
|
+
|
462
|
+
protected:
|
463
|
+
|
464
|
+
/**@name Constructors, destructor<br>
|
465
|
+
<strong>NOTE</strong>: All constructors are protected. There's no need
|
466
|
+
to expose them, after all, this is an abstract class. */
|
467
|
+
//@{
|
468
|
+
/** Default constructor. */
|
469
|
+
ClpMatrixBase();
|
470
|
+
/** Destructor (has to be public) */
|
471
|
+
public:
|
472
|
+
virtual ~ClpMatrixBase();
|
473
|
+
protected:
|
474
|
+
// Copy
|
475
|
+
ClpMatrixBase(const ClpMatrixBase&);
|
476
|
+
// Assignment
|
477
|
+
ClpMatrixBase& operator=(const ClpMatrixBase&);
|
478
|
+
//@}
|
479
|
+
|
480
|
+
|
481
|
+
protected:
|
482
|
+
/**@name Data members
|
483
|
+
The data members are protected to allow access for derived classes. */
|
484
|
+
//@{
|
485
|
+
/** Effective RHS offset if it is being used. This is used for long problems
|
486
|
+
or big gub or anywhere where going through full columns is
|
487
|
+
expensive */
|
488
|
+
double * rhsOffset_;
|
489
|
+
/// Current start of search space in matrix (as fraction)
|
490
|
+
double startFraction_;
|
491
|
+
/// Current end of search space in matrix (as fraction)
|
492
|
+
double endFraction_;
|
493
|
+
/// Best reduced cost so far
|
494
|
+
double savedBestDj_;
|
495
|
+
/// Initial number of negative reduced costs wanted
|
496
|
+
int originalWanted_;
|
497
|
+
/// Current number of negative reduced costs which we still need
|
498
|
+
int currentWanted_;
|
499
|
+
/// Saved best sequence in pricing
|
500
|
+
int savedBestSequence_;
|
501
|
+
/// type (may be useful)
|
502
|
+
int type_;
|
503
|
+
/// If rhsOffset used this is iteration last refreshed
|
504
|
+
int lastRefresh_;
|
505
|
+
/// If rhsOffset used this is refresh frequency (0==off)
|
506
|
+
int refreshFrequency_;
|
507
|
+
/// Partial pricing tuning parameter - minimum number of "objects" to scan
|
508
|
+
int minimumObjectsScan_;
|
509
|
+
/// Partial pricing tuning parameter - minimum number of negative reduced costs to get
|
510
|
+
int minimumGoodReducedCosts_;
|
511
|
+
/// True sequence in (i.e. from larger problem)
|
512
|
+
int trueSequenceIn_;
|
513
|
+
/// True sequence out (i.e. from larger problem)
|
514
|
+
int trueSequenceOut_;
|
515
|
+
/// whether to skip dual checks most of time
|
516
|
+
bool skipDualCheck_;
|
517
|
+
//@}
|
518
|
+
};
|
519
|
+
// bias for free variables
|
520
|
+
#define FREE_BIAS 1.0e1
|
521
|
+
// Acceptance criteria for free variables
|
522
|
+
#define FREE_ACCEPT 1.0e2
|
523
|
+
|
524
|
+
#endif
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/* $Id: ClpMessage.hpp 1926 2013-03-26 15:23:38Z 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 ClpMessage_H
|
7
|
+
#define ClpMessage_H
|
8
|
+
|
9
|
+
|
10
|
+
#include "CoinPragma.hpp"
|
11
|
+
#include <cstring>
|
12
|
+
|
13
|
+
// This deals with Clp messages (as against Osi messages etc)
|
14
|
+
|
15
|
+
#include "CoinMessageHandler.hpp"
|
16
|
+
enum CLP_Message {
|
17
|
+
CLP_SIMPLEX_FINISHED,
|
18
|
+
CLP_SIMPLEX_INFEASIBLE,
|
19
|
+
CLP_SIMPLEX_UNBOUNDED,
|
20
|
+
CLP_SIMPLEX_STOPPED,
|
21
|
+
CLP_SIMPLEX_ERROR,
|
22
|
+
CLP_SIMPLEX_INTERRUPT,
|
23
|
+
CLP_SIMPLEX_STATUS,
|
24
|
+
CLP_DUAL_BOUNDS,
|
25
|
+
CLP_SIMPLEX_ACCURACY,
|
26
|
+
CLP_SIMPLEX_BADFACTOR,
|
27
|
+
CLP_SIMPLEX_BOUNDTIGHTEN,
|
28
|
+
CLP_SIMPLEX_INFEASIBILITIES,
|
29
|
+
CLP_SIMPLEX_FLAG,
|
30
|
+
CLP_SIMPLEX_GIVINGUP,
|
31
|
+
CLP_DUAL_CHECKB,
|
32
|
+
CLP_DUAL_ORIGINAL,
|
33
|
+
CLP_SIMPLEX_PERTURB,
|
34
|
+
CLP_PRIMAL_ORIGINAL,
|
35
|
+
CLP_PRIMAL_WEIGHT,
|
36
|
+
CLP_PRIMAL_OPTIMAL,
|
37
|
+
CLP_SINGULARITIES,
|
38
|
+
CLP_MODIFIEDBOUNDS,
|
39
|
+
CLP_RIMSTATISTICS1,
|
40
|
+
CLP_RIMSTATISTICS2,
|
41
|
+
CLP_RIMSTATISTICS3,
|
42
|
+
CLP_POSSIBLELOOP,
|
43
|
+
CLP_SMALLELEMENTS,
|
44
|
+
CLP_DUPLICATEELEMENTS,
|
45
|
+
CLP_SIMPLEX_HOUSE1,
|
46
|
+
CLP_SIMPLEX_HOUSE2,
|
47
|
+
CLP_SIMPLEX_NONLINEAR,
|
48
|
+
CLP_SIMPLEX_FREEIN,
|
49
|
+
CLP_SIMPLEX_PIVOTROW,
|
50
|
+
CLP_DUAL_CHECK,
|
51
|
+
CLP_PRIMAL_DJ,
|
52
|
+
CLP_PACKEDSCALE_INITIAL,
|
53
|
+
CLP_PACKEDSCALE_WHILE,
|
54
|
+
CLP_PACKEDSCALE_FINAL,
|
55
|
+
CLP_PACKEDSCALE_FORGET,
|
56
|
+
CLP_INITIALIZE_STEEP,
|
57
|
+
CLP_UNABLE_OPEN,
|
58
|
+
CLP_BAD_BOUNDS,
|
59
|
+
CLP_BAD_MATRIX,
|
60
|
+
CLP_LOOP,
|
61
|
+
CLP_IMPORT_RESULT,
|
62
|
+
CLP_IMPORT_ERRORS,
|
63
|
+
CLP_EMPTY_PROBLEM,
|
64
|
+
CLP_CRASH,
|
65
|
+
CLP_END_VALUES_PASS,
|
66
|
+
CLP_QUADRATIC_BOTH,
|
67
|
+
CLP_QUADRATIC_PRIMAL_DETAILS,
|
68
|
+
CLP_IDIOT_ITERATION,
|
69
|
+
CLP_INFEASIBLE,
|
70
|
+
CLP_MATRIX_CHANGE,
|
71
|
+
CLP_TIMING,
|
72
|
+
CLP_INTERVAL_TIMING,
|
73
|
+
CLP_SPRINT,
|
74
|
+
CLP_BARRIER_ITERATION,
|
75
|
+
CLP_BARRIER_OBJECTIVE_GAP,
|
76
|
+
CLP_BARRIER_GONE_INFEASIBLE,
|
77
|
+
CLP_BARRIER_CLOSE_TO_OPTIMAL,
|
78
|
+
CLP_BARRIER_COMPLEMENTARITY,
|
79
|
+
CLP_BARRIER_EXIT2,
|
80
|
+
CLP_BARRIER_STOPPING,
|
81
|
+
CLP_BARRIER_EXIT,
|
82
|
+
CLP_BARRIER_SCALING,
|
83
|
+
CLP_BARRIER_MU,
|
84
|
+
CLP_BARRIER_INFO,
|
85
|
+
CLP_BARRIER_END,
|
86
|
+
CLP_BARRIER_ACCURACY,
|
87
|
+
CLP_BARRIER_SAFE,
|
88
|
+
CLP_BARRIER_NEGATIVE_GAPS,
|
89
|
+
CLP_BARRIER_REDUCING,
|
90
|
+
CLP_BARRIER_DIAGONAL,
|
91
|
+
CLP_BARRIER_SLACKS,
|
92
|
+
CLP_BARRIER_DUALINF,
|
93
|
+
CLP_BARRIER_KILLED,
|
94
|
+
CLP_BARRIER_ABS_DROPPED,
|
95
|
+
CLP_BARRIER_ABS_ERROR,
|
96
|
+
CLP_BARRIER_FEASIBLE,
|
97
|
+
CLP_BARRIER_STEP,
|
98
|
+
CLP_BARRIER_KKT,
|
99
|
+
CLP_RIM_SCALE,
|
100
|
+
CLP_SLP_ITER,
|
101
|
+
CLP_COMPLICATED_MODEL,
|
102
|
+
CLP_BAD_STRING_VALUES,
|
103
|
+
CLP_CRUNCH_STATS,
|
104
|
+
CLP_PARAMETRICS_STATS,
|
105
|
+
CLP_PARAMETRICS_STATS2,
|
106
|
+
#ifndef NO_FATHOM_PRINT
|
107
|
+
CLP_FATHOM_STATUS,
|
108
|
+
CLP_FATHOM_SOLUTION,
|
109
|
+
CLP_FATHOM_FINISH,
|
110
|
+
#endif
|
111
|
+
CLP_GENERAL,
|
112
|
+
CLP_GENERAL2,
|
113
|
+
CLP_GENERAL_WARNING,
|
114
|
+
CLP_DUMMY_END
|
115
|
+
};
|
116
|
+
|
117
|
+
/** This deals with Clp messages (as against Osi messages etc)
|
118
|
+
*/
|
119
|
+
class ClpMessage : public CoinMessages {
|
120
|
+
|
121
|
+
public:
|
122
|
+
|
123
|
+
/**@name Constructors etc */
|
124
|
+
//@{
|
125
|
+
/** Constructor */
|
126
|
+
ClpMessage(Language language = us_en);
|
127
|
+
//@}
|
128
|
+
|
129
|
+
};
|
130
|
+
|
131
|
+
#endif
|