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,148 @@
1
+ /* $Id: CoinShallowPackedVector.hpp 1498 2011-11-02 15:25:35Z mjs $ */
2
+ // Copyright (C) 2000, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ #ifndef CoinShallowPackedVector_H
7
+ #define CoinShallowPackedVector_H
8
+
9
+ #if defined(_MSC_VER)
10
+ // Turn off compiler warning about long names
11
+ # pragma warning(disable:4786)
12
+ #endif
13
+
14
+ #include "CoinError.hpp"
15
+ #include "CoinPackedVectorBase.hpp"
16
+
17
+ /** Shallow Sparse Vector
18
+
19
+ This class is for sparse vectors where the indices and
20
+ elements are stored elsewhere. This class only maintains
21
+ pointers to the indices and elements. Since this class
22
+ does not own the index and element data it provides
23
+ read only access to to the data. An CoinSparsePackedVector
24
+ must be used when the sparse vector's data will be altered.
25
+
26
+ This class stores pointers to the vectors.
27
+ It does not actually contain the vectors.
28
+
29
+ Here is a sample usage:
30
+ @verbatim
31
+ const int ne = 4;
32
+ int inx[ne] = { 1, 4, 0, 2 };
33
+ double el[ne] = { 10., 40., 1., 50. };
34
+
35
+ // Create vector and set its value
36
+ CoinShallowPackedVector r(ne,inx,el);
37
+
38
+ // access each index and element
39
+ assert( r.indices ()[0]== 1 );
40
+ assert( r.elements()[0]==10. );
41
+ assert( r.indices ()[1]== 4 );
42
+ assert( r.elements()[1]==40. );
43
+ assert( r.indices ()[2]== 0 );
44
+ assert( r.elements()[2]== 1. );
45
+ assert( r.indices ()[3]== 2 );
46
+ assert( r.elements()[3]==50. );
47
+
48
+ // access as a full storage vector
49
+ assert( r[ 0]==1. );
50
+ assert( r[ 1]==10.);
51
+ assert( r[ 2]==50.);
52
+ assert( r[ 3]==0. );
53
+ assert( r[ 4]==40.);
54
+
55
+ // Tests for equality and equivalence
56
+ CoinShallowPackedVector r1;
57
+ r1=r;
58
+ assert( r==r1 );
59
+ r.sort(CoinIncrElementOrdered());
60
+ assert( r!=r1 );
61
+
62
+ // Add packed vectors.
63
+ // Similarly for subtraction, multiplication,
64
+ // and division.
65
+ CoinPackedVector add = r + r1;
66
+ assert( add[0] == 1.+ 1. );
67
+ assert( add[1] == 10.+10. );
68
+ assert( add[2] == 50.+50. );
69
+ assert( add[3] == 0.+ 0. );
70
+ assert( add[4] == 40.+40. );
71
+ assert( r.sum() == 10.+40.+1.+50. );
72
+ @endverbatim
73
+ */
74
+ class CoinShallowPackedVector : public CoinPackedVectorBase {
75
+ friend void CoinShallowPackedVectorUnitTest();
76
+
77
+ public:
78
+
79
+ /**@name Get methods */
80
+ //@{
81
+ /// Get length of indices and elements vectors
82
+ virtual int getNumElements() const { return nElements_; }
83
+ /// Get indices of elements
84
+ virtual const int * getIndices() const { return indices_; }
85
+ /// Get element values
86
+ virtual const double * getElements() const { return elements_; }
87
+ //@}
88
+
89
+ /**@name Set methods */
90
+ //@{
91
+ /// Reset the vector (as if were just created an empty vector)
92
+ void clear();
93
+ /** Assignment operator. */
94
+ CoinShallowPackedVector& operator=(const CoinShallowPackedVector & x);
95
+ /** Assignment operator from a CoinPackedVectorBase. */
96
+ CoinShallowPackedVector& operator=(const CoinPackedVectorBase & x);
97
+ /** just like the explicit constructor */
98
+ void setVector(int size, const int * indices, const double * elements,
99
+ bool testForDuplicateIndex = true);
100
+ //@}
101
+
102
+ /**@name Methods to create, set and destroy */
103
+ //@{
104
+ /** Default constructor. */
105
+ CoinShallowPackedVector(bool testForDuplicateIndex = true);
106
+ /** Explicit Constructor.
107
+ Set vector size, indices, and elements. Size is the length of both the
108
+ indices and elements vectors. The indices and elements vectors are not
109
+ copied into this class instance. The ShallowPackedVector only maintains
110
+ the pointers to the indices and elements vectors. <br>
111
+ The last argument specifies whether the creator of the object knows in
112
+ advance that there are no duplicate indices.
113
+ */
114
+ CoinShallowPackedVector(int size,
115
+ const int * indices, const double * elements,
116
+ bool testForDuplicateIndex = true);
117
+ /** Copy constructor from the base class. */
118
+ CoinShallowPackedVector(const CoinPackedVectorBase &);
119
+ /** Copy constructor. */
120
+ CoinShallowPackedVector(const CoinShallowPackedVector &);
121
+ /** Destructor. */
122
+ virtual ~CoinShallowPackedVector() {}
123
+ /// Print vector information.
124
+ void print();
125
+ //@}
126
+
127
+ private:
128
+ /**@name Private member data */
129
+ //@{
130
+ /// Vector indices
131
+ const int * indices_;
132
+ ///Vector elements
133
+ const double * elements_;
134
+ /// Size of indices and elements vectors
135
+ int nElements_;
136
+ //@}
137
+ };
138
+
139
+ //#############################################################################
140
+ /** A function that tests the methods in the CoinShallowPackedVector class. The
141
+ only reason for it not to be a member method is that this way it doesn't
142
+ have to be compiled into the library. And that's a gain, because the
143
+ library should be compiled with optimization on, but this method should be
144
+ compiled with debugging. */
145
+ void
146
+ CoinShallowPackedVectorUnitTest();
147
+
148
+ #endif
@@ -0,0 +1,117 @@
1
+ /* $Id: CoinSignal.hpp 1810 2015-03-13 20:16:34Z tkr $ */
2
+ // Copyright (C) 2003, International Business Machines
3
+ // Corporation and others. All Rights Reserved.
4
+ // This code is licensed under the terms of the Eclipse Public License (EPL).
5
+
6
+ #ifndef _CoinSignal_hpp
7
+ #define _CoinSignal_hpp
8
+
9
+ // This file is fully docified.
10
+ // There's nothing to docify...
11
+
12
+ //#############################################################################
13
+
14
+ #include <csignal>
15
+
16
+ //#############################################################################
17
+
18
+ #if defined(_MSC_VER)
19
+ typedef void (__cdecl *CoinSighandler_t) (int);
20
+ # define CoinSighandler_t_defined
21
+ #endif
22
+
23
+ //-----------------------------------------------------------------------------
24
+
25
+ #if (defined(__GNUC__) && defined(__linux__))
26
+ typedef sighandler_t CoinSighandler_t;
27
+ # define CoinSighandler_t_defined
28
+ #endif
29
+
30
+ //-----------------------------------------------------------------------------
31
+
32
+ #if defined(__CYGWIN__) && defined(__GNUC__)
33
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
34
+ # define CoinSighandler_t_defined
35
+ #endif
36
+
37
+ //-----------------------------------------------------------------------------
38
+
39
+ #if defined(__MINGW32__) && defined(__GNUC__)
40
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
41
+ # define CoinSighandler_t_defined
42
+ #endif
43
+
44
+ //-----------------------------------------------------------------------------
45
+
46
+ #if defined(__FreeBSD__) && defined(__GNUC__)
47
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
48
+ # define CoinSighandler_t_defined
49
+ #endif
50
+
51
+ //-----------------------------------------------------------------------------
52
+
53
+ #if defined(__NetBSD__) && defined(__GNUC__)
54
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
55
+ # define CoinSighandler_t_defined
56
+ #endif
57
+
58
+ //-----------------------------------------------------------------------------
59
+
60
+ #if defined(_AIX)
61
+ # if defined(__GNUC__)
62
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
63
+ # define CoinSighandler_t_defined
64
+ # endif
65
+ #endif
66
+
67
+ //-----------------------------------------------------------------------------
68
+
69
+ #if defined (__hpux)
70
+ # define CoinSighandler_t_defined
71
+ # if defined(__GNUC__)
72
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
73
+ # else
74
+ extern "C" {
75
+ typedef void (*CoinSighandler_t) (int);
76
+ }
77
+ # endif
78
+ #endif
79
+
80
+ //-----------------------------------------------------------------------------
81
+
82
+ #if defined(__sun)
83
+ # if defined(__SUNPRO_CC)
84
+ # include <signal.h>
85
+ extern "C" {
86
+ typedef void (*CoinSighandler_t) (int);
87
+ }
88
+ # define CoinSighandler_t_defined
89
+ # endif
90
+ # if defined(__GNUC__)
91
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
92
+ # define CoinSighandler_t_defined
93
+ # endif
94
+ #endif
95
+
96
+ //-----------------------------------------------------------------------------
97
+
98
+ #if defined(__MACH__) && defined(__GNUC__)
99
+ typedef __decltype(SIG_DFL) CoinSighandler_t;
100
+ # define CoinSighandler_t_defined
101
+ #endif
102
+
103
+ //#############################################################################
104
+
105
+ #ifndef CoinSighandler_t_defined
106
+ # warning("OS and/or compiler is not recognized. Defaulting to:");
107
+ # warning("extern 'C' {")
108
+ # warning(" typedef void (*CoinSighandler_t) (int);")
109
+ # warning("}")
110
+ extern "C" {
111
+ typedef void (*CoinSighandler_t) (int);
112
+ }
113
+ #endif
114
+
115
+ //#############################################################################
116
+
117
+ #endif
@@ -0,0 +1,431 @@
1
+ /* $Id: CoinSimpFactorization.hpp 1416 2011-04-17 09:57:29Z stefan $ */
2
+ // Copyright (C) 2008, 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
+ /*
7
+ This is a simple factorization of the LP Basis
8
+ */
9
+ #ifndef CoinSimpFactorization_H
10
+ #define CoinSimpFactorization_H
11
+
12
+ #include <iostream>
13
+ #include <string>
14
+ #include <cassert>
15
+ #include "CoinTypes.hpp"
16
+ #include "CoinIndexedVector.hpp"
17
+ #include "CoinDenseFactorization.hpp"
18
+ class CoinPackedMatrix;
19
+
20
+
21
+ /// pointers used during factorization
22
+ class FactorPointers{
23
+ public:
24
+ double *rowMax;
25
+ int *firstRowKnonzeros;
26
+ int *prevRow;
27
+ int *nextRow;
28
+ int *firstColKnonzeros;
29
+ int *prevColumn;
30
+ int *nextColumn;
31
+ int *newCols;
32
+ //constructor
33
+ FactorPointers( int numRows, int numCols, int *UrowLengths_, int *UcolLengths_ );
34
+ // destructor
35
+ ~ FactorPointers();
36
+ };
37
+
38
+ class CoinSimpFactorization : public CoinOtherFactorization {
39
+ friend void CoinSimpFactorizationUnitTest( const std::string & mpsDir );
40
+
41
+ public:
42
+
43
+ /**@name Constructors and destructor and copy */
44
+ //@{
45
+ /// Default constructor
46
+ CoinSimpFactorization ( );
47
+ /// Copy constructor
48
+ CoinSimpFactorization ( const CoinSimpFactorization &other);
49
+
50
+ /// Destructor
51
+ virtual ~CoinSimpFactorization ( );
52
+ /// = copy
53
+ CoinSimpFactorization & operator = ( const CoinSimpFactorization & other );
54
+ /// Clone
55
+ virtual CoinOtherFactorization * clone() const ;
56
+ //@}
57
+
58
+ /**@name Do factorization - public */
59
+ //@{
60
+ /// Gets space for a factorization
61
+ virtual void getAreas ( int numberRows,
62
+ int numberColumns,
63
+ CoinBigIndex maximumL,
64
+ CoinBigIndex maximumU );
65
+
66
+ /// PreProcesses column ordered copy of basis
67
+ virtual void preProcess ( );
68
+ /** Does most of factorization returning status
69
+ 0 - OK
70
+ -99 - needs more memory
71
+ -1 - singular - use numberGoodColumns and redo
72
+ */
73
+ virtual int factor ( );
74
+ /// Does post processing on valid factorization - putting variables on correct rows
75
+ virtual void postProcess(const int * sequence, int * pivotVariable);
76
+ /// Makes a non-singular basis by replacing variables
77
+ virtual void makeNonSingular(int * sequence, int numberColumns);
78
+ //@}
79
+
80
+ /**@name general stuff such as status */
81
+ //@{
82
+ /// Total number of elements in factorization
83
+ virtual inline int numberElements ( ) const {
84
+ return numberRows_*(numberColumns_+numberPivots_);
85
+ }
86
+ /// Returns maximum absolute value in factorization
87
+ double maximumCoefficient() const;
88
+ //@}
89
+
90
+ /**@name rank one updates which do exist */
91
+ //@{
92
+
93
+ /** Replaces one Column to basis,
94
+ returns 0=OK, 1=Probably OK, 2=singular, 3=no room
95
+ If checkBeforeModifying is true will do all accuracy checks
96
+ before modifying factorization. Whether to set this depends on
97
+ speed considerations. You could just do this on first iteration
98
+ after factorization and thereafter re-factorize
99
+ partial update already in U */
100
+ virtual int replaceColumn ( CoinIndexedVector * regionSparse,
101
+ int pivotRow,
102
+ double pivotCheck ,
103
+ bool checkBeforeModifying=false,
104
+ double acceptablePivot=1.0e-8);
105
+ //@}
106
+
107
+ /**@name various uses of factorization (return code number elements)
108
+ which user may want to know about */
109
+ //@{
110
+ /** Updates one column (FTRAN) from regionSparse2
111
+ Tries to do FT update
112
+ number returned is negative if no room
113
+ regionSparse starts as zero and is zero at end.
114
+ Note - if regionSparse2 packed on input - will be packed on output
115
+ */
116
+
117
+ virtual int updateColumnFT ( CoinIndexedVector * regionSparse,
118
+ CoinIndexedVector * regionSparse2,
119
+ bool noPermute=false);
120
+
121
+ /** This version has same effect as above with FTUpdate==false
122
+ so number returned is always >=0 */
123
+ virtual int updateColumn ( CoinIndexedVector * regionSparse,
124
+ CoinIndexedVector * regionSparse2,
125
+ bool noPermute=false) const;
126
+ /// does FTRAN on two columns
127
+ virtual int updateTwoColumnsFT(CoinIndexedVector * regionSparse1,
128
+ CoinIndexedVector * regionSparse2,
129
+ CoinIndexedVector * regionSparse3,
130
+ bool noPermute=false);
131
+ /// does updatecolumn if save==true keeps column for replace column
132
+ int upColumn ( CoinIndexedVector * regionSparse,
133
+ CoinIndexedVector * regionSparse2,
134
+ bool noPermute=false, bool save=false) const;
135
+ /** Updates one column (BTRAN) from regionSparse2
136
+ regionSparse starts as zero and is zero at end
137
+ Note - if regionSparse2 packed on input - will be packed on output
138
+ */
139
+ virtual int updateColumnTranspose ( CoinIndexedVector * regionSparse,
140
+ CoinIndexedVector * regionSparse2) const;
141
+ /// does updateColumnTranspose, the other is a wrapper
142
+ int upColumnTranspose ( CoinIndexedVector * regionSparse,
143
+ CoinIndexedVector * regionSparse2) const;
144
+ //@}
145
+ /// *** Below this user may not want to know about
146
+
147
+ /**@name various uses of factorization
148
+ which user may not want to know about (left over from my LP code) */
149
+ //@{
150
+ /// Get rid of all memory
151
+ inline void clearArrays()
152
+ { gutsOfDestructor();}
153
+ /// Returns array to put basis indices in
154
+ inline int * indices() const
155
+ { return reinterpret_cast<int *> (elements_+numberRows_*numberRows_);}
156
+ /// Returns permute in
157
+ virtual inline int * permute() const
158
+ { return pivotRow_;}
159
+ //@}
160
+
161
+ /// The real work of destructor
162
+ void gutsOfDestructor();
163
+ /// The real work of constructor
164
+ void gutsOfInitialize();
165
+ /// The real work of copy
166
+ void gutsOfCopy(const CoinSimpFactorization &other);
167
+
168
+
169
+ /// calls factorization
170
+ void factorize(int numberOfRows,
171
+ int numberOfColumns,
172
+ const int colStarts[],
173
+ const int indicesRow[],
174
+ const double elements[]);
175
+ /// main loop of factorization
176
+ int mainLoopFactor (FactorPointers &pointers );
177
+ /// copies L by rows
178
+ void copyLbyRows();
179
+ /// copies U by columns
180
+ void copyUbyColumns();
181
+ /// finds a pivot element using Markowitz count
182
+ int findPivot(FactorPointers &pointers, int &r, int &s, bool &ifSlack);
183
+ /// finds a pivot in a shortest column
184
+ int findPivotShCol(FactorPointers &pointers, int &r, int &s);
185
+ /// finds a pivot in the first column available
186
+ int findPivotSimp(FactorPointers &pointers, int &r, int &s);
187
+ /// does Gauss elimination
188
+ void GaussEliminate(FactorPointers &pointers, int &r, int &s);
189
+ /// finds short row that intersects a given column
190
+ int findShortRow(const int column, const int length, int &minRow,
191
+ int &minRowLength, FactorPointers &pointers);
192
+ /// finds short column that intersects a given row
193
+ int findShortColumn(const int row, const int length, int &minCol,
194
+ int &minColLength, FactorPointers &pointers);
195
+ /// finds maximum absolute value in a row
196
+ double findMaxInRrow(const int row, FactorPointers &pointers);
197
+ /// does pivoting
198
+ void pivoting(const int pivotRow, const int pivotColumn,
199
+ const double invPivot, FactorPointers &pointers);
200
+ /// part of pivoting
201
+ void updateCurrentRow(const int pivotRow, const int row,
202
+ const double multiplier, FactorPointers &pointers,
203
+ int &newNonZeros);
204
+ /// allocates more space for L
205
+ void increaseLsize();
206
+ /// allocates more space for a row of U
207
+ void increaseRowSize(const int row, const int newSize);
208
+ /// allocates more space for a column of U
209
+ void increaseColSize(const int column, const int newSize, const bool b);
210
+ /// allocates more space for rows of U
211
+ void enlargeUrow(const int numNewElements);
212
+ /// allocates more space for columns of U
213
+ void enlargeUcol(const int numNewElements, const bool b);
214
+ /// finds a given row in a column
215
+ int findInRow(const int row, const int column);
216
+ /// finds a given column in a row
217
+ int findInColumn(const int column, const int row);
218
+ /// declares a row inactive
219
+ void removeRowFromActSet(const int row, FactorPointers &pointers);
220
+ /// declares a column inactive
221
+ void removeColumnFromActSet(const int column, FactorPointers &pointers);
222
+ /// allocates space for U
223
+ void allocateSpaceForU();
224
+ /// allocates several working arrays
225
+ void allocateSomeArrays();
226
+ /// initializes some numbers
227
+ void initialSomeNumbers();
228
+ /// solves L x = b
229
+ void Lxeqb(double *b) const;
230
+ /// same as above but with two rhs
231
+ void Lxeqb2(double *b1, double *b2) const;
232
+ /// solves U x = b
233
+ void Uxeqb(double *b, double *sol) const;
234
+ /// same as above but with two rhs
235
+ void Uxeqb2(double *b1, double *sol1, double *sol2, double *b2) const;
236
+ /// solves x L = b
237
+ void xLeqb(double *b) const;
238
+ /// solves x U = b
239
+ void xUeqb(double *b, double *sol) const;
240
+ /// updates factorization after a Simplex iteration
241
+ int LUupdate(int newBasicCol);
242
+ /// creates a new eta vector
243
+ void newEta(int row, int numNewElements);
244
+ /// makes a copy of row permutations
245
+ void copyRowPermutations();
246
+ /// solves H x = b, where H is a product of eta matrices
247
+ void Hxeqb(double *b) const;
248
+ /// same as above but with two rhs
249
+ void Hxeqb2(double *b1, double *b2) const;
250
+ /// solves x H = b
251
+ void xHeqb(double *b) const;
252
+ /// does FTRAN
253
+ void ftran(double *b, double *sol, bool save) const;
254
+ /// same as above but with two columns
255
+ void ftran2(double *b1, double *sol1, double *b2, double *sol2) const;
256
+ /// does BTRAN
257
+ void btran(double *b, double *sol) const;
258
+ ///---------------------------------------
259
+
260
+
261
+
262
+ //@}
263
+ protected:
264
+ /** Returns accuracy status of replaceColumn
265
+ returns 0=OK, 1=Probably OK, 2=singular */
266
+ int checkPivot(double saveFromU, double oldPivot) const;
267
+ ////////////////// data //////////////////
268
+ protected:
269
+
270
+ /**@name data */
271
+ //@{
272
+ /// work array (should be initialized to zero)
273
+ double *denseVector_;
274
+ /// work array
275
+ double *workArea2_;
276
+ /// work array
277
+ double *workArea3_;
278
+ /// array of labels (should be initialized to zero)
279
+ int *vecLabels_;
280
+ /// array of indices
281
+ int *indVector_;
282
+
283
+ /// auxiliary vector
284
+ double *auxVector_;
285
+ /// auxiliary vector
286
+ int *auxInd_;
287
+
288
+ /// vector to keep for LUupdate
289
+ double *vecKeep_;
290
+ /// indices of this vector
291
+ int *indKeep_;
292
+ /// number of nonzeros
293
+ mutable int keepSize_;
294
+
295
+
296
+
297
+ /// Starts of the rows of L
298
+ int *LrowStarts_;
299
+ /// Lengths of the rows of L
300
+ int *LrowLengths_;
301
+ /// L by rows
302
+ double *Lrows_;
303
+ /// indices in the rows of L
304
+ int *LrowInd_;
305
+ /// Size of Lrows_;
306
+ int LrowSize_;
307
+ /// Capacity of Lrows_
308
+ int LrowCap_;
309
+
310
+ /// Starts of the columns of L
311
+ int *LcolStarts_;
312
+ /// Lengths of the columns of L
313
+ int *LcolLengths_;
314
+ /// L by columns
315
+ double *Lcolumns_;
316
+ /// indices in the columns of L
317
+ int *LcolInd_;
318
+ /// numbers of elements in L
319
+ int LcolSize_;
320
+ /// maximum capacity of L
321
+ int LcolCap_;
322
+
323
+
324
+ /// Starts of the rows of U
325
+ int *UrowStarts_;
326
+ /// Lengths of the rows of U
327
+ int *UrowLengths_;
328
+ #ifdef COIN_SIMP_CAPACITY
329
+ /// Capacities of the rows of U
330
+ int *UrowCapacities_;
331
+ #endif
332
+ /// U by rows
333
+ double *Urows_;
334
+ /// Indices in the rows of U
335
+ int *UrowInd_;
336
+ /// maximum capacity of Urows
337
+ int UrowMaxCap_;
338
+ /// number of used places in Urows
339
+ int UrowEnd_;
340
+ /// first row in U
341
+ int firstRowInU_;
342
+ /// last row in U
343
+ int lastRowInU_;
344
+ /// previous row in U
345
+ int *prevRowInU_;
346
+ /// next row in U
347
+ int *nextRowInU_;
348
+
349
+ /// Starts of the columns of U
350
+ int *UcolStarts_;
351
+ /// Lengths of the columns of U
352
+ int *UcolLengths_;
353
+ #ifdef COIN_SIMP_CAPACITY
354
+ /// Capacities of the columns of U
355
+ int *UcolCapacities_;
356
+ #endif
357
+ /// U by columns
358
+ double *Ucolumns_;
359
+ /// Indices in the columns of U
360
+ int *UcolInd_;
361
+ /// previous column in U
362
+ int *prevColInU_;
363
+ /// next column in U
364
+ int *nextColInU_;
365
+ /// first column in U
366
+ int firstColInU_;
367
+ /// last column in U
368
+ int lastColInU_;
369
+ /// maximum capacity of Ucolumns_
370
+ int UcolMaxCap_;
371
+ /// last used position in Ucolumns_
372
+ int UcolEnd_;
373
+ /// indicator of slack variables
374
+ int *colSlack_;
375
+
376
+ /// inverse values of the elements of diagonal of U
377
+ double *invOfPivots_;
378
+
379
+ /// permutation of columns
380
+ int *colOfU_;
381
+ /// position of column after permutation
382
+ int *colPosition_;
383
+ /// permutations of rows
384
+ int *rowOfU_;
385
+ /// position of row after permutation
386
+ int *rowPosition_;
387
+ /// permutations of rows during LUupdate
388
+ int *secRowOfU_;
389
+ /// position of row after permutation during LUupdate
390
+ int *secRowPosition_;
391
+
392
+ /// position of Eta vector
393
+ int *EtaPosition_;
394
+ /// Starts of eta vectors
395
+ int *EtaStarts_;
396
+ /// Lengths of eta vectors
397
+ int *EtaLengths_;
398
+ /// columns of eta vectors
399
+ int *EtaInd_;
400
+ /// elements of eta vectors
401
+ double *Eta_;
402
+ /// number of elements in Eta_
403
+ int EtaSize_;
404
+ /// last eta row
405
+ int lastEtaRow_;
406
+ /// maximum number of eta vectors
407
+ int maxEtaRows_;
408
+ /// Capacity of Eta_
409
+ int EtaMaxCap_;
410
+
411
+ /// minimum storage increase
412
+ int minIncrease_;
413
+ /// maximum size for the diagonal of U after update
414
+ double updateTol_;
415
+ /// do Shul heuristic
416
+ bool doSuhlHeuristic_;
417
+ /// maximum of U
418
+ double maxU_;
419
+ /// bound on the growth rate
420
+ double maxGrowth_;
421
+ /// maximum of A
422
+ double maxA_;
423
+ /// maximum number of candidates for pivot
424
+ int pivotCandLimit_;
425
+ /// number of slacks in basis
426
+ int numberSlacks_;
427
+ /// number of slacks in irst basis
428
+ int firstNumberSlacks_;
429
+ //@}
430
+ };
431
+ #endif