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.
Files changed (303) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/README.md +203 -0
  7. data/Rakefile +40 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +7 -0
  10. data/ext/ruby-cbc/cbc.i +15 -0
  11. data/ext/ruby-cbc/cbc_wrap.c +4618 -0
  12. data/ext/ruby-cbc/extconf.rb +60 -0
  13. data/ext/ruby-cbc/install/bin/cbc +0 -0
  14. data/ext/ruby-cbc/install/bin/clp +0 -0
  15. data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +24 -0
  16. data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +62 -0
  17. data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +78 -0
  18. data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +183 -0
  19. data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +129 -0
  20. data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +100 -0
  21. data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +206 -0
  22. data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +242 -0
  23. data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +94 -0
  24. data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +236 -0
  25. data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +303 -0
  26. data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +39 -0
  27. data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +14 -0
  28. data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +142 -0
  29. data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +120 -0
  30. data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +47 -0
  31. data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +48 -0
  32. data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +49 -0
  33. data/ext/ruby-cbc/install/include/coin/CbcConfig.h +14 -0
  34. data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +49 -0
  35. data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +168 -0
  36. data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +482 -0
  37. data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +57 -0
  38. data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +66 -0
  39. data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +83 -0
  40. data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +245 -0
  41. data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +137 -0
  42. data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +169 -0
  43. data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +56 -0
  44. data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +67 -0
  45. data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +207 -0
  46. data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +161 -0
  47. data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +60 -0
  48. data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +279 -0
  49. data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +682 -0
  50. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +96 -0
  51. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +309 -0
  52. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +192 -0
  53. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
  54. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
  55. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
  56. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
  57. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
  58. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
  59. data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +340 -0
  60. data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +280 -0
  61. data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +271 -0
  62. data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
  63. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +77 -0
  64. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +102 -0
  65. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +58 -0
  66. data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +94 -0
  67. data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +1406 -0
  68. data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +94 -0
  69. data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +26 -0
  70. data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +2952 -0
  71. data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +166 -0
  72. data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +351 -0
  73. data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +349 -0
  74. data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +272 -0
  75. data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +64 -0
  76. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +4134 -0
  77. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +532 -0
  78. data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +324 -0
  79. data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +110 -0
  80. data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +279 -0
  81. data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +286 -0
  82. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +564 -0
  83. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +114 -0
  84. data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +447 -0
  85. data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +258 -0
  86. data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +83 -0
  87. data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +490 -0
  88. data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +372 -0
  89. data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +381 -0
  90. data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +464 -0
  91. data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +115 -0
  92. data/ext/ruby-cbc/install/include/coin/CglClique.hpp +308 -0
  93. data/ext/ruby-cbc/install/include/coin/CglConfig.h +19 -0
  94. data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +121 -0
  95. data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +189 -0
  96. data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +371 -0
  97. data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +364 -0
  98. data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +313 -0
  99. data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +204 -0
  100. data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +310 -0
  101. data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +306 -0
  102. data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +130 -0
  103. data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +104 -0
  104. data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +50 -0
  105. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +429 -0
  106. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +427 -0
  107. data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +160 -0
  108. data/ext/ruby-cbc/install/include/coin/CglParam.hpp +93 -0
  109. data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +492 -0
  110. data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +543 -0
  111. data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +448 -0
  112. data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +494 -0
  113. data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +495 -0
  114. data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +272 -0
  115. data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +240 -0
  116. data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +174 -0
  117. data/ext/ruby-cbc/install/include/coin/CglStored.hpp +125 -0
  118. data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +180 -0
  119. data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +565 -0
  120. data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +133 -0
  121. data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +113 -0
  122. data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +294 -0
  123. data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +162 -0
  124. data/ext/ruby-cbc/install/include/coin/ClpConfig.h +17 -0
  125. data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +125 -0
  126. data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +108 -0
  127. data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +110 -0
  128. data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +119 -0
  129. data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +71 -0
  130. data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +129 -0
  131. data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +153 -0
  132. data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +183 -0
  133. data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +186 -0
  134. data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +381 -0
  135. data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +187 -0
  136. data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +432 -0
  137. data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +247 -0
  138. data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +358 -0
  139. data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +570 -0
  140. data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +103 -0
  141. data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +524 -0
  142. data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +131 -0
  143. data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +1307 -0
  144. data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +229 -0
  145. data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +349 -0
  146. data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +401 -0
  147. data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +134 -0
  148. data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +638 -0
  149. data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +126 -0
  150. data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +103 -0
  151. data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +290 -0
  152. data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +299 -0
  153. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +72 -0
  154. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +155 -0
  155. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +247 -0
  156. data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +155 -0
  157. data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +1797 -0
  158. data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +300 -0
  159. data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +117 -0
  160. data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +277 -0
  161. data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +244 -0
  162. data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +446 -0
  163. data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +525 -0
  164. data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +176 -0
  165. data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +149 -0
  166. data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +419 -0
  167. data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +383 -0
  168. data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +48 -0
  169. data/ext/ruby-cbc/install/include/coin/CoinError.hpp +257 -0
  170. data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +2044 -0
  171. data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +166 -0
  172. data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +34 -0
  173. data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +177 -0
  174. data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +1111 -0
  175. data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +1164 -0
  176. data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +805 -0
  177. data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +96 -0
  178. data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +666 -0
  179. data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +1054 -0
  180. data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +441 -0
  181. data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +1056 -0
  182. data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +280 -0
  183. data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +947 -0
  184. data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +657 -0
  185. data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +269 -0
  186. data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +644 -0
  187. data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +26 -0
  188. data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +73 -0
  189. data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +85 -0
  190. data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +226 -0
  191. data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +116 -0
  192. data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +181 -0
  193. data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +61 -0
  194. data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +60 -0
  195. data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +51 -0
  196. data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +1842 -0
  197. data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +105 -0
  198. data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +166 -0
  199. data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +112 -0
  200. data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +101 -0
  201. data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +55 -0
  202. data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +66 -0
  203. data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +63 -0
  204. data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +60 -0
  205. data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +44 -0
  206. data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +465 -0
  207. data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +148 -0
  208. data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +117 -0
  209. data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +431 -0
  210. data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +528 -0
  211. data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +476 -0
  212. data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +678 -0
  213. data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +247 -0
  214. data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +310 -0
  215. data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +64 -0
  216. data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +19 -0
  217. data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +34 -0
  218. data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +58 -0
  219. data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +456 -0
  220. data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +166 -0
  221. data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +211 -0
  222. data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +488 -0
  223. data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +115 -0
  224. data/ext/ruby-cbc/install/include/coin/Idiot.hpp +298 -0
  225. data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +206 -0
  226. data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +1005 -0
  227. data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +764 -0
  228. data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +534 -0
  229. data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +1509 -0
  230. data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +324 -0
  231. data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +35 -0
  232. data/ext/ruby-cbc/install/include/coin/OsiConfig.h +19 -0
  233. data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +245 -0
  234. data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +474 -0
  235. data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +252 -0
  236. data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +331 -0
  237. data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +187 -0
  238. data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +152 -0
  239. data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +2143 -0
  240. data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +142 -0
  241. data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +374 -0
  242. data/ext/ruby-cbc/install/lib/libCbc.la +35 -0
  243. data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
  244. data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
  245. data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
  246. data/ext/ruby-cbc/install/lib/libCbcSolver.la +35 -0
  247. data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
  248. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
  249. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
  250. data/ext/ruby-cbc/install/lib/libCgl.la +35 -0
  251. data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
  252. data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
  253. data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
  254. data/ext/ruby-cbc/install/lib/libClp.la +35 -0
  255. data/ext/ruby-cbc/install/lib/libClp.so +0 -0
  256. data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
  257. data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
  258. data/ext/ruby-cbc/install/lib/libClpSolver.la +35 -0
  259. data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
  260. data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
  261. data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
  262. data/ext/ruby-cbc/install/lib/libCoinUtils.la +35 -0
  263. data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
  264. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
  265. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
  266. data/ext/ruby-cbc/install/lib/libOsi.la +35 -0
  267. data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
  268. data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
  269. data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
  270. data/ext/ruby-cbc/install/lib/libOsiCbc.la +35 -0
  271. data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
  272. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
  273. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
  274. data/ext/ruby-cbc/install/lib/libOsiClp.la +35 -0
  275. data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
  276. data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
  277. data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
  278. data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +35 -0
  279. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
  280. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
  281. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
  282. data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +12 -0
  283. data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +12 -0
  284. data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +12 -0
  285. data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +9 -0
  286. data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +9 -0
  287. data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +12 -0
  288. data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +12 -0
  289. data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +12 -0
  290. data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +12 -0
  291. data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +12 -0
  292. data/lib/ruby-cbc/ilp/constant.rb +44 -0
  293. data/lib/ruby-cbc/ilp/constraint.rb +32 -0
  294. data/lib/ruby-cbc/ilp/objective.rb +26 -0
  295. data/lib/ruby-cbc/ilp/term.rb +47 -0
  296. data/lib/ruby-cbc/ilp/term_array.rb +80 -0
  297. data/lib/ruby-cbc/ilp/var.rb +62 -0
  298. data/lib/ruby-cbc/model.rb +125 -0
  299. data/lib/ruby-cbc/problem.rb +170 -0
  300. data/lib/ruby-cbc/version.rb +3 -0
  301. data/lib/ruby-cbc.rb +21 -0
  302. data/ruby-cbc.gemspec +36 -0
  303. metadata +431 -0
