ruby-cbc 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +203 -0
- data/Rakefile +40 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/ext/ruby-cbc/cbc.i +15 -0
- data/ext/ruby-cbc/cbc_wrap.c +4618 -0
- data/ext/ruby-cbc/extconf.rb +60 -0
- data/ext/ruby-cbc/install/bin/cbc +0 -0
- data/ext/ruby-cbc/install/bin/clp +0 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +24 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +62 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +78 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +183 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +129 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +100 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +206 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +242 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +236 -0
- data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +303 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +39 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +14 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +142 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +120 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +47 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +48 -0
- data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +49 -0
- data/ext/ruby-cbc/install/include/coin/CbcConfig.h +14 -0
- data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +49 -0
- data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +168 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +482 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +57 -0
- data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +66 -0
- data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +83 -0
- data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +245 -0
- data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +137 -0
- data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +169 -0
- data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +56 -0
- data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +67 -0
- data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +207 -0
- data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +161 -0
- data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +279 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +682 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +96 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +309 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +192 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +340 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +280 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +271 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +77 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +102 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +1406 -0
- data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +94 -0
- data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +26 -0
- data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +2952 -0
- data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +351 -0
- data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +349 -0
- data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +272 -0
- data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +64 -0
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +4134 -0
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +532 -0
- data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +324 -0
- data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +110 -0
- data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +279 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +286 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +564 -0
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +114 -0
- data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +447 -0
- data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +258 -0
- data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +83 -0
- data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +490 -0
- data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +372 -0
- data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +381 -0
- data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +464 -0
- data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +115 -0
- data/ext/ruby-cbc/install/include/coin/CglClique.hpp +308 -0
- data/ext/ruby-cbc/install/include/coin/CglConfig.h +19 -0
- data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +121 -0
- data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +189 -0
- data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +371 -0
- data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +364 -0
- data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +313 -0
- data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +204 -0
- data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +310 -0
- data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +306 -0
- data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +130 -0
- data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +104 -0
- data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +50 -0
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +429 -0
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +427 -0
- data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +160 -0
- data/ext/ruby-cbc/install/include/coin/CglParam.hpp +93 -0
- data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +492 -0
- data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +543 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +448 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +494 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +495 -0
- data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +272 -0
- data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +240 -0
- data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +174 -0
- data/ext/ruby-cbc/install/include/coin/CglStored.hpp +125 -0
- data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +180 -0
- data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +565 -0
- data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +133 -0
- data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +113 -0
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +294 -0
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +162 -0
- data/ext/ruby-cbc/install/include/coin/ClpConfig.h +17 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +125 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +108 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +110 -0
- data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +119 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +71 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +129 -0
- data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +153 -0
- data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +183 -0
- data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +186 -0
- data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +381 -0
- data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +187 -0
- data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +432 -0
- data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +358 -0
- data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +570 -0
- data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +103 -0
- data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +524 -0
- data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +131 -0
- data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +1307 -0
- data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +229 -0
- data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +349 -0
- data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +401 -0
- data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +134 -0
- data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +638 -0
- data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +126 -0
- data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +103 -0
- data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +290 -0
- data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +299 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +72 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +155 -0
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +155 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +1797 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +300 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +117 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +277 -0
- data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +244 -0
- data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +446 -0
- data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +525 -0
- data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +176 -0
- data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +149 -0
- data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +419 -0
- data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +383 -0
- data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +48 -0
- data/ext/ruby-cbc/install/include/coin/CoinError.hpp +257 -0
- data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +2044 -0
- data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +34 -0
- data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +177 -0
- data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +1111 -0
- data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +1164 -0
- data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +805 -0
- data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +96 -0
- data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +666 -0
- data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +1054 -0
- data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +441 -0
- data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +1056 -0
- data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +280 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +947 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +657 -0
- data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +269 -0
- data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +644 -0
- data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +26 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +73 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +85 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +226 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +116 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +181 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +61 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +51 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +1842 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +105 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +112 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +101 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +55 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +66 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +63 -0
- data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +60 -0
- data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +44 -0
- data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +465 -0
- data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +148 -0
- data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +117 -0
- data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +431 -0
- data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +528 -0
- data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +476 -0
- data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +678 -0
- data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +247 -0
- data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +310 -0
- data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +64 -0
- data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +19 -0
- data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +34 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +58 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +456 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +166 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +211 -0
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +488 -0
- data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +115 -0
- data/ext/ruby-cbc/install/include/coin/Idiot.hpp +298 -0
- data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +206 -0
- data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +1005 -0
- data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +764 -0
- data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +534 -0
- data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +1509 -0
- data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +324 -0
- data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +35 -0
- data/ext/ruby-cbc/install/include/coin/OsiConfig.h +19 -0
- data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +245 -0
- data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +474 -0
- data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +252 -0
- data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +331 -0
- data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +187 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +152 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +2143 -0
- data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +142 -0
- data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +374 -0
- data/ext/ruby-cbc/install/lib/libCbc.la +35 -0
- data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.la +35 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.la +35 -0
- data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.la +35 -0
- data/ext/ruby-cbc/install/lib/libClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.la +35 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.la +35 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.la +35 -0
- data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.la +35 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.la +35 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +35 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +9 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +9 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +12 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +12 -0
- data/lib/ruby-cbc/ilp/constant.rb +44 -0
- data/lib/ruby-cbc/ilp/constraint.rb +32 -0
- data/lib/ruby-cbc/ilp/objective.rb +26 -0
- data/lib/ruby-cbc/ilp/term.rb +47 -0
- data/lib/ruby-cbc/ilp/term_array.rb +80 -0
- data/lib/ruby-cbc/ilp/var.rb +62 -0
- data/lib/ruby-cbc/model.rb +125 -0
- data/lib/ruby-cbc/problem.rb +170 -0
- data/lib/ruby-cbc/version.rb +3 -0
- data/lib/ruby-cbc.rb +21 -0
- data/ruby-cbc.gemspec +36 -0
- metadata +431 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* $Id: ClpParameters.hpp 2046 2014-08-14 04:13:10Z tkr $ */
|
|
2
|
+
// Copyright (C) 2000, 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 _ClpParameters_H
|
|
7
|
+
#define _ClpParameters_H
|
|
8
|
+
|
|
9
|
+
/** This is where to put any useful stuff.
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
enum ClpIntParam {
|
|
13
|
+
/** The maximum number of iterations Clp can execute in the simplex methods
|
|
14
|
+
*/
|
|
15
|
+
ClpMaxNumIteration = 0,
|
|
16
|
+
/** The maximum number of iterations Clp can execute in hotstart before
|
|
17
|
+
terminating */
|
|
18
|
+
ClpMaxNumIterationHotStart,
|
|
19
|
+
/** The name discipline; specifies how the solver will handle row and
|
|
20
|
+
column names.
|
|
21
|
+
- 0: Auto names: Names cannot be set by the client. Names of the form
|
|
22
|
+
Rnnnnnnn or Cnnnnnnn are generated on demand when a name for a
|
|
23
|
+
specific row or column is requested; nnnnnnn is derived from the row
|
|
24
|
+
or column index. Requests for a vector of names return a vector with
|
|
25
|
+
zero entries.
|
|
26
|
+
- 1: Lazy names: Names supplied by the client are retained. Names of the
|
|
27
|
+
form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
|
|
28
|
+
supplied by the client. Requests for a vector of names return a
|
|
29
|
+
vector sized to the largest index of a name supplied by the client;
|
|
30
|
+
some entries in the vector may be null strings.
|
|
31
|
+
- 2: Full names: Names supplied by the client are retained. Names of the
|
|
32
|
+
form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
|
|
33
|
+
supplied by the client. Requests for a vector of names return a
|
|
34
|
+
vector sized to match the constraint system, and all entries will
|
|
35
|
+
contain either the name specified by the client or a generated name.
|
|
36
|
+
*/
|
|
37
|
+
ClpNameDiscipline,
|
|
38
|
+
/** Just a marker, so that we can allocate a static sized array to store
|
|
39
|
+
parameters. */
|
|
40
|
+
ClpLastIntParam
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
enum ClpDblParam {
|
|
44
|
+
/** Set Dual objective limit. This is to be used as a termination criteria
|
|
45
|
+
in methods where the dual objective monotonically changes (dual
|
|
46
|
+
simplex). */
|
|
47
|
+
ClpDualObjectiveLimit,
|
|
48
|
+
/** Primal objective limit. This is to be used as a termination
|
|
49
|
+
criteria in methods where the primal objective monotonically changes
|
|
50
|
+
(e.g., primal simplex) */
|
|
51
|
+
ClpPrimalObjectiveLimit,
|
|
52
|
+
/** The maximum amount the dual constraints can be violated and still be
|
|
53
|
+
considered feasible. */
|
|
54
|
+
ClpDualTolerance,
|
|
55
|
+
/** The maximum amount the primal constraints can be violated and still be
|
|
56
|
+
considered feasible. */
|
|
57
|
+
ClpPrimalTolerance,
|
|
58
|
+
/** Objective function constant. This the value of the constant term in
|
|
59
|
+
the objective function. */
|
|
60
|
+
ClpObjOffset,
|
|
61
|
+
/// Maximum time in seconds - after, this action is as max iterations
|
|
62
|
+
ClpMaxSeconds,
|
|
63
|
+
/// Maximum wallclock running time in seconds - after, this action is as max iterations
|
|
64
|
+
ClpMaxWallSeconds,
|
|
65
|
+
/// Tolerance to use in presolve
|
|
66
|
+
ClpPresolveTolerance,
|
|
67
|
+
/** Just a marker, so that we can allocate a static sized array to store
|
|
68
|
+
parameters. */
|
|
69
|
+
ClpLastDblParam
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
enum ClpStrParam {
|
|
74
|
+
/** Name of the problem. This is the found on the Name card of
|
|
75
|
+
an mps file. */
|
|
76
|
+
ClpProbName = 0,
|
|
77
|
+
/** Just a marker, so that we can allocate a static sized array to store
|
|
78
|
+
parameters. */
|
|
79
|
+
ClpLastStrParam
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/// Copy (I don't like complexity of Coin version)
|
|
83
|
+
template <class T> inline void
|
|
84
|
+
ClpDisjointCopyN( const T * array, const int size, T * newArray)
|
|
85
|
+
{
|
|
86
|
+
memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
|
|
87
|
+
}
|
|
88
|
+
/// And set
|
|
89
|
+
template <class T> inline void
|
|
90
|
+
ClpFillN( T * array, const int size, T value)
|
|
91
|
+
{
|
|
92
|
+
int i;
|
|
93
|
+
for (i = 0; i < size; i++)
|
|
94
|
+
array[i] = value;
|
|
95
|
+
}
|
|
96
|
+
/// This returns a non const array filled with input from scalar or actual array
|
|
97
|
+
template <class T> inline T*
|
|
98
|
+
ClpCopyOfArray( const T * array, const int size, T value)
|
|
99
|
+
{
|
|
100
|
+
T * arrayNew = new T[size];
|
|
101
|
+
if (array)
|
|
102
|
+
ClpDisjointCopyN(array, size, arrayNew);
|
|
103
|
+
else
|
|
104
|
+
ClpFillN ( arrayNew, size, value);
|
|
105
|
+
return arrayNew;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/// This returns a non const array filled with actual array (or NULL)
|
|
109
|
+
template <class T> inline T*
|
|
110
|
+
ClpCopyOfArray( const T * array, const int size)
|
|
111
|
+
{
|
|
112
|
+
if (array) {
|
|
113
|
+
T * arrayNew = new T[size];
|
|
114
|
+
ClpDisjointCopyN(array, size, arrayNew);
|
|
115
|
+
return arrayNew;
|
|
116
|
+
} else {
|
|
117
|
+
return NULL;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/// For a structure to be used by trusted code
|
|
121
|
+
typedef struct {
|
|
122
|
+
int typeStruct; // allocated as 1,2 etc
|
|
123
|
+
int typeCall;
|
|
124
|
+
void * data;
|
|
125
|
+
} ClpTrustedData;
|
|
126
|
+
#endif
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* $Id: ClpPdcoBase.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 ClpPdcoBase_H
|
|
7
|
+
#define ClpPdcoBase_H
|
|
8
|
+
|
|
9
|
+
#include "CoinPragma.hpp"
|
|
10
|
+
|
|
11
|
+
#include "CoinPackedMatrix.hpp"
|
|
12
|
+
#include "CoinDenseVector.hpp"
|
|
13
|
+
class ClpInterior;
|
|
14
|
+
|
|
15
|
+
/** Abstract base class for tailoring everything for Pcdo
|
|
16
|
+
|
|
17
|
+
Since this class is abstract, no object of this type can be created.
|
|
18
|
+
|
|
19
|
+
If a derived class provides all methods then all ClpPcdo algorithms
|
|
20
|
+
should work.
|
|
21
|
+
|
|
22
|
+
Eventually we should be able to use ClpObjective and ClpMatrixBase.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
class ClpPdcoBase {
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**@name Virtual methods that the derived classes must provide */
|
|
29
|
+
//@{
|
|
30
|
+
virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const = 0;
|
|
31
|
+
|
|
32
|
+
virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;
|
|
33
|
+
|
|
34
|
+
virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;
|
|
35
|
+
|
|
36
|
+
virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;
|
|
37
|
+
|
|
38
|
+
virtual void matPrecon(ClpInterior * model, double delta, double * x, double * y) const = 0;
|
|
39
|
+
|
|
40
|
+
//@}
|
|
41
|
+
//@{
|
|
42
|
+
///@name Other
|
|
43
|
+
/// Clone
|
|
44
|
+
virtual ClpPdcoBase * clone() const = 0;
|
|
45
|
+
/// Returns type
|
|
46
|
+
inline int type() const {
|
|
47
|
+
return type_;
|
|
48
|
+
};
|
|
49
|
+
/// Sets type
|
|
50
|
+
inline void setType(int type) {
|
|
51
|
+
type_ = type;
|
|
52
|
+
};
|
|
53
|
+
/// Returns size of d1
|
|
54
|
+
inline int sizeD1() const {
|
|
55
|
+
return 1;
|
|
56
|
+
};
|
|
57
|
+
/// Returns d1 as scalar
|
|
58
|
+
inline double getD1() const {
|
|
59
|
+
return d1_;
|
|
60
|
+
};
|
|
61
|
+
/// Returns size of d2
|
|
62
|
+
inline int sizeD2() const {
|
|
63
|
+
return 1;
|
|
64
|
+
};
|
|
65
|
+
/// Returns d2 as scalar
|
|
66
|
+
inline double getD2() const {
|
|
67
|
+
return d2_;
|
|
68
|
+
};
|
|
69
|
+
//@}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
protected:
|
|
73
|
+
|
|
74
|
+
/**@name Constructors, destructor<br>
|
|
75
|
+
<strong>NOTE</strong>: All constructors are protected. There's no need
|
|
76
|
+
to expose them, after all, this is an abstract class. */
|
|
77
|
+
//@{
|
|
78
|
+
/** Default constructor. */
|
|
79
|
+
ClpPdcoBase();
|
|
80
|
+
/** Destructor (has to be public) */
|
|
81
|
+
public:
|
|
82
|
+
virtual ~ClpPdcoBase();
|
|
83
|
+
protected:
|
|
84
|
+
// Copy
|
|
85
|
+
ClpPdcoBase(const ClpPdcoBase&);
|
|
86
|
+
// Assignment
|
|
87
|
+
ClpPdcoBase& operator=(const ClpPdcoBase&);
|
|
88
|
+
//@}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
protected:
|
|
92
|
+
/**@name Data members
|
|
93
|
+
The data members are protected to allow access for derived classes. */
|
|
94
|
+
//@{
|
|
95
|
+
/// Should be dense vectors
|
|
96
|
+
double d1_;
|
|
97
|
+
double d2_;
|
|
98
|
+
/// type (may be useful)
|
|
99
|
+
int type_;
|
|
100
|
+
//@}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
#endif
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/* $Id: ClpPlusMinusOneMatrix.hpp 2078 2015-01-05 12:39:49Z forrest $ */
|
|
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 ClpPlusMinusOneMatrix_H
|
|
7
|
+
#define ClpPlusMinusOneMatrix_H
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#include "CoinPragma.hpp"
|
|
11
|
+
|
|
12
|
+
#include "ClpMatrixBase.hpp"
|
|
13
|
+
|
|
14
|
+
/** This implements a simple +- one matrix as derived from ClpMatrixBase.
|
|
15
|
+
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
class ClpPlusMinusOneMatrix : public ClpMatrixBase {
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
/**@name Useful methods */
|
|
22
|
+
//@{
|
|
23
|
+
/// Return a complete CoinPackedMatrix
|
|
24
|
+
virtual CoinPackedMatrix * getPackedMatrix() const;
|
|
25
|
+
/** Whether the packed matrix is column major ordered or not. */
|
|
26
|
+
virtual bool isColOrdered() const ;
|
|
27
|
+
/** Number of entries in the packed matrix. */
|
|
28
|
+
virtual CoinBigIndex getNumElements() const;
|
|
29
|
+
/** Number of columns. */
|
|
30
|
+
virtual int getNumCols() const {
|
|
31
|
+
return numberColumns_;
|
|
32
|
+
}
|
|
33
|
+
/** Number of rows. */
|
|
34
|
+
virtual int getNumRows() const {
|
|
35
|
+
return numberRows_;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** A vector containing the elements in the packed matrix. Note that there
|
|
39
|
+
might be gaps in this list, entries that do not belong to any
|
|
40
|
+
major-dimension vector. To get the actual elements one should look at
|
|
41
|
+
this vector together with vectorStarts and vectorLengths. */
|
|
42
|
+
virtual const double * getElements() const;
|
|
43
|
+
/** A vector containing the minor indices of the elements in the packed
|
|
44
|
+
matrix. Note that there might be gaps in this list, entries that do not
|
|
45
|
+
belong to any major-dimension vector. To get the actual elements one
|
|
46
|
+
should look at this vector together with vectorStarts and
|
|
47
|
+
vectorLengths. */
|
|
48
|
+
virtual const int * getIndices() const {
|
|
49
|
+
return indices_;
|
|
50
|
+
}
|
|
51
|
+
// and for advanced use
|
|
52
|
+
int * getMutableIndices() const {
|
|
53
|
+
return indices_;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
virtual const CoinBigIndex * getVectorStarts() const;
|
|
57
|
+
/** The lengths of the major-dimension vectors. */
|
|
58
|
+
virtual const int * getVectorLengths() const;
|
|
59
|
+
|
|
60
|
+
/** Delete the columns whose indices are listed in <code>indDel</code>. */
|
|
61
|
+
virtual void deleteCols(const int numDel, const int * indDel);
|
|
62
|
+
/** Delete the rows whose indices are listed in <code>indDel</code>. */
|
|
63
|
+
virtual void deleteRows(const int numDel, const int * indDel);
|
|
64
|
+
/// Append Columns
|
|
65
|
+
virtual void appendCols(int number, const CoinPackedVectorBase * const * columns);
|
|
66
|
+
/// Append Rows
|
|
67
|
+
virtual void appendRows(int number, const CoinPackedVectorBase * const * rows);
|
|
68
|
+
#ifndef SLIM_CLP
|
|
69
|
+
/** Append a set of rows/columns to the end of the matrix. Returns number of errors
|
|
70
|
+
i.e. if any of the new rows/columns contain an index that's larger than the
|
|
71
|
+
number of columns-1/rows-1 (if numberOther>0) or duplicates
|
|
72
|
+
If 0 then rows, 1 if columns */
|
|
73
|
+
virtual int appendMatrix(int number, int type,
|
|
74
|
+
const CoinBigIndex * starts, const int * index,
|
|
75
|
+
const double * element, int numberOther = -1);
|
|
76
|
+
#endif
|
|
77
|
+
/** Returns a new matrix in reverse order without gaps */
|
|
78
|
+
virtual ClpMatrixBase * reverseOrderedCopy() const;
|
|
79
|
+
/// Returns number of elements in column part of basis
|
|
80
|
+
virtual CoinBigIndex countBasis(
|
|
81
|
+
const int * whichColumn,
|
|
82
|
+
int & numberColumnBasic);
|
|
83
|
+
/// Fills in column part of basis
|
|
84
|
+
virtual void fillBasis(ClpSimplex * model,
|
|
85
|
+
const int * whichColumn,
|
|
86
|
+
int & numberColumnBasic,
|
|
87
|
+
int * row, int * start,
|
|
88
|
+
int * rowCount, int * columnCount,
|
|
89
|
+
CoinFactorizationDouble * element);
|
|
90
|
+
/** Given positive integer weights for each row fills in sum of weights
|
|
91
|
+
for each column (and slack).
|
|
92
|
+
Returns weights vector
|
|
93
|
+
*/
|
|
94
|
+
virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model, int * inputWeights) const;
|
|
95
|
+
/** Returns largest and smallest elements of both signs.
|
|
96
|
+
Largest refers to largest absolute value.
|
|
97
|
+
*/
|
|
98
|
+
virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
|
|
99
|
+
double & smallestPositive, double & largestPositive);
|
|
100
|
+
/** Unpacks a column into an CoinIndexedvector
|
|
101
|
+
*/
|
|
102
|
+
virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
|
|
103
|
+
int column) const ;
|
|
104
|
+
/** Unpacks a column into an CoinIndexedvector
|
|
105
|
+
** in packed foramt
|
|
106
|
+
Note that model is NOT const. Bounds and objective could
|
|
107
|
+
be modified if doing column generation (just for this variable) */
|
|
108
|
+
virtual void unpackPacked(ClpSimplex * model,
|
|
109
|
+
CoinIndexedVector * rowArray,
|
|
110
|
+
int column) const;
|
|
111
|
+
/** Adds multiple of a column into an CoinIndexedvector
|
|
112
|
+
You can use quickAdd to add to vector */
|
|
113
|
+
virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
|
|
114
|
+
int column, double multiplier) const ;
|
|
115
|
+
/** Adds multiple of a column into an array */
|
|
116
|
+
virtual void add(const ClpSimplex * model, double * array,
|
|
117
|
+
int column, double multiplier) const;
|
|
118
|
+
/// Allow any parts of a created CoinMatrix to be deleted
|
|
119
|
+
virtual void releasePackedMatrix() const;
|
|
120
|
+
/** Set the dimensions of the matrix. In effect, append new empty
|
|
121
|
+
columns/rows to the matrix. A negative number for either dimension
|
|
122
|
+
means that that dimension doesn't change. Otherwise the new dimensions
|
|
123
|
+
MUST be at least as large as the current ones otherwise an exception
|
|
124
|
+
is thrown. */
|
|
125
|
+
virtual void setDimensions(int numrows, int numcols);
|
|
126
|
+
/// Just checks matrix valid - will say if dimensions not quite right if detail
|
|
127
|
+
void checkValid(bool detail) const;
|
|
128
|
+
//@}
|
|
129
|
+
|
|
130
|
+
/**@name Matrix times vector methods */
|
|
131
|
+
//@{
|
|
132
|
+
/** Return <code>y + A * scalar *x</code> in <code>y</code>.
|
|
133
|
+
@pre <code>x</code> must be of size <code>numColumns()</code>
|
|
134
|
+
@pre <code>y</code> must be of size <code>numRows()</code> */
|
|
135
|
+
virtual void times(double scalar,
|
|
136
|
+
const double * x, double * y) const;
|
|
137
|
+
/// And for scaling
|
|
138
|
+
virtual void times(double scalar,
|
|
139
|
+
const double * x, double * y,
|
|
140
|
+
const double * rowScale,
|
|
141
|
+
const double * columnScale) const;
|
|
142
|
+
/** Return <code>y + x * scalar * A</code> in <code>y</code>.
|
|
143
|
+
@pre <code>x</code> must be of size <code>numRows()</code>
|
|
144
|
+
@pre <code>y</code> must be of size <code>numColumns()</code> */
|
|
145
|
+
virtual void transposeTimes(double scalar,
|
|
146
|
+
const double * x, double * y) const;
|
|
147
|
+
/// And for scaling
|
|
148
|
+
virtual void transposeTimes(double scalar,
|
|
149
|
+
const double * x, double * y,
|
|
150
|
+
const double * rowScale,
|
|
151
|
+
const double * columnScale, double * spare = NULL) const;
|
|
152
|
+
/** Return <code>x * scalar * A + y</code> in <code>z</code>.
|
|
153
|
+
Can use y as temporary array (will be empty at end)
|
|
154
|
+
Note - If x packed mode - then z packed mode
|
|
155
|
+
Squashes small elements and knows about ClpSimplex */
|
|
156
|
+
virtual void transposeTimes(const ClpSimplex * model, double scalar,
|
|
157
|
+
const CoinIndexedVector * x,
|
|
158
|
+
CoinIndexedVector * y,
|
|
159
|
+
CoinIndexedVector * z) const;
|
|
160
|
+
/** Return <code>x * scalar * A + y</code> in <code>z</code>.
|
|
161
|
+
Can use y as temporary array (will be empty at end)
|
|
162
|
+
Note - If x packed mode - then z packed mode
|
|
163
|
+
Squashes small elements and knows about ClpSimplex.
|
|
164
|
+
This version uses row copy*/
|
|
165
|
+
virtual void transposeTimesByRow(const ClpSimplex * model, double scalar,
|
|
166
|
+
const CoinIndexedVector * x,
|
|
167
|
+
CoinIndexedVector * y,
|
|
168
|
+
CoinIndexedVector * z) const;
|
|
169
|
+
/** Return <code>x *A</code> in <code>z</code> but
|
|
170
|
+
just for indices in y.
|
|
171
|
+
Note - z always packed mode */
|
|
172
|
+
virtual void subsetTransposeTimes(const ClpSimplex * model,
|
|
173
|
+
const CoinIndexedVector * x,
|
|
174
|
+
const CoinIndexedVector * y,
|
|
175
|
+
CoinIndexedVector * z) const;
|
|
176
|
+
/** Returns true if can combine transposeTimes and subsetTransposeTimes
|
|
177
|
+
and if it would be faster */
|
|
178
|
+
virtual bool canCombine(const ClpSimplex * model,
|
|
179
|
+
const CoinIndexedVector * pi) const;
|
|
180
|
+
/// Updates two arrays for steepest
|
|
181
|
+
virtual void transposeTimes2(const ClpSimplex * model,
|
|
182
|
+
const CoinIndexedVector * pi1, CoinIndexedVector * dj1,
|
|
183
|
+
const CoinIndexedVector * pi2,
|
|
184
|
+
CoinIndexedVector * spare,
|
|
185
|
+
double referenceIn, double devex,
|
|
186
|
+
// Array for exact devex to say what is in reference framework
|
|
187
|
+
unsigned int * reference,
|
|
188
|
+
double * weights, double scaleFactor);
|
|
189
|
+
/// Updates second array for steepest and does devex weights
|
|
190
|
+
virtual void subsetTimes2(const ClpSimplex * model,
|
|
191
|
+
CoinIndexedVector * dj1,
|
|
192
|
+
const CoinIndexedVector * pi2, CoinIndexedVector * dj2,
|
|
193
|
+
double referenceIn, double devex,
|
|
194
|
+
// Array for exact devex to say what is in reference framework
|
|
195
|
+
unsigned int * reference,
|
|
196
|
+
double * weights, double scaleFactor);
|
|
197
|
+
//@}
|
|
198
|
+
|
|
199
|
+
/**@name Other */
|
|
200
|
+
//@{
|
|
201
|
+
/// Return starts of +1s
|
|
202
|
+
inline CoinBigIndex * startPositive() const {
|
|
203
|
+
return startPositive_;
|
|
204
|
+
}
|
|
205
|
+
/// Return starts of -1s
|
|
206
|
+
inline CoinBigIndex * startNegative() const {
|
|
207
|
+
return startNegative_;
|
|
208
|
+
}
|
|
209
|
+
//@}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
/**@name Constructors, destructor */
|
|
213
|
+
//@{
|
|
214
|
+
/** Default constructor. */
|
|
215
|
+
ClpPlusMinusOneMatrix();
|
|
216
|
+
/** Destructor */
|
|
217
|
+
virtual ~ClpPlusMinusOneMatrix();
|
|
218
|
+
//@}
|
|
219
|
+
|
|
220
|
+
/**@name Copy method */
|
|
221
|
+
//@{
|
|
222
|
+
/** The copy constructor. */
|
|
223
|
+
ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix&);
|
|
224
|
+
/** The copy constructor from an CoinPlusMinusOneMatrix.
|
|
225
|
+
If not a valid matrix then getIndices will be NULL and
|
|
226
|
+
startPositive[0] will have number of +1,
|
|
227
|
+
startPositive[1] will have number of -1,
|
|
228
|
+
startPositive[2] will have number of others,
|
|
229
|
+
*/
|
|
230
|
+
ClpPlusMinusOneMatrix(const CoinPackedMatrix&);
|
|
231
|
+
/// Constructor from arrays
|
|
232
|
+
ClpPlusMinusOneMatrix(int numberRows, int numberColumns,
|
|
233
|
+
bool columnOrdered, const int * indices,
|
|
234
|
+
const CoinBigIndex * startPositive, const CoinBigIndex * startNegative);
|
|
235
|
+
/** Subset constructor (without gaps). Duplicates are allowed
|
|
236
|
+
and order is as given */
|
|
237
|
+
ClpPlusMinusOneMatrix (const ClpPlusMinusOneMatrix & wholeModel,
|
|
238
|
+
int numberRows, const int * whichRows,
|
|
239
|
+
int numberColumns, const int * whichColumns);
|
|
240
|
+
|
|
241
|
+
ClpPlusMinusOneMatrix& operator=(const ClpPlusMinusOneMatrix&);
|
|
242
|
+
/// Clone
|
|
243
|
+
virtual ClpMatrixBase * clone() const ;
|
|
244
|
+
/** Subset clone (without gaps). Duplicates are allowed
|
|
245
|
+
and order is as given */
|
|
246
|
+
virtual ClpMatrixBase * subsetClone (
|
|
247
|
+
int numberRows, const int * whichRows,
|
|
248
|
+
int numberColumns, const int * whichColumns) const ;
|
|
249
|
+
/// pass in copy (object takes ownership)
|
|
250
|
+
void passInCopy(int numberRows, int numberColumns,
|
|
251
|
+
bool columnOrdered, int * indices,
|
|
252
|
+
CoinBigIndex * startPositive, CoinBigIndex * startNegative);
|
|
253
|
+
/// Says whether it can do partial pricing
|
|
254
|
+
virtual bool canDoPartialPricing() const;
|
|
255
|
+
/// Partial pricing
|
|
256
|
+
virtual void partialPricing(ClpSimplex * model, double start, double end,
|
|
257
|
+
int & bestSequence, int & numberWanted);
|
|
258
|
+
//@}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
protected:
|
|
262
|
+
/**@name Data members
|
|
263
|
+
The data members are protected to allow access for derived classes. */
|
|
264
|
+
//@{
|
|
265
|
+
/// For fake CoinPackedMatrix
|
|
266
|
+
mutable CoinPackedMatrix * matrix_;
|
|
267
|
+
mutable int * lengths_;
|
|
268
|
+
/// Start of +1's for each
|
|
269
|
+
CoinBigIndex * COIN_RESTRICT startPositive_;
|
|
270
|
+
/// Start of -1's for each
|
|
271
|
+
CoinBigIndex * COIN_RESTRICT startNegative_;
|
|
272
|
+
/// Data -1, then +1 rows in pairs (row==-1 if one entry)
|
|
273
|
+
int * COIN_RESTRICT indices_;
|
|
274
|
+
/// Number of rows
|
|
275
|
+
int numberRows_;
|
|
276
|
+
/// Number of columns
|
|
277
|
+
int numberColumns_;
|
|
278
|
+
#ifdef CLP_PLUS_ONE_MATRIX
|
|
279
|
+
/** Other flags (could have columnOrdered_?)
|
|
280
|
+
1 bit - says just +1
|
|
281
|
+
*/
|
|
282
|
+
mutable int otherFlags_;
|
|
283
|
+
#endif
|
|
284
|
+
/// True if column ordered
|
|
285
|
+
bool columnOrdered_;
|
|
286
|
+
|
|
287
|
+
//@}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
#endif
|