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,176 @@
|
|
1
|
+
/* $Id: CoinAlloc.hpp 1438 2011-06-09 18:14:12Z stefan $ */
|
2
|
+
// Copyright (C) 2007, 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 CoinAlloc_hpp
|
7
|
+
#define CoinAlloc_hpp
|
8
|
+
|
9
|
+
#include "CoinUtilsConfig.h"
|
10
|
+
#include <cstdlib>
|
11
|
+
|
12
|
+
#if !defined(COINUTILS_MEMPOOL_MAXPOOLED)
|
13
|
+
# define COINUTILS_MEMPOOL_MAXPOOLED -1
|
14
|
+
#endif
|
15
|
+
|
16
|
+
#if (COINUTILS_MEMPOOL_MAXPOOLED >= 0)
|
17
|
+
|
18
|
+
#ifndef COINUTILS_MEMPOOL_ALIGNMENT
|
19
|
+
#define COINUTILS_MEMPOOL_ALIGNMENT 16
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/* Note:
|
23
|
+
This memory pool implementation assumes that sizeof(size_t) and
|
24
|
+
sizeof(void*) are both <= COINUTILS_MEMPOOL_ALIGNMENT.
|
25
|
+
Choosing an alignment of 4 will cause segfault on 64-bit platforms and may
|
26
|
+
lead to bad performance on 32-bit platforms. So 8 is a mnimum recommended
|
27
|
+
alignment. Probably 16 does not waste too much space either and may be even
|
28
|
+
better for performance. One must play with it.
|
29
|
+
*/
|
30
|
+
|
31
|
+
//#############################################################################
|
32
|
+
|
33
|
+
#if (COINUTILS_MEMPOOL_ALIGNMENT == 16)
|
34
|
+
static const std::size_t CoinAllocPtrShift = 4;
|
35
|
+
static const std::size_t CoinAllocRoundMask = ~((std::size_t)15);
|
36
|
+
#elif (COINUTILS_MEMPOOL_ALIGNMENT == 8)
|
37
|
+
static const std::size_t CoinAllocPtrShift = 3;
|
38
|
+
static const std::size_t CoinAllocRoundMask = ~((std::size_t)7);
|
39
|
+
#else
|
40
|
+
#error "COINUTILS_MEMPOOL_ALIGNMENT must be defined as 8 or 16 (or this code needs to be changed :-)"
|
41
|
+
#endif
|
42
|
+
|
43
|
+
//#############################################################################
|
44
|
+
|
45
|
+
#ifndef COIN_MEMPOOL_SAVE_BLOCKHEADS
|
46
|
+
# define COIN_MEMPOOL_SAVE_BLOCKHEADS 0
|
47
|
+
#endif
|
48
|
+
|
49
|
+
//#############################################################################
|
50
|
+
|
51
|
+
class CoinMempool
|
52
|
+
{
|
53
|
+
private:
|
54
|
+
#if (COIN_MEMPOOL_SAVE_BLOCKHEADS == 1)
|
55
|
+
char** block_heads;
|
56
|
+
std::size_t block_num;
|
57
|
+
std::size_t max_block_num;
|
58
|
+
#endif
|
59
|
+
#if defined(COINUTILS_PTHREADS) && (COINUTILS_PTHREAD == 1)
|
60
|
+
pthread_mutex_t mutex_;
|
61
|
+
#endif
|
62
|
+
int last_block_size_;
|
63
|
+
char* first_free_;
|
64
|
+
const std::size_t entry_size_;
|
65
|
+
|
66
|
+
private:
|
67
|
+
CoinMempool(const CoinMempool&);
|
68
|
+
CoinMempool& operator=(const CoinMempool&);
|
69
|
+
|
70
|
+
private:
|
71
|
+
char* allocate_new_block();
|
72
|
+
inline void lock_mutex() {
|
73
|
+
#if defined(COINUTILS_PTHREADS) && (COINUTILS_PTHREAD == 1)
|
74
|
+
pthread_mutex_lock(&mutex_);
|
75
|
+
#endif
|
76
|
+
}
|
77
|
+
inline void unlock_mutex() {
|
78
|
+
#if defined(COINUTILS_PTHREADS) && (COINUTILS_PTHREAD == 1)
|
79
|
+
pthread_mutex_unlock(&mutex_);
|
80
|
+
#endif
|
81
|
+
}
|
82
|
+
|
83
|
+
public:
|
84
|
+
CoinMempool(std::size_t size = 0);
|
85
|
+
~CoinMempool();
|
86
|
+
|
87
|
+
char* alloc();
|
88
|
+
inline void dealloc(char *p)
|
89
|
+
{
|
90
|
+
char** pp = (char**)p;
|
91
|
+
lock_mutex();
|
92
|
+
*pp = first_free_;
|
93
|
+
first_free_ = p;
|
94
|
+
unlock_mutex();
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
98
|
+
//#############################################################################
|
99
|
+
|
100
|
+
/** A memory pool allocator.
|
101
|
+
|
102
|
+
If a request arrives for allocating \c n bytes then it is first
|
103
|
+
rounded up to the nearest multiple of \c sizeof(void*) (this is \c
|
104
|
+
n_roundup), then one more \c sizeof(void*) is added to this
|
105
|
+
number. If the result is no more than maxpooled_ then
|
106
|
+
the appropriate pool is used to get a chunk of memory, if not,
|
107
|
+
then malloc is used. In either case, the size of the allocated
|
108
|
+
chunk is written into the first \c sizeof(void*) bytes and a
|
109
|
+
pointer pointing afterwards is returned.
|
110
|
+
*/
|
111
|
+
|
112
|
+
class CoinAlloc
|
113
|
+
{
|
114
|
+
private:
|
115
|
+
CoinMempool* pool_;
|
116
|
+
int maxpooled_;
|
117
|
+
public:
|
118
|
+
CoinAlloc();
|
119
|
+
~CoinAlloc() {}
|
120
|
+
|
121
|
+
inline void* alloc(const std::size_t n)
|
122
|
+
{
|
123
|
+
if (maxpooled_ <= 0) {
|
124
|
+
return std::malloc(n);
|
125
|
+
}
|
126
|
+
char *p = NULL;
|
127
|
+
const std::size_t to_alloc =
|
128
|
+
((n+COINUTILS_MEMPOOL_ALIGNMENT-1) & CoinAllocRoundMask) +
|
129
|
+
COINUTILS_MEMPOOL_ALIGNMENT;
|
130
|
+
CoinMempool* pool = NULL;
|
131
|
+
if (maxpooled_ > 0 && to_alloc >= (size_t)maxpooled_) {
|
132
|
+
p = static_cast<char*>(std::malloc(to_alloc));
|
133
|
+
if (p == NULL) throw std::bad_alloc();
|
134
|
+
} else {
|
135
|
+
pool = pool_ + (to_alloc >> CoinAllocPtrShift);
|
136
|
+
p = pool->alloc();
|
137
|
+
}
|
138
|
+
*((CoinMempool**)p) = pool;
|
139
|
+
return static_cast<void*>(p+COINUTILS_MEMPOOL_ALIGNMENT);
|
140
|
+
}
|
141
|
+
|
142
|
+
inline void dealloc(void* p)
|
143
|
+
{
|
144
|
+
if (maxpooled_ <= 0) {
|
145
|
+
std::free(p);
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
if (p) {
|
149
|
+
char* base = static_cast<char*>(p)-COINUTILS_MEMPOOL_ALIGNMENT;
|
150
|
+
CoinMempool* pool = *((CoinMempool**)base);
|
151
|
+
if (!pool) {
|
152
|
+
std::free(base);
|
153
|
+
} else {
|
154
|
+
pool->dealloc(base);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
};
|
159
|
+
|
160
|
+
extern CoinAlloc CoinAllocator;
|
161
|
+
|
162
|
+
//#############################################################################
|
163
|
+
|
164
|
+
#if defined(COINUTILS_MEMPOOL_OVERRIDE_NEW) && (COINUTILS_MEMPOOL_OVERRIDE_NEW == 1)
|
165
|
+
void* operator new(std::size_t size) throw (std::bad_alloc);
|
166
|
+
void* operator new[](std::size_t) throw (std::bad_alloc);
|
167
|
+
void operator delete(void*) throw();
|
168
|
+
void operator delete[](void*) throw();
|
169
|
+
void* operator new(std::size_t, const std::nothrow_t&) throw();
|
170
|
+
void* operator new[](std::size_t, const std::nothrow_t&) throw();
|
171
|
+
void operator delete(void*, const std::nothrow_t&) throw();
|
172
|
+
void operator delete[](void*, const std::nothrow_t&) throw();
|
173
|
+
#endif
|
174
|
+
|
175
|
+
#endif /*(COINUTILS_MEMPOOL_MAXPOOLED >= 0)*/
|
176
|
+
#endif
|
@@ -0,0 +1,149 @@
|
|
1
|
+
/* $Id: CoinBuild.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 CoinBuild_H
|
7
|
+
#define CoinBuild_H
|
8
|
+
|
9
|
+
|
10
|
+
#include "CoinPragma.hpp"
|
11
|
+
#include "CoinTypes.hpp"
|
12
|
+
#include "CoinFinite.hpp"
|
13
|
+
|
14
|
+
|
15
|
+
/**
|
16
|
+
In many cases it is natural to build a model by adding one row at a time. In Coin this
|
17
|
+
is inefficient so this class gives some help. An instance of CoinBuild can be built up
|
18
|
+
more efficiently and then added to the Clp/OsiModel in one go.
|
19
|
+
|
20
|
+
It may be more efficient to have fewer arrays and re-allocate them but this should
|
21
|
+
give a large gain over addRow.
|
22
|
+
|
23
|
+
I have now extended it to columns.
|
24
|
+
|
25
|
+
*/
|
26
|
+
|
27
|
+
class CoinBuild {
|
28
|
+
|
29
|
+
public:
|
30
|
+
/**@name Useful methods */
|
31
|
+
//@{
|
32
|
+
/// add a row
|
33
|
+
void addRow(int numberInRow, const int * columns,
|
34
|
+
const double * elements, double rowLower=-COIN_DBL_MAX,
|
35
|
+
double rowUpper=COIN_DBL_MAX);
|
36
|
+
/// add a column
|
37
|
+
void addColumn(int numberInColumn, const int * rows,
|
38
|
+
const double * elements,
|
39
|
+
double columnLower=0.0,
|
40
|
+
double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0);
|
41
|
+
/// add a column
|
42
|
+
inline void addCol(int numberInColumn, const int * rows,
|
43
|
+
const double * elements,
|
44
|
+
double columnLower=0.0,
|
45
|
+
double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0)
|
46
|
+
{ addColumn(numberInColumn, rows, elements, columnLower, columnUpper, objectiveValue);}
|
47
|
+
/// Return number of rows or maximum found so far
|
48
|
+
inline int numberRows() const
|
49
|
+
{ return (type_==0) ? numberItems_ : numberOther_;}
|
50
|
+
/// Return number of columns or maximum found so far
|
51
|
+
inline int numberColumns() const
|
52
|
+
{ return (type_==1) ? numberItems_ : numberOther_;}
|
53
|
+
/// Return number of elements
|
54
|
+
inline CoinBigIndex numberElements() const
|
55
|
+
{ return numberElements_;}
|
56
|
+
/** Returns number of elements in a row and information in row
|
57
|
+
*/
|
58
|
+
int row(int whichRow, double & rowLower, double & rowUpper,
|
59
|
+
const int * & indices, const double * & elements) const;
|
60
|
+
/** Returns number of elements in current row and information in row
|
61
|
+
Used as rows may be stored in a chain
|
62
|
+
*/
|
63
|
+
int currentRow(double & rowLower, double & rowUpper,
|
64
|
+
const int * & indices, const double * & elements) const;
|
65
|
+
/// Set current row
|
66
|
+
void setCurrentRow(int whichRow);
|
67
|
+
/// Returns current row number
|
68
|
+
int currentRow() const;
|
69
|
+
/** Returns number of elements in a column and information in column
|
70
|
+
*/
|
71
|
+
int column(int whichColumn,
|
72
|
+
double & columnLower, double & columnUpper,double & objectiveValue,
|
73
|
+
const int * & indices, const double * & elements) const;
|
74
|
+
/** Returns number of elements in current column and information in column
|
75
|
+
Used as columns may be stored in a chain
|
76
|
+
*/
|
77
|
+
int currentColumn( double & columnLower, double & columnUpper,double & objectiveValue,
|
78
|
+
const int * & indices, const double * & elements) const;
|
79
|
+
/// Set current column
|
80
|
+
void setCurrentColumn(int whichColumn);
|
81
|
+
/// Returns current column number
|
82
|
+
int currentColumn() const;
|
83
|
+
/// Returns type
|
84
|
+
inline int type() const
|
85
|
+
{ return type_;}
|
86
|
+
//@}
|
87
|
+
|
88
|
+
|
89
|
+
/**@name Constructors, destructor */
|
90
|
+
//@{
|
91
|
+
/** Default constructor. */
|
92
|
+
CoinBuild();
|
93
|
+
/** Constructor with type 0==for addRow, 1== for addColumn. */
|
94
|
+
CoinBuild(int type);
|
95
|
+
/** Destructor */
|
96
|
+
~CoinBuild();
|
97
|
+
//@}
|
98
|
+
|
99
|
+
/**@name Copy method */
|
100
|
+
//@{
|
101
|
+
/** The copy constructor. */
|
102
|
+
CoinBuild(const CoinBuild&);
|
103
|
+
/// =
|
104
|
+
CoinBuild& operator=(const CoinBuild&);
|
105
|
+
//@}
|
106
|
+
private:
|
107
|
+
/// Set current
|
108
|
+
void setMutableCurrent(int which) const;
|
109
|
+
/// add a item
|
110
|
+
void addItem(int numberInItem, const int * indices,
|
111
|
+
const double * elements,
|
112
|
+
double itemLower,
|
113
|
+
double itemUpper, double objectiveValue);
|
114
|
+
/** Returns number of elements in a item and information in item
|
115
|
+
*/
|
116
|
+
int item(int whichItem,
|
117
|
+
double & itemLower, double & itemUpper,double & objectiveValue,
|
118
|
+
const int * & indices, const double * & elements) const;
|
119
|
+
/** Returns number of elements in current item and information in item
|
120
|
+
Used as items may be stored in a chain
|
121
|
+
*/
|
122
|
+
int currentItem( double & itemLower, double & itemUpper,double & objectiveValue,
|
123
|
+
const int * & indices, const double * & elements) const;
|
124
|
+
/// Set current item
|
125
|
+
void setCurrentItem(int whichItem);
|
126
|
+
/// Returns current item number
|
127
|
+
int currentItem() const;
|
128
|
+
|
129
|
+
private:
|
130
|
+
/**@name Data members */
|
131
|
+
//@{
|
132
|
+
/// Current number of items
|
133
|
+
int numberItems_;
|
134
|
+
/// Current number of other dimension i.e. Columns if addRow (i.e. max)
|
135
|
+
int numberOther_;
|
136
|
+
/// Current number of elements
|
137
|
+
CoinBigIndex numberElements_;
|
138
|
+
/// Current item pointer
|
139
|
+
mutable double * currentItem_;
|
140
|
+
/// First item pointer
|
141
|
+
double * firstItem_;
|
142
|
+
/// Last item pointer
|
143
|
+
double * lastItem_;
|
144
|
+
/// Type of build - 0 for row, 1 for column, -1 unset
|
145
|
+
int type_;
|
146
|
+
//@}
|
147
|
+
};
|
148
|
+
|
149
|
+
#endif
|