@@ -0,0 +1,207 @@
1
+ // $Id: CbcFollowOn.hpp 1899 2013-04-09 18:12:08Z stefan $
2
+ // Copyright (C) 2002, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ // Edwin 11/10/2009-- carved out of CbcBranchActual
7
+
8
+ #ifndef CbcFollowOn_H
9
+ #define CbcFollowOn_H
10
+
11
+ #include "CbcBranchBase.hpp"
12
+ #include "OsiRowCut.hpp"
13
+ #include "CoinHelperFunctions.hpp"
14
+ #include "CoinPackedMatrix.hpp"
15
+
16
+ /** Define a follow on class.
17
+ The idea of this is that in air-crew scheduling problems crew may fly in on flight A
18
+ and out on flight B or on some other flight. A useful branch is one which on one side
19
+ fixes all which go out on flight B to 0, while the other branch fixes all those that do NOT
20
+ go out on flight B to 0.
21
+
22
+ This branching rule should be in addition to normal rules and have a high priority.
23
+ */
24
+
25
+ class CbcFollowOn : public CbcObject {
26
+
27
+ public:
28
+
29
+ // Default Constructor
30
+ CbcFollowOn ();
31
+
32
+ /** Useful constructor
33
+ */
34
+ CbcFollowOn (CbcModel * model);
35
+
36
+ // Copy constructor
37
+ CbcFollowOn ( const CbcFollowOn &);
38
+
39
+ /// Clone
40
+ virtual CbcObject * clone() const;
41
+
42
+ // Assignment operator
43
+ CbcFollowOn & operator=( const CbcFollowOn& rhs);
44
+
45
+ // Destructor
46
+ ~CbcFollowOn ();
47
+
48
+ /// Infeasibility - large is 0.5
49
+ virtual double infeasibility(const OsiBranchingInformation * info,
50
+ int &preferredWay) const;
51
+
52
+ using CbcObject::feasibleRegion ;
53
+ /// This looks at solution and sets bounds to contain solution
54
+ virtual void feasibleRegion();
55
+
56
+ /// Creates a branching object
57
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
58
+ /// As some computation is needed in more than one place - returns row
59
+ virtual int gutsOfFollowOn(int & otherRow, int & preferredWay) const;
60
+
61
+ protected:
62
+ /// data
63
+ /// Matrix
64
+ CoinPackedMatrix matrix_;
65
+ /// Matrix by row
66
+ CoinPackedMatrix matrixByRow_;
67
+ /// Possible rhs (if 0 then not possible)
68
+ int * rhs_;
69
+ };
70
+
71
+ /** General Branching Object class.
72
+ Each way fixes some variables to lower bound
73
+ */
74
+ class CbcFixingBranchingObject : public CbcBranchingObject {
75
+
76
+ public:
77
+
78
+ // Default Constructor
79
+ CbcFixingBranchingObject ();
80
+
81
+ // Useful constructor
82
+ CbcFixingBranchingObject (CbcModel * model,
83
+ int way,
84
+ int numberOnDownSide, const int * down,
85
+ int numberOnUpSide, const int * up);
86
+
87
+ // Copy constructor
88
+ CbcFixingBranchingObject ( const CbcFixingBranchingObject &);
89
+
90
+ // Assignment operator
91
+ CbcFixingBranchingObject & operator=( const CbcFixingBranchingObject& rhs);
92
+
93
+ /// Clone
94
+ virtual CbcBranchingObject * clone() const;
95
+
96
+ // Destructor
97
+ virtual ~CbcFixingBranchingObject ();
98
+
99
+ using CbcBranchingObject::branch ;
100
+ /// Does next branch and updates state
101
+ virtual double branch();
102
+
103
+ #ifdef JJF_ZERO
104
+ // No need to override. Default works fine.
105
+ /** Reset every information so that the branching object appears to point to
106
+ the previous child. This method does not need to modify anything in any
107
+ solver. */
108
+ virtual void previousBranch();
109
+ #endif
110
+
111
+ using CbcBranchingObject::print ;
112
+ /** \brief Print something about branch - only if log level high
113
+ */
114
+ virtual void print();
115
+
116
+ /** Return the type (an integer identifier) of \c this */
117
+ virtual CbcBranchObjType type() const {
118
+ return FollowOnBranchObj;
119
+ }
120
+
121
+ /** Compare the original object of \c this with the original object of \c
122
+ brObj. Assumes that there is an ordering of the original objects.
123
+ This method should be invoked only if \c this and brObj are of the same
124
+ type.
125
+ Return negative/0/positive depending on whether \c this is
126
+ smaller/same/larger than the argument.
127
+ */
128
+ virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
129
+
130
+ /** Compare the \c this with \c brObj. \c this and \c brObj must be os the
131
+ same type and must have the same original object, but they may have
132
+ different feasible regions.
133
+ Return the appropriate CbcRangeCompare value (first argument being the
134
+ sub/superset if that's the case). In case of overlap (and if \c
135
+ replaceIfOverlap is true) replace the current branching object with one
136
+ whose feasible region is the overlap.
137
+ */
138
+ virtual CbcRangeCompare compareBranchingObject
139
+ (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
140
+
141
+ private:
142
+ /// data
143
+ /// Number on down list
144
+ int numberDown_;
145
+ /// Number on up list
146
+ int numberUp_;
147
+ /// downList - variables to fix to lb on down branch
148
+ int * downList_;
149
+ /// upList - variables to fix to lb on up branch
150
+ int * upList_;
151
+ };
152
+
153
+ /** Define an idiotic idea class.
154
+ The idea of this is that we take some integer variables away from integer and
155
+ sum them with some randomness to get signed sum close to 0.5. We then can
156
+ branch to exclude that gap.
157
+
158
+ This branching rule should be in addition to normal rules and have a high priority.
159
+ */
160
+
161
+ class CbcIdiotBranch : public CbcObject {
162
+
163
+ public:
164
+
165
+ // Default Constructor
166
+ CbcIdiotBranch ();
167
+
168
+ /** Useful constructor
169
+ */
170
+ CbcIdiotBranch (CbcModel * model);
171
+
172
+ // Copy constructor
173
+ CbcIdiotBranch ( const CbcIdiotBranch &);
174
+
175
+ /// Clone
176
+ virtual CbcObject * clone() const;
177
+
178
+ // Assignment operator
179
+ CbcIdiotBranch & operator=( const CbcIdiotBranch& rhs);
180
+
181
+ // Destructor
182
+ ~CbcIdiotBranch ();
183
+
184
+ /// Infeasibility - large is 0.5
185
+ virtual double infeasibility(const OsiBranchingInformation * info,
186
+ int &preferredWay) const;
187
+
188
+ using CbcObject::feasibleRegion ;
189
+ /// This looks at solution and sets bounds to contain solution
190
+ virtual void feasibleRegion();
191
+
192
+ /// Creates a branching object
193
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
194
+ /// Initialize for branching
195
+ virtual void initializeForBranching(CbcModel * );
196
+ protected:
197
+ /// Build "cut"
198
+ OsiRowCut buildCut(const OsiBranchingInformation * info,int type,int & preferredWay) const;
199
+ /// data
200
+ /// Thread specific random number generator
201
+ mutable CoinThreadRandom randomNumberGenerator_;
202
+ /// Saved version of thread specific random number generator
203
+ mutable CoinThreadRandom savedRandomNumberGenerator_;
204
+ };
205
+
206
+ #endif
207
+
@@ -0,0 +1,161 @@
1
+ // $Id: CbcFullNodeInfo.hpp 1899 2013-04-09 18:12:08Z stefan $
2
+ // Copyright (C) 2002, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ // Edwin 11/24/09 carved from CbcNode
7
+
8
+ #ifndef CbcFullNodeInfo_H
9
+ #define CbcFullNodeInfo_H
10
+
11
+ #include <string>
12
+ #include <vector>
13
+
14
+ #include "CoinWarmStartBasis.hpp"
15
+ #include "CoinSearchTree.hpp"
16
+ #include "CbcBranchBase.hpp"
17
+ #include "CbcNodeInfo.hpp"
18
+
19
+ class OsiSolverInterface;
20
+ class OsiSolverBranch;
21
+
22
+ class OsiCuts;
23
+ class OsiRowCut;
24
+ class OsiRowCutDebugger;
25
+ class CoinWarmStartBasis;
26
+ class CbcCountRowCut;
27
+ class CbcModel;
28
+ class CbcNode;
29
+ class CbcSubProblem;
30
+ class CbcGeneralBranchingObject;
31
+
32
+ //#############################################################################
33
+ /** Information required to recreate the subproblem at this node
34
+
35
+ When a subproblem is initially created, it is represented by a CbcNode
36
+ object and an attached CbcNodeInfo object.
37
+
38
+ The CbcNode contains information needed while the subproblem remains live.
39
+ The CbcNode is deleted when the last branch arm has been evaluated.
40
+
41
+ The CbcNodeInfo contains information required to maintain the branch-and-cut
42
+ search tree structure (links and reference counts) and to recreate the
43
+ subproblem for this node (basis, variable bounds, cutting planes). A
44
+ CbcNodeInfo object remains in existence until all nodes have been pruned from
45
+ the subtree rooted at this node.
46
+
47
+ The principle used to maintain the reference count is that the reference
48
+ count is always the sum of all potential and actual children of the node.
49
+ Specifically,
50
+ <ul>
51
+ <li> Once it's determined how the node will branch, the reference count
52
+ is set to the number of potential children (<i>i.e.</i>, the number
53
+ of arms of the branch).
54
+ <li> As each child is created by CbcNode::branch() (converting a potential
55
+ child to the active subproblem), the reference count is decremented.
56
+ <li> If the child survives and will become a node in the search tree
57
+ (converting the active subproblem into an actual child), increment the
58
+ reference count.
59
+ </ul>
60
+ Notice that the active subproblem lives in a sort of limbo, neither a
61
+ potential or an actual node in the branch-and-cut tree.
62
+
63
+ CbcNodeInfo objects come in two flavours. A CbcFullNodeInfo object contains
64
+ a full record of the information required to recreate a subproblem.
65
+ A CbcPartialNodeInfo object expresses this information in terms of
66
+ differences from the parent.
67
+ */
68
+
69
+
70
+ /** \brief Holds complete information for recreating a subproblem.
71
+
72
+ A CbcFullNodeInfo object contains all necessary information (bounds, basis,
73
+ and cuts) required to recreate a subproblem.
74
+
75
+ \todo While there's no explicit statement, the code often makes the implicit
76
+ assumption that an CbcFullNodeInfo structure will appear only at the
77
+ root node of the search tree. Things will break if this assumption
78
+ is violated.
79
+ */
80
+
81
+ class CbcFullNodeInfo : public CbcNodeInfo {
82
+
83
+ public:
84
+
85
+ /** \brief Modify model according to information at node
86
+
87
+ The routine modifies the model according to bound information at node,
88
+ creates a new basis according to information at node, but with the size
89
+ passed in through basis, and adds any cuts to the addCuts array.
90
+
91
+ \note The basis passed in via basis is solely a vehicle for passing in
92
+ the desired basis size. It will be deleted and a new basis returned.
93
+ */
94
+ virtual void applyToModel (CbcModel *model, CoinWarmStartBasis *&basis,
95
+ CbcCountRowCut **addCuts,
96
+ int &currentNumberCuts) const ;
97
+
98
+ /// Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible)
99
+ virtual int applyBounds(int iColumn, double & lower, double & upper, int force) ;
100
+
101
+ /** Builds up row basis backwards (until original model).
102
+ Returns NULL or previous one to apply .
103
+ Depends on Free being 0 and impossible for cuts
104
+ */
105
+ virtual CbcNodeInfo * buildRowBasis(CoinWarmStartBasis & basis) const ;
106
+ // Default Constructor
107
+ CbcFullNodeInfo ();
108
+
109
+ /** Constructor from continuous or satisfied
110
+ */
111
+ CbcFullNodeInfo (CbcModel * model,
112
+ int numberRowsAtContinuous);
113
+
114
+ // Copy constructor
115
+ CbcFullNodeInfo ( const CbcFullNodeInfo &);
116
+
117
+ // Destructor
118
+ ~CbcFullNodeInfo ();
119
+
120
+ /// Clone
121
+ virtual CbcNodeInfo * clone() const;
122
+ /// Lower bounds
123
+ inline const double * lower() const {
124
+ return lower_;
125
+ }
126
+ /// Set a bound
127
+ inline void setColLower(int sequence, double value)
128
+ { lower_[sequence]=value;}
129
+ /// Mutable lower bounds
130
+ inline double * mutableLower() const {
131
+ return lower_;
132
+ }
133
+ /// Upper bounds
134
+ inline const double * upper() const {
135
+ return upper_;
136
+ }
137
+ /// Set a bound
138
+ inline void setColUpper(int sequence, double value)
139
+ { upper_[sequence]=value;}
140
+ /// Mutable upper bounds
141
+ inline double * mutableUpper() const {
142
+ return upper_;
143
+ }
144
+ protected:
145
+ // Data
146
+ /** Full basis
147
+
148
+ This MUST BE A POINTER to avoid cutting extra information in derived
149
+ warm start classes.
150
+ */
151
+ CoinWarmStartBasis *basis_;
152
+ int numberIntegers_;
153
+ // Bounds stored in full
154
+ double * lower_;
155
+ double * upper_;
156
+ private:
157
+ /// Illegal Assignment operator
158
+ CbcFullNodeInfo & operator=(const CbcFullNodeInfo& rhs);
159
+ };
160
+ #endif //CbcFullNodeInfo_H
161
+
@@ -0,0 +1,60 @@
1
+ // $Id: CbcGeneral.hpp 1899 2013-04-09 18:12:08Z stefan $
2
+ // Copyright (C) 2002, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ // Edwin 11/10/2009-- carved out of CbcBranchActual
7
+
8
+ #ifndef CbcGeneral_H
9
+ #define CbcGeneral_H
10
+
11
+ #include "CbcBranchBase.hpp"
12
+ /** Define a catch all class.
13
+ This will create a list of subproblems
14
+ */
15
+
16
+
17
+ class CbcGeneral : public CbcObject {
18
+
19
+ public:
20
+
21
+ // Default Constructor
22
+ CbcGeneral ();
23
+
24
+ /** Useful constructor
25
+ Just needs to point to model.
26
+ */
27
+ CbcGeneral (CbcModel * model);
28
+
29
+ // Copy constructor
30
+ CbcGeneral ( const CbcGeneral &);
31
+
32
+ /// Clone
33
+ virtual CbcObject * clone() const = 0;
34
+
35
+ // Assignment operator
36
+ CbcGeneral & operator=( const CbcGeneral& rhs);
37
+
38
+ // Destructor
39
+ ~CbcGeneral ();
40
+
41
+ /// Infeasibility - large is 0.5
42
+ virtual double infeasibility(const OsiBranchingInformation * info,
43
+ int &preferredWay) const;
44
+
45
+ using CbcObject::feasibleRegion ;
46
+ /// This looks at solution and sets bounds to contain solution
47
+ virtual void feasibleRegion() = 0;
48
+
49
+ /// Creates a branching object
50
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
51
+
52
+ /// Redoes data when sequence numbers change
53
+ virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns) = 0;
54
+
55
+ protected:
56
+ /// data
57
+ };
58
+
59
+ #endif
60
+
@@ -0,0 +1,279 @@
1
+ // $Id: CbcGeneralDepth.hpp 1899 2013-04-09 18:12:08Z stefan $
2
+ // Copyright (C) 2002, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ // Edwin 11/10/2009-- carved out of CbcBranchActual
7
+
8
+ #ifndef CbcGeneralDepth_H
9
+ #define CbcGeneralDepth_H
10
+
11
+ #include "CbcGeneral.hpp"
12
+ #include "CbcBranchBase.hpp"
13
+ #include "CbcSubProblem.hpp"
14
+
15
+ #ifdef COIN_HAS_CLP
16
+
17
+ /** Define a catch all class.
18
+ This will create a list of subproblems using partial evaluation
19
+ */
20
+ #include "ClpSimplex.hpp"
21
+ #include "ClpNode.hpp"
22
+
23
+
24
+ class CbcGeneralDepth : public CbcGeneral {
25
+
26
+ public:
27
+
28
+ // Default Constructor
29
+ CbcGeneralDepth ();
30
+
31
+ /** Useful constructor
32
+ Just needs to point to model.
33
+ Initial version does evaluation to depth N
34
+ This is stored in CbcModel but may be
35
+ better here
36
+ */
37
+ CbcGeneralDepth (CbcModel * model, int maximumDepth);
38
+
39
+ // Copy constructor
40
+ CbcGeneralDepth ( const CbcGeneralDepth &);
41
+
42
+ /// Clone
43
+ virtual CbcObject * clone() const;
44
+
45
+ // Assignment operator
46
+ CbcGeneralDepth & operator=( const CbcGeneralDepth& rhs);
47
+
48
+ // Destructor
49
+ ~CbcGeneralDepth ();
50
+
51
+ /// Infeasibility - large is 0.5
52
+ virtual double infeasibility(const OsiBranchingInformation * info,
53
+ int &preferredWay) const;
54
+
55
+ using CbcObject::feasibleRegion ;
56
+ /// This looks at solution and sets bounds to contain solution
57
+ virtual void feasibleRegion();
58
+
59
+ /// Creates a branching object
60
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
61
+ /// Return maximum number of nodes
62
+ inline int maximumNodes() const {
63
+ return maximumNodes_;
64
+ }
65
+ /// Get maximum depth
66
+ inline int maximumDepth() const {
67
+ return maximumDepth_;
68
+ }
69
+ /// Set maximum depth
70
+ inline void setMaximumDepth(int value) {
71
+ maximumDepth_ = value;
72
+ }
73
+ /// Return number of nodes
74
+ inline int numberNodes() const {
75
+ return numberNodes_;
76
+ }
77
+ /// Get which solution
78
+ inline int whichSolution() const {
79
+ return whichSolution_;
80
+ }
81
+ /// Get ClpNode info
82
+ inline ClpNode * nodeInfo(int which) {
83
+ return nodeInfo_->nodeInfo_[which];
84
+ }
85
+
86
+ /// Redoes data when sequence numbers change
87
+ virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
88
+
89
+ protected:
90
+ /// data
91
+ /// Maximum depth
92
+ int maximumDepth_;
93
+ /// Maximum nodes
94
+ int maximumNodes_;
95
+ /// Which node has solution (or -1)
96
+ mutable int whichSolution_;
97
+ /// Number of valid nodes (including whichSolution_)
98
+ mutable int numberNodes_;
99
+ /// For solving nodes
100
+ mutable ClpNodeStuff * nodeInfo_;
101
+ };
102
+ /** Branching object for general objects
103
+
104
+ */
105
+ class CbcNode;
106
+ class CbcGeneralBranchingObject : public CbcBranchingObject {
107
+
108
+ public:
109
+
110
+ // Default Constructor
111
+ CbcGeneralBranchingObject ();
112
+
113
+ // Useful constructor
114
+ CbcGeneralBranchingObject (CbcModel * model);
115
+
116
+ // Copy constructor
117
+ CbcGeneralBranchingObject ( const CbcGeneralBranchingObject &);
118
+
119
+ // Assignment operator
120
+ CbcGeneralBranchingObject & operator=( const CbcGeneralBranchingObject& rhs);
121
+
122
+ /// Clone
123
+ virtual CbcBranchingObject * clone() const;
124
+
125
+ // Destructor
126
+ virtual ~CbcGeneralBranchingObject ();
127
+
128
+ using CbcBranchingObject::branch ;
129
+ /// Does next branch and updates state
130
+ virtual double branch();
131
+ /** Double checks in case node can change its mind!
132
+ Can change objective etc */
133
+ virtual void checkIsCutoff(double cutoff);
134
+
135
+ using CbcBranchingObject::print ;
136
+ /** \brief Print something about branch - only if log level high
137
+ */
138
+ virtual void print();
139
+ /// Fill in current objective etc
140
+ void state(double & objectiveValue, double & sumInfeasibilities,
141
+ int & numberUnsatisfied, int which) const;
142
+ /// Set CbcNode
143
+ inline void setNode(CbcNode * node) {
144
+ node_ = node;
145
+ }
146
+ /** Return the type (an integer identifier) of \c this */
147
+ virtual CbcBranchObjType type() const {
148
+ return GeneralDepthBranchObj;
149
+ }
150
+
151
+ /** Compare the original object of \c this with the original object of \c
152
+ brObj. Assumes that there is an ordering of the original objects.
153
+ This method should be invoked only if \c this and brObj are of the same
154
+ type.
155
+ Return negative/0/positive depending on whether \c this is
156
+ smaller/same/larger than the argument.
157
+ */
158
+ virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
159
+
160
+ /** Compare the \c this with \c brObj. \c this and \c brObj must be os the
161
+ same type and must have the same original object, but they may have
162
+ different feasible regions.
163
+ Return the appropriate CbcRangeCompare value (first argument being the
164
+ sub/superset if that's the case). In case of overlap (and if \c
165
+ replaceIfOverlap is true) replace the current branching object with one
166
+ whose feasible region is the overlap.
167
+ */
168
+ virtual CbcRangeCompare compareBranchingObject
169
+ (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
170
+ /// Number of subproblems
171
+ inline int numberSubProblems() const {
172
+ return numberSubProblems_;
173
+ }
174
+ /// Decrement number left and return number
175
+ inline int decrementNumberLeft() {
176
+ numberSubLeft_--;
177
+ return numberSubLeft_;
178
+ }
179
+ /// Which node we want to use
180
+ inline int whichNode() const {
181
+ return whichNode_;
182
+ }
183
+ /// Set which node we want to use
184
+ inline void setWhichNode(int value) {
185
+ whichNode_ = value;
186
+ }
187
+ // Sub problem
188
+ const CbcSubProblem * subProblem(int which) const {
189
+ return subProblems_ + which;
190
+ }
191
+
192
+ public:
193
+ /// data
194
+ // Sub problems
195
+ CbcSubProblem * subProblems_;
196
+ /// Node
197
+ CbcNode * node_;
198
+ /// Number of subproblems
199
+ int numberSubProblems_;
200
+ /// Number of subproblems left
201
+ int numberSubLeft_;
202
+ /// Which node we want to use (-1 for default)
203
+ int whichNode_;
204
+ /// Number of rows
205
+ int numberRows_;
206
+ };
207
+ /** Branching object for general objects - just one
208
+
209
+ */
210
+ class CbcOneGeneralBranchingObject : public CbcBranchingObject {
211
+
212
+ public:
213
+
214
+ // Default Constructor
215
+ CbcOneGeneralBranchingObject ();
216
+
217
+ // Useful constructor
218
+ CbcOneGeneralBranchingObject (CbcModel * model,
219
+ CbcGeneralBranchingObject * object,
220
+ int whichOne);
221
+
222
+ // Copy constructor
223
+ CbcOneGeneralBranchingObject ( const CbcOneGeneralBranchingObject &);
224
+
225
+ // Assignment operator
226
+ CbcOneGeneralBranchingObject & operator=( const CbcOneGeneralBranchingObject& rhs);
227
+
228
+ /// Clone
229
+ virtual CbcBranchingObject * clone() const;
230
+
231
+ // Destructor
232
+ virtual ~CbcOneGeneralBranchingObject ();
233
+
234
+ using CbcBranchingObject::branch ;
235
+ /// Does next branch and updates state
236
+ virtual double branch();
237
+ /** Double checks in case node can change its mind!
238
+ Can change objective etc */
239
+ virtual void checkIsCutoff(double cutoff);
240
+
241
+ using CbcBranchingObject::print ;
242
+ /** \brief Print something about branch - only if log level high
243
+ */
244
+ virtual void print();
245
+ /** Return the type (an integer identifier) of \c this */
246
+ virtual CbcBranchObjType type() const {
247
+ return OneGeneralBranchingObj;
248
+ }
249
+
250
+ /** Compare the original object of \c this with the original object of \c
251
+ brObj. Assumes that there is an ordering of the original objects.
252
+ This method should be invoked only if \c this and brObj are of the same
253
+ type.
254
+ Return negative/0/positive depending on whether \c this is
255
+ smaller/same/larger than the argument.
256
+ */
257
+ virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
258
+
259
+ /** Compare the \c this with \c brObj. \c this and \c brObj must be os the
260
+ same type and must have the same original object, but they may have
261
+ different feasible regions.
262
+ Return the appropriate CbcRangeCompare value (first argument being the
263
+ sub/superset if that's the case). In case of overlap (and if \c
264
+ replaceIfOverlap is true) replace the current branching object with one
265
+ whose feasible region is the overlap.
266
+ */
267
+ virtual CbcRangeCompare compareBranchingObject
268
+ (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
269
+
270
+ public:
271
+ /// data
272
+ /// Object
273
+ CbcGeneralBranchingObject * object_;
274
+ /// Which one
275
+ int whichOne_;
276
+ };
277
+ #endif //COIN_HAS_CLP
278
+ #endif
279
+