ruby-cbc 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/Rakefile +0 -2
  4. data/lib/ruby-cbc.rb +1 -1
  5. data/lib/ruby-cbc/problem.rb +6 -8
  6. data/lib/ruby-cbc/version.rb +1 -1
  7. data/ruby-cbc.gemspec +3 -2
  8. metadata +17 -287
  9. data/ext/ruby-cbc/cbc.i +0 -15
  10. data/ext/ruby-cbc/cbc_wrap.c +0 -4618
  11. data/ext/ruby-cbc/extconf.rb +0 -60
  12. data/ext/ruby-cbc/install/bin/cbc +0 -0
  13. data/ext/ruby-cbc/install/bin/clp +0 -0
  14. data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +0 -24
  15. data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +0 -62
  16. data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +0 -78
  17. data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +0 -183
  18. data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +0 -129
  19. data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +0 -100
  20. data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +0 -206
  21. data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +0 -242
  22. data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +0 -94
  23. data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +0 -236
  24. data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +0 -303
  25. data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +0 -39
  26. data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +0 -14
  27. data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +0 -142
  28. data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +0 -120
  29. data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +0 -47
  30. data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +0 -48
  31. data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +0 -49
  32. data/ext/ruby-cbc/install/include/coin/CbcConfig.h +0 -14
  33. data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +0 -49
  34. data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +0 -168
  35. data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +0 -482
  36. data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +0 -57
  37. data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +0 -66
  38. data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +0 -83
  39. data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +0 -245
  40. data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +0 -137
  41. data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +0 -169
  42. data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +0 -56
  43. data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +0 -67
  44. data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +0 -207
  45. data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +0 -161
  46. data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +0 -60
  47. data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +0 -279
  48. data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +0 -682
  49. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +0 -96
  50. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +0 -309
  51. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +0 -192
  52. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +0 -52
  53. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +0 -52
  54. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +0 -55
  55. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +0 -52
  56. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +0 -60
  57. data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +0 -52
  58. data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +0 -340
  59. data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +0 -280
  60. data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +0 -271
  61. data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +0 -58
  62. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +0 -77
  63. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +0 -102
  64. data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +0 -58
  65. data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +0 -94
  66. data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +0 -1406
  67. data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +0 -94
  68. data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +0 -26
  69. data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +0 -2952
  70. data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +0 -166
  71. data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +0 -351
  72. data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +0 -349
  73. data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +0 -272
  74. data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +0 -64
  75. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +0 -4134
  76. data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +0 -532
  77. data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +0 -324
  78. data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +0 -110
  79. data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +0 -279
  80. data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +0 -286
  81. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +0 -564
  82. data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +0 -114
  83. data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +0 -447
  84. data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +0 -258
  85. data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +0 -83
  86. data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +0 -490
  87. data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +0 -372
  88. data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +0 -381
  89. data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +0 -464
  90. data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +0 -115
  91. data/ext/ruby-cbc/install/include/coin/CglClique.hpp +0 -308
  92. data/ext/ruby-cbc/install/include/coin/CglConfig.h +0 -19
  93. data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +0 -121
  94. data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +0 -189
  95. data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +0 -371
  96. data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +0 -364
  97. data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +0 -313
  98. data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +0 -204
  99. data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +0 -310
  100. data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +0 -306
  101. data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +0 -130
  102. data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +0 -104
  103. data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +0 -50
  104. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +0 -429
  105. data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +0 -427
  106. data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +0 -160
  107. data/ext/ruby-cbc/install/include/coin/CglParam.hpp +0 -93
  108. data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +0 -492
  109. data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +0 -543
  110. data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +0 -448
  111. data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +0 -494
  112. data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +0 -495
  113. data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +0 -272
  114. data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +0 -240
  115. data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +0 -174
  116. data/ext/ruby-cbc/install/include/coin/CglStored.hpp +0 -125
  117. data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +0 -180
  118. data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +0 -565
  119. data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +0 -133
  120. data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +0 -113
  121. data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +0 -294
  122. data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +0 -162
  123. data/ext/ruby-cbc/install/include/coin/ClpConfig.h +0 -17
  124. data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +0 -125
  125. data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +0 -108
  126. data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +0 -110
  127. data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +0 -119
  128. data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +0 -71
  129. data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +0 -129
  130. data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +0 -153
  131. data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +0 -183
  132. data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +0 -186
  133. data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +0 -381
  134. data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +0 -187
  135. data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +0 -432
  136. data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +0 -247
  137. data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +0 -358
  138. data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +0 -570
  139. data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +0 -103
  140. data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +0 -524
  141. data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +0 -131
  142. data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +0 -1307
  143. data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +0 -229
  144. data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +0 -349
  145. data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +0 -401
  146. data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +0 -134
  147. data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +0 -638
  148. data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +0 -126
  149. data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +0 -103
  150. data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +0 -290
  151. data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +0 -299
  152. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +0 -72
  153. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +0 -155
  154. data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +0 -247
  155. data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +0 -155
  156. data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +0 -1797
  157. data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +0 -300
  158. data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +0 -117
  159. data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +0 -277
  160. data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +0 -244
  161. data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +0 -446
  162. data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +0 -525
  163. data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +0 -176
  164. data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +0 -149
  165. data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +0 -419
  166. data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +0 -383
  167. data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +0 -48
  168. data/ext/ruby-cbc/install/include/coin/CoinError.hpp +0 -257
  169. data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +0 -2044
  170. data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +0 -166
  171. data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +0 -34
  172. data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +0 -177
  173. data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +0 -1111
  174. data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +0 -1164
  175. data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +0 -805
  176. data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +0 -96
  177. data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +0 -666
  178. data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +0 -1054
  179. data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +0 -441
  180. data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +0 -1056
  181. data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +0 -280
  182. data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +0 -947
  183. data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +0 -657
  184. data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +0 -269
  185. data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +0 -644
  186. data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +0 -26
  187. data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +0 -73
  188. data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +0 -85
  189. data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +0 -226
  190. data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +0 -116
  191. data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +0 -181
  192. data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +0 -61
  193. data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +0 -60
  194. data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +0 -51
  195. data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +0 -1842
  196. data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +0 -105
  197. data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +0 -166
  198. data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +0 -112
  199. data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +0 -101
  200. data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +0 -55
  201. data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +0 -66
  202. data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +0 -63
  203. data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +0 -60
  204. data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +0 -44
  205. data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +0 -465
  206. data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +0 -148
  207. data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +0 -117
  208. data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +0 -431
  209. data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +0 -528
  210. data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +0 -476
  211. data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +0 -678
  212. data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +0 -247
  213. data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +0 -310
  214. data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +0 -64
  215. data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +0 -19
  216. data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +0 -34
  217. data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +0 -58
  218. data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +0 -456
  219. data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +0 -166
  220. data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +0 -211
  221. data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +0 -488
  222. data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +0 -115
  223. data/ext/ruby-cbc/install/include/coin/Idiot.hpp +0 -298
  224. data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +0 -206
  225. data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +0 -1005
  226. data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +0 -764
  227. data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +0 -534
  228. data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +0 -1509
  229. data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +0 -324
  230. data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +0 -35
  231. data/ext/ruby-cbc/install/include/coin/OsiConfig.h +0 -19
  232. data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +0 -245
  233. data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +0 -474
  234. data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +0 -252
  235. data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +0 -331
  236. data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +0 -187
  237. data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +0 -152
  238. data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +0 -2143
  239. data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +0 -142
  240. data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +0 -374
  241. data/ext/ruby-cbc/install/lib/libCbc.la +0 -35
  242. data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
  243. data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
  244. data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
  245. data/ext/ruby-cbc/install/lib/libCbcSolver.la +0 -35
  246. data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
  247. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
  248. data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
  249. data/ext/ruby-cbc/install/lib/libCgl.la +0 -35
  250. data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
  251. data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
  252. data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
  253. data/ext/ruby-cbc/install/lib/libClp.la +0 -35
  254. data/ext/ruby-cbc/install/lib/libClp.so +0 -0
  255. data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
  256. data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
  257. data/ext/ruby-cbc/install/lib/libClpSolver.la +0 -35
  258. data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
  259. data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
  260. data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
  261. data/ext/ruby-cbc/install/lib/libCoinUtils.la +0 -35
  262. data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
  263. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
  264. data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
  265. data/ext/ruby-cbc/install/lib/libOsi.la +0 -35
  266. data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
  267. data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
  268. data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
  269. data/ext/ruby-cbc/install/lib/libOsiCbc.la +0 -35
  270. data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
  271. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
  272. data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
  273. data/ext/ruby-cbc/install/lib/libOsiClp.la +0 -35
  274. data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
  275. data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
  276. data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
  277. data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +0 -35
  278. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
  279. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
  280. data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
  281. data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +0 -12
  282. data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +0 -12
  283. data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +0 -12
  284. data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +0 -9
  285. data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +0 -9
  286. data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +0 -12
  287. data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +0 -12
  288. data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +0 -12
  289. data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +0 -12
  290. data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +0 -12
