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,115 @@
1
+ /* $Id: Coin_C_defines.h 1690 2014-03-13 17:45:21Z mlubin $ */
2
+ /*
3
+ Copyright (C) 2002, 2003 International Business Machines Corporation
4
+ and others. All Rights Reserved.
5
+
6
+ This code is licensed under the terms of the Eclipse Public License (EPL).
7
+ */
8
+ #ifndef CoinCDefine_H
9
+ #define CoinCDefine_H
10
+
11
+ /** This has #defines etc for the "C" interface to Coin.
12
+ If COIN_EXTERN_C defined then an extra extern C
13
+ */
14
+
15
+ #if defined (CLP_EXTERN_C)
16
+ #define COIN_EXTERN_C
17
+ #define COIN_NO_SBB
18
+ #define COIN_NO_CBC
19
+ #endif
20
+ #if defined (SBB_EXTERN_C)
21
+ #define COIN_EXTERN_C
22
+ #define COIN_NO_CLP
23
+ #endif
24
+ #if defined (CBC_EXTERN_C)
25
+ #define COIN_EXTERN_C
26
+ #define COIN_NO_CLP
27
+ #endif
28
+ /* We need to allow for Microsoft */
29
+ #ifndef COINLIBAPI
30
+
31
+ #if defined(CBCCINTERFACEDLL_EXPORTS) || defined(CLPMSDLL)
32
+ #if defined (COIN_EXTERN_C)
33
+ # define COINLIBAPI __declspec(dllexport)
34
+ #else
35
+ # define COINLIBAPI __declspec(dllexport)
36
+ #endif
37
+ # define COINLINKAGE __stdcall
38
+ # define COINLINKAGE_CB __cdecl
39
+ #else
40
+ #if defined (COIN_EXTERN_C)
41
+ # define COINLIBAPI extern "C"
42
+ #else
43
+ # define COINLIBAPI
44
+ #endif
45
+ # define COINLINKAGE
46
+ # define COINLINKAGE_CB
47
+ #endif
48
+
49
+ #endif
50
+ /** User does not need to see structure of model but C++ code does */
51
+ #if defined (CLP_EXTERN_C)
52
+ /* Real typedef for structure */
53
+ class CMessageHandler;
54
+ typedef struct {
55
+ ClpSimplex * model_;
56
+ CMessageHandler * handler_;
57
+ } Clp_Simplex;
58
+ #else
59
+ typedef void Clp_Simplex;
60
+ #endif
61
+
62
+ #ifndef COIN_NO_CLP
63
+ /** typedef for user call back.
64
+ The cvec are constructed so don't need to be const*/
65
+ typedef void (COINLINKAGE_CB *clp_callback) (Clp_Simplex * model,int msgno, int ndouble,
66
+ const double * dvec, int nint, const int * ivec,
67
+ int nchar, char ** cvec);
68
+ #endif
69
+ /** User does not need to see structure of model but C++ code does */
70
+ #if defined (SBB_EXTERN_C)
71
+ /* Real typedef for structure */
72
+ class Sbb_MessageHandler;
73
+ typedef struct {
74
+ OsiClpSolverInterface * solver_;
75
+ SbbModel * model_;
76
+ Sbb_MessageHandler * handler_;
77
+ char * information_;
78
+ } Sbb_Model;
79
+ #else
80
+ typedef void Sbb_Model;
81
+ #endif
82
+ #if defined (CBC_EXTERN_C)
83
+ /* Real typedef for structure */
84
+ class Cbc_MessageHandler;
85
+ typedef struct {
86
+ OsiClpSolverInterface * solver_;
87
+ CbcModel * model_;
88
+ Cbc_MessageHandler * handler_;
89
+ std::vector<std::string> cmdargs_;
90
+ } Cbc_Model;
91
+ #else
92
+ typedef void Cbc_Model;
93
+ #endif
94
+ #ifndef COIN_NO_SBB
95
+ /** typedef for user call back.
96
+ The cvec are constructed so don't need to be const*/
97
+ typedef void (COINLINKAGE_CB *sbb_callback) (Sbb_Model * model,int msgno, int ndouble,
98
+ const double * dvec, int nint, const int * ivec,
99
+ int nchar, char ** cvec);
100
+ typedef void (COINLINKAGE_CB *cbc_callback) (Cbc_Model * model,int msgno, int ndouble,
101
+ const double * dvec, int nint, const int * ivec,
102
+ int nchar, char ** cvec);
103
+ #endif
104
+ #if COIN_BIG_INDEX==0
105
+ typedef int CoinBigIndex;
106
+ #elif COIN_BIG_INDEX==1
107
+ typedef long CoinBigIndex;
108
+ #else
109
+ typedef long long CoinBigIndex;
110
+ #endif
111
+ /* just in case used somewhere */
112
+ #undef COIN_NO_CLP
113
+ #undef COIN_NO_SBB
114
+ #undef COIN_NO_CBC
115
+ #endif
@@ -0,0 +1,298 @@
1
+ /* $Id: Idiot.hpp 2143 2015-05-20 15:49:17Z 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
+ // "Idiot" as the name of this algorithm is copylefted. If you want to change
7
+ // the name then it should be something equally stupid (but not "Stupid") or
8
+ // even better something witty.
9
+
10
+ #ifndef Idiot_H
11
+ #define Idiot_H
12
+ #ifndef OSI_IDIOT
13
+ #include "ClpSimplex.hpp"
14
+ #define OsiSolverInterface ClpSimplex
15
+ #else
16
+ #include "OsiSolverInterface.hpp"
17
+ typedef int CoinBigIndex;
18
+ #endif
19
+ class CoinMessageHandler;
20
+ class CoinMessages;
21
+ /// for use internally
22
+ typedef struct {
23
+ double infeas;
24
+ double objval;
25
+ double dropThis;
26
+ double weighted;
27
+ double sumSquared;
28
+ double djAtBeginning;
29
+ double djAtEnd;
30
+ int iteration;
31
+ } IdiotResult;
32
+ /** This class implements a very silly algorithm. It has no merit
33
+ apart from the fact that it gets an approximate solution to
34
+ some classes of problems. Better if vaguely homogeneous.
35
+ It works on problems where volume algorithm works and often
36
+ gets a better primal solution but it has no dual solution.
37
+
38
+ It can also be used as a "crash" to get a problem started. This
39
+ is probably its most useful function.
40
+
41
+ It is based on the idea that algorithms with terrible convergence
42
+ properties may be okay at first. Throw in some random dubious tricks
43
+ and the resulting code may be worth keeping as long as you don't
44
+ look at it.
45
+
46
+ */
47
+
48
+ class Idiot {
49
+
50
+ public:
51
+
52
+ /**@name Constructors and destructor
53
+ Just a pointer to model is kept
54
+ */
55
+ //@{
56
+ /// Default constructor
57
+ Idiot ( );
58
+ /// Constructor with model
59
+ Idiot ( OsiSolverInterface & model );
60
+
61
+ /// Copy constructor.
62
+ Idiot(const Idiot &);
63
+ /// Assignment operator. This copies the data
64
+ Idiot & operator=(const Idiot & rhs);
65
+ /// Destructor
66
+ ~Idiot ( );
67
+ //@}
68
+
69
+
70
+ /**@name Algorithmic calls
71
+ */
72
+ //@{
73
+ /// Get an approximate solution with the idiot code
74
+ void solve();
75
+ /// Lightweight "crash"
76
+ void crash(int numberPass, CoinMessageHandler * handler,
77
+ const CoinMessages * messages, bool doCrossover = true);
78
+ /** Use simplex to get an optimal solution
79
+ mode is how many steps the simplex crossover should take to
80
+ arrive to an extreme point:
81
+ 0 - chosen,all ever used, all
82
+ 1 - chosen, all
83
+ 2 - all
84
+ 3 - do not do anything - maybe basis
85
+ + 16 do presolves
86
+ */
87
+ void crossOver(int mode);
88
+ //@}
89
+
90
+
91
+ /**@name Gets and sets of most useful data
92
+ */
93
+ //@{
94
+ /** Starting weight - small emphasizes feasibility,
95
+ default 1.0e-4 */
96
+ inline double getStartingWeight() const {
97
+ return mu_;
98
+ }
99
+ inline void setStartingWeight(double value) {
100
+ mu_ = value;
101
+ }
102
+ /** Weight factor - weight multiplied by this when changes,
103
+ default 0.333 */
104
+ inline double getWeightFactor() const {
105
+ return muFactor_;
106
+ }
107
+ inline void setWeightFactor(double value) {
108
+ muFactor_ = value;
109
+ }
110
+ /** Feasibility tolerance - problem essentially feasible if
111
+ individual infeasibilities less than this.
112
+ default 0.1 */
113
+ inline double getFeasibilityTolerance() const {
114
+ return smallInfeas_;
115
+ }
116
+ inline void setFeasibilityTolerance(double value) {
117
+ smallInfeas_ = value;
118
+ }
119
+ /** Reasonably feasible. Dubious method concentrates more on
120
+ objective when sum of infeasibilities less than this.
121
+ Very dubious default value of (Number of rows)/20 */
122
+ inline double getReasonablyFeasible() const {
123
+ return reasonableInfeas_;
124
+ }
125
+ inline void setReasonablyFeasible(double value) {
126
+ reasonableInfeas_ = value;
127
+ }
128
+ /** Exit infeasibility - exit if sum of infeasibilities less than this.
129
+ Default -1.0 (i.e. switched off) */
130
+ inline double getExitInfeasibility() const {
131
+ return exitFeasibility_;
132
+ }
133
+ inline void setExitInfeasibility(double value) {
134
+ exitFeasibility_ = value;
135
+ }
136
+ /** Major iterations. stop after this number.
137
+ Default 30. Use 2-5 for "crash" 50-100 for serious crunching */
138
+ inline int getMajorIterations() const {
139
+ return majorIterations_;
140
+ }
141
+ inline void setMajorIterations(int value) {
142
+ majorIterations_ = value;
143
+ }
144
+ /** Minor iterations. Do this number of tiny steps before
145
+ deciding whether to change weights etc.
146
+ Default - dubious sqrt(Number of Rows).
147
+ Good numbers 105 to 405 say (5 is dubious method of making sure
148
+ idiot is not trying to be clever which it may do every 10 minor
149
+ iterations) */
150
+ inline int getMinorIterations() const {
151
+ return maxIts2_;
152
+ }
153
+ inline void setMinorIterations(int value) {
154
+ maxIts2_ = value;
155
+ }
156
+ // minor iterations for first time
157
+ inline int getMinorIterations0() const {
158
+ return maxIts_;
159
+ }
160
+ inline void setMinorIterations0(int value) {
161
+ maxIts_ = value;
162
+ }
163
+ /** Reduce weight after this many major iterations. It may
164
+ get reduced before this but this is a maximum.
165
+ Default 3. 3-10 plausible. */
166
+ inline int getReduceIterations() const {
167
+ return maxBigIts_;
168
+ }
169
+ inline void setReduceIterations(int value) {
170
+ maxBigIts_ = value;
171
+ }
172
+ /// Amount of information - default of 1 should be okay
173
+ inline int getLogLevel() const {
174
+ return logLevel_;
175
+ }
176
+ inline void setLogLevel(int value) {
177
+ logLevel_ = value;
178
+ }
179
+ /// How lightweight - 0 not, 1 yes, 2 very lightweight
180
+ inline int getLightweight() const {
181
+ return lightWeight_;
182
+ }
183
+ inline void setLightweight(int value) {
184
+ lightWeight_ = value;
185
+ }
186
+ /// strategy
187
+ inline int getStrategy() const {
188
+ return strategy_;
189
+ }
190
+ inline void setStrategy(int value) {
191
+ strategy_ = value;
192
+ }
193
+ /// Fine tuning - okay if feasibility drop this factor
194
+ inline double getDropEnoughFeasibility() const {
195
+ return dropEnoughFeasibility_;
196
+ }
197
+ inline void setDropEnoughFeasibility(double value) {
198
+ dropEnoughFeasibility_ = value;
199
+ }
200
+ /// Fine tuning - okay if weighted obj drop this factor
201
+ inline double getDropEnoughWeighted() const {
202
+ return dropEnoughWeighted_;
203
+ }
204
+ inline void setDropEnoughWeighted(double value) {
205
+ dropEnoughWeighted_ = value;
206
+ }
207
+ /// Set model
208
+ inline void setModel(OsiSolverInterface * model) {
209
+ model_ = model;
210
+ };
211
+ //@}
212
+
213
+
214
+ /// Stuff for internal use
215
+ private:
216
+
217
+ /// Does actual work
218
+ // allow public!
219
+ public:
220
+ void solve2(CoinMessageHandler * handler, const CoinMessages *messages);
221
+ private:
222
+ IdiotResult IdiSolve(
223
+ int nrows, int ncols, double * rowsol , double * colsol,
224
+ double * pi, double * djs, const double * origcost ,
225
+ double * rowlower,
226
+ double * rowupper, const double * lower,
227
+ const double * upper, const double * element,
228
+ const int * row, const CoinBigIndex * colcc,
229
+ const int * length, double * lambda,
230
+ int maxIts, double mu, double drop,
231
+ double maxmin, double offset,
232
+ int strategy, double djTol, double djExit, double djFlag,
233
+ CoinThreadRandom * randomNumberGenerator);
234
+ int dropping(IdiotResult result,
235
+ double tolerance,
236
+ double small,
237
+ int *nbad);
238
+ IdiotResult objval(int nrows, int ncols, double * rowsol , double * colsol,
239
+ double * pi, double * djs, const double * cost ,
240
+ const double * rowlower,
241
+ const double * rowupper, const double * lower,
242
+ const double * upper, const double * elemnt,
243
+ const int * row, const CoinBigIndex * columnStart,
244
+ const int * length, int extraBlock, int * rowExtra,
245
+ double * solExtra, double * elemExtra, double * upperExtra,
246
+ double * costExtra, double weight);
247
+ // Deals with whenUsed and slacks
248
+ int cleanIteration(int iteration, int ordinaryStart, int ordinaryEnd,
249
+ double * colsol, const double * lower, const double * upper,
250
+ const double * rowLower, const double * rowUpper,
251
+ const double * cost, const double * element, double fixTolerance, double & objChange,
252
+ double & infChange, double & maxInfeasibility);
253
+ private:
254
+ /// Underlying model
255
+ OsiSolverInterface * model_;
256
+
257
+ double djTolerance_;
258
+ double mu_; /* starting mu */
259
+ double drop_; /* exit if drop over 5 checks less than this */
260
+ double muFactor_; /* reduce mu by this */
261
+ double stopMu_; /* exit if mu gets smaller than this */
262
+ double smallInfeas_; /* feasibility tolerance */
263
+ double reasonableInfeas_; /* use lambdas if feasibility less than this */
264
+ double exitDrop_; /* candidate for stopping after a major iteration */
265
+ double muAtExit_; /* mu on exit */
266
+ double exitFeasibility_; /* exit if infeasibility less than this */
267
+ double dropEnoughFeasibility_; /* okay if feasibility drop this factor */
268
+ double dropEnoughWeighted_; /* okay if weighted obj drop this factor */
269
+ int * whenUsed_; /* array to say what was used */
270
+ int maxBigIts_; /* always reduce mu after this */
271
+ int maxIts_; /* do this many iterations on first go */
272
+ int majorIterations_;
273
+ int logLevel_;
274
+ int logFreq_;
275
+ int checkFrequency_; /* can exit after 5 * this iterations (on drop) */
276
+ int lambdaIterations_; /* do at least this many lambda iterations */
277
+ int maxIts2_; /* do this many iterations on subsequent goes */
278
+ int strategy_; /* 0 - default strategy
279
+ 1 - do accelerator step but be cautious
280
+ 2 - do not do accelerator step
281
+ 4 - drop, exitDrop and djTolerance all relative
282
+ 8 - keep accelerator step to theta=10.0
283
+
284
+ 32 - Scale
285
+ 512 - crossover
286
+ 2048 - keep lambda across mu change
287
+ 4096 - return best solution (not last found)
288
+ 8192 - always do a presolve in crossover
289
+ 16384 - costed slacks found - so whenUsed_ longer
290
+ 32768 - experimental 1
291
+ 65536 - experimental 2
292
+ 131072 - experimental 3
293
+ 262144 - just values pass etc
294
+ 524288 - don't treat structural slacks as slacks */
295
+
296
+ int lightWeight_; // 0 - normal, 1 lightweight
297
+ };
298
+ #endif
@@ -0,0 +1,206 @@
1
+ // Copyright (C) 2006, International Business Machines
2
+ // Corporation and others. All Rights Reserved.
3
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
4
+
5
+ #ifndef OsiAuxInfo_H
6
+ #define OsiAuxInfo_H
7
+
8
+ class OsiSolverInterface;
9
+
10
+ //#############################################################################
11
+ /** This class allows for a more structured use of algorithmic tweaking to
12
+ an OsiSolverInterface. It is designed to replace the simple use of
13
+ appData_ pointer.
14
+
15
+ This has been done to make it easier to use NonLinear solvers and other
16
+ exotic beasts in a branch and bound mode. After this class definition
17
+ there is one for a derived class for just such a purpose.
18
+
19
+ */
20
+
21
+ class OsiAuxInfo {
22
+ public:
23
+ // Default Constructor
24
+ OsiAuxInfo (void * appData = NULL);
25
+
26
+ // Copy Constructor
27
+ OsiAuxInfo (const OsiAuxInfo & rhs);
28
+ // Destructor
29
+ virtual ~OsiAuxInfo();
30
+
31
+ /// Clone
32
+ virtual OsiAuxInfo * clone() const;
33
+ /// Assignment operator
34
+ OsiAuxInfo & operator=(const OsiAuxInfo& rhs);
35
+
36
+ /// Get application data
37
+ inline void * getApplicationData() const
38
+ { return appData_;}
39
+ protected:
40
+ /// Pointer to user-defined data structure
41
+ void * appData_;
42
+ };
43
+ //#############################################################################
44
+ /** This class allows for the use of more exotic solvers e.g. Non-Linear or Volume.
45
+
46
+ You can derive from this although at present I can't see the need.
47
+ */
48
+
49
+ class OsiBabSolver : public OsiAuxInfo {
50
+ public:
51
+ // Default Constructor
52
+ OsiBabSolver (int solverType=0);
53
+
54
+ // Copy Constructor
55
+ OsiBabSolver (const OsiBabSolver & rhs);
56
+ // Destructor
57
+ virtual ~OsiBabSolver();
58
+
59
+ /// Clone
60
+ virtual OsiAuxInfo * clone() const;
61
+ /// Assignment operator
62
+ OsiBabSolver & operator=(const OsiBabSolver& rhs);
63
+
64
+ /// Update solver
65
+ inline void setSolver(const OsiSolverInterface * solver)
66
+ { solver_ = solver;}
67
+ /// Update solver
68
+ inline void setSolver(const OsiSolverInterface & solver)
69
+ { solver_ = &solver;}
70
+
71
+ /** returns 0 if no heuristic solution, 1 if valid solution
72
+ with better objective value than one passed in
73
+ Sets solution values if good, sets objective value
74
+ numberColumns is size of newSolution
75
+ */
76
+ int solution(double & objectiveValue,
77
+ double * newSolution, int numberColumns);
78
+ /** Set solution and objective value.
79
+ Number of columns and optimization direction taken from current solver.
80
+ Size of solution is numberColumns (may be padded or truncated in function) */
81
+ void setSolution(const double * solution, int numberColumns, double objectiveValue);
82
+
83
+ /** returns true if the object stores a solution, false otherwise. If there
84
+ is a solution then solutionValue and solution will be filled out as well.
85
+ In that case the user needs to allocate solution to be a big enough
86
+ array.
87
+ */
88
+ bool hasSolution(double & solutionValue, double * solution);
89
+
90
+ /** Sets solver type
91
+ 0 - normal LP solver
92
+ 1 - DW - may also return heuristic solutions
93
+ 2 - NLP solver or similar - can't compute objective value just from solution
94
+ check solver to see if feasible and what objective value is
95
+ - may also return heuristic solution
96
+ 3 - NLP solver or similar - can't compute objective value just from solution
97
+ check this (rather than solver) to see if feasible and what objective value is.
98
+ Using Outer Approximation so called lp based
99
+ - may also return heuristic solution
100
+ 4 - normal solver but cuts are needed for integral solution
101
+ */
102
+ inline void setSolverType(int value)
103
+ { solverType_=value;}
104
+ /** gets solver type
105
+ 0 - normal LP solver
106
+ 1 - DW - may also return heuristic solutions
107
+ 2 - NLP solver or similar - can't compute objective value just from solution
108
+ check this (rather than solver) to see if feasible and what objective value is
109
+ - may also return heuristic solution
110
+ 3 - NLP solver or similar - can't compute objective value just from solution
111
+ check this (rather than solver) to see if feasible and what objective value is.
112
+ Using Outer Approximation so called lp based
113
+ - may also return heuristic solution
114
+ 4 - normal solver but cuts are needed for integral solution
115
+ */
116
+ inline int solverType() const
117
+ { return solverType_;}
118
+ /** Return true if getting solution may add cuts so hot start etc will
119
+ be obsolete */
120
+ inline bool solutionAddsCuts() const
121
+ { return solverType_==3;}
122
+ /// Return true if we should try cuts at root even if looks satisfied
123
+ inline bool alwaysTryCutsAtRootNode() const
124
+ { return solverType_==4;}
125
+ /** Returns true if can use solver objective or feasible values,
126
+ otherwise use mipBound etc */
127
+ inline bool solverAccurate() const
128
+ { return solverType_==0||solverType_==2||solverType_==4;}
129
+ /// Returns true if can use reduced costs for fixing
130
+ inline bool reducedCostsAccurate() const
131
+ { return solverType_==0||solverType_==4;}
132
+ /// Get objective (well mip bound)
133
+ double mipBound() const;
134
+ /// Returns true if node feasible
135
+ bool mipFeasible() const;
136
+ /// Set mip bound (only used for some solvers)
137
+ inline void setMipBound(double value)
138
+ { mipBound_ = value;}
139
+ /// Get objective value of saved solution
140
+ inline double bestObjectiveValue() const
141
+ { return bestObjectiveValue_;}
142
+ /// Says whether we want to try cuts at all
143
+ inline bool tryCuts() const
144
+ { return solverType_!=2;}
145
+ /// Says whether we have a warm start (so can do strong branching)
146
+ inline bool warmStart() const
147
+ { return solverType_!=2;}
148
+ /** Get bit mask for odd actions of solvers
149
+ 1 - solution or bound arrays may move in mysterious ways e.g. cplex
150
+ 2 - solver may want bounds before branch
151
+ */
152
+ inline int extraCharacteristics() const
153
+ { return extraCharacteristics_;}
154
+ /** Set bit mask for odd actions of solvers
155
+ 1 - solution or bound arrays may move in mysterious ways e.g. cplex
156
+ 2 - solver may want bounds before branch
157
+ */
158
+ inline void setExtraCharacteristics(int value)
159
+ { extraCharacteristics_=value;}
160
+ /// Pointer to lower bounds before branch (only if extraCharacteristics set)
161
+ inline const double * beforeLower() const
162
+ { return beforeLower_;}
163
+ /// Set pointer to lower bounds before branch (only if extraCharacteristics set)
164
+ inline void setBeforeLower(const double * array)
165
+ { beforeLower_ = array;}
166
+ /// Pointer to upper bounds before branch (only if extraCharacteristics set)
167
+ inline const double * beforeUpper() const
168
+ { return beforeUpper_;}
169
+ /// Set pointer to upper bounds before branch (only if extraCharacteristics set)
170
+ inline void setBeforeUpper(const double * array)
171
+ { beforeUpper_ = array;}
172
+ protected:
173
+ /// Objective value of best solution (if there is one) (minimization)
174
+ double bestObjectiveValue_;
175
+ /// Current lower bound on solution ( if > 1.0e50 infeasible)
176
+ double mipBound_;
177
+ /// Solver to use for getting/setting solutions etc
178
+ const OsiSolverInterface * solver_;
179
+ /// Best integer feasible solution
180
+ double * bestSolution_;
181
+ /// Pointer to lower bounds before branch (only if extraCharacteristics set)
182
+ const double * beforeLower_;
183
+ /// Pointer to upper bounds before branch (only if extraCharacteristics set)
184
+ const double * beforeUpper_;
185
+ /** Solver type
186
+ 0 - normal LP solver
187
+ 1 - DW - may also return heuristic solutions
188
+ 2 - NLP solver or similar - can't compute objective value just from solution
189
+ check this (rather than solver) to see if feasible and what objective value is
190
+ - may also return heuristic solution
191
+ 3 - NLP solver or similar - can't compute objective value just from solution
192
+ check this (rather than solver) to see if feasible and what objective value is.
193
+ Using Outer Approximation so called lp based
194
+ - may also return heuristic solution
195
+ */
196
+ int solverType_;
197
+ /// Size of solution
198
+ int sizeSolution_;
199
+ /** Bit mask for odd actions of solvers
200
+ 1 - solution or bound arrays may move in mysterious ways e.g. cplex
201
+ 2 - solver may want bounds before branch
202
+ */
203
+ int extraCharacteristics_;
204
+ };
205
+
206
+ #endif