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,644 @@
1
+ /* $Id: CoinParam.hpp 1493 2011-11-01 16:56:07Z tkr $ */
2
+ #ifndef CoinParam_H
3
+ #define CoinParam_H
4
+
5
+ /*
6
+ Copyright (C) 2002, International Business Machines
7
+ Corporation and others. All Rights Reserved.
8
+
9
+ This code is licensed under the terms of the Eclipse Public License (EPL).
10
+ */
11
+
12
+ /*! \file CoinParam.hpp
13
+ \brief Declaration of a class for command line parameters.
14
+ */
15
+
16
+ #include <vector>
17
+ #include <string>
18
+ #include <cstdio>
19
+
20
+ /*! \class CoinParam
21
+ \brief A base class for `keyword value' command line parameters.
22
+
23
+ The underlying paradigm is that a parameter specifies an action to be
24
+ performed on a target object. The base class provides two function
25
+ pointers, a `push' function and a `pull' function. By convention, a push
26
+ function will set some value in the target object or perform some action
27
+ using the target object. A `pull' function will retrieve some value from
28
+ the target object. This is only a convention, however; CoinParam and
29
+ associated utilities make no use of these functions and have no hardcoded
30
+ notion of how they should be used.
31
+
32
+ The action to be performed, and the target object, will be specific to a
33
+ particular application. It is expected that users will derive
34
+ application-specific parameter classes from this base class. A derived
35
+ class will typically add fields and methods to set/get a code for the
36
+ action to be performed (often, an enum class) and the target object (often,
37
+ a pointer or reference).
38
+
39
+ Facilities provided by the base class and associated utility routines
40
+ include:
41
+ <ul>
42
+ <li> Support for common parameter types with numeric, string, or
43
+ keyword values.
44
+ <li> Support for short and long help messages.
45
+ <li> Pointers to `push' and `pull' functions as described above.
46
+ <li> Command line parsing and keyword matching.
47
+ </ul>
48
+ All utility routines are declared in the #CoinParamUtils namespace.
49
+
50
+ The base class recognises five types of parameters: actions (which require
51
+ no value); numeric parameters with integer or real (double) values; keyword
52
+ parameters, where the value is one of a defined set of value-keywords;
53
+ and string parameters (where the value is a string).
54
+ The base class supports the definition of a valid range, a default value,
55
+ and short and long help messages for a parameter.
56
+
57
+ As defined by the #CoinParamFunc typedef, push and pull functions
58
+ should take a single parameter, a pointer to a CoinParam. Typically this
59
+ object will actually be a derived class as described above, and the
60
+ implementation function will have access to all capabilities of CoinParam and
61
+ of the derived class.
62
+
63
+ When specified as command line parameters, the expected syntax is `-keyword
64
+ value' or `-keyword=value'. You can also use the Gnu double-dash style,
65
+ `--keyword'. Spaces around the `=' will \e not work.
66
+
67
+ The keyword (name) for a parameter can be defined with an `!' to mark the
68
+ minimal match point. For example, allow!ableGap will be considered matched
69
+ by the strings `allow', `allowa', `allowab', \e etc. Similarly, the
70
+ value-keyword strings for keyword parameters can be defined with `!' to
71
+ mark the minimal match point. Matching of keywords and value-keywords is
72
+ \e not case sensitive.
73
+ */
74
+
75
+ class CoinParam
76
+ {
77
+
78
+ public:
79
+
80
+ /*! \name Subtypes */
81
+ //@{
82
+
83
+ /*! \brief Enumeration for the types of parameters supported by CoinParam
84
+
85
+ CoinParam provides support for several types of parameters:
86
+ <ul>
87
+ <li> Action parameters, which require no value.
88
+ <li> Integer and double numeric parameters, with upper and lower bounds.
89
+ <li> String parameters that take an arbitrary string value.
90
+ <li> Keyword parameters that take a defined set of string (value-keyword)
91
+ values. Value-keywords are associated with integers in the order in
92
+ which they are added, starting from zero.
93
+ </ul>
94
+ */
95
+ typedef enum { coinParamInvalid = 0,
96
+ coinParamAct, coinParamInt, coinParamDbl,
97
+ coinParamStr, coinParamKwd } CoinParamType ;
98
+
99
+ /*! \brief Type declaration for push and pull functions.
100
+
101
+ By convention, a return code of 0 indicates execution without error, >0
102
+ indicates nonfatal error, and <0 indicates fatal error. This is only
103
+ convention, however; the base class makes no use of the push and pull
104
+ functions and has no hardcoded interpretation of the return code.
105
+ */
106
+ typedef int (*CoinParamFunc)(CoinParam *param) ;
107
+
108
+ //@}
109
+
110
+ /*! \name Constructors and Destructors
111
+
112
+ Be careful how you specify parameters for the constructors! Some compilers
113
+ are entirely too willing to convert almost anything to bool.
114
+ */
115
+ //@{
116
+
117
+ /*! \brief Default constructor */
118
+
119
+ CoinParam() ;
120
+
121
+ /*! \brief Constructor for a parameter with a double value
122
+
123
+ The default value is 0.0. Be careful to clearly indicate that \p lower and
124
+ \p upper are real (double) values to distinguish this constructor from the
125
+ constructor for an integer parameter.
126
+ */
127
+ CoinParam(std::string name, std::string help,
128
+ double lower, double upper, double dflt = 0.0,
129
+ bool display = true) ;
130
+
131
+ /*! \brief Constructor for a parameter with an integer value
132
+
133
+ The default value is 0.
134
+ */
135
+ CoinParam(std::string name, std::string help,
136
+ int lower, int upper, int dflt = 0,
137
+ bool display = true) ;
138
+
139
+ /*! \brief Constructor for a parameter with keyword values
140
+
141
+ The string supplied as \p firstValue becomes the first value-keyword.
142
+ Additional value-keywords can be added using appendKwd(). It's necessary
143
+ to specify both the first value-keyword (\p firstValue) and the default
144
+ value-keyword index (\p dflt) in order to distinguish this constructor
145
+ from the constructors for string and action parameters.
146
+
147
+ Value-keywords are associated with an integer, starting with zero and
148
+ increasing as each keyword is added. The value-keyword given as \p
149
+ firstValue will be associated with the integer zero. The integer supplied
150
+ for \p dflt can be any value, as long as it will be valid once all
151
+ value-keywords have been added.
152
+ */
153
+ CoinParam(std::string name, std::string help,
154
+ std::string firstValue, int dflt, bool display = true) ;
155
+
156
+ /*! \brief Constructor for a string parameter
157
+
158
+ For some compilers, the default value (\p dflt) must be specified
159
+ explicitly with type std::string to distinguish the constructor for a
160
+ string parameter from the constructor for an action parameter. For
161
+ example, use std::string("default") instead of simply "default", or use a
162
+ variable of type std::string.
163
+ */
164
+ CoinParam(std::string name, std::string help,
165
+ std::string dflt, bool display = true) ;
166
+
167
+ /*! \brief Constructor for an action parameter */
168
+
169
+ CoinParam(std::string name, std::string help,
170
+ bool display = true) ;
171
+
172
+ /*! \brief Copy constructor */
173
+
174
+ CoinParam(const CoinParam &orig) ;
175
+
176
+ /*! \brief Clone */
177
+
178
+ virtual CoinParam *clone() ;
179
+
180
+ /*! \brief Assignment */
181
+
182
+ CoinParam &operator=(const CoinParam &rhs) ;
183
+
184
+ /*! \brief Destructor */
185
+
186
+ virtual ~CoinParam() ;
187
+
188
+ //@}
189
+
190
+ /*! \name Methods to query and manipulate the value(s) of a parameter */
191
+ //@{
192
+
193
+ /*! \brief Add an additional value-keyword to a keyword parameter */
194
+
195
+ void appendKwd(std::string kwd) ;
196
+
197
+ /*! \brief Return the integer associated with the specified value-keyword
198
+
199
+ Returns -1 if no value-keywords match the specified string.
200
+ */
201
+ int kwdIndex(std::string kwd) const ;
202
+
203
+ /*! \brief Return the value-keyword that is the current value of the
204
+ keyword parameter
205
+ */
206
+ std::string kwdVal() const ;
207
+
208
+ /*! \brief Set the value of the keyword parameter using the integer
209
+ associated with a value-keyword.
210
+
211
+ If \p printIt is true, the corresponding value-keyword string will be
212
+ echoed to std::cout.
213
+ */
214
+ void setKwdVal(int value, bool printIt = false) ;
215
+
216
+ /*! \brief Set the value of the keyword parameter using a value-keyword
217
+ string.
218
+
219
+ The given string will be tested against the set of value-keywords for
220
+ the parameter using the shortest match rules.
221
+ */
222
+ void setKwdVal(const std::string value ) ;
223
+
224
+ /*! \brief Prints the set of value-keywords defined for this keyword
225
+ parameter
226
+ */
227
+ void printKwds() const ;
228
+
229
+
230
+ /*! \brief Set the value of a string parameter */
231
+
232
+ void setStrVal(std::string value) ;
233
+
234
+ /*! \brief Get the value of a string parameter */
235
+
236
+ std::string strVal() const ;
237
+
238
+
239
+ /*! \brief Set the value of a double parameter */
240
+
241
+ void setDblVal(double value) ;
242
+
243
+ /*! \brief Get the value of a double parameter */
244
+
245
+ double dblVal() const ;
246
+
247
+
248
+ /*! \brief Set the value of a integer parameter */
249
+
250
+ void setIntVal(int value) ;
251
+
252
+ /*! \brief Get the value of a integer parameter */
253
+
254
+ int intVal() const ;
255
+
256
+
257
+ /*! \brief Add a short help string to a parameter */
258
+
259
+ inline void setShortHelp(const std::string help) { shortHelp_ = help ; }
260
+
261
+ /*! \brief Retrieve the short help string */
262
+
263
+ inline std::string shortHelp() const { return (shortHelp_) ; }
264
+
265
+ /*! \brief Add a long help message to a parameter
266
+
267
+ See printLongHelp() for a description of how messages are broken into
268
+ lines.
269
+ */
270
+ inline void setLongHelp(const std::string help) { longHelp_ = help ; }
271
+
272
+ /*! \brief Retrieve the long help message */
273
+
274
+ inline std::string longHelp() const { return (longHelp_) ; }
275
+
276
+ /*! \brief Print long help
277
+
278
+ Prints the long help string, plus the valid range and/or keywords if
279
+ appropriate. The routine makes a best effort to break the message into
280
+ lines appropriate for an 80-character line. Explicit line breaks in the
281
+ message will be observed. The short help string will be used if
282
+ long help is not available.
283
+ */
284
+ void printLongHelp() const ;
285
+
286
+ //@}
287
+
288
+ /*! \name Methods to query and manipulate a parameter object */
289
+ //@{
290
+
291
+ /*! \brief Return the type of the parameter */
292
+
293
+ inline CoinParamType type() const { return (type_) ; }
294
+
295
+ /*! \brief Set the type of the parameter */
296
+
297
+ inline void setType(CoinParamType type) { type_ = type ; }
298
+
299
+ /*! \brief Return the parameter keyword (name) string */
300
+
301
+ inline std::string name() const { return (name_) ; }
302
+
303
+ /*! \brief Set the parameter keyword (name) string */
304
+
305
+ inline void setName(std::string name) { name_ = name ; processName() ; }
306
+
307
+ /*! \brief Check if the specified string matches the parameter keyword (name)
308
+ string
309
+
310
+ Returns 1 if the string matches and meets the minimum match length,
311
+ 2 if the string matches but doesn't meet the minimum match length,
312
+ and 0 if the string doesn't match. Matches are \e not case-sensitive.
313
+ */
314
+ int matches (std::string input) const ;
315
+
316
+ /*! \brief Return the parameter keyword (name) string formatted to show
317
+ the minimum match length
318
+
319
+ For example, if the parameter name was defined as allow!ableGap, the
320
+ string returned by matchName would be allow(ableGap).
321
+ */
322
+ std::string matchName() const ;
323
+
324
+ /*! \brief Set visibility of parameter
325
+
326
+ Intended to control whether the parameter is shown when a list of
327
+ parameters is processed. Used by CoinParamUtils::printHelp when printing
328
+ help messages for a list of parameters.
329
+ */
330
+ inline void setDisplay(bool display) { display_ = display ; }
331
+
332
+ /*! \brief Get visibility of parameter */
333
+
334
+ inline bool display() const { return (display_) ; }
335
+
336
+ /*! \brief Get push function */
337
+
338
+ inline CoinParamFunc pushFunc() { return (pushFunc_) ; }
339
+
340
+ /*! \brief Set push function */
341
+
342
+ inline void setPushFunc(CoinParamFunc func) { pushFunc_ = func ; }
343
+
344
+ /*! \brief Get pull function */
345
+
346
+ inline CoinParamFunc pullFunc() { return (pullFunc_) ; }
347
+
348
+ /*! \brief Set pull function */
349
+
350
+ inline void setPullFunc(CoinParamFunc func) { pullFunc_ = func ; }
351
+
352
+ //@}
353
+
354
+ private:
355
+
356
+ /*! \name Private methods */
357
+ //@{
358
+
359
+ /*! Process a name for efficient matching */
360
+ void processName() ;
361
+
362
+ //@}
363
+
364
+ /*! \name Private parameter data */
365
+ //@{
366
+ /// Parameter type (see #CoinParamType)
367
+ CoinParamType type_ ;
368
+
369
+ /// Parameter name
370
+ std::string name_ ;
371
+
372
+ /// Length of parameter name
373
+ size_t lengthName_ ;
374
+
375
+ /*! \brief Minimum length required to declare a match for the parameter
376
+ name.
377
+ */
378
+ size_t lengthMatch_ ;
379
+
380
+ /// Lower bound on value for a double parameter
381
+ double lowerDblValue_ ;
382
+
383
+ /// Upper bound on value for a double parameter
384
+ double upperDblValue_ ;
385
+
386
+ /// Double parameter - current value
387
+ double dblValue_ ;
388
+
389
+ /// Lower bound on value for an integer parameter
390
+ int lowerIntValue_ ;
391
+
392
+ /// Upper bound on value for an integer parameter
393
+ int upperIntValue_ ;
394
+
395
+ /// Integer parameter - current value
396
+ int intValue_ ;
397
+
398
+ /// String parameter - current value
399
+ std::string strValue_ ;
400
+
401
+ /// Set of valid value-keywords for a keyword parameter
402
+ std::vector<std::string> definedKwds_ ;
403
+
404
+ /*! \brief Current value for a keyword parameter (index into #definedKwds_)
405
+ */
406
+ int currentKwd_ ;
407
+
408
+ /// Push function
409
+ CoinParamFunc pushFunc_ ;
410
+
411
+ /// Pull function
412
+ CoinParamFunc pullFunc_ ;
413
+
414
+ /// Short help
415
+ std::string shortHelp_ ;
416
+
417
+ /// Long help
418
+ std::string longHelp_ ;
419
+
420
+ /// Display when processing lists of parameters?
421
+ bool display_ ;
422
+ //@}
423
+
424
+ } ;
425
+
426
+ /*! \relatesalso CoinParam
427
+ \brief A type for a parameter vector.
428
+ */
429
+ typedef std::vector<CoinParam*> CoinParamVec ;
430
+
431
+ /*! \relatesalso CoinParam
432
+ \brief A stream output function for a CoinParam object.
433
+ */
434
+ std::ostream &operator<< (std::ostream &s, const CoinParam &param) ;
435
+
436
+ /*
437
+ Bring in the utility functions for parameter handling (CbcParamUtils).
438
+ */
439
+
440
+ /*! \brief Utility functions for processing CoinParam parameters.
441
+
442
+ The functions in CoinParamUtils support command line or interactive
443
+ parameter processing and a help facility. Consult the `Related Functions'
444
+ section of the CoinParam class documentation for individual function
445
+ documentation.
446
+ */
447
+ namespace CoinParamUtils {
448
+ /*! \relatesalso CoinParam
449
+ \brief Take command input from the file specified by src.
450
+
451
+ Use stdin for \p src to specify interactive prompting for commands.
452
+ */
453
+ void setInputSrc(FILE *src) ;
454
+
455
+ /*! \relatesalso CoinParam
456
+ \brief Returns true if command line parameters are being processed.
457
+ */
458
+ bool isCommandLine() ;
459
+
460
+ /*! \relatesalso CoinParam
461
+ \brief Returns true if parameters are being obtained from stdin.
462
+ */
463
+ bool isInteractive() ;
464
+
465
+ /*! \relatesalso CoinParam
466
+ \brief Attempt to read a string from the input.
467
+
468
+ \p argc and \p argv are used only if isCommandLine() would return true.
469
+ If \p valid is supplied, it will be set to 0 if a string is parsed
470
+ without error, 2 if no field is present.
471
+ */
472
+ std::string getStringField(int argc, const char *argv[], int *valid) ;
473
+
474
+ /*! \relatesalso CoinParam
475
+ \brief Attempt to read an integer from the input.
476
+
477
+ \p argc and \p argv are used only if isCommandLine() would return true.
478
+ If \p valid is supplied, it will be set to 0 if an integer is parsed
479
+ without error, 1 if there's a parse error, and 2 if no field is present.
480
+ */
481
+ int getIntField(int argc, const char *argv[], int *valid) ;
482
+
483
+ /*! \relatesalso CoinParam
484
+ \brief Attempt to read a real (double) from the input.
485
+
486
+ \p argc and \p argv are used only if isCommandLine() would return true.
487
+ If \p valid is supplied, it will be set to 0 if a real number is parsed
488
+ without error, 1 if there's a parse error, and 2 if no field is present.
489
+ */
490
+ double getDoubleField(int argc, const char *argv[], int *valid) ;
491
+
492
+ /*! \relatesalso CoinParam
493
+ \brief Scan a parameter vector for parameters whose keyword (name) string
494
+ matches \p name using minimal match rules.
495
+
496
+ \p matchNdx is set to the index of the last parameter that meets the
497
+ minimal match criteria (but note there should be at most one matching
498
+ parameter if the parameter vector is properly configured). \p shortCnt
499
+ is set to the number of short matches (should be zero for a properly
500
+ configured parameter vector if a minimal match is found). The return
501
+ value is the number of matches satisfying the minimal match requirement
502
+ (should be 0 or 1 in a properly configured vector).
503
+ */
504
+ int matchParam(const CoinParamVec &paramVec, std::string name,
505
+ int &matchNdx, int &shortCnt) ;
506
+
507
+ /*! \relatesalso CoinParam
508
+ \brief Get the next command keyword (name)
509
+
510
+ To be precise, return the next field from the current command input
511
+ source, after a bit of processing. In command line mode (isCommandLine()
512
+ returns true) the next field will normally be of the form `-keyword' or
513
+ `--keyword' (\e i.e., a parameter keyword), and the string returned would
514
+ be `keyword'. In interactive mode (isInteractive() returns true), the
515
+ user will be prompted if necessary. It is assumed that the user knows
516
+ not to use the `-' or `--' prefixes unless specifying parameters on the
517
+ command line.
518
+
519
+ There are a number of special cases if we're in command line mode. The
520
+ order of processing of the raw string goes like this:
521
+ <ul>
522
+ <li> A stand-alone `-' is forced to `stdin'.
523
+ <li> A stand-alone '--' is returned as a word; interpretation is up to
524
+ the client.
525
+ <li> A prefix of '-' or '--' is stripped from the string.
526
+ </ul>
527
+ If the result is the string `stdin', command processing shifts to
528
+ interactive mode and the user is immediately prompted for a new command.
529
+
530
+ Whatever results from the above sequence is returned to the user as the
531
+ return value of the function. An empty string indicates end of input.
532
+
533
+ \p prompt will be used only if it's necessary to prompt the user in
534
+ interactive mode.
535
+ */
536
+
537
+ std::string getCommand(int argc, const char *argv[],
538
+ const std::string prompt, std::string *pfx = 0) ;
539
+
540
+ /*! \relatesalso CoinParam
541
+ \brief Look up the command keyword (name) in the parameter vector.
542
+ Print help if requested.
543
+
544
+ In the most straightforward use, \p name is a string without `?', and the
545
+ value returned is the index in \p paramVec of the single parameter that
546
+ matched \p name. One or more '?' characters at the end of \p name is a
547
+ query for information. The routine prints short (one '?') or long (more
548
+ than one '?') help messages for a query. Help is also printed in the case
549
+ where the name is ambiguous (some of the matches did not meet the minimal
550
+ match length requirement).
551
+
552
+ Note that multiple matches meeting the minimal match requirement is a
553
+ configuration error. The mimimal match length for the parameters
554
+ involved is too short.
555
+
556
+ If provided as parameters, on return
557
+ <ul>
558
+ <li> \p matchCnt will be set to the number of matches meeting the
559
+ minimal match requirement
560
+ <li> \p shortCnt will be set to the number of matches that did not
561
+ meet the miminal match requirement
562
+ <li> \p queryCnt will be set to the number of '?' characters at the
563
+ end of the name
564
+ </ul>
565
+
566
+ The return values are:
567
+ <ul>
568
+ <li> >0: index in \p paramVec of the single unique match for \p name
569
+ <li> -1: a query was detected (one or more '?' characters at the end
570
+ of \p name
571
+ <li> -2: one or more short matches, not a query
572
+ <li> -3: no matches, not a query
573
+ <li> -4: multiple matches meeting the minimal match requirement
574
+ (configuration error)
575
+ </ul>
576
+ */
577
+ int lookupParam(std::string name, CoinParamVec &paramVec,
578
+ int *matchCnt = 0, int *shortCnt = 0, int *queryCnt = 0) ;
579
+
580
+ /*! \relatesalso CoinParam
581
+ \brief Utility to print a long message as filled lines of text
582
+
583
+ The routine makes a best effort to break lines without exceeding the
584
+ standard 80 character line length. Explicit newlines in \p msg will
585
+ be obeyed.
586
+ */
587
+ void printIt(const char *msg) ;
588
+
589
+ /*! \relatesalso CoinParam
590
+ \brief Utility routine to print help given a short match or explicit
591
+ request for help.
592
+
593
+ The two really are related, in that a query (a string that ends with
594
+ one or more `?' characters) will often result in a short match. The
595
+ routine expects that \p name matches a single parameter, and does not
596
+ look for multiple matches.
597
+
598
+ If called with \p matchNdx < 0, the routine will look up \p name in \p
599
+ paramVec and print the full name from the parameter. If called with \p
600
+ matchNdx > 0, it just prints the name from the specified parameter. If
601
+ the name is a query, short (one '?') or long (more than one '?') help
602
+ is printed.
603
+
604
+ */ void shortOrHelpOne(CoinParamVec &paramVec,int matchNdx, std::string
605
+ name, int numQuery) ;
606
+
607
+ /*! \relatesalso CoinParam
608
+ \brief Utility routine to print help given multiple matches.
609
+
610
+ If the name is not a query, or asks for short help (\e i.e., contains
611
+ zero or one '?' characters), the list of matching names is printed. If
612
+ the name asks for long help (contains two or more '?' characters),
613
+ short help is printed for each matching name.
614
+ */
615
+ void shortOrHelpMany(CoinParamVec &paramVec,
616
+ std::string name, int numQuery) ;
617
+
618
+ /*! \relatesalso CoinParam
619
+ \brief Print a generic `how to use the command interface' help message.
620
+
621
+ The message is hard coded to match the behaviour of the parsing utilities.
622
+ */
623
+ void printGenericHelp() ;
624
+
625
+ /*! \relatesalso CoinParam
626
+ \brief Utility routine to print help messages for one or more
627
+ parameters.
628
+
629
+ Intended as a utility to implement explicit `help' commands. Help will be
630
+ printed for all parameters in \p paramVec from \p firstParam to \p
631
+ lastParam, inclusive. If \p shortHelp is true, short help messages will
632
+ be printed. If \p longHelp is true, long help messages are printed. \p
633
+ shortHelp overrules \p longHelp. If neither is true, only command
634
+ keywords are printed. \p prefix is printed before each line; it's an
635
+ imperfect attempt at indentation.
636
+ */
637
+ void printHelp(CoinParamVec &paramVec, int firstParam, int lastParam,
638
+ std::string prefix,
639
+ bool shortHelp, bool longHelp, bool hidden) ;
640
+ }
641
+
642
+
643
+ #endif /* CoinParam_H */
644
+
@@ -0,0 +1,26 @@
1
+ /* $Id: CoinPragma.hpp 1372 2011-01-03 23:31:00Z lou $ */
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 CoinPragma_H
7
+ #define CoinPragma_H
8
+
9
+ //-------------------------------------------------------------------
10
+ //
11
+ // This is a file which can contain Pragma's that are
12
+ // generally applicable to any source file.
13
+ //
14
+ //-------------------------------------------------------------------
15
+
16
+ #if defined(_MSC_VER)
17
+ // Turn off compiler warning about long names
18
+ # pragma warning(disable:4786)
19
+ // Turn off compiler warning:
20
+ // "empty controlled statement found; is this the intent?"
21
+ # pragma warning(disable:4390)
22
+ // Turn off compiler warning about deprecated functions
23
+ # pragma warning(disable:4996)
24
+ #endif
25
+
26
+ #endif