@@ -1,58 +0,0 @@
1
- /* $Id: CbcHeuristicPivotAndFix.hpp 1899 2013-04-09 18:12:08Z 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
- #ifndef CbcHeuristicPivotAndFix_H
7
- #define CbcHeuristicPivotAndFix_H
8
-
9
- #include "CbcHeuristic.hpp"
10
- /** LocalSearch class
11
- */
12
-
13
- class CbcHeuristicPivotAndFix : public CbcHeuristic {
14
- public:
15
-
16
- // Default Constructor
17
- CbcHeuristicPivotAndFix ();
18
-
19
- /* Constructor with model - assumed before cuts
20
- Initial version does not do Lps
21
- */
22
- CbcHeuristicPivotAndFix (CbcModel & model);
23
-
24
- // Copy constructor
25
- CbcHeuristicPivotAndFix ( const CbcHeuristicPivotAndFix &);
26
-
27
- // Destructor
28
- ~CbcHeuristicPivotAndFix ();
29
-
30
- /// Clone
31
- virtual CbcHeuristic * clone() const;
32
-
33
- /// Assignment operator
34
- CbcHeuristicPivotAndFix & operator=(const CbcHeuristicPivotAndFix& rhs);
35
-
36
- /// Create C++ lines to get to current state
37
- virtual void generateCpp( FILE * fp) ;
38
-
39
- /// Resets stuff if model changes
40
- virtual void resetModel(CbcModel * model);
41
-
42
- /// update model (This is needed if cliques update matrix etc)
43
- virtual void setModel(CbcModel * model);
44
-
45
- using CbcHeuristic::solution ;
46
- /** returns 0 if no solution, 1 if valid solution.
47
- Sets solution values if good, sets objective value (only if good)
48
- needs comments
49
- */
50
- virtual int solution(double & objectiveValue,
51
- double * newSolution);
52
-
53
- protected:
54
- };
55
-
56
-
57
- #endif
58
-
@@ -1,77 +0,0 @@
1
- // $Id: CbcHeuristicRENS.hpp 2105 2015-01-05 13:11:11Z forrest $
2
- // Copyright (C) 2006, International Business Machines
3
- // Corporation and others. All Rights Reserved.
4
- // This code is licensed under the terms of the Eclipse Public License (EPL).
5
-
6
- // edwin 12/5/09 carved out of CbcHeuristicRINS
7
-
8
- #ifndef CbcHeuristicRENS_H
9
- #define CbcHeuristicRENS_H
10
-
11
- #include "CbcHeuristic.hpp"
12
-
13
- /** LocalSearch class
14
- */
15
-
16
- class CbcHeuristicRENS : public CbcHeuristic {
17
- public:
18
-
19
- // Default Constructor
20
- CbcHeuristicRENS ();
21
-
22
- /* Constructor with model - assumed before cuts
23
- Initial version does not do Lps
24
- */
25
- CbcHeuristicRENS (CbcModel & model);
26
-
27
- // Copy constructor
28
- CbcHeuristicRENS ( const CbcHeuristicRENS &);
29
-
30
- // Destructor
31
- ~CbcHeuristicRENS ();
32
-
33
- /// Clone
34
- virtual CbcHeuristic * clone() const;
35
-
36
-
37
- /// Assignment operator
38
- CbcHeuristicRENS & operator=(const CbcHeuristicRENS& rhs);
39
-
40
- /// Resets stuff if model changes
41
- virtual void resetModel(CbcModel * model);
42
-
43
- /// update model (This is needed if cliques update matrix etc)
44
- virtual void setModel(CbcModel * model);
45
-
46
- using CbcHeuristic::solution ;
47
- /** returns 0 if no solution, 1 if valid solution.
48
- Sets solution values if good, sets objective value (only if good)
49
- This does Relaxation Extension Neighborhood Search
50
- Does not run if when_<2 and a solution exists
51
- */
52
- virtual int solution(double & objectiveValue,
53
- double * newSolution);
54
-
55
- /// Set type
56
- inline void setRensType(int value)
57
- { rensType_ = value;}
58
-
59
- protected:
60
- // Data
61
- /// Number of tries
62
- int numberTries_;
63
- /** Type
64
- 0 - fix at LB
65
- 1 - fix on dj
66
- 2 - fix at UB as well
67
- 3 - fix on 0.01*average dj
68
- add 16 to allow two tries
69
- 32 - if solution exists use to keep more variables
70
- 64 - if priorities keep high priority
71
- 128 - if priorities keep low priority
72
- */
73
- int rensType_;
74
- };
75
-
76
- #endif
77
-
@@ -1,102 +0,0 @@
1
- /* $Id: CbcHeuristicRINS.hpp 1956 2013-08-17 15:28:45Z forrest $ */
2
- // Copyright (C) 2006, 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 CbcHeuristicRINS_H
7
- #define CbcHeuristicRINS_H
8
-
9
- #include "CbcHeuristic.hpp"
10
- // for backward compatibility include 3 other headers
11
- #include "CbcHeuristicRENS.hpp"
12
- #include "CbcHeuristicDINS.hpp"
13
- #include "CbcHeuristicVND.hpp"
14
- /** LocalSearch class
15
- */
16
-
17
- class CbcHeuristicRINS : public CbcHeuristic {
18
- public:
19
-
20
- // Default Constructor
21
- CbcHeuristicRINS ();
22
-
23
- /* Constructor with model - assumed before cuts
24
- Initial version does not do Lps
25
- */
26
- CbcHeuristicRINS (CbcModel & model);
27
-
28
- // Copy constructor
29
- CbcHeuristicRINS ( const CbcHeuristicRINS &);
30
-
31
- // Destructor
32
- ~CbcHeuristicRINS ();
33
-
34
- /// Clone
35
- virtual CbcHeuristic * clone() const;
36
-
37
-
38
- /// Assignment operator
39
- CbcHeuristicRINS & operator=(const CbcHeuristicRINS& rhs);
40
-
41
- /// Create C++ lines to get to current state
42
- virtual void generateCpp( FILE * fp) ;
43
-
44
- /// Resets stuff if model changes
45
- virtual void resetModel(CbcModel * model);
46
-
47
- /// update model (This is needed if cliques update matrix etc)
48
- virtual void setModel(CbcModel * model);
49
-
50
- using CbcHeuristic::solution ;
51
- /** returns 0 if no solution, 1 if valid solution.
52
- Sets solution values if good, sets objective value (only if good)
53
- This does Relaxation Induced Neighborhood Search
54
- */
55
- virtual int solution(double & objectiveValue,
56
- double * newSolution);
57
- /// This version fixes stuff and does IP
58
- int solutionFix(double & objectiveValue,
59
- double * newSolution,
60
- const int * keep);
61
-
62
- /// Sets how often to do it
63
- inline void setHowOften(int value) {
64
- howOften_ = value;
65
- }
66
- /// Used array so we can set
67
- inline char * used() const {
68
- return used_;
69
- }
70
- /// Resets lastNode
71
- inline void setLastNode(int value) {
72
- lastNode_ = value;
73
- }
74
- /// Resets number of solutions
75
- inline void setSolutionCount(int value) {
76
- numberSolutions_ = value;
77
- }
78
-
79
- protected:
80
- // Data
81
-
82
- /// Number of solutions so we can do something at solution
83
- int numberSolutions_;
84
- /// How often to do (code can change)
85
- int howOften_;
86
- /// Number of successes
87
- int numberSuccesses_;
88
- /// Number of tries
89
- int numberTries_;
90
- /** State of fixing continuous variables -
91
- 0 - not tried
92
- +n - this divisor makes small enough
93
- -n - this divisor still not small enough
94
- */
95
- int stateOfFixing_;
96
- /// Node when last done
97
- int lastNode_;
98
- /// Whether a variable has been in a solution
99
- char * used_;
100
- };
101
- #endif
102
-
@@ -1,58 +0,0 @@
1
- /* $Id: CbcHeuristicRandRound.hpp 1899 2013-04-09 18:12:08Z 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
- #ifndef CbcHeuristicRandRound_H
7
- #define CbcHeuristicRandRound_H
8
-
9
- #include "CbcHeuristic.hpp"
10
- /** LocalSearch class
11
- */
12
-
13
- class CbcHeuristicRandRound : public CbcHeuristic {
14
- public:
15
-
16
- // Default Constructor
17
- CbcHeuristicRandRound ();
18
-
19
- /* Constructor with model - assumed before cuts
20
- Initial version does not do Lps
21
- */
22
- CbcHeuristicRandRound (CbcModel & model);
23
-
24
- // Copy constructor
25
- CbcHeuristicRandRound ( const CbcHeuristicRandRound &);
26
-
27
- // Destructor
28
- ~CbcHeuristicRandRound ();
29
-
30
- /// Clone
31
- virtual CbcHeuristic * clone() const;
32
-
33
- /// Assignment operator
34
- CbcHeuristicRandRound & operator=(const CbcHeuristicRandRound& rhs);
35
-
36
- /// Create C++ lines to get to current state
37
- virtual void generateCpp( FILE * fp) ;
38
-
39
- /// Resets stuff if model changes
40
- virtual void resetModel(CbcModel * model);
41
-
42
- /// update model (This is needed if cliques update matrix etc)
43
- virtual void setModel(CbcModel * model);
44
-
45
- using CbcHeuristic::solution ;
46
- /** returns 0 if no solution, 1 if valid solution.
47
- Sets solution values if good, sets objective value (only if good)
48
- needs comments
49
- */
50
- virtual int solution(double & objectiveValue,
51
- double * newSolution);
52
-
53
- protected:
54
- };
55
-
56
-
57
- #endif
58
-
@@ -1,94 +0,0 @@
1
- // $Id: CbcHeuristicVND.hpp 1899 2013-04-09 18:12:08Z stefan $
2
- // Copyright (C) 2006, International Business Machines
3
- // Corporation and others. All Rights Reserved.
4
- // This code is licensed under the terms of the Eclipse Public License (EPL).
5
-
6
- // edwin 12/5/09 carved out of CbcHeuristicRINS
7
-
8
- #ifndef CbcHeuristicVND_H
9
- #define CbcHeuristicVND_H
10
-
11
- #include "CbcHeuristic.hpp"
12
-
13
-
14
- /** LocalSearch class
15
- */
16
-
17
- class CbcHeuristicVND : public CbcHeuristic {
18
- public:
19
-
20
- // Default Constructor
21
- CbcHeuristicVND ();
22
-
23
- /* Constructor with model - assumed before cuts
24
- Initial version does not do Lps
25
- */
26
- CbcHeuristicVND (CbcModel & model);
27
-
28
- // Copy constructor
29
- CbcHeuristicVND ( const CbcHeuristicVND &);
30
-
31
- // Destructor
32
- ~CbcHeuristicVND ();
33
-
34
- /// Clone
35
- virtual CbcHeuristic * clone() const;
36
-
37
-
38
- /// Assignment operator
39
- CbcHeuristicVND & operator=(const CbcHeuristicVND& rhs);
40
-
41
- /// Create C++ lines to get to current state
42
- virtual void generateCpp( FILE * fp) ;
43
-
44
- /// Resets stuff if model changes
45
- virtual void resetModel(CbcModel * model);
46
-
47
- /// update model (This is needed if cliques update matrix etc)
48
- virtual void setModel(CbcModel * model);
49
-
50
- using CbcHeuristic::solution ;
51
- /** returns 0 if no solution, 1 if valid solution.
52
- Sets solution values if good, sets objective value (only if good)
53
- This does Relaxation Induced Neighborhood Search
54
- */
55
- virtual int solution(double & objectiveValue,
56
- double * newSolution);
57
- /// This version fixes stuff and does IP
58
- int solutionFix(double & objectiveValue,
59
- double * newSolution,
60
- const int * keep);
61
-
62
- /// Sets how often to do it
63
- inline void setHowOften(int value) {
64
- howOften_ = value;
65
- }
66
- /// base solution array so we can set
67
- inline double * baseSolution() const {
68
- return baseSolution_;
69
- }
70
-
71
- protected:
72
- // Data
73
-
74
- /// Number of solutions so we can do something at solution
75
- int numberSolutions_;
76
- /// How often to do (code can change)
77
- int howOften_;
78
- /// Number of successes
79
- int numberSuccesses_;
80
- /// Number of tries
81
- int numberTries_;
82
- /// Node when last done
83
- int lastNode_;
84
- /// Step size for decomposition
85
- int stepSize_;
86
- int k_;
87
- int kmax_;
88
- int nDifferent_;
89
- /// Base solution
90
- double * baseSolution_;
91
- };
92
-
93
- #endif
94
-
@@ -1,1406 +0,0 @@
1
- /* $Id: CbcLinked.hpp 1899 2013-04-09 18:12:08Z stefan $ */
2
- // Copyright (C) 2006, 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 CglLinked_H
7
- #define CglLinked_H
8
- /* THIS CONTAINS STUFF THAT SHOULD BE IN
9
- OsiSolverLink
10
- OsiBranchLink
11
- CglTemporary
12
- */
13
- #include "CoinModel.hpp"
14
- #include "OsiClpSolverInterface.hpp"
15
- #include "OsiChooseVariable.hpp"
16
- #include "CbcFathom.hpp"
17
- class CbcModel;
18
- class CoinPackedMatrix;
19
- class OsiLinkedBound;
20
- class OsiObject;
21
- class CglStored;
22
- class CglTemporary;
23
- /**
24
-
25
- This is to allow the user to replace initialSolve and resolve
26
- This version changes coefficients
27
- */
28
-
29
- class OsiSolverLink : public CbcOsiSolver {
30
-
31
- public:
32
- //---------------------------------------------------------------------------
33
- /**@name Solve methods */
34
- //@{
35
- /// Solve initial LP relaxation
36
- virtual void initialSolve();
37
-
38
- /// Resolve an LP relaxation after problem modification
39
- virtual void resolve();
40
-
41
- /**
42
- Problem specific
43
- Returns -1 if node fathomed and no solution
44
- 0 if did nothing
45
- 1 if node fathomed and solution
46
- allFixed is true if all LinkedBound variables are fixed
47
- */
48
- virtual int fathom(bool allFixed) ;
49
- /** Solves nonlinear problem from CoinModel using SLP - may be used as crash
50
- for other algorithms when number of iterations small.
51
- Also exits if all problematical variables are changing
52
- less than deltaTolerance
53
- Returns solution array
54
- */
55
- double * nonlinearSLP(int numberPasses, double deltaTolerance);
56
- /** Solve linearized quadratic objective branch and bound.
57
- Return cutoff and OA cut
58
- */
59
- double linearizedBAB(CglStored * cut) ;
60
- /** Solves nonlinear problem from CoinModel using SLP - and then tries to get
61
- heuristic solution
62
- Returns solution array
63
- mode -
64
- 0 just get continuous
65
- 1 round and try normal bab
66
- 2 use defaultBound_ to bound integer variables near current solution
67
- */
68
- double * heuristicSolution(int numberPasses, double deltaTolerance, int mode);
69
-
70
- /// Do OA cuts
71
- int doAOCuts(CglTemporary * cutGen, const double * solution, const double * solution2);
72
- //@}
73
-
74
-
75
- /**@name Constructors and destructors */
76
- //@{
77
- /// Default Constructor
78
- OsiSolverLink ();
79
-
80
- /** This creates from a coinModel object
81
-
82
- if errors.then number of sets is -1
83
-
84
- This creates linked ordered sets information. It assumes -
85
-
86
- for product terms syntax is yy*f(zz)
87
- also just f(zz) is allowed
88
- and even a constant
89
-
90
- modelObject not const as may be changed as part of process.
91
- */
92
- OsiSolverLink( CoinModel & modelObject);
93
- // Other way with existing object
94
- void load( CoinModel & modelObject, bool tightenBounds = false, int logLevel = 1);
95
- /// Clone
96
- virtual OsiSolverInterface * clone(bool copyData = true) const;
97
-
98
- /// Copy constructor
99
- OsiSolverLink (const OsiSolverLink &);
100
-
101
- /// Assignment operator
102
- OsiSolverLink & operator=(const OsiSolverLink& rhs);
103
-
104
- /// Destructor
105
- virtual ~OsiSolverLink ();
106
-
107
- //@}
108
-
109
-
110
- /**@name Sets and Gets */
111
- //@{
112
- /// Add a bound modifier
113
- void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable, int whichVariableAffected,
114
- double multiplier = 1.0);
115
- /// Update coefficients - returns number updated if in updating mode
116
- int updateCoefficients(ClpSimplex * solver, CoinPackedMatrix * matrix);
117
- /// Analyze constraints to see which are convex (quadratic)
118
- void analyzeObjects();
119
- /// Add reformulated bilinear constraints
120
- void addTighterConstraints();
121
- /// Objective value of best solution found internally
122
- inline double bestObjectiveValue() const {
123
- return bestObjectiveValue_;
124
- }
125
- /// Set objective value of best solution found internally
126
- inline void setBestObjectiveValue(double value) {
127
- bestObjectiveValue_ = value;
128
- }
129
- /// Best solution found internally
130
- inline const double * bestSolution() const {
131
- return bestSolution_;
132
- }
133
- /// Set best solution found internally
134
- void setBestSolution(const double * solution, int numberColumns);
135
- /// Set special options
136
- inline void setSpecialOptions2(int value) {
137
- specialOptions2_ = value;
138
- }
139
- /// Say convex (should work it out) - if convex false then strictly concave
140
- void sayConvex(bool convex);
141
- /// Get special options
142
- inline int specialOptions2() const {
143
- return specialOptions2_;
144
- }
145
- /** Clean copy of matrix
146
- So we can add rows
147
- */
148
- CoinPackedMatrix * cleanMatrix() const {
149
- return matrix_;
150
- }
151
- /** Row copy of matrix
152
- Just genuine columns and rows
153
- Linear part
154
- */
155
- CoinPackedMatrix * originalRowCopy() const {
156
- return originalRowCopy_;
157
- }
158
- /// Copy of quadratic model if one
159
- ClpSimplex * quadraticModel() const {
160
- return quadraticModel_;
161
- }
162
- /// Gets correct form for a quadratic row - user to delete
163
- CoinPackedMatrix * quadraticRow(int rowNumber, double * linear) const;
164
- /// Default meshSize
165
- inline double defaultMeshSize() const {
166
- return defaultMeshSize_;
167
- }
168
- inline void setDefaultMeshSize(double value) {
169
- defaultMeshSize_ = value;
170
- }
171
- /// Default maximumbound
172
- inline double defaultBound() const {
173
- return defaultBound_;
174
- }
175
- inline void setDefaultBound(double value) {
176
- defaultBound_ = value;
177
- }
178
- /// Set integer priority
179
- inline void setIntegerPriority(int value) {
180
- integerPriority_ = value;
181
- }
182
- /// Get integer priority
183
- inline int integerPriority() const {
184
- return integerPriority_;
185
- }
186
- /// Objective transfer variable if one
187
- inline int objectiveVariable() const {
188
- return objectiveVariable_;
189
- }
190
- /// Set biLinear priority
191
- inline void setBiLinearPriority(int value) {
192
- biLinearPriority_ = value;
193
- }
194
- /// Get biLinear priority
195
- inline int biLinearPriority() const {
196
- return biLinearPriority_;
197
- }
198
- /// Return CoinModel
199
- inline const CoinModel * coinModel() const {
200
- return &coinModel_;
201
- }
202
- /// Set all biLinear priorities on x-x variables
203
- void setBiLinearPriorities(int value, double meshSize = 1.0);
204
- /** Set options and priority on all or some biLinear variables
205
- 1 - on I-I
206
- 2 - on I-x
207
- 4 - on x-x
208
- or combinations.
209
- -1 means leave (for priority value and strategy value)
210
- */
211
- void setBranchingStrategyOnVariables(int strategyValue, int priorityValue = -1,
212
- int mode = 7);
213
- /// Set all mesh sizes on x-x variables
214
- void setMeshSizes(double value);
215
- /** Two tier integer problem where when set of variables with priority
216
- less than this are fixed the problem becomes an easier integer problem
217
- */
218
- void setFixedPriority(int priorityValue);
219
- //@}
220
-
221
- //---------------------------------------------------------------------------
222
-
223
- protected:
224
-
225
-
226
- /**@name functions */
227
- //@{
228
- /// Do real work of initialize
229
- //void initialize(ClpSimplex * & solver, OsiObject ** & object) const;
230
- /// Do real work of delete
231
- void gutsOfDestructor(bool justNullify = false);
232
- /// Do real work of copy
233
- void gutsOfCopy(const OsiSolverLink & rhs) ;
234
- //@}
235
-
236
- /**@name Private member data */
237
- //@{
238
- /** Clean copy of matrix
239
- Marked coefficients will be multiplied by L or U
240
- */
241
- CoinPackedMatrix * matrix_;
242
- /** Row copy of matrix
243
- Just genuine columns and rows
244
- */
245
- CoinPackedMatrix * originalRowCopy_;
246
- /// Copy of quadratic model if one
247
- ClpSimplex * quadraticModel_;
248
- /// Number of rows with nonLinearities
249
- int numberNonLinearRows_;
250
- /// Starts of lists
251
- int * startNonLinear_;
252
- /// Row number for a list
253
- int * rowNonLinear_;
254
- /** Indicator whether is convex, concave or neither
255
- -1 concave, 0 neither, +1 convex
256
- */
257
- int * convex_;
258
- /// Indices in a list/row
259
- int * whichNonLinear_;
260
- /// Model in CoinModel format
261
- CoinModel coinModel_;
262
- /// Number of variables in tightening phase
263
- int numberVariables_;
264
- /// Information
265
- OsiLinkedBound * info_;
266
- /**
267
- 0 bit (1) - call fathom (may do mini B&B)
268
- 1 bit (2) - quadratic only in objective (add OA cuts)
269
- 2 bit (4) - convex
270
- 3 bit (8) - try adding OA cuts
271
- 4 bit (16) - add linearized constraints
272
- */
273
- int specialOptions2_;
274
- /// Objective transfer row if one
275
- int objectiveRow_;
276
- /// Objective transfer variable if one
277
- int objectiveVariable_;
278
- /// Objective value of best solution found internally
279
- double bestObjectiveValue_;
280
- /// Default mesh
281
- double defaultMeshSize_;
282
- /// Default maximum bound
283
- double defaultBound_;
284
- /// Best solution found internally
285
- double * bestSolution_;
286
- /// Priority for integers
287
- int integerPriority_;
288
- /// Priority for bilinear
289
- int biLinearPriority_;
290
- /// Number of variables which when fixed help
291
- int numberFix_;
292
- /// list of fixed variables
293
- int * fixVariables_;
294
- //@}
295
- };
296
- /**
297
- List of bounds which depend on other bounds
298
- */
299
-
300
- class OsiLinkedBound {
301
-
302
- public:
303
- //---------------------------------------------------------------------------
304
- /**@name Action methods */
305
- //@{
306
- /// Update other bounds
307
- void updateBounds(ClpSimplex * solver);
308
- //@}
309
-
310
-
311
- /**@name Constructors and destructors */
312
- //@{
313
- /// Default Constructor
314
- OsiLinkedBound ();
315
- /// Useful Constructor
316
- OsiLinkedBound(OsiSolverInterface * model, int variable,
317
- int numberAffected, const int * positionL,
318
- const int * positionU, const double * multiplier);
319
-
320
- /// Copy constructor
321
- OsiLinkedBound (const OsiLinkedBound &);
322
-
323
- /// Assignment operator
324
- OsiLinkedBound & operator=(const OsiLinkedBound& rhs);
325
-
326
- /// Destructor
327
- ~OsiLinkedBound ();
328
-
329
- //@}
330
-
331
- /**@name Sets and Gets */
332
- //@{
333
- /// Get variable
334
- inline int variable() const {
335
- return variable_;
336
- }
337
- /// Add a bound modifier
338
- void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable,
339
- double multiplier = 1.0);
340
- //@}
341
-
342
- private:
343
- typedef struct {
344
- double multiplier; // to use in computation
345
- int affected; // variable or element affected
346
- /*
347
- 0 - LB of variable affected
348
- 1 - UB of variable affected
349
- 2 - element in position (affected) affected
350
- */
351
- unsigned char affect;
352
- unsigned char ubUsed; // nonzero if UB of this variable is used
353
- /*
354
- 0 - use x*multiplier
355
- 1 - use multiplier/x
356
- 2 - if UB use min of current upper and x*multiplier, if LB use max of current lower and x*multiplier
357
- */
358
- unsigned char type; // type of computation
359
- } boundElementAction;
360
-
361
- /**@name Private member data */
362
- //@{
363
- /// Pointer back to model
364
- OsiSolverInterface * model_;
365
- /// Variable
366
- int variable_;
367
- /// Number of variables/elements affected
368
- int numberAffected_;
369
- /// Maximum number of variables/elements affected
370
- int maximumAffected_;
371
- /// Actions
372
- boundElementAction * affected_;
373
- //@}
374
- };
375
- #include "CbcHeuristic.hpp"
376
- /** heuristic - just picks up any good solution
377
- */
378
-
379
- class CbcHeuristicDynamic3 : public CbcHeuristic {
380
- public:
381
-
382
- // Default Constructor
383
- CbcHeuristicDynamic3 ();
384
-
385
- /* Constructor with model
386
- */
387
- CbcHeuristicDynamic3 (CbcModel & model);
388
-
389
- // Copy constructor
390
- CbcHeuristicDynamic3 ( const CbcHeuristicDynamic3 &);
391
-
392
- // Destructor
393
- ~CbcHeuristicDynamic3 ();
394
-
395
- /// Clone
396
- virtual CbcHeuristic * clone() const;
397
-
398
- /// update model
399
- virtual void setModel(CbcModel * model);
400
-
401
- using CbcHeuristic::solution ;
402
- /** returns 0 if no solution, 1 if valid solution.
403
- Sets solution values if good, sets objective value (only if good)
404
- We leave all variables which are at one at this node of the
405
- tree to that value and will
406
- initially set all others to zero. We then sort all variables in order of their cost
407
- divided by the number of entries in rows which are not yet covered. We randomize that
408
- value a bit so that ties will be broken in different ways on different runs of the heuristic.
409
- We then choose the best one and set it to one and repeat the exercise.
410
-
411
- */
412
- virtual int solution(double & objectiveValue,
413
- double * newSolution);
414
- /// Resets stuff if model changes
415
- virtual void resetModel(CbcModel * model);
416
- /// Returns true if can deal with "odd" problems e.g. sos type 2
417
- virtual bool canDealWithOdd() const {
418
- return true;
419
- }
420
-
421
- protected:
422
- private:
423
- /// Illegal Assignment operator
424
- CbcHeuristicDynamic3 & operator=(const CbcHeuristicDynamic3& rhs);
425
- };
426
-
427
- #include "OsiBranchingObject.hpp"
428
-
429
- /** Define Special Linked Ordered Sets.
430
-
431
- */
432
- class CoinWarmStartBasis;
433
-
434
- class OsiOldLink : public OsiSOS {
435
-
436
- public:
437
-
438
- // Default Constructor
439
- OsiOldLink ();
440
-
441
- /** Useful constructor - A valid solution is if all variables are zero
442
- apart from k*numberLink to (k+1)*numberLink-1 where k is 0 through
443
- numberInSet-1. The length of weights array is numberInSet.
444
- For this constructor the variables in matrix are the numberInSet*numberLink
445
- starting at first. If weights null then 0,1,2..
446
- */
447
- OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
448
- int numberLinks, int first,
449
- const double * weights, int setNumber);
450
- /** Useful constructor - A valid solution is if all variables are zero
451
- apart from k*numberLink to (k+1)*numberLink-1 where k is 0 through
452
- numberInSet-1. The length of weights array is numberInSet.
453
- For this constructor the variables are given by list - grouped.
454
- If weights null then 0,1,2..
455
- */
456
- OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
457
- int numberLinks, int typeSOS, const int * which,
458
- const double * weights, int setNumber);
459
-
460
- // Copy constructor
461
- OsiOldLink ( const OsiOldLink &);
462
-
463
- /// Clone
464
- virtual OsiObject * clone() const;
465
-
466
- // Assignment operator
467
- OsiOldLink & operator=( const OsiOldLink& rhs);
468
-
469
- // Destructor
470
- virtual ~OsiOldLink ();
471
-
472
- using OsiObject::infeasibility ;
473
- /// Infeasibility - large is 0.5
474
- virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
475
-
476
- using OsiObject::feasibleRegion ;
477
- /** Set bounds to fix the variable at the current (integer) value.
478
-
479
- Given an integer value, set the lower and upper bounds to fix the
480
- variable. Returns amount it had to move variable.
481
- */
482
- virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
483
-
484
- /** Creates a branching object
485
-
486
- The preferred direction is set by \p way, 0 for down, 1 for up.
487
- */
488
- virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
489
-
490
- /// Redoes data when sequence numbers change
491
- virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
492
-
493
- /// Number of links for each member
494
- inline int numberLinks() const {
495
- return numberLinks_;
496
- }
497
-
498
- /** \brief Return true if object can take part in normal heuristics
499
- */
500
- virtual bool canDoHeuristics() const {
501
- return false;
502
- }
503
- /** \brief Return true if branch should only bound variables
504
- */
505
- virtual bool boundBranch() const {
506
- return false;
507
- }
508
-
509
- private:
510
- /// data
511
-
512
- /// Number of links
513
- int numberLinks_;
514
- };
515
- /** Branching object for Linked ordered sets
516
-
517
- */
518
- class OsiOldLinkBranchingObject : public OsiSOSBranchingObject {
519
-
520
- public:
521
-
522
- // Default Constructor
523
- OsiOldLinkBranchingObject ();
524
-
525
- // Useful constructor
526
- OsiOldLinkBranchingObject (OsiSolverInterface * solver, const OsiOldLink * originalObject,
527
- int way,
528
- double separator);
529
-
530
- // Copy constructor
531
- OsiOldLinkBranchingObject ( const OsiOldLinkBranchingObject &);
532
-
533
- // Assignment operator
534
- OsiOldLinkBranchingObject & operator=( const OsiOldLinkBranchingObject& rhs);
535
-
536
- /// Clone
537
- virtual OsiBranchingObject * clone() const;
538
-
539
- // Destructor
540
- virtual ~OsiOldLinkBranchingObject ();
541
-
542
- using OsiBranchingObject::branch ;
543
- /// Does next branch and updates state
544
- virtual double branch(OsiSolverInterface * solver);
545
-
546
- using OsiBranchingObject::print ;
547
- /** \brief Print something about branch - only if log level high
548
- */
549
- virtual void print(const OsiSolverInterface * solver = NULL);
550
- private:
551
- /// data
552
- };
553
- /** Define data for one link
554
-
555
- */
556
-
557
-
558
- class OsiOneLink {
559
-
560
- public:
561
-
562
- // Default Constructor
563
- OsiOneLink ();
564
-
565
- /** Useful constructor -
566
-
567
- */
568
- OsiOneLink (const OsiSolverInterface * solver, int xRow, int xColumn, int xyRow,
569
- const char * functionString);
570
-
571
- // Copy constructor
572
- OsiOneLink ( const OsiOneLink &);
573
-
574
- // Assignment operator
575
- OsiOneLink & operator=( const OsiOneLink& rhs);
576
-
577
- // Destructor
578
- virtual ~OsiOneLink ();
579
-
580
- /// data
581
-
582
- /// Row which defines x (if -1 then no x)
583
- int xRow_;
584
- /// Column which defines x
585
- int xColumn_;
586
- /// Output row
587
- int xyRow;
588
- /// Function
589
- std::string function_;
590
- };
591
- /** Define Special Linked Ordered Sets. New style
592
-
593
- members and weights may be stored in SOS object
594
-
595
- This is for y and x*f(y) and z*g(y) etc
596
-
597
- */
598
-
599
-
600
- class OsiLink : public OsiSOS {
601
-
602
- public:
603
-
604
- // Default Constructor
605
- OsiLink ();
606
-
607
- /** Useful constructor -
608
-
609
- */
610
- OsiLink (const OsiSolverInterface * solver, int yRow,
611
- int yColumn, double meshSize);
612
-
613
- // Copy constructor
614
- OsiLink ( const OsiLink &);
615
-
616
- /// Clone
617
- virtual OsiObject * clone() const;
618
-
619
- // Assignment operator
620
- OsiLink & operator=( const OsiLink& rhs);
621
-
622
- // Destructor
623
- virtual ~OsiLink ();
624
-
625
- using OsiObject::infeasibility ;
626
- /// Infeasibility - large is 0.5
627
- virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
628
-
629
- using OsiObject::feasibleRegion ;
630
- /** Set bounds to fix the variable at the current (integer) value.
631
-
632
- Given an integer value, set the lower and upper bounds to fix the
633
- variable. Returns amount it had to move variable.
634
- */
635
- virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
636
-
637
- /** Creates a branching object
638
-
639
- The preferred direction is set by \p way, 0 for down, 1 for up.
640
- */
641
- virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
642
-
643
- /// Redoes data when sequence numbers change
644
- virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
645
-
646
- /// Number of links for each member
647
- inline int numberLinks() const {
648
- return numberLinks_;
649
- }
650
-
651
- /** \brief Return true if object can take part in normal heuristics
652
- */
653
- virtual bool canDoHeuristics() const {
654
- return false;
655
- }
656
- /** \brief Return true if branch should only bound variables
657
- */
658
- virtual bool boundBranch() const {
659
- return false;
660
- }
661
-
662
- private:
663
- /// data
664
- /// Current increment for y points
665
- double meshSize_;
666
- /// Links
667
- OsiOneLink * data_;
668
- /// Number of links
669
- int numberLinks_;
670
- /// Row which defines y
671
- int yRow_;
672
- /// Column which defines y
673
- int yColumn_;
674
- };
675
- /** Branching object for Linked ordered sets
676
-
677
- */
678
- class OsiLinkBranchingObject : public OsiTwoWayBranchingObject {
679
-
680
- public:
681
-
682
- // Default Constructor
683
- OsiLinkBranchingObject ();
684
-
685
- // Useful constructor
686
- OsiLinkBranchingObject (OsiSolverInterface * solver, const OsiLink * originalObject,
687
- int way,
688
- double separator);
689
-
690
- // Copy constructor
691
- OsiLinkBranchingObject ( const OsiLinkBranchingObject &);
692
-
693
- // Assignment operator
694
- OsiLinkBranchingObject & operator=( const OsiLinkBranchingObject& rhs);
695
-
696
- /// Clone
697
- virtual OsiBranchingObject * clone() const;
698
-
699
- // Destructor
700
- virtual ~OsiLinkBranchingObject ();
701
-
702
- using OsiBranchingObject::branch ;
703
- /// Does next branch and updates state
704
- virtual double branch(OsiSolverInterface * solver);
705
-
706
- using OsiBranchingObject::print ;
707
- /** \brief Print something about branch - only if log level high
708
- */
709
- virtual void print(const OsiSolverInterface * solver = NULL);
710
- private:
711
- /// data
712
- };
713
- /** Define BiLinear objects
714
-
715
- This models x*y where one or both are integer
716
-
717
- */
718
-
719
-
720
- class OsiBiLinear : public OsiObject2 {
721
-
722
- public:
723
-
724
- // Default Constructor
725
- OsiBiLinear ();
726
-
727
- /** Useful constructor -
728
- This Adds in rows and variables to construct valid Linked Ordered Set
729
- Adds extra constraints to match other x/y
730
- So note not const solver
731
- */
732
- OsiBiLinear (OsiSolverInterface * solver, int xColumn,
733
- int yColumn, int xyRow, double coefficient,
734
- double xMesh, double yMesh,
735
- int numberExistingObjects = 0, const OsiObject ** objects = NULL );
736
-
737
- /** Useful constructor -
738
- This Adds in rows and variables to construct valid Linked Ordered Set
739
- Adds extra constraints to match other x/y
740
- So note not const model
741
- */
742
- OsiBiLinear (CoinModel * coinModel, int xColumn,
743
- int yColumn, int xyRow, double coefficient,
744
- double xMesh, double yMesh,
745
- int numberExistingObjects = 0, const OsiObject ** objects = NULL );
746
-
747
- // Copy constructor
748
- OsiBiLinear ( const OsiBiLinear &);
749
-
750
- /// Clone
751
- virtual OsiObject * clone() const;
752
-
753
- // Assignment operator
754
- OsiBiLinear & operator=( const OsiBiLinear& rhs);
755
-
756
- // Destructor
757
- virtual ~OsiBiLinear ();
758
-
759
- using OsiObject::infeasibility ;
760
- /// Infeasibility - large is 0.5
761
- virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
762
-
763
- using OsiObject::feasibleRegion ;
764
- /** Set bounds to fix the variable at the current (integer) value.
765
-
766
- Given an integer value, set the lower and upper bounds to fix the
767
- variable. Returns amount it had to move variable.
768
- */
769
- virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
770
-
771
- /** Creates a branching object
772
-
773
- The preferred direction is set by \p way, 0 for down, 1 for up.
774
- */
775
- virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
776
-
777
- /// Redoes data when sequence numbers change
778
- virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
779
-
780
- // This does NOT set mutable stuff
781
- virtual double checkInfeasibility(const OsiBranchingInformation * info) const;
782
-
783
- /** \brief Return true if object can take part in normal heuristics
784
- */
785
- virtual bool canDoHeuristics() const {
786
- return false;
787
- }
788
- /** \brief Return true if branch should only bound variables
789
- */
790
- virtual bool boundBranch() const {
791
- return (branchingStrategy_&4) != 0;
792
- }
793
- /// X column
794
- inline int xColumn() const {
795
- return xColumn_;
796
- }
797
- /// Y column
798
- inline int yColumn() const {
799
- return yColumn_;
800
- }
801
- /// X row
802
- inline int xRow() const {
803
- return xRow_;
804
- }
805
- /// Y row
806
- inline int yRow() const {
807
- return yRow_;
808
- }
809
- /// XY row
810
- inline int xyRow() const {
811
- return xyRow_;
812
- }
813
- /// Coefficient
814
- inline double coefficient() const {
815
- return coefficient_;
816
- }
817
- /// Set coefficient
818
- inline void setCoefficient(double value) {
819
- coefficient_ = value;
820
- }
821
- /// First lambda (of 4)
822
- inline int firstLambda() const {
823
- return firstLambda_;
824
- }
825
- /// X satisfied if less than this away from mesh
826
- inline double xSatisfied() const {
827
- return xSatisfied_;
828
- }
829
- inline void setXSatisfied(double value) {
830
- xSatisfied_ = value;
831
- }
832
- /// Y satisfied if less than this away from mesh
833
- inline double ySatisfied() const {
834
- return ySatisfied_;
835
- }
836
- inline void setYSatisfied(double value) {
837
- ySatisfied_ = value;
838
- }
839
- /// X other satisfied if less than this away from mesh
840
- inline double xOtherSatisfied() const {
841
- return xOtherSatisfied_;
842
- }
843
- inline void setXOtherSatisfied(double value) {
844
- xOtherSatisfied_ = value;
845
- }
846
- /// Y other satisfied if less than this away from mesh
847
- inline double yOtherSatisfied() const {
848
- return yOtherSatisfied_;
849
- }
850
- inline void setYOtherSatisfied(double value) {
851
- yOtherSatisfied_ = value;
852
- }
853
- /// X meshSize
854
- inline double xMeshSize() const {
855
- return xMeshSize_;
856
- }
857
- inline void setXMeshSize(double value) {
858
- xMeshSize_ = value;
859
- }
860
- /// Y meshSize
861
- inline double yMeshSize() const {
862
- return yMeshSize_;
863
- }
864
- inline void setYMeshSize(double value) {
865
- yMeshSize_ = value;
866
- }
867
- /// XY satisfied if two version differ by less than this
868
- inline double xySatisfied() const {
869
- return xySatisfied_;
870
- }
871
- inline void setXYSatisfied(double value) {
872
- xySatisfied_ = value;
873
- }
874
- /// Set sizes and other stuff
875
- void setMeshSizes(const OsiSolverInterface * solver, double x, double y);
876
- /** branching strategy etc
877
- bottom 2 bits
878
- 0 branch on either, 1 branch on x, 2 branch on y
879
- next bit
880
- 4 set to say don't update coefficients
881
- next bit
882
- 8 set to say don't use in feasible region
883
- next bit
884
- 16 set to say - Always satisfied !!
885
- */
886
- inline int branchingStrategy() const {
887
- return branchingStrategy_;
888
- }
889
- inline void setBranchingStrategy(int value) {
890
- branchingStrategy_ = value;
891
- }
892
- /** Simple quadratic bound marker.
893
- 0 no
894
- 1 L if coefficient pos, G if negative i.e. value is ub on xy
895
- 2 G if coefficient pos, L if negative i.e. value is lb on xy
896
- 3 E
897
- If bound then real coefficient is 1.0 and coefficient_ is bound
898
- */
899
- inline int boundType() const {
900
- return boundType_;
901
- }
902
- inline void setBoundType(int value) {
903
- boundType_ = value;
904
- }
905
- /// Does work of branching
906
- void newBounds(OsiSolverInterface * solver, int way, short xOrY, double separator) const;
907
- /// Updates coefficients - returns number updated
908
- int updateCoefficients(const double * lower, const double * upper, double * objective,
909
- CoinPackedMatrix * matrix, CoinWarmStartBasis * basis) const;
910
- /// Returns true value of single xyRow coefficient
911
- double xyCoefficient(const double * solution) const;
912
- /// Get LU coefficients from matrix
913
- void getCoefficients(const OsiSolverInterface * solver, double xB[2], double yB[2], double xybar[4]) const;
914
- /// Compute lambdas (third entry in each .B is current value) (nonzero if bad)
915
- double computeLambdas(const double xB[3], const double yB[3], const double xybar[4], double lambda[4]) const;
916
- /// Adds in data for extra row with variable coefficients
917
- void addExtraRow(int row, double multiplier);
918
- /// Sets infeasibility and other when pseudo shadow prices
919
- void getPseudoShadow(const OsiBranchingInformation * info);
920
- /// Gets sum of movements to correct value
921
- double getMovement(const OsiBranchingInformation * info);
922
-
923
- protected:
924
- /// Compute lambdas if coefficients not changing
925
- void computeLambdas(const OsiSolverInterface * solver, double lambda[4]) const;
926
- /// data
927
-
928
- /// Coefficient
929
- double coefficient_;
930
- /// x mesh
931
- double xMeshSize_;
932
- /// y mesh
933
- double yMeshSize_;
934
- /// x satisfied if less than this away from mesh
935
- double xSatisfied_;
936
- /// y satisfied if less than this away from mesh
937
- double ySatisfied_;
938
- /// X other satisfied if less than this away from mesh
939
- double xOtherSatisfied_;
940
- /// Y other satisfied if less than this away from mesh
941
- double yOtherSatisfied_;
942
- /// xy satisfied if less than this away from true
943
- double xySatisfied_;
944
- /// value of x or y to branch about
945
- mutable double xyBranchValue_;
946
- /// x column
947
- int xColumn_;
948
- /// y column
949
- int yColumn_;
950
- /// First lambda (of 4)
951
- int firstLambda_;
952
- /** branching strategy etc
953
- bottom 2 bits
954
- 0 branch on either, 1 branch on x, 2 branch on y
955
- next bit
956
- 4 set to say don't update coefficients
957
- next bit
958
- 8 set to say don't use in feasible region
959
- next bit
960
- 16 set to say - Always satisfied !!
961
- */
962
- int branchingStrategy_;
963
- /** Simple quadratic bound marker.
964
- 0 no
965
- 1 L if coefficient pos, G if negative i.e. value is ub on xy
966
- 2 G if coefficient pos, L if negative i.e. value is lb on xy
967
- 3 E
968
- If bound then real coefficient is 1.0 and coefficient_ is bound
969
- */
970
- int boundType_;
971
- /// x row
972
- int xRow_;
973
- /// y row (-1 if x*x)
974
- int yRow_;
975
- /// Output row
976
- int xyRow_;
977
- /// Convexity row
978
- int convexity_;
979
- /// Number of extra rows (coefficients to be modified)
980
- int numberExtraRows_;
981
- /// Multiplier for coefficient on row
982
- double * multiplier_;
983
- /// Row number
984
- int * extraRow_;
985
- /// Which chosen -1 none, 0 x, 1 y
986
- mutable short chosen_;
987
- };
988
- /** Branching object for BiLinear objects
989
-
990
- */
991
- class OsiBiLinearBranchingObject : public OsiTwoWayBranchingObject {
992
-
993
- public:
994
-
995
- // Default Constructor
996
- OsiBiLinearBranchingObject ();
997
-
998
- // Useful constructor
999
- OsiBiLinearBranchingObject (OsiSolverInterface * solver, const OsiBiLinear * originalObject,
1000
- int way,
1001
- double separator, int chosen);
1002
-
1003
- // Copy constructor
1004
- OsiBiLinearBranchingObject ( const OsiBiLinearBranchingObject &);
1005
-
1006
- // Assignment operator
1007
- OsiBiLinearBranchingObject & operator=( const OsiBiLinearBranchingObject& rhs);
1008
-
1009
- /// Clone
1010
- virtual OsiBranchingObject * clone() const;
1011
-
1012
- // Destructor
1013
- virtual ~OsiBiLinearBranchingObject ();
1014
-
1015
- using OsiBranchingObject::branch ;
1016
- /// Does next branch and updates state
1017
- virtual double branch(OsiSolverInterface * solver);
1018
-
1019
- using OsiBranchingObject::print ;
1020
- /** \brief Print something about branch - only if log level high
1021
- */
1022
- virtual void print(const OsiSolverInterface * solver = NULL);
1023
- /** \brief Return true if branch should only bound variables
1024
- */
1025
- virtual bool boundBranch() const;
1026
- private:
1027
- /// data
1028
- /// 1 means branch on x, 2 branch on y
1029
- short chosen_;
1030
- };
1031
- /** Define Continuous BiLinear objects for an == bound
1032
-
1033
- This models x*y = b where both are continuous
1034
-
1035
- */
1036
-
1037
-
1038
- class OsiBiLinearEquality : public OsiBiLinear {
1039
-
1040
- public:
1041
-
1042
- // Default Constructor
1043
- OsiBiLinearEquality ();
1044
-
1045
- /** Useful constructor -
1046
- This Adds in rows and variables to construct Ordered Set
1047
- for x*y = b
1048
- So note not const solver
1049
- */
1050
- OsiBiLinearEquality (OsiSolverInterface * solver, int xColumn,
1051
- int yColumn, int xyRow, double rhs,
1052
- double xMesh);
1053
-
1054
- // Copy constructor
1055
- OsiBiLinearEquality ( const OsiBiLinearEquality &);
1056
-
1057
- /// Clone
1058
- virtual OsiObject * clone() const;
1059
-
1060
- // Assignment operator
1061
- OsiBiLinearEquality & operator=( const OsiBiLinearEquality& rhs);
1062
-
1063
- // Destructor
1064
- virtual ~OsiBiLinearEquality ();
1065
-
1066
- /// Possible improvement
1067
- virtual double improvement(const OsiSolverInterface * solver) const;
1068
- /** change grid
1069
- if type 0 then use solution and make finer
1070
- if 1 then back to original
1071
- returns mesh size
1072
- */
1073
- double newGrid(OsiSolverInterface * solver, int type) const;
1074
- /// Number of points
1075
- inline int numberPoints() const {
1076
- return numberPoints_;
1077
- }
1078
- inline void setNumberPoints(int value) {
1079
- numberPoints_ = value;
1080
- }
1081
-
1082
- private:
1083
- /// Number of points
1084
- int numberPoints_;
1085
- };
1086
- /// Define a single integer class - but one where you keep branching until fixed even if satisfied
1087
-
1088
-
1089
- class OsiSimpleFixedInteger : public OsiSimpleInteger {
1090
-
1091
- public:
1092
-
1093
- /// Default Constructor
1094
- OsiSimpleFixedInteger ();
1095
-
1096
- /// Useful constructor - passed solver index
1097
- OsiSimpleFixedInteger (const OsiSolverInterface * solver, int iColumn);
1098
-
1099
- /// Useful constructor - passed solver index and original bounds
1100
- OsiSimpleFixedInteger (int iColumn, double lower, double upper);
1101
-
1102
- /// Useful constructor - passed simple integer
1103
- OsiSimpleFixedInteger (const OsiSimpleInteger &);
1104
-
1105
- /// Copy constructor
1106
- OsiSimpleFixedInteger ( const OsiSimpleFixedInteger &);
1107
-
1108
- /// Clone
1109
- virtual OsiObject * clone() const;
1110
-
1111
- /// Assignment operator
1112
- OsiSimpleFixedInteger & operator=( const OsiSimpleFixedInteger& rhs);
1113
-
1114
- /// Destructor
1115
- virtual ~OsiSimpleFixedInteger ();
1116
-
1117
- using OsiObject::infeasibility ;
1118
- /// Infeasibility - large is 0.5
1119
- virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
1120
-
1121
- /** Creates a branching object
1122
-
1123
- The preferred direction is set by \p way, 0 for down, 1 for up.
1124
- */
1125
- virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
1126
- protected:
1127
- /// data
1128
-
1129
- };
1130
- /** Define a single variable class which is involved with OsiBiLinear objects.
1131
- This is used so can make better decision on where to branch as it can look at
1132
- all objects.
1133
-
1134
- This version sees if it can re-use code from OsiSimpleInteger
1135
- even if not an integer variable. If not then need to duplicate code.
1136
- */
1137
-
1138
-
1139
- class OsiUsesBiLinear : public OsiSimpleInteger {
1140
-
1141
- public:
1142
-
1143
- /// Default Constructor
1144
- OsiUsesBiLinear ();
1145
-
1146
- /// Useful constructor - passed solver index
1147
- OsiUsesBiLinear (const OsiSolverInterface * solver, int iColumn, int type);
1148
-
1149
- /// Useful constructor - passed solver index and original bounds
1150
- OsiUsesBiLinear (int iColumn, double lower, double upper, int type);
1151
-
1152
- /// Useful constructor - passed simple integer
1153
- OsiUsesBiLinear (const OsiSimpleInteger & rhs, int type);
1154
-
1155
- /// Copy constructor
1156
- OsiUsesBiLinear ( const OsiUsesBiLinear & rhs);
1157
-
1158
- /// Clone
1159
- virtual OsiObject * clone() const;
1160
-
1161
- /// Assignment operator
1162
- OsiUsesBiLinear & operator=( const OsiUsesBiLinear& rhs);
1163
-
1164
- /// Destructor
1165
- virtual ~OsiUsesBiLinear ();
1166
-
1167
- using OsiObject::infeasibility ;
1168
- /// Infeasibility - large is 0.5
1169
- virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
1170
-
1171
- /** Creates a branching object
1172
-
1173
- The preferred direction is set by \p way, 0 for down, 1 for up.
1174
- */
1175
- virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
1176
-
1177
- using OsiObject::feasibleRegion ;
1178
- /** Set bounds to fix the variable at the current value.
1179
-
1180
- Given an current value, set the lower and upper bounds to fix the
1181
- variable. Returns amount it had to move variable.
1182
- */
1183
- virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
1184
-
1185
- /// Add all bi-linear objects
1186
- void addBiLinearObjects(OsiSolverLink * solver);
1187
- protected:
1188
- /// data
1189
- /// Number of bilinear objects (maybe could be more general)
1190
- int numberBiLinear_;
1191
- /// Type of variable - 0 continuous, 1 integer
1192
- int type_;
1193
- /// Objects
1194
- OsiObject ** objects_;
1195
- };
1196
- /** This class chooses a variable to branch on
1197
-
1198
- This is just as OsiChooseStrong but it fakes it so only
1199
- first so many are looked at in this phase
1200
-
1201
- */
1202
-
1203
- class OsiChooseStrongSubset : public OsiChooseStrong {
1204
-
1205
- public:
1206
-
1207
- /// Default Constructor
1208
- OsiChooseStrongSubset ();
1209
-
1210
- /// Constructor from solver (so we can set up arrays etc)
1211
- OsiChooseStrongSubset (const OsiSolverInterface * solver);
1212
-
1213
- /// Copy constructor
1214
- OsiChooseStrongSubset (const OsiChooseStrongSubset &);
1215
-
1216
- /// Assignment operator
1217
- OsiChooseStrongSubset & operator= (const OsiChooseStrongSubset& rhs);
1218
-
1219
- /// Clone
1220
- virtual OsiChooseVariable * clone() const;
1221
-
1222
- /// Destructor
1223
- virtual ~OsiChooseStrongSubset ();
1224
-
1225
- /** Sets up strong list and clears all if initialize is true.
1226
- Returns number of infeasibilities.
1227
- If returns -1 then has worked out node is infeasible!
1228
- */
1229
- virtual int setupList ( OsiBranchingInformation *info, bool initialize);
1230
- /** Choose a variable
1231
- Returns -
1232
- -1 Node is infeasible
1233
- 0 Normal termination - we have a candidate
1234
- 1 All looks satisfied - no candidate
1235
- 2 We can change the bound on a variable - but we also have a strong branching candidate
1236
- 3 We can change the bound on a variable - but we have a non-strong branching candidate
1237
- 4 We can change the bound on a variable - no other candidates
1238
- We can pick up branch from bestObjectIndex() and bestWhichWay()
1239
- We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay()
1240
- If we have a solution then we can pick up from goodObjectiveValue() and goodSolution()
1241
- If fixVariables is true then 2,3,4 are all really same as problem changed
1242
- */
1243
- virtual int chooseVariable( OsiSolverInterface * solver, OsiBranchingInformation *info, bool fixVariables);
1244
-
1245
- /// Number of objects to use
1246
- inline int numberObjectsToUse() const {
1247
- return numberObjectsToUse_;
1248
- }
1249
- /// Set number of objects to use
1250
- inline void setNumberObjectsToUse(int value) {
1251
- numberObjectsToUse_ = value;
1252
- }
1253
-
1254
- protected:
1255
- // Data
1256
- /// Number of objects to be used (and set in solver)
1257
- int numberObjectsToUse_;
1258
- };
1259
-
1260
- #include <string>
1261
-
1262
- #include "CglStored.hpp"
1263
-
1264
- class CoinWarmStartBasis;
1265
- /** Stored Temporary Cut Generator Class - destroyed after first use */
1266
- class CglTemporary : public CglStored {
1267
-
1268
- public:
1269
-
1270
-
1271
- /**@name Generate Cuts */
1272
- //@{
1273
- /** Generate Mixed Integer Stored cuts for the model of the
1274
- solver interface, si.
1275
-
1276
- Insert the generated cuts into OsiCut, cs.
1277
-
1278
- This generator just looks at previously stored cuts
1279
- and inserts any that are violated by enough
1280
- */
1281
- virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
1282
- const CglTreeInfo info = CglTreeInfo());
1283
- //@}
1284
-
1285
- /**@name Constructors and destructors */
1286
- //@{
1287
- /// Default constructor
1288
- CglTemporary ();
1289
-
1290
- /// Copy constructor
1291
- CglTemporary (const CglTemporary & rhs);
1292
-
1293
- /// Clone
1294
- virtual CglCutGenerator * clone() const;
1295
-
1296
- /// Assignment operator
1297
- CglTemporary &
1298
- operator=(const CglTemporary& rhs);
1299
-
1300
- /// Destructor
1301
- virtual
1302
- ~CglTemporary ();
1303
- //@}
1304
-
1305
- private:
1306
-
1307
- // Private member methods
1308
-
1309
- // Private member data
1310
- };
1311
- //#############################################################################
1312
-
1313
- /**
1314
-
1315
- This is to allow the user to replace initialSolve and resolve
1316
- */
1317
-
1318
- class OsiSolverLinearizedQuadratic : public OsiClpSolverInterface {
1319
-
1320
- public:
1321
- //---------------------------------------------------------------------------
1322
- /**@name Solve methods */
1323
- //@{
1324
- /// Solve initial LP relaxation
1325
- virtual void initialSolve();
1326
- //@}
1327
-
1328
-
1329
- /**@name Constructors and destructors */
1330
- //@{
1331
- /// Default Constructor
1332
- OsiSolverLinearizedQuadratic ();
1333
- /// Useful constructor (solution should be good)
1334
- OsiSolverLinearizedQuadratic( ClpSimplex * quadraticModel);
1335
- /// Clone
1336
- virtual OsiSolverInterface * clone(bool copyData = true) const;
1337
-
1338
- /// Copy constructor
1339
- OsiSolverLinearizedQuadratic (const OsiSolverLinearizedQuadratic &);
1340
-
1341
- /// Assignment operator
1342
- OsiSolverLinearizedQuadratic & operator=(const OsiSolverLinearizedQuadratic& rhs);
1343
-
1344
- /// Destructor
1345
- virtual ~OsiSolverLinearizedQuadratic ();
1346
-
1347
- //@}
1348
-
1349
-
1350
- /**@name Sets and Gets */
1351
- //@{
1352
- /// Objective value of best solution found internally
1353
- inline double bestObjectiveValue() const {
1354
- return bestObjectiveValue_;
1355
- }
1356
- /// Best solution found internally
1357
- const double * bestSolution() const {
1358
- return bestSolution_;
1359
- }
1360
- /// Set special options
1361
- inline void setSpecialOptions3(int value) {
1362
- specialOptions3_ = value;
1363
- }
1364
- /// Get special options
1365
- inline int specialOptions3() const {
1366
- return specialOptions3_;
1367
- }
1368
- /// Copy of quadratic model if one
1369
- ClpSimplex * quadraticModel() const {
1370
- return quadraticModel_;
1371
- }
1372
- //@}
1373
-
1374
- //---------------------------------------------------------------------------
1375
-
1376
- protected:
1377
-
1378
-
1379
- /**@name functions */
1380
- //@{
1381
-
1382
- /**@name Private member data */
1383
- //@{
1384
- /// Objective value of best solution found internally
1385
- double bestObjectiveValue_;
1386
- /// Copy of quadratic model if one
1387
- ClpSimplex * quadraticModel_;
1388
- /// Best solution found internally
1389
- double * bestSolution_;
1390
- /**
1391
- 0 bit (1) - don't do mini B&B
1392
- 1 bit (2) - quadratic only in objective
1393
- */
1394
- int specialOptions3_;
1395
- //@}
1396
- };
1397
- class ClpSimplex;
1398
- /** Return an approximate solution to a CoinModel.
1399
- Lots of bounds may be odd to force a solution.
1400
- mode = 0 just tries to get a continuous solution
1401
- */
1402
- ClpSimplex * approximateSolution(CoinModel & coinModel,
1403
- int numberPasses, double deltaTolerance,
1404
- int mode = 0);
1405
- #endif
1406
-