ruby-cbc 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
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,349 @@
1
+ // $Id: CbcNodeInfo.hpp 2048 2014-07-16 09:29:16Z forrest $
2
+ // Copyright (C) 2002, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ // Edwin 11/24/09 carved from CbcNode
7
+
8
+ #ifndef CbcNodeInfo_H
9
+ #define CbcNodeInfo_H
10
+
11
+ #include <string>
12
+ #include <vector>
13
+
14
+ #include "CoinWarmStartBasis.hpp"
15
+ #include "CoinSearchTree.hpp"
16
+ #include "CbcBranchBase.hpp"
17
+
18
+ class OsiSolverInterface;
19
+ class OsiSolverBranch;
20
+
21
+ class OsiCuts;
22
+ class OsiRowCut;
23
+ class OsiRowCutDebugger;
24
+ class CoinWarmStartBasis;
25
+ class CbcCountRowCut;
26
+ class CbcModel;
27
+ class CbcNode;
28
+ class CbcSubProblem;
29
+ class CbcGeneralBranchingObject;
30
+
31
+ //#############################################################################
32
+ /** Information required to recreate the subproblem at this node
33
+
34
+ When a subproblem is initially created, it is represented by a CbcNode
35
+ object and an attached CbcNodeInfo object.
36
+
37
+ The CbcNode contains information needed while the subproblem remains live.
38
+ The CbcNode is deleted when the last branch arm has been evaluated.
39
+
40
+ The CbcNodeInfo contains information required to maintain the branch-and-cut
41
+ search tree structure (links and reference counts) and to recreate the
42
+ subproblem for this node (basis, variable bounds, cutting planes). A
43
+ CbcNodeInfo object remains in existence until all nodes have been pruned from
44
+ the subtree rooted at this node.
45
+
46
+ The principle used to maintain the reference count is that the reference
47
+ count is always the sum of all potential and actual children of the node.
48
+ Specifically,
49
+ <ul>
50
+ <li> Once it's determined how the node will branch, the reference count
51
+ is set to the number of potential children (<i>i.e.</i>, the number
52
+ of arms of the branch).
53
+ <li> As each child is created by CbcNode::branch() (converting a potential
54
+ child to the active subproblem), the reference count is decremented.
55
+ <li> If the child survives and will become a node in the search tree
56
+ (converting the active subproblem into an actual child), increment the
57
+ reference count.
58
+ </ul>
59
+ Notice that the active subproblem lives in a sort of limbo, neither a
60
+ potential or an actual node in the branch-and-cut tree.
61
+
62
+ CbcNodeInfo objects come in two flavours. A CbcFullNodeInfo object contains
63
+ a full record of the information required to recreate a subproblem.
64
+ A CbcPartialNodeInfo object expresses this information in terms of
65
+ differences from the parent.
66
+ */
67
+
68
+ class CbcNodeInfo {
69
+
70
+ public:
71
+
72
+ /** \name Constructors & destructors */
73
+ //@{
74
+ /** Default Constructor
75
+
76
+ Creates an empty NodeInfo object.
77
+ */
78
+ CbcNodeInfo ();
79
+
80
+ /// Copy constructor
81
+ CbcNodeInfo ( const CbcNodeInfo &);
82
+
83
+ #ifdef JJF_ZERO
84
+ /** Construct with parent
85
+
86
+ Creates a NodeInfo object which knows its parent and assumes it will
87
+ in turn have two children.
88
+ */
89
+ CbcNodeInfo (CbcNodeInfo * parent);
90
+ #endif
91
+
92
+ /** Construct with parent and owner
93
+
94
+ As for `construct with parent', and attached to \p owner.
95
+ */
96
+ CbcNodeInfo (CbcNodeInfo * parent, CbcNode * owner);
97
+
98
+ /** Destructor
99
+
100
+ Note that the destructor will recursively delete the parent if this
101
+ nodeInfo is the last child.
102
+ */
103
+ virtual ~CbcNodeInfo();
104
+ //@}
105
+
106
+
107
+ /** \brief Modify model according to information at node
108
+
109
+ The routine modifies the model according to bound and basis
110
+ information at node and adds any cuts to the addCuts array.
111
+ */
112
+ virtual void applyToModel (CbcModel *model, CoinWarmStartBasis *&basis,
113
+ CbcCountRowCut **addCuts,
114
+ int &currentNumberCuts) const = 0 ;
115
+ /// Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible)
116
+ virtual int applyBounds(int iColumn, double & lower, double & upper, int force) = 0;
117
+
118
+ /** Builds up row basis backwards (until original model).
119
+ Returns NULL or previous one to apply .
120
+ Depends on Free being 0 and impossible for cuts
121
+ */
122
+ virtual CbcNodeInfo * buildRowBasis(CoinWarmStartBasis & basis) const = 0;
123
+ /// Clone
124
+ virtual CbcNodeInfo * clone() const = 0;
125
+ /// Called when number branches left down to zero
126
+ virtual void allBranchesGone() {}
127
+ #ifndef JJF_ONE
128
+ /// Increment number of references
129
+ inline void increment(int amount = 1) {
130
+ numberPointingToThis_ += amount;/*printf("CbcNodeInfo %x incremented by %d to %d\n",this,amount,numberPointingToThis_);*/
131
+ }
132
+
133
+ /// Decrement number of references and return number left
134
+ inline int decrement(int amount = 1) {
135
+ numberPointingToThis_ -= amount;/*printf("CbcNodeInfo %x decremented by %d to %d\n",this,amount,numberPointingToThis_);*/
136
+ return numberPointingToThis_;
137
+ }
138
+ #else
139
+ /// Increment number of references
140
+ void increment(int amount = 1);
141
+ /// Decrement number of references and return number left
142
+ int decrement(int amount = 1);
143
+ #endif
144
+ /** Initialize reference counts
145
+
146
+ Initialize the reference counts used for tree maintenance.
147
+ */
148
+
149
+ inline void initializeInfo(int number) {
150
+ numberPointingToThis_ = number;
151
+ numberBranchesLeft_ = number;
152
+ }
153
+
154
+ /// Return number of branches left in object
155
+ inline int numberBranchesLeft() const {
156
+ return numberBranchesLeft_;
157
+ }
158
+
159
+ /// Set number of branches left in object
160
+ inline void setNumberBranchesLeft(int value) {
161
+ numberBranchesLeft_ = value;
162
+ }
163
+
164
+ /// Return number of objects pointing to this
165
+ inline int numberPointingToThis() const {
166
+ return numberPointingToThis_;
167
+ }
168
+
169
+ /// Set number of objects pointing to this
170
+ inline void setNumberPointingToThis(int number) {
171
+ numberPointingToThis_ = number;
172
+ }
173
+
174
+ /// Increment number of objects pointing to this
175
+ inline void incrementNumberPointingToThis() {
176
+ numberPointingToThis_ ++;
177
+ }
178
+
179
+ /// Say one branch taken
180
+ inline int branchedOn() {
181
+ numberPointingToThis_--;
182
+ numberBranchesLeft_--;
183
+ return numberBranchesLeft_;
184
+ }
185
+
186
+ /// Say thrown away
187
+ inline void throwAway() {
188
+ numberPointingToThis_ -= numberBranchesLeft_;
189
+ numberBranchesLeft_ = 0;
190
+ }
191
+
192
+ /// Parent of this
193
+ CbcNodeInfo * parent() const {
194
+ return parent_;
195
+ }
196
+ /// Set parent null
197
+ inline void nullParent() {
198
+ parent_ = NULL;
199
+ }
200
+
201
+ void addCuts(OsiCuts & cuts, int numberToBranch, //int * whichGenerator,
202
+ int numberPointingToThis);
203
+ void addCuts(int numberCuts, CbcCountRowCut ** cuts, int numberToBranch);
204
+ /** Delete cuts (decrements counts)
205
+ Slow unless cuts in same order as saved
206
+ */
207
+ void deleteCuts(int numberToDelete, CbcCountRowCut ** cuts);
208
+ void deleteCuts(int numberToDelete, int * which);
209
+
210
+ /// Really delete a cut
211
+ void deleteCut(int whichOne);
212
+
213
+ /// Decrement active cut counts
214
+ void decrementCuts(int change = 1);
215
+
216
+ /// Increment active cut counts
217
+ void incrementCuts(int change = 1);
218
+
219
+ /// Decrement all active cut counts in chain starting at parent
220
+ void decrementParentCuts(CbcModel * model, int change = 1);
221
+
222
+ /// Increment all active cut counts in parent chain
223
+ void incrementParentCuts(CbcModel * model, int change = 1);
224
+
225
+ /// Array of pointers to cuts
226
+ inline CbcCountRowCut ** cuts() const {
227
+ return cuts_;
228
+ }
229
+
230
+ /// Number of row cuts (this node)
231
+ inline int numberCuts() const {
232
+ return numberCuts_;
233
+ }
234
+ inline void setNumberCuts(int value) {
235
+ numberCuts_ = value;
236
+ }
237
+
238
+ /// Set owner null
239
+ inline void nullOwner() {
240
+ owner_ = NULL;
241
+ }
242
+ const inline CbcNode * owner() const {
243
+ return owner_;
244
+ }
245
+ inline CbcNode * mutableOwner() const {
246
+ return owner_;
247
+ }
248
+ /// The node number
249
+ inline int nodeNumber() const {
250
+ return nodeNumber_;
251
+ }
252
+ inline void setNodeNumber(int node) {
253
+ nodeNumber_ = node;
254
+ }
255
+ /** Deactivate node information.
256
+ 1 - bounds
257
+ 2 - cuts
258
+ 4 - basis!
259
+ 8 - just marked
260
+ 16 - symmetry branching worked
261
+ */
262
+ void deactivate(int mode = 3);
263
+ /// Say if normal
264
+ inline bool allActivated() const {
265
+ return ((active_&7) == 7);
266
+ }
267
+ /// Say if marked
268
+ inline bool marked() const {
269
+ return ((active_&8) != 0);
270
+ }
271
+ /// Mark
272
+ inline void mark() {
273
+ active_ |= 8;
274
+ }
275
+ /// Unmark
276
+ inline void unmark() {
277
+ active_ &= ~8;
278
+ }
279
+ /// Get symmetry value (true worked at this node)
280
+ inline bool symmetryWorked() const
281
+ { return (active_&16) !=0;}
282
+ /// Say symmetry worked at this node)
283
+ inline void setSymmetryWorked()
284
+ { active_ |= 16;}
285
+
286
+ /// Branching object for the parent
287
+ inline const OsiBranchingObject * parentBranch() const {
288
+ return parentBranch_;
289
+ }
290
+ /// If we need to take off parent based data
291
+ void unsetParentBasedData();
292
+ protected:
293
+
294
+ /** Number of other nodes pointing to this node.
295
+
296
+ Number of existing and potential search tree nodes pointing to this node.
297
+ `Existing' means referenced by #parent_ of some other CbcNodeInfo.
298
+ `Potential' means children still to be created (#numberBranchesLeft_ of
299
+ this CbcNodeInfo).
300
+ */
301
+ int numberPointingToThis_;
302
+
303
+ /// parent
304
+ CbcNodeInfo * parent_;
305
+
306
+ /// Copy of the branching object of the parent when the node is created
307
+ OsiBranchingObject * parentBranch_;
308
+
309
+ /// Owner
310
+ CbcNode * owner_;
311
+
312
+ /// Number of row cuts (this node)
313
+ int numberCuts_;
314
+
315
+ /// The node number
316
+ int nodeNumber_;
317
+
318
+ /// Array of pointers to cuts
319
+ CbcCountRowCut ** cuts_;
320
+
321
+ /** Number of rows in problem (before these cuts). This
322
+ means that for top of chain it must be rows at continuous */
323
+ int numberRows_;
324
+
325
+ /** Number of branch arms left to explore at this node
326
+
327
+ \todo There seems to be redundancy between this field and
328
+ CbcBranchingObject::numberBranchesLeft_. It'd be good to sort out if
329
+ both are necessary.
330
+ */
331
+ int numberBranchesLeft_;
332
+ /** Active node information.
333
+ 1 - bounds
334
+ 2 - cuts
335
+ 4 - basis!
336
+ */
337
+ int active_;
338
+
339
+ private:
340
+
341
+ /// Illegal Assignment operator
342
+ CbcNodeInfo & operator=(const CbcNodeInfo& rhs);
343
+
344
+ /// routine common to constructors
345
+ void setParentBasedData();
346
+ };
347
+
348
+ #endif // CbcNodeInfo_H
349
+
@@ -0,0 +1,272 @@
1
+ // $Id: CbcObject.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/12/2009 carved from CbcBranchBase
7
+
8
+ #ifndef CbcObject_H
9
+ #define CbcObject_H
10
+
11
+ #include <string>
12
+ #include <vector>
13
+ #include "OsiBranchingObject.hpp"
14
+ class OsiSolverInterface;
15
+ class OsiSolverBranch;
16
+
17
+ class CbcModel;
18
+ class CbcNode;
19
+ class CbcNodeInfo;
20
+ class CbcBranchingObject;
21
+ class OsiChooseVariable;
22
+ class CbcObjectUpdateData;
23
+ //#############################################################################
24
+
25
+ /** Abstract base class for `objects'.
26
+ It now just has stuff that OsiObject does not have
27
+
28
+ The branching model used in Cbc is based on the idea of an <i>object</i>.
29
+ In the abstract, an object is something that has a feasible region, can be
30
+ evaluated for infeasibility, can be branched on (<i>i.e.</i>, there's some
31
+ constructive action to be taken to move toward feasibility), and allows
32
+ comparison of the effect of branching.
33
+
34
+ This class (CbcObject) is the base class for an object. To round out the
35
+ branching model, the class CbcBranchingObject describes how to perform a
36
+ branch, and the class CbcBranchDecision describes how to compare two
37
+ CbcBranchingObjects.
38
+
39
+ To create a new type of object you need to provide three methods:
40
+ #infeasibility(), #feasibleRegion(), and #createCbcBranch(), described below.
41
+
42
+ This base class is primarily virtual to allow for any form of structure.
43
+ Any form of discontinuity is allowed.
44
+
45
+ \todo The notion that all branches are binary (two arms) is wired into the
46
+ implementation of CbcObject, CbcBranchingObject, and
47
+ CbcBranchDecision. Changing this will require a moderate amount of
48
+ recoding.
49
+ */
50
+ // This can be used if object wants to skip strong branching
51
+ typedef struct {
52
+ CbcBranchingObject * possibleBranch; // what a branch would do
53
+ double upMovement; // cost going up (and initial away from feasible)
54
+ double downMovement; // cost going down
55
+ int numIntInfeasUp ; // without odd ones
56
+ int numObjInfeasUp ; // just odd ones
57
+ bool finishedUp; // true if solver finished
58
+ int numItersUp ; // number of iterations in solver
59
+ int numIntInfeasDown ; // without odd ones
60
+ int numObjInfeasDown ; // just odd ones
61
+ bool finishedDown; // true if solver finished
62
+ int numItersDown; // number of iterations in solver
63
+ int objectNumber; // Which object it is
64
+ int fix; // 0 if no fix, 1 if we can fix up, -1 if we can fix down
65
+ } CbcStrongInfo;
66
+
67
+ class CbcObject : public OsiObject {
68
+
69
+ public:
70
+
71
+ // Default Constructor
72
+ CbcObject ();
73
+
74
+ // Useful constructor
75
+ CbcObject (CbcModel * model);
76
+
77
+ // Copy constructor
78
+ CbcObject ( const CbcObject &);
79
+
80
+ // Assignment operator
81
+ CbcObject & operator=( const CbcObject& rhs);
82
+
83
+ /// Clone
84
+ virtual CbcObject * clone() const = 0;
85
+
86
+ /// Destructor
87
+ virtual ~CbcObject ();
88
+
89
+ /** Infeasibility of the object
90
+
91
+ This is some measure of the infeasibility of the object. It should be
92
+ scaled to be in the range [0.0, 0.5], with 0.0 indicating the object
93
+ is satisfied.
94
+
95
+ The preferred branching direction is returned in preferredWay,
96
+
97
+ This is used to prepare for strong branching but should also think of
98
+ case when no strong branching
99
+
100
+ The object may also compute an estimate of cost of going "up" or "down".
101
+ This will probably be based on pseudo-cost ideas
102
+ */
103
+ #ifdef CBC_NEW_STYLE_BRANCH
104
+ virtual double infeasibility(const OsiBranchingInformation * info,
105
+ int &preferredWay) const = 0;
106
+ #else
107
+ virtual double infeasibility(const OsiBranchingInformation * /*info*/,
108
+ int &preferredWay) const {
109
+ return infeasibility(preferredWay);
110
+ }
111
+ virtual double infeasibility(int &/*preferredWay*/) const {
112
+ throw CoinError("Need code", "infeasibility", "CbcBranchBase");
113
+ }
114
+ #endif
115
+
116
+ /** For the variable(s) referenced by the object,
117
+ look at the current solution and set bounds to match the solution.
118
+ */
119
+ virtual void feasibleRegion() = 0;
120
+ /// Dummy one for compatibility
121
+ virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
122
+
123
+ /** For the variable(s) referenced by the object,
124
+ look at the current solution and set bounds to match the solution.
125
+ Returns measure of how much it had to move solution to make feasible
126
+ */
127
+ virtual double feasibleRegion(OsiSolverInterface * solver) const ;
128
+
129
+ /** Create a branching object and indicate which way to branch first.
130
+
131
+ The branching object has to know how to create branches (fix
132
+ variables, etc.)
133
+ */
134
+ #ifdef CBC_NEW_STYLE_BRANCH
135
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) = 0;
136
+ #else
137
+ virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *
138
+ /* solver */,
139
+ const OsiBranchingInformation *
140
+ /* info */, int /* way */) {
141
+ // return createBranch(solver, info, way);
142
+ return NULL;
143
+ }
144
+ virtual OsiBranchingObject * createBranch(OsiSolverInterface * /*solver*/,
145
+ const OsiBranchingInformation * /*info*/, int /*way*/) const {
146
+ throw CoinError("Need code", "createBranch", "CbcBranchBase");
147
+ }
148
+ #endif
149
+ /** Create an Osibranching object and indicate which way to branch first.
150
+
151
+ The branching object has to know how to create branches (fix
152
+ variables, etc.)
153
+ */
154
+ virtual OsiBranchingObject * createOsiBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
155
+ /** Create an OsiSolverBranch object
156
+
157
+ This returns NULL if branch not represented by bound changes
158
+ */
159
+ virtual OsiSolverBranch * solverBranch() const;
160
+
161
+ /** \brief Given a valid solution (with reduced costs, etc.),
162
+ return a branching object which would give a new feasible
163
+ point in a good direction.
164
+
165
+ If the method cannot generate a feasible point (because there aren't
166
+ any, or because it isn't bright enough to find one), it should
167
+ return null.
168
+ */
169
+ virtual CbcBranchingObject * preferredNewFeasible() const {
170
+ return NULL;
171
+ }
172
+
173
+ /** \brief Given a valid solution (with reduced costs, etc.),
174
+ return a branching object which would give a new feasible
175
+ point in a bad direction.
176
+
177
+ If the method cannot generate a feasible point (because there aren't
178
+ any, or because it isn't bright enough to find one), it should
179
+ return null.
180
+ */
181
+ virtual CbcBranchingObject * notPreferredNewFeasible() const {
182
+ return NULL;
183
+ }
184
+
185
+ /** Reset variable bounds to their original values.
186
+
187
+ Bounds may be tightened, so it may be good to be able to set this info in object.
188
+ */
189
+ virtual void resetBounds(const OsiSolverInterface * ) {}
190
+
191
+ /** Returns floor and ceiling i.e. closest valid points
192
+ */
193
+ virtual void floorCeiling(double & floorValue, double & ceilingValue, double value,
194
+ double tolerance) const;
195
+
196
+ /** Pass in information on branch just done and create CbcObjectUpdateData instance.
197
+ If object does not need data then backward pointer will be NULL.
198
+ Assumes can get information from solver */
199
+ virtual CbcObjectUpdateData createUpdateInformation(const OsiSolverInterface * solver,
200
+ const CbcNode * node,
201
+ const CbcBranchingObject * branchingObject);
202
+
203
+ /// Update object by CbcObjectUpdateData
204
+ virtual void updateInformation(const CbcObjectUpdateData & ) {}
205
+
206
+ /// Identifier (normally column number in matrix)
207
+ inline int id() const {
208
+ return id_;
209
+ }
210
+
211
+ /** Set identifier (normally column number in matrix)
212
+ but 1000000000 to 1100000000 means optional branching object
213
+ i.e. code would work without it */
214
+ inline void setId(int value) {
215
+ id_ = value;
216
+ }
217
+
218
+ /** Return true if optional branching object
219
+ i.e. code would work without it */
220
+ inline bool optionalObject() const {
221
+ return (id_ >= 1000000000 && id_ < 1100000000);
222
+ }
223
+
224
+ /// Get position in object_ list
225
+ inline int position() const {
226
+ return position_;
227
+ }
228
+
229
+ /// Set position in object_ list
230
+ inline void setPosition(int position) {
231
+ position_ = position;
232
+ }
233
+
234
+ /// update model
235
+ inline void setModel(CbcModel * model) {
236
+ model_ = model;
237
+ }
238
+
239
+ /// Return model
240
+ inline CbcModel * model() const {
241
+ return model_;
242
+ }
243
+
244
+ /// If -1 down always chosen first, +1 up always, 0 normal
245
+ inline int preferredWay() const {
246
+ return preferredWay_;
247
+ }
248
+ /// Set -1 down always chosen first, +1 up always, 0 normal
249
+ inline void setPreferredWay(int value) {
250
+ preferredWay_ = value;
251
+ }
252
+ /// Redoes data when sequence numbers change
253
+ virtual void redoSequenceEtc(CbcModel * , int , const int * ) {}
254
+ /// Initialize for branching
255
+ virtual void initializeForBranching(CbcModel * ) {}
256
+
257
+ protected:
258
+ /// data
259
+
260
+ /// Model
261
+ CbcModel * model_;
262
+ /// Identifier (normally column number in matrix)
263
+ int id_;
264
+ /// Position in object list
265
+ int position_;
266
+ /// If -1 down always chosen first, +1 up always, 0 normal
267
+ int preferredWay_;
268
+
269
+ };
270
+
271
+ #endif
272
+
@@ -0,0 +1,64 @@
1
+ // $Id: CbcObjectUpdateData.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/12/2009 carved from CbcBranchBase
7
+
8
+ #ifndef CbcObjectUpdateData_H
9
+ #define CbcObjectUpdateData_H
10
+
11
+ #include "CbcObject.hpp"
12
+ /* This stores data so an object can be updated
13
+ */
14
+ class CbcObjectUpdateData {
15
+
16
+ public:
17
+
18
+ /// Default Constructor
19
+ CbcObjectUpdateData ();
20
+
21
+ /// Useful constructor
22
+ CbcObjectUpdateData (CbcObject * object,
23
+ int way,
24
+ double change,
25
+ int status,
26
+ int intDecrease_,
27
+ double branchingValue);
28
+
29
+ /// Copy constructor
30
+ CbcObjectUpdateData ( const CbcObjectUpdateData &);
31
+
32
+ /// Assignment operator
33
+ CbcObjectUpdateData & operator=( const CbcObjectUpdateData& rhs);
34
+
35
+ /// Destructor
36
+ virtual ~CbcObjectUpdateData ();
37
+
38
+
39
+ public:
40
+ /// data
41
+
42
+ /// Object
43
+ CbcObject * object_;
44
+ /// Branch as defined by instance of CbcObject
45
+ int way_;
46
+ /// Object number
47
+ int objectNumber_;
48
+ /// Change in objective
49
+ double change_;
50
+ /// Status 0 Optimal, 1 infeasible, 2 unknown
51
+ int status_;
52
+ /// Decrease in number unsatisfied
53
+ int intDecrease_;
54
+ /// Branching value
55
+ double branchingValue_;
56
+ /// Objective value before branching
57
+ double originalObjective_;
58
+ /// Current cutoff
59
+ double cutoff_;
60
+
61
+ };
62
+
63
+ #endif
64
+