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,364 @@
1
+ // Last edit: 02/05/2013
2
+ //
3
+ // Name: CglGMI.hpp
4
+ // Author: Giacomo Nannicini
5
+ // Singapore University of Technology and Design, Singapore
6
+ // email: nannicini@sutd.edu.sg
7
+ // Date: 11/17/09
8
+ //-----------------------------------------------------------------------------
9
+ // Copyright (C) 2009, Giacomo Nannicini. All Rights Reserved.
10
+
11
+ #ifndef CglGMI_H
12
+ #define CglGMI_H
13
+
14
+ #include "CglCutGenerator.hpp"
15
+ #include "CglGMIParam.hpp"
16
+ #include "CoinWarmStartBasis.hpp"
17
+ #include "CoinFactorization.hpp"
18
+
19
+ /* Enable tracking of rejection of cutting planes. If this is disabled,
20
+ the cut generator is slightly faster. If defined, it enables proper use
21
+ of setTrackRejection and related functions. */
22
+ //#define TRACK_REJECT
23
+
24
+ /* Debug output */
25
+ //#define GMI_TRACE
26
+
27
+ /* Debug output: print optimal tableau */
28
+ //#define GMI_TRACETAB
29
+
30
+ /* Print reason for cut rejection, whenever a cut is discarded */
31
+ //#define GMI_TRACE_CLEAN
32
+
33
+ /** Gomory cut generator with several cleaning procedures, used to test
34
+ * the numerical safety of the resulting cuts
35
+ */
36
+
37
+ class CglGMI : public CglCutGenerator {
38
+
39
+ friend void CglGMIUnitTest(const OsiSolverInterface * siP,
40
+ const std::string mpdDir);
41
+ public:
42
+
43
+ /** Public enum: all possible reasons for cut rejection */
44
+ enum RejectionType{
45
+ failureFractionality,
46
+ failureDynamism,
47
+ failureViolation,
48
+ failureSupport,
49
+ failureScale
50
+ };
51
+
52
+ /**@name generateCuts */
53
+ //@{
54
+ /** Generate Gomory Mixed-Integer cuts for the model of the solver
55
+ interface si.
56
+
57
+ Insert the generated cuts into OsiCuts cs.
58
+
59
+ Warning: This generator currently works only with the Lp solvers Clp or
60
+ Cplex9.0 or higher. It requires access to the optimal tableau and
61
+ optimal basis inverse and makes assumptions on the way slack variables
62
+ are added by the solver. The Osi implementations for Clp and Cplex
63
+ verify these assumptions.
64
+
65
+ When calling the generator, the solver interface si must contain
66
+ an optimized problem and information related to the optimal
67
+ basis must be available through the OsiSolverInterface methods
68
+ (si->optimalBasisIsAvailable() must return 'true'). It is also
69
+ essential that the integrality of structural variable i can be
70
+ obtained using si->isInteger(i).
71
+
72
+ */
73
+ virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
74
+ const CglTreeInfo info = CglTreeInfo());
75
+
76
+ /// Return true if needs optimal basis to do cuts (will return true)
77
+ virtual bool needsOptimalBasis() const { return true; }
78
+ //@}
79
+
80
+ /**@name Common Methods */
81
+ //@{
82
+ // Function for checking equality with user tolerance
83
+ inline bool areEqual(double x, double y,
84
+ double epsAbs = 1e-12,
85
+ double epsRel = 1e-12) {
86
+ return (fabs((x) - (y)) <=
87
+ std::max(epsAbs, epsRel * std::max(fabs(x), fabs(y))));
88
+ }
89
+
90
+ // Function for checking is a number is zero
91
+ inline bool isZero(double x, double epsZero = 1e-20) {
92
+ return (fabs(x) <= epsZero);
93
+ }
94
+
95
+
96
+ // Function for checking if a number is integer
97
+ inline bool isIntegerValue(double x,
98
+ double intEpsAbs = 1e-9,
99
+ double intEpsRel = 1e-15) {
100
+ return (fabs((x) - floor((x)+0.5)) <=
101
+ std::max(intEpsAbs, intEpsRel * fabs(x)));
102
+ }
103
+
104
+
105
+ //@}
106
+
107
+
108
+ /**@name Public Methods */
109
+ //@{
110
+
111
+ // Set the parameters to the values of the given CglGMIParam object.
112
+ void setParam(const CglGMIParam &source);
113
+ // Return the CglGMIParam object of the generator.
114
+ inline CglGMIParam getParam() const {return param;}
115
+ inline CglGMIParam & getParam() {return param;}
116
+
117
+ // Compute entries of is_integer.
118
+ void computeIsInteger();
119
+
120
+ /// Print the current simplex tableau
121
+ void printOptTab(OsiSolverInterface *solver) const;
122
+
123
+ /// Set/get tracking of the rejection of cutting planes.
124
+ /// Note that all rejection related functions will not do anything
125
+ /// unless the generator is compiled with the define GMI_TRACK_REJECTION
126
+ void setTrackRejection(bool value);
127
+ bool getTrackRejection();
128
+
129
+ /// Get number of cuts rejected for given reason; see above
130
+ int getNumberRejectedCuts(RejectionType reason);
131
+
132
+ /// Reset counters for cut rejection tracking; see above
133
+ void resetRejectionCounters();
134
+
135
+ /// Get total number of generated cuts since last resetRejectionCounters()
136
+ int getNumberGeneratedCuts();
137
+
138
+ //@}
139
+
140
+ /**@name Constructors and destructors */
141
+ //@{
142
+ /// Default constructor
143
+ CglGMI();
144
+
145
+ /// Constructor with specified parameters
146
+ CglGMI(const CglGMIParam &param);
147
+
148
+ /// Copy constructor
149
+ CglGMI(const CglGMI &);
150
+
151
+ /// Clone
152
+ virtual CglCutGenerator * clone() const;
153
+
154
+ /// Assignment operator
155
+ CglGMI & operator=(const CglGMI& rhs);
156
+
157
+ /// Destructor
158
+ virtual ~CglGMI();
159
+ /// Create C++ lines to get to current state
160
+ virtual std::string generateCpp( FILE * fp);
161
+
162
+ //@}
163
+
164
+ private:
165
+
166
+ // Private member methods
167
+
168
+ /**@name Private member methods */
169
+
170
+ //@{
171
+
172
+ // Method generating the cuts after all CglGMI members are properly set.
173
+ void generateCuts(OsiCuts & cs);
174
+
175
+ /// Compute the fractional part of value, allowing for small error.
176
+ inline double aboveInteger(double value) const;
177
+
178
+ /// Compute the fractionalities involved in the cut, and the cut rhs.
179
+ /// Returns true if cut is accepted, false if discarded
180
+ inline bool computeCutFractionality(double varRhs, double& cutRhs);
181
+
182
+ /// Compute the cut coefficient on a given variable
183
+ inline double computeCutCoefficient(double rowElem, int index);
184
+
185
+ /// Use multiples of the initial inequalities to cancel out the coefficient
186
+ /// on a slack variables.
187
+ inline void eliminateSlack(double cutElem, int cutIndex, double* cut,
188
+ double& cutRhs, const double *elements,
189
+ const int *rowStart, const int *indices,
190
+ const int *rowLength, const double *rhs);
191
+
192
+ /// Change the sign of the coefficients of the non basic
193
+ /// variables at their upper bound.
194
+ inline void flip(double& rowElem, int rowIndex);
195
+
196
+ /// Change the sign of the coefficients of the non basic
197
+ /// variables at their upper bound and do the translations restoring
198
+ /// the original bounds. Modify the right hand side
199
+ /// accordingly. Two functions: one for original variables, one for slacks.
200
+ inline void unflipOrig(double& rowElem, int rowIndex, double& rowRhs);
201
+ inline void unflipSlack(double& rowElem, int rowIndex, double& rowRhs,
202
+ const double* slack_val);
203
+
204
+ /// Pack a row of ncol elements
205
+ inline void packRow(double* row, double* rowElem, int* rowIndex,
206
+ int& rowNz);
207
+
208
+ /// Clean the cutting plane; the cleaning procedure does several things
209
+ /// like removing small coefficients, scaling, and checks several
210
+ /// acceptance criteria. If this returns false, the cut should be discarded.
211
+ /// There are several cleaning procedures available, that can be selected
212
+ /// via the parameter param.setCLEANING_PROCEDURE(int value)
213
+ bool cleanCut(double* cutElem, int* cutIndex, int& cutNz,
214
+ double& cutRhs, const double* xbar);
215
+
216
+ /// Cut cleaning procedures: return true if successfull, false if
217
+ /// cut should be discarded by the caller of if problems encountered
218
+
219
+ /// Check the violation
220
+ bool checkViolation(const double* cutElem, const int* cutIndex,
221
+ int cutNz, double cutrhs, const double* xbar);
222
+
223
+ /// Check the dynamism
224
+ bool checkDynamism(const double* cutElem, const int* cutIndex,
225
+ int cutNz);
226
+
227
+ /// Check the support
228
+ bool checkSupport(int cutNz);
229
+
230
+ /// Remove small coefficients and adjust the rhs accordingly
231
+ bool removeSmallCoefficients(double* cutElem, int* cutIndex,
232
+ int& cutNz, double& cutRhs);
233
+
234
+ /// Adjust the rhs by relaxing by a small amount (relative or absolute)
235
+ void relaxRhs(double& rhs);
236
+
237
+ /// Scale the cutting plane in different ways;
238
+ /// scaling_type possible values:
239
+ /// 0 : scale to obtain integral cut
240
+ /// 1 : scale based on norm, to obtain cut norm equal to ncol
241
+ /// 2 : scale to obtain largest coefficient equal to 1
242
+ bool scaleCut(double* cutElem, int* cutIndex, int cutNz,
243
+ double& cutRhs, int scalingType);
244
+
245
+ /// Scale the cutting plane in order to generate integral coefficients
246
+ bool scaleCutIntegral(double* cutElem, int* cutIndex, int cutNz,
247
+ double& cutRhs);
248
+
249
+ /// Compute the nearest rational number; used by scale_row_integral
250
+ bool nearestRational(double val, double maxdelta, long maxdnom,
251
+ long& numerator, long& denominator);
252
+
253
+ /// Compute the greatest common divisor
254
+ long computeGcd(long a, long b);
255
+
256
+ /// print a vector of integers
257
+ void printvecINT(const char *vecstr, const int *x, int n) const;
258
+ /// print a vector of doubles: dense form
259
+ void printvecDBL(const char *vecstr, const double *x, int n) const;
260
+ /// print a vector of doubles: sparse form
261
+ void printvecDBL(const char *vecstr, const double *elem, const int * index,
262
+ int nz) const;
263
+
264
+ /// Recompute the simplex tableau for want of a better accuracy.
265
+ /// Requires an empty CoinFactorization object to do the computations,
266
+ /// and two empty (already allocated) arrays which will contain
267
+ /// the basis indices on exit. Returns 0 if successfull.
268
+ int factorize(CoinFactorization & factorization,
269
+ int* colBasisIndex, int* rowBasisIndex);
270
+
271
+
272
+ //@}
273
+
274
+
275
+ // Private member data
276
+
277
+ /**@name Private member data */
278
+
279
+ //@{
280
+
281
+ /// Object with CglGMIParam members.
282
+ CglGMIParam param;
283
+
284
+ /// Number of rows ( = number of slack variables) in the current LP.
285
+ int nrow;
286
+
287
+ /// Number of structural variables in the current LP.
288
+ int ncol;
289
+
290
+ /// Lower bounds for structural variables
291
+ const double *colLower;
292
+
293
+ /// Upper bounds for structural variables
294
+ const double *colUpper;
295
+
296
+ /// Lower bounds for constraints
297
+ const double *rowLower;
298
+
299
+ /// Upper bounds for constraints
300
+ const double *rowUpper;
301
+
302
+ /// Righ hand side for constraints (upper bound for ranged constraints).
303
+ const double *rowRhs;
304
+
305
+ /// Characteristic vectors of structural integer variables or continuous
306
+ /// variables currently fixed to integer values.
307
+ bool *isInteger;
308
+
309
+ /// Current basis status: columns
310
+ int *cstat;
311
+
312
+ /// Current basis status: rows
313
+ int *rstat;
314
+
315
+ /// Pointer on solver. Reset by each call to generateCuts().
316
+ OsiSolverInterface *solver;
317
+
318
+ /// Pointer on point to separate. Reset by each call to generateCuts().
319
+ const double *xlp;
320
+
321
+ /// Pointer on row activity. Reset by each call to generateCuts().
322
+ const double *rowActivity;
323
+
324
+ /// Pointer on matrix of coefficient ordered by rows.
325
+ /// Reset by each call to generateCuts().
326
+ const CoinPackedMatrix *byRow;
327
+
328
+ /// Pointer on matrix of coefficient ordered by columns.
329
+ /// Reset by each call to generateCuts().
330
+ const CoinPackedMatrix *byCol;
331
+
332
+ /// Fractionality of the cut and related quantities.
333
+ double f0;
334
+ double f0compl;
335
+ double ratiof0compl;
336
+
337
+ #if defined(TRACK_REJECT) || defined (TRACK_REJECT_SIMPLE)
338
+ /// Should we track the reason of each cut rejection?
339
+ bool trackRejection;
340
+ /// Number of failures by type
341
+ int fracFail;
342
+ int dynFail;
343
+ int violFail;
344
+ int suppFail;
345
+ int smallCoeffFail;
346
+ int scaleFail;
347
+ /// Total number of generated cuts
348
+ int numGeneratedCuts;
349
+ #endif
350
+
351
+ //@}
352
+ };
353
+
354
+ //#############################################################################
355
+ /** A function that tests the methods in the CglGMI class. The
356
+ only reason for it not to be a member method is that this way it doesn't
357
+ have to be compiled into the library. And that's a gain, because the
358
+ library should be compiled with optimization on, but this method should be
359
+ compiled with debugging. */
360
+ void CglGMIUnitTest(const OsiSolverInterface * siP,
361
+ const std::string mpdDir );
362
+
363
+
364
+ #endif
@@ -0,0 +1,313 @@
1
+ // Name: CglGMIParam.hpp
2
+ // Author: Giacomo Nannicini
3
+ // Singapore University of Technology and Design
4
+ // email: nannicini@sutd.edu.sg
5
+ // based on CglRedSplitParam.hpp by Francois Margot
6
+ // Date: 11/17/09
7
+ //-----------------------------------------------------------------------------
8
+ // Copyright (C) 2009, Giacomo Nannicini and others. All Rights Reserved.
9
+
10
+ #ifndef CglGMIParam_H
11
+ #define CglGMIParam_H
12
+
13
+ #include "CglParam.hpp"
14
+
15
+
16
+ /**@name CglGMI Parameters */
17
+ //@{
18
+
19
+ /** Class collecting parameters for the GMI cut generator.
20
+
21
+ Parameters of the generator are listed below. Modifying the default
22
+ values for parameters other than the last four might result in
23
+ invalid cuts.
24
+
25
+ - MAXDYN: Maximum ratio between largest and smallest non zero
26
+ coefficients in a cut. See method setMAXDYN().
27
+ - EPS_ELIM: Precision for deciding if a coefficient is zero when
28
+ eliminating slack variables. See method setEPS_ELIM().
29
+ - MINVIOL: Minimum violation for the current basic solution in
30
+ a generated cut. See method setMINVIOL().
31
+ - USE_INTSLACKS: Use integer slacks to generate cuts.
32
+ (not implemented yet, will be in the future).
33
+ See method setUSE_INTSLACKS().
34
+ - AWAY: Look only at basic integer variables whose current value is at
35
+ least this value away from being integer. See method setAway().
36
+ - CHECK_DUPLICATES: Should we check for duplicates when adding a cut
37
+ to the collection? Can be slow.
38
+ Default 0 - do not check, add cuts anyway.
39
+ - CLEAN_PROC: Cleaning procedure that should be used. Look below at the
40
+ enumeration CleaningProcedure for possible values.
41
+ - INTEGRAL_SCALE_CONT: If we try to scale cut coefficients so that
42
+ they become integral, do we also scale on
43
+ continuous variables?
44
+ Default 0 - do not scale continuous vars.
45
+ Used only if CLEAN_PROC does integral scaling.
46
+ - ENFORCE_SCALING: Discard badly scaled cuts, or keep them (unscaled).
47
+ Default 1 - yes.
48
+
49
+ */
50
+ //@}
51
+
52
+ class CglGMIParam : public CglParam {
53
+
54
+ public:
55
+
56
+ /**@name Enumerations */
57
+ enum CleaningProcedure{
58
+ /* CglLandP procedure I */
59
+ CP_CGLLANDP1,
60
+ /* CglLandP procedure II */
61
+ CP_CGLLANDP2,
62
+ /* CglRedSplit procedure I */
63
+ CP_CGLREDSPLIT,
64
+ /* Only integral cuts, i.e. cuts with integral coefficients */
65
+ CP_INTEGRAL_CUTS,
66
+ /* CglLandP procedure I with integral scaling */
67
+ CP_CGLLANDP1_INT,
68
+ /* CglLandP procedure I with scaling of the max element to 1 if possible */
69
+ CP_CGLLANDP1_SCALEMAX,
70
+ /* CglLandP procedure I with scaling of the rhs to 1 if possible */
71
+ CP_CGLLANDP1_SCALERHS
72
+ };
73
+
74
+ /**@name Set/get methods */
75
+
76
+ //@{
77
+ /** Aliases for parameter get/set method in the base class CglParam */
78
+
79
+ /** Value for Infinity. Default: DBL_MAX */
80
+ inline void setInfinity(double value) {setINFINIT(value);}
81
+ inline double getInfinity() const {return INFINIT;}
82
+
83
+ /** Epsilon for comparing numbers. Default: 1.0e-6 */
84
+ inline void setEps(double value) {setEPS(value);}
85
+ inline double getEps() const {return EPS;}
86
+
87
+ /** Epsilon for zeroing out coefficients. Default: 1.0e-5 */
88
+ inline void setEpsCoeff(double value) {setEPS_COEFF(value);}
89
+ inline double getEpsCoeff() const {return EPS_COEFF;}
90
+
91
+ /** Maximum support of the cutting planes. Default: INT_MAX */
92
+ inline void setMaxSupport(int value) {setMAX_SUPPORT(value);}
93
+ inline int getMaxSupport() const {return MAX_SUPPORT;}
94
+ /** Alias for consistency with our naming scheme */
95
+ inline void setMaxSupportAbs(int value) {setMAX_SUPPORT(value);}
96
+ inline int getMaxSupportAbs() const {return MAX_SUPPORT;}
97
+ inline int getMAX_SUPPORT_ABS() const {return MAX_SUPPORT;}
98
+
99
+ /** Set AWAY, the minimum distance from being integer used for selecting
100
+ rows for cut generation; all rows whose pivot variable should be
101
+ integer but is more than away from integrality will be selected;
102
+ Default: 0.005 */
103
+ virtual void setAway(double value);
104
+ /** Get value of away */
105
+ inline double getAway() const {return AWAY;}
106
+ /// Aliases
107
+ inline void setAWAY(double value) {setAway(value);}
108
+ inline double getAWAY() const {return AWAY;}
109
+
110
+ /** Set the value of EPS_ELIM, epsilon for values of coefficients when
111
+ eliminating slack variables;
112
+ Default: 0 */
113
+ virtual void setEPS_ELIM(double value);
114
+ /** Get the value of EPS_ELIM */
115
+ inline double getEPS_ELIM() const {return EPS_ELIM;}
116
+ /// Aliases
117
+ inline void setEpsElim(double value) {setEPS_ELIM(value);}
118
+ inline double getEpsElim() const {return EPS_ELIM;}
119
+
120
+ /** Set EPS_RELAX_ABS */
121
+ virtual void setEPS_RELAX_ABS(double value);
122
+ /** Get value of EPS_RELAX_ABS */
123
+ inline double getEPS_RELAX_ABS() const {return EPS_RELAX_ABS;}
124
+ /// Aliases
125
+ inline void setEpsRelaxAbs(double value) {setEPS_RELAX_ABS(value);}
126
+ inline double getEpsRelaxAbs() const {return EPS_RELAX_ABS;}
127
+
128
+ /** Set EPS_RELAX_REL */
129
+ virtual void setEPS_RELAX_REL(double value);
130
+ /** Get value of EPS_RELAX_REL */
131
+ inline double getEPS_RELAX_REL() const {return EPS_RELAX_REL;}
132
+ /// Aliases
133
+ inline void setEpsRelaxRel(double value) {setEPS_RELAX_REL(value);}
134
+ inline double getEpsRelaxRel() const {return EPS_RELAX_REL;}
135
+
136
+ // Set the maximum ratio between largest and smallest non zero
137
+ // coefficients in a cut. Default: 1e6.
138
+ virtual void setMAXDYN(double value);
139
+ /** Get the value of MAXDYN */
140
+ inline double getMAXDYN() const {return MAXDYN;}
141
+ /// Aliases
142
+ inline void setMaxDyn(double value) {setMAXDYN(value);}
143
+ inline double getMaxDyn() const {return MAXDYN;}
144
+
145
+ /** Set the value of MINVIOL, the minimum violation for the current
146
+ basic solution in a generated cut. Default: 1e-7 */
147
+ virtual void setMINVIOL(double value);
148
+ /** Get the value of MINVIOL */
149
+ inline double getMINVIOL() const {return MINVIOL;}
150
+ /// Aliases
151
+ inline void setMinViol(double value) {setMINVIOL(value);}
152
+ inline double getMinViol() const {return MINVIOL;}
153
+
154
+ /** Set the value of MAX_SUPPORT_REL, the factor contributing to the
155
+ maximum support relative to the number of columns. Maximum
156
+ allowed support is: MAX_SUPPORT_ABS +
157
+ MAX_SUPPORT_REL*ncols. Default: 0.1 */
158
+ virtual void setMAX_SUPPORT_REL(double value);
159
+ /** Get the value of MINVIOL */
160
+ inline double getMAX_SUPPORT_REL() const {return MAX_SUPPORT_REL;}
161
+ /// Aliases
162
+ inline void setMaxSupportRel(double value) {setMAX_SUPPORT_REL(value);}
163
+ inline double getMaxSupportRel() const {return MAX_SUPPORT_REL;}
164
+
165
+ /** Set the value of USE_INTSLACKS. Default: 0 */
166
+ virtual void setUSE_INTSLACKS(bool value);
167
+ /** Get the value of USE_INTSLACKS */
168
+ inline bool getUSE_INTSLACKS() const {return USE_INTSLACKS;}
169
+ /// Aliases
170
+ inline void setUseIntSlacks(bool value) {setUSE_INTSLACKS(value);}
171
+ inline int getUseIntSlacks() const {return USE_INTSLACKS;}
172
+
173
+ /** Set the value of CHECK_DUPLICATES. Default: 0 */
174
+ virtual void setCHECK_DUPLICATES(bool value);
175
+ /** Get the value of CHECK_DUPLICATES */
176
+ inline bool getCHECK_DUPLICATES() const {return CHECK_DUPLICATES;}
177
+ /// Aliases
178
+ inline void setCheckDuplicates(bool value) {setCHECK_DUPLICATES(value);}
179
+ inline bool getCheckDuplicates() const {return CHECK_DUPLICATES;}
180
+
181
+ /** Set the value of CLEAN_PROC. Default: CP_CGLLANDP1 */
182
+ virtual void setCLEAN_PROC(CleaningProcedure value);
183
+ /** Get the value of CLEAN_PROC. */
184
+ inline CleaningProcedure getCLEAN_PROC() const {return CLEAN_PROC;}
185
+ /// Aliases
186
+ inline void setCleanProc(CleaningProcedure value) {setCLEAN_PROC(value);}
187
+ inline CleaningProcedure getCleaningProcedure() const {return CLEAN_PROC;}
188
+
189
+ /** Set the value of INTEGRAL_SCALE_CONT. Default: 0 */
190
+ virtual void setINTEGRAL_SCALE_CONT(bool value);
191
+ /** Get the value of INTEGRAL_SCALE_CONT. */
192
+ inline bool getINTEGRAL_SCALE_CONT() const {return INTEGRAL_SCALE_CONT;}
193
+ /// Aliases
194
+ inline void setIntegralScaleCont(bool value) {setINTEGRAL_SCALE_CONT(value);}
195
+ inline bool getIntegralScaleCont() const {return INTEGRAL_SCALE_CONT;}
196
+
197
+ /** Set the value of ENFORCE_SCALING. Default: 1 */
198
+ virtual void setENFORCE_SCALING(bool value);
199
+ /** Get the value of ENFORCE_SCALING. */
200
+ inline bool getENFORCE_SCALING() const {return ENFORCE_SCALING;}
201
+ /// Aliases
202
+ inline void setEnforceScaling(bool value) {setENFORCE_SCALING(value);}
203
+ inline bool getEnforcescaling() const {return ENFORCE_SCALING;}
204
+
205
+ //@}
206
+
207
+ /**@name Constructors and destructors */
208
+ //@{
209
+ /// Default constructor
210
+ CglGMIParam(double eps = 1e-12,
211
+ double away = 0.005,
212
+ double eps_coeff = 1e-11,
213
+ double eps_elim = 0,
214
+ double eps_relax_abs = 1e-11,
215
+ double eps_relax_rel = 1e-13,
216
+ double max_dyn = 1e6,
217
+ double min_viol = 1e-4,
218
+ int max_supp_abs = 1000,
219
+ double max_supp_rel = 0.1,
220
+ CleaningProcedure clean_proc = CP_CGLLANDP1,
221
+ bool use_int_slacks = false,
222
+ bool check_duplicates = false,
223
+ bool integral_scale_cont = false,
224
+ bool enforce_scaling = true);
225
+
226
+ /// Constructor from CglParam
227
+ CglGMIParam(CglParam &source,
228
+ double away = 0.005,
229
+ double eps_elim = 1e-12,
230
+ double eps_relax_abs = 1e-11,
231
+ double eps_relax_rel = 1e-13,
232
+ double max_dyn = 1e6,
233
+ double min_viol = 1e-4,
234
+ double max_supp_rel = 0.1,
235
+ CleaningProcedure clean_proc = CP_CGLLANDP1,
236
+ bool use_int_slacks = false,
237
+ bool check_duplicates = false,
238
+ bool integral_scale_cont = false,
239
+ bool enforce_scaling = true);
240
+
241
+ /// Copy constructor
242
+ CglGMIParam(const CglGMIParam &source);
243
+
244
+ /// Clone
245
+ virtual CglGMIParam* clone() const;
246
+
247
+ /// Assignment operator
248
+ virtual CglGMIParam& operator=(const CglGMIParam &rhs);
249
+
250
+ /// Destructor
251
+ virtual ~CglGMIParam();
252
+ //@}
253
+
254
+ protected:
255
+
256
+ /**@name Parameters */
257
+ //@{
258
+
259
+ /** Use row only if pivot variable should be integer but is more
260
+ than AWAY from being integer. */
261
+ double AWAY;
262
+
263
+ /** Epsilon for value of coefficients when eliminating slack variables.
264
+ Default: 0. */
265
+ double EPS_ELIM;
266
+
267
+ /** Value added to the right hand side of each generated cut to relax it.
268
+ Default: 1e-11 */
269
+ double EPS_RELAX_ABS;
270
+
271
+ /** For a generated cut with right hand side rhs_val,
272
+ EPS_RELAX_EPS * fabs(rhs_val) is used to relax the constraint.
273
+ Default: 1.e-13 */
274
+ double EPS_RELAX_REL;
275
+
276
+ /** Maximum ratio between largest and smallest non zero
277
+ coefficients in a cut. Default: 1e6. */
278
+ double MAXDYN;
279
+
280
+ /** Minimum violation for the current basic solution in a generated cut.
281
+ Default: 1e-4. */
282
+ double MINVIOL;
283
+
284
+ /** Maximum support relative to number of columns. Must be between 0
285
+ and 1. Default: 0. */
286
+ double MAX_SUPPORT_REL;
287
+
288
+ /** Which cleaning procedure should be used? */
289
+ CleaningProcedure CLEAN_PROC;
290
+
291
+ /** Use integer slacks to generate cuts if USE_INTSLACKS = 1. Default: 0. */
292
+ bool USE_INTSLACKS;
293
+
294
+ /** Check for duplicates when adding the cut to the collection? */
295
+ bool CHECK_DUPLICATES;
296
+
297
+ /** Should we try to rescale cut coefficients on continuous variables
298
+ so that they become integral, or do we only rescale coefficients
299
+ on integral variables? Used only by cleaning procedure that try
300
+ the integral scaling. */
301
+ bool INTEGRAL_SCALE_CONT;
302
+
303
+ /** Should we discard badly scaled cuts (according to the scaling
304
+ procedure in use)? If false, CglGMI::scaleCut always returns
305
+ true, even though it still scales cuts whenever possible, but
306
+ not cut is rejected for scaling. Default true. Used only by
307
+ cleaning procedure that try to scale. */
308
+ bool ENFORCE_SCALING;
309
+
310
+ //@}
311
+ };
312
+
313
+ #endif