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,441 @@
|
|
1
|
+
/* $Id: CoinModelUseful.hpp 1416 2011-04-17 09:57:29Z stefan $ */
|
2
|
+
// Copyright (C) 2005, 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 CoinModelUseful_H
|
7
|
+
#define CoinModelUseful_H
|
8
|
+
|
9
|
+
|
10
|
+
#include <cstdlib>
|
11
|
+
#include <cmath>
|
12
|
+
#include <cassert>
|
13
|
+
#include <cfloat>
|
14
|
+
#include <cstring>
|
15
|
+
#include <cstdio>
|
16
|
+
#include <iostream>
|
17
|
+
|
18
|
+
|
19
|
+
#include "CoinPragma.hpp"
|
20
|
+
|
21
|
+
/**
|
22
|
+
This is for various structures/classes needed by CoinModel.
|
23
|
+
|
24
|
+
CoinModelLink
|
25
|
+
CoinModelLinkedList
|
26
|
+
CoinModelHash
|
27
|
+
*/
|
28
|
+
/// for going through row or column
|
29
|
+
|
30
|
+
class CoinModelLink {
|
31
|
+
|
32
|
+
public:
|
33
|
+
/**@name Constructors, destructor */
|
34
|
+
//@{
|
35
|
+
/** Default constructor. */
|
36
|
+
CoinModelLink();
|
37
|
+
/** Destructor */
|
38
|
+
~CoinModelLink();
|
39
|
+
//@}
|
40
|
+
|
41
|
+
/**@name Copy method */
|
42
|
+
//@{
|
43
|
+
/** The copy constructor. */
|
44
|
+
CoinModelLink(const CoinModelLink&);
|
45
|
+
/// =
|
46
|
+
CoinModelLink& operator=(const CoinModelLink&);
|
47
|
+
//@}
|
48
|
+
|
49
|
+
/**@name Sets and gets method */
|
50
|
+
//@{
|
51
|
+
/// Get row
|
52
|
+
inline int row() const
|
53
|
+
{ return row_;}
|
54
|
+
/// Get column
|
55
|
+
inline int column() const
|
56
|
+
{ return column_;}
|
57
|
+
/// Get value
|
58
|
+
inline double value() const
|
59
|
+
{ return value_;}
|
60
|
+
/// Get value
|
61
|
+
inline double element() const
|
62
|
+
{ return value_;}
|
63
|
+
/// Get position
|
64
|
+
inline int position() const
|
65
|
+
{ return position_;}
|
66
|
+
/// Get onRow
|
67
|
+
inline bool onRow() const
|
68
|
+
{ return onRow_;}
|
69
|
+
/// Set row
|
70
|
+
inline void setRow(int row)
|
71
|
+
{ row_=row;}
|
72
|
+
/// Set column
|
73
|
+
inline void setColumn(int column)
|
74
|
+
{ column_=column;}
|
75
|
+
/// Set value
|
76
|
+
inline void setValue(double value)
|
77
|
+
{ value_=value;}
|
78
|
+
/// Set value
|
79
|
+
inline void setElement(double value)
|
80
|
+
{ value_=value;}
|
81
|
+
/// Set position
|
82
|
+
inline void setPosition(int position)
|
83
|
+
{ position_=position;}
|
84
|
+
/// Set onRow
|
85
|
+
inline void setOnRow(bool onRow)
|
86
|
+
{ onRow_=onRow;}
|
87
|
+
//@}
|
88
|
+
|
89
|
+
private:
|
90
|
+
/**@name Data members */
|
91
|
+
//@{
|
92
|
+
/// Row
|
93
|
+
int row_;
|
94
|
+
/// Column
|
95
|
+
int column_;
|
96
|
+
/// Value as double
|
97
|
+
double value_;
|
98
|
+
/// Position in data
|
99
|
+
int position_;
|
100
|
+
/// If on row chain
|
101
|
+
bool onRow_;
|
102
|
+
//@}
|
103
|
+
};
|
104
|
+
|
105
|
+
/// for linked lists
|
106
|
+
// for specifying triple
|
107
|
+
typedef struct {
|
108
|
+
// top bit is nonzero if string
|
109
|
+
// rest is row
|
110
|
+
unsigned int row;
|
111
|
+
//CoinModelRowIndex row;
|
112
|
+
int column;
|
113
|
+
double value; // If string then index into strings
|
114
|
+
} CoinModelTriple;
|
115
|
+
inline int rowInTriple(const CoinModelTriple & triple)
|
116
|
+
{ return triple.row&0x7fffffff;}
|
117
|
+
inline void setRowInTriple(CoinModelTriple & triple,int iRow)
|
118
|
+
{ triple.row = iRow|(triple.row&0x80000000);}
|
119
|
+
inline bool stringInTriple(const CoinModelTriple & triple)
|
120
|
+
{ return (triple.row&0x80000000)!=0;}
|
121
|
+
inline void setStringInTriple(CoinModelTriple & triple,bool string)
|
122
|
+
{ triple.row = (string ? 0x80000000 : 0)|(triple.row&0x7fffffff);}
|
123
|
+
inline void setRowAndStringInTriple(CoinModelTriple & triple,
|
124
|
+
int iRow,bool string)
|
125
|
+
{ triple.row = (string ? 0x80000000 : 0)|iRow;}
|
126
|
+
/// for names and hashing
|
127
|
+
// for hashing
|
128
|
+
typedef struct {
|
129
|
+
int index, next;
|
130
|
+
} CoinModelHashLink;
|
131
|
+
|
132
|
+
/* Function type. */
|
133
|
+
typedef double (*func_t) (double);
|
134
|
+
|
135
|
+
/// For string evaluation
|
136
|
+
/* Data type for links in the chain of symbols. */
|
137
|
+
struct symrec
|
138
|
+
{
|
139
|
+
char *name; /* name of symbol */
|
140
|
+
int type; /* type of symbol: either VAR or FNCT */
|
141
|
+
union
|
142
|
+
{
|
143
|
+
double var; /* value of a VAR */
|
144
|
+
func_t fnctptr; /* value of a FNCT */
|
145
|
+
} value;
|
146
|
+
struct symrec *next; /* link field */
|
147
|
+
};
|
148
|
+
|
149
|
+
typedef struct symrec symrec;
|
150
|
+
|
151
|
+
class CoinYacc {
|
152
|
+
private:
|
153
|
+
CoinYacc(const CoinYacc& rhs);
|
154
|
+
CoinYacc& operator=(const CoinYacc& rhs);
|
155
|
+
|
156
|
+
public:
|
157
|
+
CoinYacc() : symtable(NULL), symbuf(NULL), length(0), unsetValue(0) {}
|
158
|
+
~CoinYacc()
|
159
|
+
{
|
160
|
+
if (length) {
|
161
|
+
free(symbuf);
|
162
|
+
symbuf = NULL;
|
163
|
+
}
|
164
|
+
symrec* s = symtable;
|
165
|
+
while (s) {
|
166
|
+
free(s->name);
|
167
|
+
symtable = s;
|
168
|
+
s = s->next;
|
169
|
+
free(symtable);
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
public:
|
174
|
+
symrec * symtable;
|
175
|
+
char * symbuf;
|
176
|
+
int length;
|
177
|
+
double unsetValue;
|
178
|
+
};
|
179
|
+
|
180
|
+
class CoinModelHash {
|
181
|
+
|
182
|
+
public:
|
183
|
+
/**@name Constructors, destructor */
|
184
|
+
//@{
|
185
|
+
/** Default constructor. */
|
186
|
+
CoinModelHash();
|
187
|
+
/** Destructor */
|
188
|
+
~CoinModelHash();
|
189
|
+
//@}
|
190
|
+
|
191
|
+
/**@name Copy method */
|
192
|
+
//@{
|
193
|
+
/** The copy constructor. */
|
194
|
+
CoinModelHash(const CoinModelHash&);
|
195
|
+
/// =
|
196
|
+
CoinModelHash& operator=(const CoinModelHash&);
|
197
|
+
//@}
|
198
|
+
|
199
|
+
/**@name sizing (just increases) */
|
200
|
+
//@{
|
201
|
+
/// Resize hash (also re-hashs)
|
202
|
+
void resize(int maxItems,bool forceReHash=false);
|
203
|
+
/// Number of items i.e. rows if just row names
|
204
|
+
inline int numberItems() const
|
205
|
+
{ return numberItems_;}
|
206
|
+
/// Set number of items
|
207
|
+
void setNumberItems(int number);
|
208
|
+
/// Maximum number of items
|
209
|
+
inline int maximumItems() const
|
210
|
+
{ return maximumItems_;}
|
211
|
+
/// Names
|
212
|
+
inline const char *const * names() const
|
213
|
+
{ return names_;}
|
214
|
+
//@}
|
215
|
+
|
216
|
+
/**@name hashing */
|
217
|
+
//@{
|
218
|
+
/// Returns index or -1
|
219
|
+
int hash(const char * name) const;
|
220
|
+
/// Adds to hash
|
221
|
+
void addHash(int index, const char * name);
|
222
|
+
/// Deletes from hash
|
223
|
+
void deleteHash(int index);
|
224
|
+
/// Returns name at position (or NULL)
|
225
|
+
const char * name(int which) const;
|
226
|
+
/// Returns non const name at position (or NULL)
|
227
|
+
char * getName(int which) const;
|
228
|
+
/// Sets name at position (does not create)
|
229
|
+
void setName(int which,char * name ) ;
|
230
|
+
/// Validates
|
231
|
+
void validateHash() const;
|
232
|
+
private:
|
233
|
+
/// Returns a hash value
|
234
|
+
int hashValue(const char * name) const;
|
235
|
+
public:
|
236
|
+
//@}
|
237
|
+
private:
|
238
|
+
/**@name Data members */
|
239
|
+
//@{
|
240
|
+
/// Names
|
241
|
+
char ** names_;
|
242
|
+
/// hash
|
243
|
+
CoinModelHashLink * hash_;
|
244
|
+
/// Number of items
|
245
|
+
int numberItems_;
|
246
|
+
/// Maximum number of items
|
247
|
+
int maximumItems_;
|
248
|
+
/// Last slot looked at
|
249
|
+
int lastSlot_;
|
250
|
+
//@}
|
251
|
+
};
|
252
|
+
/// For int,int hashing
|
253
|
+
class CoinModelHash2 {
|
254
|
+
|
255
|
+
public:
|
256
|
+
/**@name Constructors, destructor */
|
257
|
+
//@{
|
258
|
+
/** Default constructor. */
|
259
|
+
CoinModelHash2();
|
260
|
+
/** Destructor */
|
261
|
+
~CoinModelHash2();
|
262
|
+
//@}
|
263
|
+
|
264
|
+
/**@name Copy method */
|
265
|
+
//@{
|
266
|
+
/** The copy constructor. */
|
267
|
+
CoinModelHash2(const CoinModelHash2&);
|
268
|
+
/// =
|
269
|
+
CoinModelHash2& operator=(const CoinModelHash2&);
|
270
|
+
//@}
|
271
|
+
|
272
|
+
/**@name sizing (just increases) */
|
273
|
+
//@{
|
274
|
+
/// Resize hash (also re-hashs)
|
275
|
+
void resize(int maxItems, const CoinModelTriple * triples,bool forceReHash=false);
|
276
|
+
/// Number of items
|
277
|
+
inline int numberItems() const
|
278
|
+
{ return numberItems_;}
|
279
|
+
/// Set number of items
|
280
|
+
void setNumberItems(int number);
|
281
|
+
/// Maximum number of items
|
282
|
+
inline int maximumItems() const
|
283
|
+
{ return maximumItems_;}
|
284
|
+
//@}
|
285
|
+
|
286
|
+
/**@name hashing */
|
287
|
+
//@{
|
288
|
+
/// Returns index or -1
|
289
|
+
int hash(int row, int column, const CoinModelTriple * triples) const;
|
290
|
+
/// Adds to hash
|
291
|
+
void addHash(int index, int row, int column, const CoinModelTriple * triples);
|
292
|
+
/// Deletes from hash
|
293
|
+
void deleteHash(int index, int row, int column);
|
294
|
+
private:
|
295
|
+
/// Returns a hash value
|
296
|
+
int hashValue(int row, int column) const;
|
297
|
+
public:
|
298
|
+
//@}
|
299
|
+
private:
|
300
|
+
/**@name Data members */
|
301
|
+
//@{
|
302
|
+
/// hash
|
303
|
+
CoinModelHashLink * hash_;
|
304
|
+
/// Number of items
|
305
|
+
int numberItems_;
|
306
|
+
/// Maximum number of items
|
307
|
+
int maximumItems_;
|
308
|
+
/// Last slot looked at
|
309
|
+
int lastSlot_;
|
310
|
+
//@}
|
311
|
+
};
|
312
|
+
class CoinModelLinkedList {
|
313
|
+
|
314
|
+
public:
|
315
|
+
/**@name Constructors, destructor */
|
316
|
+
//@{
|
317
|
+
/** Default constructor. */
|
318
|
+
CoinModelLinkedList();
|
319
|
+
/** Destructor */
|
320
|
+
~CoinModelLinkedList();
|
321
|
+
//@}
|
322
|
+
|
323
|
+
/**@name Copy method */
|
324
|
+
//@{
|
325
|
+
/** The copy constructor. */
|
326
|
+
CoinModelLinkedList(const CoinModelLinkedList&);
|
327
|
+
/// =
|
328
|
+
CoinModelLinkedList& operator=(const CoinModelLinkedList&);
|
329
|
+
//@}
|
330
|
+
|
331
|
+
/**@name sizing (just increases) */
|
332
|
+
//@{
|
333
|
+
/** Resize list - for row list maxMajor is maximum rows.
|
334
|
+
*/
|
335
|
+
void resize(int maxMajor,int maxElements);
|
336
|
+
/** Create list - for row list maxMajor is maximum rows.
|
337
|
+
type 0 row list, 1 column list
|
338
|
+
*/
|
339
|
+
void create(int maxMajor,int maxElements,
|
340
|
+
int numberMajor, int numberMinor,
|
341
|
+
int type,
|
342
|
+
int numberElements, const CoinModelTriple * triples);
|
343
|
+
/// Number of major items i.e. rows if just row links
|
344
|
+
inline int numberMajor() const
|
345
|
+
{ return numberMajor_;}
|
346
|
+
/// Maximum number of major items i.e. rows if just row links
|
347
|
+
inline int maximumMajor() const
|
348
|
+
{ return maximumMajor_;}
|
349
|
+
/// Number of elements
|
350
|
+
inline int numberElements() const
|
351
|
+
{ return numberElements_;}
|
352
|
+
/// Maximum number of elements
|
353
|
+
inline int maximumElements() const
|
354
|
+
{ return maximumElements_;}
|
355
|
+
/// First on free chain
|
356
|
+
inline int firstFree() const
|
357
|
+
{ return first_[maximumMajor_];}
|
358
|
+
/// Last on free chain
|
359
|
+
inline int lastFree() const
|
360
|
+
{ return last_[maximumMajor_];}
|
361
|
+
/// First on chain
|
362
|
+
inline int first(int which) const
|
363
|
+
{ return first_[which];}
|
364
|
+
/// Last on chain
|
365
|
+
inline int last(int which) const
|
366
|
+
{ return last_[which];}
|
367
|
+
/// Next array
|
368
|
+
inline const int * next() const
|
369
|
+
{ return next_;}
|
370
|
+
/// Previous array
|
371
|
+
inline const int * previous() const
|
372
|
+
{ return previous_;}
|
373
|
+
//@}
|
374
|
+
|
375
|
+
/**@name does work */
|
376
|
+
//@{
|
377
|
+
/** Adds to list - easy case i.e. add row to row list
|
378
|
+
Returns where chain starts
|
379
|
+
*/
|
380
|
+
int addEasy(int majorIndex, int numberOfElements, const int * indices,
|
381
|
+
const double * elements, CoinModelTriple * triples,
|
382
|
+
CoinModelHash2 & hash);
|
383
|
+
/** Adds to list - hard case i.e. add row to column list
|
384
|
+
*/
|
385
|
+
void addHard(int minorIndex, int numberOfElements, const int * indices,
|
386
|
+
const double * elements, CoinModelTriple * triples,
|
387
|
+
CoinModelHash2 & hash);
|
388
|
+
/** Adds to list - hard case i.e. add row to column list
|
389
|
+
This is when elements have been added to other copy
|
390
|
+
*/
|
391
|
+
void addHard(int first, const CoinModelTriple * triples,
|
392
|
+
int firstFree, int lastFree,const int * nextOther);
|
393
|
+
/** Deletes from list - same case i.e. delete row from row list
|
394
|
+
*/
|
395
|
+
void deleteSame(int which, CoinModelTriple * triples,
|
396
|
+
CoinModelHash2 & hash, bool zapTriples);
|
397
|
+
/** Deletes from list - other case i.e. delete row from column list
|
398
|
+
This is when elements have been deleted from other copy
|
399
|
+
*/
|
400
|
+
void updateDeleted(int which, CoinModelTriple * triples,
|
401
|
+
CoinModelLinkedList & otherList);
|
402
|
+
/** Deletes one element from Row list
|
403
|
+
*/
|
404
|
+
void deleteRowOne(int position, CoinModelTriple * triples,
|
405
|
+
CoinModelHash2 & hash);
|
406
|
+
/** Update column list for one element when
|
407
|
+
one element deleted from row copy
|
408
|
+
*/
|
409
|
+
void updateDeletedOne(int position, const CoinModelTriple * triples);
|
410
|
+
/// Fills first,last with -1
|
411
|
+
void fill(int first,int last);
|
412
|
+
/** Puts in free list from other list */
|
413
|
+
void synchronize(CoinModelLinkedList & other);
|
414
|
+
/// Checks that links are consistent
|
415
|
+
void validateLinks(const CoinModelTriple * triples) const;
|
416
|
+
//@}
|
417
|
+
private:
|
418
|
+
/**@name Data members */
|
419
|
+
//@{
|
420
|
+
/// Previous - maximumElements long
|
421
|
+
int * previous_;
|
422
|
+
/// Next - maximumElements long
|
423
|
+
int * next_;
|
424
|
+
/// First - maximumMajor+1 long (last free element chain)
|
425
|
+
int * first_;
|
426
|
+
/// Last - maximumMajor+1 long (last free element chain)
|
427
|
+
int * last_;
|
428
|
+
/// Number of major items i.e. rows if just row links
|
429
|
+
int numberMajor_;
|
430
|
+
/// Maximum number of major items i.e. rows if just row links
|
431
|
+
int maximumMajor_;
|
432
|
+
/// Number of elements
|
433
|
+
int numberElements_;
|
434
|
+
/// Maximum number of elements
|
435
|
+
int maximumElements_;
|
436
|
+
/// 0 row list, 1 column list
|
437
|
+
int type_;
|
438
|
+
//@}
|
439
|
+
};
|
440
|
+
|
441
|
+
#endif
|