lpsolver 0.1.0 → 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 (1165) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +104 -26
  4. data/ext/lpsolver/Makefile +269 -0
  5. data/ext/lpsolver/ext.c +353 -0
  6. data/ext/lpsolver/ext.o +0 -0
  7. data/ext/lpsolver/extconf.rb +79 -0
  8. data/ext/lpsolver/native.so +0 -0
  9. data/ext/lpsolver-highs/AUTHORS +7 -0
  10. data/ext/lpsolver-highs/BUILD.bazel +243 -0
  11. data/ext/lpsolver-highs/CITATION.cff +29 -0
  12. data/ext/lpsolver-highs/CMakeCache.txt +406 -0
  13. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCCompiler.cmake +81 -0
  14. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake +101 -0
  15. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_C.bin +0 -0
  16. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
  17. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeSystem.cmake +15 -0
  18. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/CMakeCCompilerId.c +904 -0
  19. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/a.out +0 -0
  20. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +919 -0
  21. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/a.out +0 -0
  22. data/ext/lpsolver-highs/CMakeFiles/CMakeConfigureLog.yaml +576 -0
  23. data/ext/lpsolver-highs/CMakeFiles/cmake.check_cache +1 -0
  24. data/ext/lpsolver-highs/CMakeLists.txt +983 -0
  25. data/ext/lpsolver-highs/CODE_OF_CONDUCT.md +128 -0
  26. data/ext/lpsolver-highs/CONTRIBUTING.md +31 -0
  27. data/ext/lpsolver-highs/FEATURES.md +61 -0
  28. data/ext/lpsolver-highs/LICENSE.txt +21 -0
  29. data/ext/lpsolver-highs/MODULE.bazel +38 -0
  30. data/ext/lpsolver-highs/README.md +281 -0
  31. data/ext/lpsolver-highs/THIRD_PARTY_NOTICES.md +78 -0
  32. data/ext/lpsolver-highs/Version.txt +4 -0
  33. data/ext/lpsolver-highs/WORKSPACE +33 -0
  34. data/ext/lpsolver-highs/app/CMakeLists.txt +110 -0
  35. data/ext/lpsolver-highs/app/HighsRuntimeOptions.h +292 -0
  36. data/ext/lpsolver-highs/app/RunHighs.cpp +147 -0
  37. data/ext/lpsolver-highs/app/highs_webdemo_shell.html +73 -0
  38. data/ext/lpsolver-highs/build/bin/highs +0 -0
  39. data/ext/lpsolver-highs/build/include/highs/HConfig.h +22 -0
  40. data/ext/lpsolver-highs/build/include/highs/Highs.h +1812 -0
  41. data/ext/lpsolver-highs/build/include/highs/interfaces/highs_c_api.h +2651 -0
  42. data/ext/lpsolver-highs/build/include/highs/io/Filereader.h +45 -0
  43. data/ext/lpsolver-highs/build/include/highs/io/FilereaderLp.h +49 -0
  44. data/ext/lpsolver-highs/build/include/highs/io/FilereaderMps.h +27 -0
  45. data/ext/lpsolver-highs/build/include/highs/io/HMPSIO.h +78 -0
  46. data/ext/lpsolver-highs/build/include/highs/io/HMpsFF.h +245 -0
  47. data/ext/lpsolver-highs/build/include/highs/io/HighsIO.h +118 -0
  48. data/ext/lpsolver-highs/build/include/highs/io/LoadOptions.h +24 -0
  49. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/builder.hpp +25 -0
  50. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/def.hpp +19 -0
  51. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/model.hpp +68 -0
  52. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/reader.hpp +10 -0
  53. data/ext/lpsolver-highs/build/include/highs/ipm/IpxSolution.h +32 -0
  54. data/ext/lpsolver-highs/build/include/highs/ipm/IpxWrapper.h +106 -0
  55. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu.h +161 -0
  56. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  57. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  58. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  59. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  60. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  61. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  62. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  63. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  64. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  65. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  66. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  67. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_object.h +30 -0
  68. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  69. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  70. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  71. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_update.h +125 -0
  72. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_def.h +39 -0
  73. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_file.h +21 -0
  74. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_internal.h +220 -0
  75. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_list.h +173 -0
  76. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
  77. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  78. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basis.h +350 -0
  79. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
  80. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/control.h +167 -0
  81. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/crossover.h +157 -0
  82. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/diagonal_precond.h +45 -0
  83. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
  84. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/guess_basis.h +21 -0
  85. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/indexed_vector.h +113 -0
  86. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/info.h +27 -0
  87. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipm.h +94 -0
  88. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_c.h +47 -0
  89. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_config.h +9 -0
  90. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_info.h +111 -0
  91. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_internal.h +89 -0
  92. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_parameters.h +76 -0
  93. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_status.h +57 -0
  94. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/iterate.h +331 -0
  95. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver.h +70 -0
  96. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  97. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  98. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/linear_operator.h +26 -0
  99. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lp_solver.h +204 -0
  100. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_factorization.h +79 -0
  101. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_update.h +129 -0
  102. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/maxvolume.h +54 -0
  103. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/model.h +413 -0
  104. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/multistream.h +52 -0
  105. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/normal_matrix.h +44 -0
  106. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/power_method.h +44 -0
  107. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_matrix.h +195 -0
  108. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_utils.h +58 -0
  109. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  110. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/starting_basis.h +39 -0
  111. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/symbolic_invert.h +29 -0
  112. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/timer.h +25 -0
  113. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/utils.h +37 -0
  114. data/ext/lpsolver-highs/build/include/highs/lp_data/HConst.h +430 -0
  115. data/ext/lpsolver-highs/build/include/highs/lp_data/HStruct.h +213 -0
  116. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsAnalysis.h +23 -0
  117. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallback.h +104 -0
  118. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallbackStruct.h +70 -0
  119. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsDebug.h +34 -0
  120. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsIis.h +139 -0
  121. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfo.h +421 -0
  122. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfoDebug.h +27 -0
  123. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLp.h +97 -0
  124. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpSolverObject.h +47 -0
  125. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpUtils.h +330 -0
  126. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsModelUtils.h +129 -0
  127. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsOptions.h +1715 -0
  128. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsRanging.h +43 -0
  129. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolution.h +179 -0
  130. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolutionDebug.h +87 -0
  131. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolve.h +29 -0
  132. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsStatus.h +29 -0
  133. data/ext/lpsolver-highs/build/include/highs/mip/HighsCliqueTable.h +329 -0
  134. data/ext/lpsolver-highs/build/include/highs/mip/HighsConflictPool.h +109 -0
  135. data/ext/lpsolver-highs/build/include/highs/mip/HighsCutGeneration.h +108 -0
  136. data/ext/lpsolver-highs/build/include/highs/mip/HighsCutPool.h +168 -0
  137. data/ext/lpsolver-highs/build/include/highs/mip/HighsDebugSol.h +133 -0
  138. data/ext/lpsolver-highs/build/include/highs/mip/HighsDomain.h +657 -0
  139. data/ext/lpsolver-highs/build/include/highs/mip/HighsDomainChange.h +48 -0
  140. data/ext/lpsolver-highs/build/include/highs/mip/HighsDynamicRowMatrix.h +104 -0
  141. data/ext/lpsolver-highs/build/include/highs/mip/HighsGFkSolve.h +439 -0
  142. data/ext/lpsolver-highs/build/include/highs/mip/HighsImplications.h +194 -0
  143. data/ext/lpsolver-highs/build/include/highs/mip/HighsLpAggregator.h +50 -0
  144. data/ext/lpsolver-highs/build/include/highs/mip/HighsLpRelaxation.h +361 -0
  145. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipAnalysis.h +71 -0
  146. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolver.h +159 -0
  147. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolverData.h +313 -0
  148. data/ext/lpsolver-highs/build/include/highs/mip/HighsModkSeparator.h +60 -0
  149. data/ext/lpsolver-highs/build/include/highs/mip/HighsNodeQueue.h +312 -0
  150. data/ext/lpsolver-highs/build/include/highs/mip/HighsObjectiveFunction.h +71 -0
  151. data/ext/lpsolver-highs/build/include/highs/mip/HighsPathSeparator.h +39 -0
  152. data/ext/lpsolver-highs/build/include/highs/mip/HighsPrimalHeuristics.h +75 -0
  153. data/ext/lpsolver-highs/build/include/highs/mip/HighsPseudocost.h +366 -0
  154. data/ext/lpsolver-highs/build/include/highs/mip/HighsRedcostFixing.h +42 -0
  155. data/ext/lpsolver-highs/build/include/highs/mip/HighsSearch.h +241 -0
  156. data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparation.h +41 -0
  157. data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparator.h +60 -0
  158. data/ext/lpsolver-highs/build/include/highs/mip/HighsTableauSeparator.h +34 -0
  159. data/ext/lpsolver-highs/build/include/highs/mip/HighsTransformedLp.h +63 -0
  160. data/ext/lpsolver-highs/build/include/highs/mip/MipTimer.h +544 -0
  161. data/ext/lpsolver-highs/build/include/highs/mip/feasibilityjump.hh +800 -0
  162. data/ext/lpsolver-highs/build/include/highs/model/HighsHessian.h +54 -0
  163. data/ext/lpsolver-highs/build/include/highs/model/HighsHessianUtils.h +47 -0
  164. data/ext/lpsolver-highs/build/include/highs/model/HighsModel.h +42 -0
  165. data/ext/lpsolver-highs/build/include/highs/parallel/HighsBinarySemaphore.h +108 -0
  166. data/ext/lpsolver-highs/build/include/highs/parallel/HighsCacheAlign.h +82 -0
  167. data/ext/lpsolver-highs/build/include/highs/parallel/HighsCombinable.h +116 -0
  168. data/ext/lpsolver-highs/build/include/highs/parallel/HighsMutex.h +124 -0
  169. data/ext/lpsolver-highs/build/include/highs/parallel/HighsParallel.h +128 -0
  170. data/ext/lpsolver-highs/build/include/highs/parallel/HighsRaceTimer.h +38 -0
  171. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSchedulerConstants.h +19 -0
  172. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSpinMutex.h +48 -0
  173. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSplitDeque.h +606 -0
  174. data/ext/lpsolver-highs/build/include/highs/parallel/HighsTask.h +170 -0
  175. data/ext/lpsolver-highs/build/include/highs/parallel/HighsTaskExecutor.h +217 -0
  176. data/ext/lpsolver-highs/build/include/highs/pdlp/CupdlpWrapper.h +108 -0
  177. data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpTimer.h +155 -0
  178. data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpWrapper.h +26 -0
  179. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
  180. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
  181. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
  182. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  183. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  184. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  185. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
  186. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
  187. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
  188. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/defs.hpp +222 -0
  189. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/linalg.hpp +61 -0
  190. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/logger.hpp +80 -0
  191. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/pdhg.hpp +358 -0
  192. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/restart.hpp +96 -0
  193. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/scaling.hpp +74 -0
  194. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/solver_results.hpp +65 -0
  195. data/ext/lpsolver-highs/build/include/highs/pdqsort/pdqsort.h +532 -0
  196. data/ext/lpsolver-highs/build/include/highs/presolve/HPresolve.h +505 -0
  197. data/ext/lpsolver-highs/build/include/highs/presolve/HPresolveAnalysis.h +52 -0
  198. data/ext/lpsolver-highs/build/include/highs/presolve/HighsPostsolveStack.h +943 -0
  199. data/ext/lpsolver-highs/build/include/highs/presolve/HighsSymmetry.h +284 -0
  200. data/ext/lpsolver-highs/build/include/highs/presolve/ICrash.h +124 -0
  201. data/ext/lpsolver-highs/build/include/highs/presolve/ICrashUtil.h +62 -0
  202. data/ext/lpsolver-highs/build/include/highs/presolve/ICrashX.h +23 -0
  203. data/ext/lpsolver-highs/build/include/highs/presolve/PresolveComponent.h +90 -0
  204. data/ext/lpsolver-highs/build/include/highs/qpsolver/a_asm.hpp +77 -0
  205. data/ext/lpsolver-highs/build/include/highs/qpsolver/a_quass.hpp +22 -0
  206. data/ext/lpsolver-highs/build/include/highs/qpsolver/basis.hpp +159 -0
  207. data/ext/lpsolver-highs/build/include/highs/qpsolver/crashsolution.hpp +20 -0
  208. data/ext/lpsolver-highs/build/include/highs/qpsolver/dantzigpricing.hpp +80 -0
  209. data/ext/lpsolver-highs/build/include/highs/qpsolver/devexpricing.hpp +108 -0
  210. data/ext/lpsolver-highs/build/include/highs/qpsolver/eventhandler.hpp +30 -0
  211. data/ext/lpsolver-highs/build/include/highs/qpsolver/factor.hpp +408 -0
  212. data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_bounded.hpp +114 -0
  213. data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_highs.hpp +301 -0
  214. data/ext/lpsolver-highs/build/include/highs/qpsolver/gradient.hpp +46 -0
  215. data/ext/lpsolver-highs/build/include/highs/qpsolver/instance.hpp +70 -0
  216. data/ext/lpsolver-highs/build/include/highs/qpsolver/matrix.hpp +342 -0
  217. data/ext/lpsolver-highs/build/include/highs/qpsolver/perturbation.hpp +15 -0
  218. data/ext/lpsolver-highs/build/include/highs/qpsolver/pricing.hpp +22 -0
  219. data/ext/lpsolver-highs/build/include/highs/qpsolver/qpconst.hpp +34 -0
  220. data/ext/lpsolver-highs/build/include/highs/qpsolver/qpvector.hpp +242 -0
  221. data/ext/lpsolver-highs/build/include/highs/qpsolver/quass.hpp +27 -0
  222. data/ext/lpsolver-highs/build/include/highs/qpsolver/ratiotest.hpp +26 -0
  223. data/ext/lpsolver-highs/build/include/highs/qpsolver/runtime.hpp +45 -0
  224. data/ext/lpsolver-highs/build/include/highs/qpsolver/scaling.hpp +15 -0
  225. data/ext/lpsolver-highs/build/include/highs/qpsolver/settings.hpp +84 -0
  226. data/ext/lpsolver-highs/build/include/highs/qpsolver/snippets.hpp +36 -0
  227. data/ext/lpsolver-highs/build/include/highs/qpsolver/statistics.hpp +30 -0
  228. data/ext/lpsolver-highs/build/include/highs/qpsolver/steepestedgepricing.hpp +173 -0
  229. data/ext/lpsolver-highs/build/include/highs/simplex/HApp.h +550 -0
  230. data/ext/lpsolver-highs/build/include/highs/simplex/HEkk.h +419 -0
  231. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDual.h +513 -0
  232. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRHS.h +134 -0
  233. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRow.h +201 -0
  234. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkPrimal.h +191 -0
  235. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplex.h +42 -0
  236. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexDebug.h +48 -0
  237. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexNla.h +158 -0
  238. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexReport.h +21 -0
  239. data/ext/lpsolver-highs/build/include/highs/simplex/HighsSimplexAnalysis.h +500 -0
  240. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexConst.h +273 -0
  241. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexStruct.h +263 -0
  242. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexTimer.h +414 -0
  243. data/ext/lpsolver-highs/build/include/highs/test_kkt/DevKkt.h +143 -0
  244. data/ext/lpsolver-highs/build/include/highs/test_kkt/KktCh2.h +79 -0
  245. data/ext/lpsolver-highs/build/include/highs/util/FactorTimer.h +199 -0
  246. data/ext/lpsolver-highs/build/include/highs/util/HFactor.h +587 -0
  247. data/ext/lpsolver-highs/build/include/highs/util/HFactorConst.h +81 -0
  248. data/ext/lpsolver-highs/build/include/highs/util/HFactorDebug.h +55 -0
  249. data/ext/lpsolver-highs/build/include/highs/util/HSet.h +89 -0
  250. data/ext/lpsolver-highs/build/include/highs/util/HVector.h +22 -0
  251. data/ext/lpsolver-highs/build/include/highs/util/HVectorBase.h +102 -0
  252. data/ext/lpsolver-highs/build/include/highs/util/HighsCDouble.h +323 -0
  253. data/ext/lpsolver-highs/build/include/highs/util/HighsComponent.h +53 -0
  254. data/ext/lpsolver-highs/build/include/highs/util/HighsDataStack.h +83 -0
  255. data/ext/lpsolver-highs/build/include/highs/util/HighsDisjointSets.h +107 -0
  256. data/ext/lpsolver-highs/build/include/highs/util/HighsHash.h +1274 -0
  257. data/ext/lpsolver-highs/build/include/highs/util/HighsHashTree.h +1461 -0
  258. data/ext/lpsolver-highs/build/include/highs/util/HighsInt.h +36 -0
  259. data/ext/lpsolver-highs/build/include/highs/util/HighsIntegers.h +212 -0
  260. data/ext/lpsolver-highs/build/include/highs/util/HighsLinearSumBounds.h +203 -0
  261. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixPic.h +37 -0
  262. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixSlice.h +561 -0
  263. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixUtils.h +57 -0
  264. data/ext/lpsolver-highs/build/include/highs/util/HighsMemoryAllocation.h +63 -0
  265. data/ext/lpsolver-highs/build/include/highs/util/HighsRandom.h +242 -0
  266. data/ext/lpsolver-highs/build/include/highs/util/HighsRbTree.h +452 -0
  267. data/ext/lpsolver-highs/build/include/highs/util/HighsSort.h +131 -0
  268. data/ext/lpsolver-highs/build/include/highs/util/HighsSparseMatrix.h +151 -0
  269. data/ext/lpsolver-highs/build/include/highs/util/HighsSparseVectorSum.h +95 -0
  270. data/ext/lpsolver-highs/build/include/highs/util/HighsSplay.h +135 -0
  271. data/ext/lpsolver-highs/build/include/highs/util/HighsTimer.h +385 -0
  272. data/ext/lpsolver-highs/build/include/highs/util/HighsUtils.h +272 -0
  273. data/ext/lpsolver-highs/build/include/highs/util/stringutil.h +46 -0
  274. data/ext/lpsolver-highs/build/include/highs/zstr/strict_fstream.hpp +237 -0
  275. data/ext/lpsolver-highs/build/include/highs/zstr/zstr.hpp +473 -0
  276. data/ext/lpsolver-highs/build/include/highs_export.h +43 -0
  277. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config-version.cmake +65 -0
  278. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config.cmake +36 -0
  279. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets-release.cmake +19 -0
  280. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets.cmake +111 -0
  281. data/ext/lpsolver-highs/build/lib/libhighs.a +0 -0
  282. data/ext/lpsolver-highs/build/lib/pkgconfig/highs.pc +12 -0
  283. data/ext/lpsolver-highs/build/share/doc/HIGHS/AUTHORS +7 -0
  284. data/ext/lpsolver-highs/build/share/doc/HIGHS/CITATION.cff +29 -0
  285. data/ext/lpsolver-highs/build/share/doc/HIGHS/CODE_OF_CONDUCT.md +128 -0
  286. data/ext/lpsolver-highs/build/share/doc/HIGHS/CONTRIBUTING.md +31 -0
  287. data/ext/lpsolver-highs/build/share/doc/HIGHS/FEATURES.md +61 -0
  288. data/ext/lpsolver-highs/build/share/doc/HIGHS/LICENSE.txt +21 -0
  289. data/ext/lpsolver-highs/build/share/doc/HIGHS/README.md +281 -0
  290. data/ext/lpsolver-highs/build_webdemo.sh +46 -0
  291. data/ext/lpsolver-highs/check/Avgas.cpp +245 -0
  292. data/ext/lpsolver-highs/check/Avgas.h +44 -0
  293. data/ext/lpsolver-highs/check/CMakeLists.txt +573 -0
  294. data/ext/lpsolver-highs/check/HCheckConfig.h.bazel.in +6 -0
  295. data/ext/lpsolver-highs/check/HCheckConfig.h.in +12 -0
  296. data/ext/lpsolver-highs/check/HCheckConfig.h.meson.in +6 -0
  297. data/ext/lpsolver-highs/check/SpecialLps.h +405 -0
  298. data/ext/lpsolver-highs/check/TestAlienBasis.cpp +720 -0
  299. data/ext/lpsolver-highs/check/TestBasis.cpp +359 -0
  300. data/ext/lpsolver-highs/check/TestBasisSolves.cpp +669 -0
  301. data/ext/lpsolver-highs/check/TestCAPI.c +2513 -0
  302. data/ext/lpsolver-highs/check/TestCallbacks.cpp +608 -0
  303. data/ext/lpsolver-highs/check/TestCheckSolution.cpp +740 -0
  304. data/ext/lpsolver-highs/check/TestCrossover.cpp +111 -0
  305. data/ext/lpsolver-highs/check/TestDualize.cpp +172 -0
  306. data/ext/lpsolver-highs/check/TestEkk.cpp +100 -0
  307. data/ext/lpsolver-highs/check/TestFactor.cpp +389 -0
  308. data/ext/lpsolver-highs/check/TestFilereader.cpp +568 -0
  309. data/ext/lpsolver-highs/check/TestFortranAPI.f90 +65 -0
  310. data/ext/lpsolver-highs/check/TestHSet.cpp +80 -0
  311. data/ext/lpsolver-highs/check/TestHighsCDouble.cpp +109 -0
  312. data/ext/lpsolver-highs/check/TestHighsGFkSolve.cpp +102 -0
  313. data/ext/lpsolver-highs/check/TestHighsHash.cpp +126 -0
  314. data/ext/lpsolver-highs/check/TestHighsHessian.cpp +329 -0
  315. data/ext/lpsolver-highs/check/TestHighsIntegers.cpp +42 -0
  316. data/ext/lpsolver-highs/check/TestHighsModel.cpp +134 -0
  317. data/ext/lpsolver-highs/check/TestHighsParallel.cpp +277 -0
  318. data/ext/lpsolver-highs/check/TestHighsRbTree.cpp +109 -0
  319. data/ext/lpsolver-highs/check/TestHighsSparseMatrix.cpp +126 -0
  320. data/ext/lpsolver-highs/check/TestHighsVersion.cpp +61 -0
  321. data/ext/lpsolver-highs/check/TestHipo.cpp +122 -0
  322. data/ext/lpsolver-highs/check/TestICrash.cpp +46 -0
  323. data/ext/lpsolver-highs/check/TestIO.cpp +163 -0
  324. data/ext/lpsolver-highs/check/TestIis.cpp +1063 -0
  325. data/ext/lpsolver-highs/check/TestInfo.cpp +116 -0
  326. data/ext/lpsolver-highs/check/TestIpm.cpp +226 -0
  327. data/ext/lpsolver-highs/check/TestIpx.cpp +96 -0
  328. data/ext/lpsolver-highs/check/TestLPFileFormat.cpp +22 -0
  329. data/ext/lpsolver-highs/check/TestLogging.cpp +69 -0
  330. data/ext/lpsolver-highs/check/TestLpModification.cpp +2497 -0
  331. data/ext/lpsolver-highs/check/TestLpOrientation.cpp +121 -0
  332. data/ext/lpsolver-highs/check/TestLpSolvers.cpp +555 -0
  333. data/ext/lpsolver-highs/check/TestLpValidation.cpp +689 -0
  334. data/ext/lpsolver-highs/check/TestMain.cpp +6 -0
  335. data/ext/lpsolver-highs/check/TestMipSolver.cpp +1406 -0
  336. data/ext/lpsolver-highs/check/TestModelProperties.cpp +143 -0
  337. data/ext/lpsolver-highs/check/TestMultiObjective.cpp +198 -0
  338. data/ext/lpsolver-highs/check/TestNames.cpp +187 -0
  339. data/ext/lpsolver-highs/check/TestOptions.cpp +544 -0
  340. data/ext/lpsolver-highs/check/TestPdlp.cpp +327 -0
  341. data/ext/lpsolver-highs/check/TestPdlpHi.cpp +40 -0
  342. data/ext/lpsolver-highs/check/TestPresolve.cpp +912 -0
  343. data/ext/lpsolver-highs/check/TestQpSolver.cpp +1345 -0
  344. data/ext/lpsolver-highs/check/TestRanging.cpp +558 -0
  345. data/ext/lpsolver-highs/check/TestRays.cpp +1010 -0
  346. data/ext/lpsolver-highs/check/TestSemiVariables.cpp +329 -0
  347. data/ext/lpsolver-highs/check/TestSetup.cpp +12 -0
  348. data/ext/lpsolver-highs/check/TestSort.cpp +247 -0
  349. data/ext/lpsolver-highs/check/TestSpecialLps.cpp +775 -0
  350. data/ext/lpsolver-highs/check/TestThrow.cpp +83 -0
  351. data/ext/lpsolver-highs/check/TestTspSolver.cpp +19 -0
  352. data/ext/lpsolver-highs/check/TestUserScale.cpp +444 -0
  353. data/ext/lpsolver-highs/check/cublas_example.cpp +76 -0
  354. data/ext/lpsolver-highs/check/cublas_gpu_start.cpp +88 -0
  355. data/ext/lpsolver-highs/check/hipo_test_option_files/hipo_options_0 +1 -0
  356. data/ext/lpsolver-highs/check/instances/1448.lp +1 -0
  357. data/ext/lpsolver-highs/check/instances/1449a.lp +1 -0
  358. data/ext/lpsolver-highs/check/instances/1449b.lp +1 -0
  359. data/ext/lpsolver-highs/check/instances/1451.lp +8 -0
  360. data/ext/lpsolver-highs/check/instances/2122.lp +1822 -0
  361. data/ext/lpsolver-highs/check/instances/2171.mps +717 -0
  362. data/ext/lpsolver-highs/check/instances/25fv47.mps +6919 -0
  363. data/ext/lpsolver-highs/check/instances/2821-duplicate.mps +31 -0
  364. data/ext/lpsolver-highs/check/instances/2821-qmatrix.mps +31 -0
  365. data/ext/lpsolver-highs/check/instances/2821-quadobj.mps +29 -0
  366. data/ext/lpsolver-highs/check/instances/2821-summation.mps +30 -0
  367. data/ext/lpsolver-highs/check/instances/2821.mps +29 -0
  368. data/ext/lpsolver-highs/check/instances/2894.mps +89 -0
  369. data/ext/lpsolver-highs/check/instances/80bau3b.mps +23732 -0
  370. data/ext/lpsolver-highs/check/instances/WithInf.set +3 -0
  371. data/ext/lpsolver-highs/check/instances/adlittle.mps +335 -0
  372. data/ext/lpsolver-highs/check/instances/afiro.mps +83 -0
  373. data/ext/lpsolver-highs/check/instances/avgas.mps +51 -0
  374. data/ext/lpsolver-highs/check/instances/bell5.mps +384 -0
  375. data/ext/lpsolver-highs/check/instances/bgetam.mps +2112 -0
  376. data/ext/lpsolver-highs/check/instances/blending.mps +13 -0
  377. data/ext/lpsolver-highs/check/instances/box1.mps +1085 -0
  378. data/ext/lpsolver-highs/check/instances/chip.mps +13 -0
  379. data/ext/lpsolver-highs/check/instances/comment.mps +23 -0
  380. data/ext/lpsolver-highs/check/instances/cplex1.mps +9674 -0
  381. data/ext/lpsolver-highs/check/instances/dD2e.mps +10 -0
  382. data/ext/lpsolver-highs/check/instances/dcmulti.mps +2310 -0
  383. data/ext/lpsolver-highs/check/instances/e226.mps +1733 -0
  384. data/ext/lpsolver-highs/check/instances/egout-ac.mps +473 -0
  385. data/ext/lpsolver-highs/check/instances/egout.mps +403 -0
  386. data/ext/lpsolver-highs/check/instances/etamacro.mps +2084 -0
  387. data/ext/lpsolver-highs/check/instances/ex72a.mps +849 -0
  388. data/ext/lpsolver-highs/check/instances/fixed-binary.lp +11 -0
  389. data/ext/lpsolver-highs/check/instances/flugpl.mps +111 -0
  390. data/ext/lpsolver-highs/check/instances/flugpl_illegal_integer.sol +24 -0
  391. data/ext/lpsolver-highs/check/instances/flugpl_integer.sol +25 -0
  392. data/ext/lpsolver-highs/check/instances/forest6.mps +261 -0
  393. data/ext/lpsolver-highs/check/instances/galenet.mps +34 -0
  394. data/ext/lpsolver-highs/check/instances/gams10am.mps +478 -0
  395. data/ext/lpsolver-highs/check/instances/garbage.ems +3 -0
  396. data/ext/lpsolver-highs/check/instances/garbage.lp +3 -0
  397. data/ext/lpsolver-highs/check/instances/garbage.mps +3 -0
  398. data/ext/lpsolver-highs/check/instances/gas11.mps +2924 -0
  399. data/ext/lpsolver-highs/check/instances/gesa2.mps +5459 -0
  400. data/ext/lpsolver-highs/check/instances/greenbea.mps +19215 -0
  401. data/ext/lpsolver-highs/check/instances/gt2.mps +534 -0
  402. data/ext/lpsolver-highs/check/instances/infeasible-mip0.mps +140 -0
  403. data/ext/lpsolver-highs/check/instances/infeasible-mip1.mps +371 -0
  404. data/ext/lpsolver-highs/check/instances/israel.mps +1490 -0
  405. data/ext/lpsolver-highs/check/instances/issue-2095.mps +836 -0
  406. data/ext/lpsolver-highs/check/instances/issue-2173.mps +3331 -0
  407. data/ext/lpsolver-highs/check/instances/issue-2204.mps +143 -0
  408. data/ext/lpsolver-highs/check/instances/issue-2290.mps +158 -0
  409. data/ext/lpsolver-highs/check/instances/issue-2388.lp +76 -0
  410. data/ext/lpsolver-highs/check/instances/issue-2402.mps +435 -0
  411. data/ext/lpsolver-highs/check/instances/issue-2446.mps +9154 -0
  412. data/ext/lpsolver-highs/check/instances/issue-2585.lp +16 -0
  413. data/ext/lpsolver-highs/check/instances/issue-2874-3.mps +97 -0
  414. data/ext/lpsolver-highs/check/instances/klein1.mps +422 -0
  415. data/ext/lpsolver-highs/check/instances/lseu.mps +371 -0
  416. data/ext/lpsolver-highs/check/instances/model.xyz +1 -0
  417. data/ext/lpsolver-highs/check/instances/nan0.mps +13 -0
  418. data/ext/lpsolver-highs/check/instances/nan1.mps +13 -0
  419. data/ext/lpsolver-highs/check/instances/nan2.mps +13 -0
  420. data/ext/lpsolver-highs/check/instances/no-newline-eof.lp +5 -0
  421. data/ext/lpsolver-highs/check/instances/p01.mps +909 -0
  422. data/ext/lpsolver-highs/check/instances/p0548.mps +1992 -0
  423. data/ext/lpsolver-highs/check/instances/primal1.mps +3909 -0
  424. data/ext/lpsolver-highs/check/instances/qap04.mps +606 -0
  425. data/ext/lpsolver-highs/check/instances/qcqp.lp +8 -0
  426. data/ext/lpsolver-highs/check/instances/qjh.lp +9 -0
  427. data/ext/lpsolver-highs/check/instances/qjh.mps +18 -0
  428. data/ext/lpsolver-highs/check/instances/qjh_qmatrix.mps +19 -0
  429. data/ext/lpsolver-highs/check/instances/qjh_quadobj.mps +18 -0
  430. data/ext/lpsolver-highs/check/instances/qjh_quadobj_qmatrix.mps +25 -0
  431. data/ext/lpsolver-highs/check/instances/qjh_uncon.lp +10 -0
  432. data/ext/lpsolver-highs/check/instances/qjh_uncon.mps +17 -0
  433. data/ext/lpsolver-highs/check/instances/qpinfeasible.lp +8 -0
  434. data/ext/lpsolver-highs/check/instances/qptestnw.lp +7 -0
  435. data/ext/lpsolver-highs/check/instances/qpunbounded.lp +5 -0
  436. data/ext/lpsolver-highs/check/instances/refinery.mps +1882 -0
  437. data/ext/lpsolver-highs/check/instances/rgn.mps +559 -0
  438. data/ext/lpsolver-highs/check/instances/scrs8.mps +2717 -0
  439. data/ext/lpsolver-highs/check/instances/sctest.mps +66 -0
  440. data/ext/lpsolver-highs/check/instances/semi-continuous.lp +13 -0
  441. data/ext/lpsolver-highs/check/instances/semi-continuous.mps +24 -0
  442. data/ext/lpsolver-highs/check/instances/semi-integer.lp +15 -0
  443. data/ext/lpsolver-highs/check/instances/semi-integer.mps +22 -0
  444. data/ext/lpsolver-highs/check/instances/shell.mps +4039 -0
  445. data/ext/lpsolver-highs/check/instances/silly-names.mps +14 -0
  446. data/ext/lpsolver-highs/check/instances/small_mip.mps +87 -0
  447. data/ext/lpsolver-highs/check/instances/smalllp.mps +21 -0
  448. data/ext/lpsolver-highs/check/instances/sp150x300d.mps +1983 -0
  449. data/ext/lpsolver-highs/check/instances/stair.mps +2499 -0
  450. data/ext/lpsolver-highs/check/instances/standata.mps +2317 -0
  451. data/ext/lpsolver-highs/check/instances/standgub.mps +2428 -0
  452. data/ext/lpsolver-highs/check/instances/standmps.mps +2695 -0
  453. data/ext/lpsolver-highs/check/instances/test.mps +53 -0
  454. data/ext/lpsolver-highs/check/instances/vol1.mps +1895 -0
  455. data/ext/lpsolver-highs/check/instances/warnings.mps +68 -0
  456. data/ext/lpsolver-highs/check/instances/woodinfe.mps +216 -0
  457. data/ext/lpsolver-highs/check/matrix_multiplication.hpp +49 -0
  458. data/ext/lpsolver-highs/check/meson.build +92 -0
  459. data/ext/lpsolver-highs/check/pythontest.py +11 -0
  460. data/ext/lpsolver-highs/check/sample_options_file +8 -0
  461. data/ext/lpsolver-highs/cmake/CheckAtomic.cmake +74 -0
  462. data/ext/lpsolver-highs/cmake/FindCUDAConf.cmake +44 -0
  463. data/ext/lpsolver-highs/cmake/FindHipoDeps.cmake +351 -0
  464. data/ext/lpsolver-highs/cmake/README.md +243 -0
  465. data/ext/lpsolver-highs/cmake/cpp-highs.cmake +243 -0
  466. data/ext/lpsolver-highs/cmake/dotnet.cmake +94 -0
  467. data/ext/lpsolver-highs/cmake/highs-config.cmake.in +22 -0
  468. data/ext/lpsolver-highs/cmake/python-highs.cmake +74 -0
  469. data/ext/lpsolver-highs/cmake/set-version.cmake +26 -0
  470. data/ext/lpsolver-highs/cmake/sources-python.cmake +461 -0
  471. data/ext/lpsolver-highs/cmake/sources.cmake +618 -0
  472. data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeader.pl +78 -0
  473. data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeaderUpdateAll +32 -0
  474. data/ext/lpsolver-highs/docs/Project.toml +7 -0
  475. data/ext/lpsolver-highs/docs/README.md +27 -0
  476. data/ext/lpsolver-highs/docs/c_api_gen/HConfig.h +1 -0
  477. data/ext/lpsolver-highs/docs/c_api_gen/build.jl +48 -0
  478. data/ext/lpsolver-highs/docs/make.jl +115 -0
  479. data/ext/lpsolver-highs/docs/src/assets/logo.png +0 -0
  480. data/ext/lpsolver-highs/docs/src/callbacks.md +171 -0
  481. data/ext/lpsolver-highs/docs/src/executable.md +88 -0
  482. data/ext/lpsolver-highs/docs/src/guide/advanced.md +66 -0
  483. data/ext/lpsolver-highs/docs/src/guide/basic.md +116 -0
  484. data/ext/lpsolver-highs/docs/src/guide/further.md +193 -0
  485. data/ext/lpsolver-highs/docs/src/guide/gpu.md +58 -0
  486. data/ext/lpsolver-highs/docs/src/guide/index.md +18 -0
  487. data/ext/lpsolver-highs/docs/src/guide/kkt.md +219 -0
  488. data/ext/lpsolver-highs/docs/src/guide/numerics.md +55 -0
  489. data/ext/lpsolver-highs/docs/src/index.md +86 -0
  490. data/ext/lpsolver-highs/docs/src/installation.md +130 -0
  491. data/ext/lpsolver-highs/docs/src/interfaces/c_api.md +6 -0
  492. data/ext/lpsolver-highs/docs/src/interfaces/cpp/examples.md +1 -0
  493. data/ext/lpsolver-highs/docs/src/interfaces/cpp/index.md +29 -0
  494. data/ext/lpsolver-highs/docs/src/interfaces/cpp/library.md +107 -0
  495. data/ext/lpsolver-highs/docs/src/interfaces/csharp.md +55 -0
  496. data/ext/lpsolver-highs/docs/src/interfaces/fortran.md +11 -0
  497. data/ext/lpsolver-highs/docs/src/interfaces/julia/index.md +130 -0
  498. data/ext/lpsolver-highs/docs/src/interfaces/other.md +41 -0
  499. data/ext/lpsolver-highs/docs/src/interfaces/python/example-py.md +275 -0
  500. data/ext/lpsolver-highs/docs/src/interfaces/python/index.md +91 -0
  501. data/ext/lpsolver-highs/docs/src/interfaces/python/model-py.md +90 -0
  502. data/ext/lpsolver-highs/docs/src/options/definitions.md +529 -0
  503. data/ext/lpsolver-highs/docs/src/options/intro.md +46 -0
  504. data/ext/lpsolver-highs/docs/src/parallel.md +88 -0
  505. data/ext/lpsolver-highs/docs/src/solvers.md +168 -0
  506. data/ext/lpsolver-highs/docs/src/structures/classes/HighsHessian.md +9 -0
  507. data/ext/lpsolver-highs/docs/src/structures/classes/HighsIis.md +16 -0
  508. data/ext/lpsolver-highs/docs/src/structures/classes/HighsLp.md +19 -0
  509. data/ext/lpsolver-highs/docs/src/structures/classes/HighsModel.md +6 -0
  510. data/ext/lpsolver-highs/docs/src/structures/classes/HighsSparseMatrix.md +10 -0
  511. data/ext/lpsolver-highs/docs/src/structures/classes/index.md +11 -0
  512. data/ext/lpsolver-highs/docs/src/structures/enums.md +114 -0
  513. data/ext/lpsolver-highs/docs/src/structures/index.md +12 -0
  514. data/ext/lpsolver-highs/docs/src/structures/structs/HighsBasis.md +8 -0
  515. data/ext/lpsolver-highs/docs/src/structures/structs/HighsInfo.md +148 -0
  516. data/ext/lpsolver-highs/docs/src/structures/structs/HighsLinearObjective.md +11 -0
  517. data/ext/lpsolver-highs/docs/src/structures/structs/HighsSolution.md +10 -0
  518. data/ext/lpsolver-highs/docs/src/structures/structs/index.md +10 -0
  519. data/ext/lpsolver-highs/docs/src/terminology.md +163 -0
  520. data/ext/lpsolver-highs/examples/CMakeLists.txt +26 -0
  521. data/ext/lpsolver-highs/examples/Docs.py +104 -0
  522. data/ext/lpsolver-highs/examples/branch-and-price.py +465 -0
  523. data/ext/lpsolver-highs/examples/call_highs_from_c.c +685 -0
  524. data/ext/lpsolver-highs/examples/call_highs_from_c_minimal.c +659 -0
  525. data/ext/lpsolver-highs/examples/call_highs_from_cpp.cpp +178 -0
  526. data/ext/lpsolver-highs/examples/call_highs_from_csharp.cs +83 -0
  527. data/ext/lpsolver-highs/examples/call_highs_from_fortran.f90 +579 -0
  528. data/ext/lpsolver-highs/examples/call_highs_from_python.py +448 -0
  529. data/ext/lpsolver-highs/examples/call_highs_from_python_highspy.py +71 -0
  530. data/ext/lpsolver-highs/examples/call_highs_from_python_mps.py +59 -0
  531. data/ext/lpsolver-highs/examples/callback_gap.py +71 -0
  532. data/ext/lpsolver-highs/examples/chip.py +43 -0
  533. data/ext/lpsolver-highs/examples/chip0.py +29 -0
  534. data/ext/lpsolver-highs/examples/distillation.py +77 -0
  535. data/ext/lpsolver-highs/examples/knapsack.py +43 -0
  536. data/ext/lpsolver-highs/examples/minimal.py +11 -0
  537. data/ext/lpsolver-highs/examples/multi_objective.py +139 -0
  538. data/ext/lpsolver-highs/examples/multiple_objective.py +120 -0
  539. data/ext/lpsolver-highs/examples/network_flow.py +37 -0
  540. data/ext/lpsolver-highs/examples/nqueens.py +29 -0
  541. data/ext/lpsolver-highs/examples/plot_highs_log.py +134 -0
  542. data/ext/lpsolver-highs/extern/CLI11.hpp +11546 -0
  543. data/ext/lpsolver-highs/extern/LICENCE_1_0.txt +23 -0
  544. data/ext/lpsolver-highs/extern/amd/License.txt +35 -0
  545. data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.c +54 -0
  546. data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.h +56 -0
  547. data/ext/lpsolver-highs/extern/amd/amd.h +357 -0
  548. data/ext/lpsolver-highs/extern/amd/amd_1.c +172 -0
  549. data/ext/lpsolver-highs/extern/amd/amd_2.c +1761 -0
  550. data/ext/lpsolver-highs/extern/amd/amd_aat.c +179 -0
  551. data/ext/lpsolver-highs/extern/amd/amd_control.c +65 -0
  552. data/ext/lpsolver-highs/extern/amd/amd_defaults.c +37 -0
  553. data/ext/lpsolver-highs/extern/amd/amd_info.c +120 -0
  554. data/ext/lpsolver-highs/extern/amd/amd_internal.h +137 -0
  555. data/ext/lpsolver-highs/extern/amd/amd_order.c +195 -0
  556. data/ext/lpsolver-highs/extern/amd/amd_post_tree.c +105 -0
  557. data/ext/lpsolver-highs/extern/amd/amd_postorder.c +140 -0
  558. data/ext/lpsolver-highs/extern/amd/amd_preprocess.c +107 -0
  559. data/ext/lpsolver-highs/extern/amd/amd_valid.c +93 -0
  560. data/ext/lpsolver-highs/extern/amd/changes.txt +8 -0
  561. data/ext/lpsolver-highs/extern/catch.hpp +18861 -0
  562. data/ext/lpsolver-highs/extern/metis/Changes.txt +31 -0
  563. data/ext/lpsolver-highs/extern/metis/GKlib/GKlib.h +62 -0
  564. data/ext/lpsolver-highs/extern/metis/GKlib/error.c +21 -0
  565. data/ext/lpsolver-highs/extern/metis/GKlib/gk_arch.h +64 -0
  566. data/ext/lpsolver-highs/extern/metis/GKlib/gk_defs.h +19 -0
  567. data/ext/lpsolver-highs/extern/metis/GKlib/gk_macros.h +50 -0
  568. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkblas.h +51 -0
  569. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkmemory.h +80 -0
  570. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkpqueue.h +329 -0
  571. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkrandom.h +89 -0
  572. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mksort.h +271 -0
  573. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_inttypes.h +41 -0
  574. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stat.h +22 -0
  575. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stdint.h +41 -0
  576. data/ext/lpsolver-highs/extern/metis/GKlib/gk_proto.h +50 -0
  577. data/ext/lpsolver-highs/extern/metis/GKlib/gk_struct.h +66 -0
  578. data/ext/lpsolver-highs/extern/metis/GKlib/gk_types.h +15 -0
  579. data/ext/lpsolver-highs/extern/metis/GKlib/mcore.c +176 -0
  580. data/ext/lpsolver-highs/extern/metis/GKlib/memory.c +23 -0
  581. data/ext/lpsolver-highs/extern/metis/GKlib/random.c +37 -0
  582. data/ext/lpsolver-highs/extern/metis/LICENSE.txt +18 -0
  583. data/ext/lpsolver-highs/extern/metis/libmetis/auxapi.c +27 -0
  584. data/ext/lpsolver-highs/extern/metis/libmetis/balance.c +491 -0
  585. data/ext/lpsolver-highs/extern/metis/libmetis/bucketsort.c +44 -0
  586. data/ext/lpsolver-highs/extern/metis/libmetis/coarsen.c +895 -0
  587. data/ext/lpsolver-highs/extern/metis/libmetis/compress.c +231 -0
  588. data/ext/lpsolver-highs/extern/metis/libmetis/contig.c +83 -0
  589. data/ext/lpsolver-highs/extern/metis/libmetis/defs.h +39 -0
  590. data/ext/lpsolver-highs/extern/metis/libmetis/fm.c +527 -0
  591. data/ext/lpsolver-highs/extern/metis/libmetis/gklib.c +55 -0
  592. data/ext/lpsolver-highs/extern/metis/libmetis/gklib_defs.h +33 -0
  593. data/ext/lpsolver-highs/extern/metis/libmetis/graph.c +268 -0
  594. data/ext/lpsolver-highs/extern/metis/libmetis/initpart.c +385 -0
  595. data/ext/lpsolver-highs/extern/metis/libmetis/macros.h +59 -0
  596. data/ext/lpsolver-highs/extern/metis/libmetis/mcutil.c +162 -0
  597. data/ext/lpsolver-highs/extern/metis/libmetis/metislib.h +35 -0
  598. data/ext/lpsolver-highs/extern/metis/libmetis/mmd.c +598 -0
  599. data/ext/lpsolver-highs/extern/metis/libmetis/ometis.c +661 -0
  600. data/ext/lpsolver-highs/extern/metis/libmetis/options.c +260 -0
  601. data/ext/lpsolver-highs/extern/metis/libmetis/proto.h +172 -0
  602. data/ext/lpsolver-highs/extern/metis/libmetis/refine.c +99 -0
  603. data/ext/lpsolver-highs/extern/metis/libmetis/separator.c +57 -0
  604. data/ext/lpsolver-highs/extern/metis/libmetis/sfm.c +581 -0
  605. data/ext/lpsolver-highs/extern/metis/libmetis/srefine.c +152 -0
  606. data/ext/lpsolver-highs/extern/metis/libmetis/stdheaders.h +29 -0
  607. data/ext/lpsolver-highs/extern/metis/libmetis/struct.h +117 -0
  608. data/ext/lpsolver-highs/extern/metis/libmetis/util.c +59 -0
  609. data/ext/lpsolver-highs/extern/metis/libmetis/wspace.c +91 -0
  610. data/ext/lpsolver-highs/extern/metis/metis.h +271 -0
  611. data/ext/lpsolver-highs/extern/pdqsort/license.txt +16 -0
  612. data/ext/lpsolver-highs/extern/pdqsort/pdqsort.h +532 -0
  613. data/ext/lpsolver-highs/extern/rcm/LICENSE +19 -0
  614. data/ext/lpsolver-highs/extern/rcm/rcm.cpp +873 -0
  615. data/ext/lpsolver-highs/extern/rcm/rcm.h +22 -0
  616. data/ext/lpsolver-highs/extern/zstr/LICENSE +21 -0
  617. data/ext/lpsolver-highs/extern/zstr/strict_fstream.hpp +237 -0
  618. data/ext/lpsolver-highs/extern/zstr/zstr.hpp +473 -0
  619. data/ext/lpsolver-highs/flake.lock +61 -0
  620. data/ext/lpsolver-highs/flake.nix +73 -0
  621. data/ext/lpsolver-highs/highs/CMakeLists.txt +499 -0
  622. data/ext/lpsolver-highs/highs/HConfig.h.bazel.in +25 -0
  623. data/ext/lpsolver-highs/highs/HConfig.h.in +22 -0
  624. data/ext/lpsolver-highs/highs/HConfig.h.meson.in +17 -0
  625. data/ext/lpsolver-highs/highs/Highs.h +1812 -0
  626. data/ext/lpsolver-highs/highs/HighsRun.md +143 -0
  627. data/ext/lpsolver-highs/highs/highs_bindings.cpp +1826 -0
  628. data/ext/lpsolver-highs/highs/highspy/__init__.py +93 -0
  629. data/ext/lpsolver-highs/highs/highspy/__init__.pyi +91 -0
  630. data/ext/lpsolver-highs/highs/highspy/_core/__init__.pyi +1058 -0
  631. data/ext/lpsolver-highs/highs/highspy/_core/cb.pyi +118 -0
  632. data/ext/lpsolver-highs/highs/highspy/_core/simplex_constants.pyi +472 -0
  633. data/ext/lpsolver-highs/highs/highspy/highs.py +2430 -0
  634. data/ext/lpsolver-highs/highs/interfaces/highs_c_api.cpp +1812 -0
  635. data/ext/lpsolver-highs/highs/interfaces/highs_c_api.h +2651 -0
  636. data/ext/lpsolver-highs/highs/interfaces/highs_csharp_api.cs +1142 -0
  637. data/ext/lpsolver-highs/highs/interfaces/highs_fortran_api.f90 +873 -0
  638. data/ext/lpsolver-highs/highs/io/Filereader.cpp +87 -0
  639. data/ext/lpsolver-highs/highs/io/Filereader.h +45 -0
  640. data/ext/lpsolver-highs/highs/io/FilereaderLp.cpp +539 -0
  641. data/ext/lpsolver-highs/highs/io/FilereaderLp.h +49 -0
  642. data/ext/lpsolver-highs/highs/io/FilereaderMps.cpp +86 -0
  643. data/ext/lpsolver-highs/highs/io/FilereaderMps.h +27 -0
  644. data/ext/lpsolver-highs/highs/io/HMPSIO.cpp +1001 -0
  645. data/ext/lpsolver-highs/highs/io/HMPSIO.h +78 -0
  646. data/ext/lpsolver-highs/highs/io/HMpsFF.cpp +2113 -0
  647. data/ext/lpsolver-highs/highs/io/HMpsFF.h +245 -0
  648. data/ext/lpsolver-highs/highs/io/HighsIO.cpp +371 -0
  649. data/ext/lpsolver-highs/highs/io/HighsIO.h +118 -0
  650. data/ext/lpsolver-highs/highs/io/LoadOptions.cpp +60 -0
  651. data/ext/lpsolver-highs/highs/io/LoadOptions.h +24 -0
  652. data/ext/lpsolver-highs/highs/io/filereaderlp/LICENSE +19 -0
  653. data/ext/lpsolver-highs/highs/io/filereaderlp/builder.hpp +25 -0
  654. data/ext/lpsolver-highs/highs/io/filereaderlp/def.hpp +19 -0
  655. data/ext/lpsolver-highs/highs/io/filereaderlp/model.hpp +68 -0
  656. data/ext/lpsolver-highs/highs/io/filereaderlp/reader.cpp +1375 -0
  657. data/ext/lpsolver-highs/highs/io/filereaderlp/reader.hpp +10 -0
  658. data/ext/lpsolver-highs/highs/ipm/IpxSolution.h +32 -0
  659. data/ext/lpsolver-highs/highs/ipm/IpxWrapper.cpp +1526 -0
  660. data/ext/lpsolver-highs/highs/ipm/IpxWrapper.h +106 -0
  661. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu.h +161 -0
  662. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.c +132 -0
  663. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  664. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.c +148 -0
  665. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  666. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.c +24 -0
  667. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  668. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  669. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  670. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  671. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  672. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  673. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  674. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  675. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  676. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.c +325 -0
  677. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.h +30 -0
  678. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.c +46 -0
  679. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  680. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.c +79 -0
  681. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  682. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.c +63 -0
  683. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  684. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.c +44 -0
  685. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.h +125 -0
  686. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_build_factors.c +441 -0
  687. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_condest.c +124 -0
  688. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_def.h +39 -0
  689. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_dfs.c +141 -0
  690. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_factorize_bump.c +56 -0
  691. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.c +184 -0
  692. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.h +21 -0
  693. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_garbage_perm.c +53 -0
  694. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_initialize.c +56 -0
  695. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.c +352 -0
  696. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.h +220 -0
  697. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_list.h +173 -0
  698. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_markowitz.c +188 -0
  699. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_matrix_norm.c +51 -0
  700. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_pivot.c +1247 -0
  701. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_residual_test.c +155 -0
  702. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_setup_bump.c +198 -0
  703. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_singletons.c +511 -0
  704. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_dense.c +129 -0
  705. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_for_update.c +360 -0
  706. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_sparse.c +284 -0
  707. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_symbolic.c +48 -0
  708. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_triangular.c +140 -0
  709. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_update.c +908 -0
  710. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.cpp +301 -0
  711. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.h +104 -0
  712. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/IntConfig.h +27 -0
  713. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.cpp +193 -0
  714. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.h +30 -0
  715. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.cpp +60 -0
  716. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.h +62 -0
  717. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/OrderingPrint.h +10 -0
  718. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.cpp +117 -0
  719. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.h +59 -0
  720. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/mycblas.h +85 -0
  721. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.cpp +1367 -0
  722. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.h +122 -0
  723. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.cpp +114 -0
  724. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.h +46 -0
  725. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.cpp +82 -0
  726. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.h +83 -0
  727. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.cpp +326 -0
  728. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.h +86 -0
  729. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFact.h +48 -0
  730. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactHybrid.cpp +279 -0
  731. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactKernel.cpp +284 -0
  732. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.cpp +38 -0
  733. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.h +32 -0
  734. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.cpp +57 -0
  735. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.h +112 -0
  736. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h +63 -0
  737. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.cpp +405 -0
  738. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.h +85 -0
  739. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.cpp +46 -0
  740. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.h +95 -0
  741. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp +238 -0
  742. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.h +31 -0
  743. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp +272 -0
  744. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.h +26 -0
  745. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.cpp +83 -0
  746. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.h +45 -0
  747. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.cpp +54 -0
  748. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.h +46 -0
  749. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/ReturnValues.h +19 -0
  750. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.cpp +10 -0
  751. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.h +48 -0
  752. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.cpp +70 -0
  753. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.h +19 -0
  754. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.cpp +101 -0
  755. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.h +220 -0
  756. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Timing.h +114 -0
  757. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.cpp +38 -0
  758. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.h +41 -0
  759. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp +887 -0
  760. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.h +92 -0
  761. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Info.h +58 -0
  762. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.cpp +8 -0
  763. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.h +37 -0
  764. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.cpp +640 -0
  765. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.h +172 -0
  766. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LinearSolver.h +81 -0
  767. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.cpp +71 -0
  768. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.h +33 -0
  769. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.cpp +403 -0
  770. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.h +136 -0
  771. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Options.h +35 -0
  772. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Parameters.h +63 -0
  773. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.cpp +646 -0
  774. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.h +94 -0
  775. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Refine.cpp +214 -0
  776. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.cpp +1346 -0
  777. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.h +338 -0
  778. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Status.h +88 -0
  779. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.cc +71 -0
  780. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.h +20 -0
  781. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.cc +299 -0
  782. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  783. data/ext/lpsolver-highs/highs/ipm/ipx/basis.cc +966 -0
  784. data/ext/lpsolver-highs/highs/ipm/ipx/basis.h +350 -0
  785. data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.cc +217 -0
  786. data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.h +74 -0
  787. data/ext/lpsolver-highs/highs/ipm/ipx/control.cc +151 -0
  788. data/ext/lpsolver-highs/highs/ipm/ipx/control.h +167 -0
  789. data/ext/lpsolver-highs/highs/ipm/ipx/crossover.cc +479 -0
  790. data/ext/lpsolver-highs/highs/ipm/ipx/crossover.h +157 -0
  791. data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.cc +70 -0
  792. data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.h +45 -0
  793. data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.cc +360 -0
  794. data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.h +102 -0
  795. data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.cc +233 -0
  796. data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.h +21 -0
  797. data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.cc +30 -0
  798. data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.h +113 -0
  799. data/ext/lpsolver-highs/highs/ipm/ipx/info.cc +124 -0
  800. data/ext/lpsolver-highs/highs/ipm/ipx/info.h +27 -0
  801. data/ext/lpsolver-highs/highs/ipm/ipx/ipm.cc +897 -0
  802. data/ext/lpsolver-highs/highs/ipm/ipx/ipm.h +94 -0
  803. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.cc +83 -0
  804. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.h +47 -0
  805. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_config.h +9 -0
  806. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_info.h +111 -0
  807. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_internal.h +89 -0
  808. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_parameters.h +76 -0
  809. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_status.h +57 -0
  810. data/ext/lpsolver-highs/highs/ipm/ipx/iterate.cc +683 -0
  811. data/ext/lpsolver-highs/highs/ipm/ipx/iterate.h +331 -0
  812. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.cc +23 -0
  813. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.h +70 -0
  814. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.cc +387 -0
  815. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  816. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.cc +120 -0
  817. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  818. data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.cc +10 -0
  819. data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.h +26 -0
  820. data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.cc +686 -0
  821. data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.h +204 -0
  822. data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.cc +131 -0
  823. data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.h +79 -0
  824. data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.cc +62 -0
  825. data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.h +129 -0
  826. data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.cc +337 -0
  827. data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.h +54 -0
  828. data/ext/lpsolver-highs/highs/ipm/ipx/model.cc +1528 -0
  829. data/ext/lpsolver-highs/highs/ipm/ipx/model.h +413 -0
  830. data/ext/lpsolver-highs/highs/ipm/ipx/multistream.h +52 -0
  831. data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.cc +126 -0
  832. data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.h +44 -0
  833. data/ext/lpsolver-highs/highs/ipm/ipx/power_method.h +44 -0
  834. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.cc +382 -0
  835. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.h +195 -0
  836. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.cc +92 -0
  837. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.h +58 -0
  838. data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.cc +117 -0
  839. data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  840. data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.cc +182 -0
  841. data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.h +39 -0
  842. data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.cc +183 -0
  843. data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.h +29 -0
  844. data/ext/lpsolver-highs/highs/ipm/ipx/timer.cc +16 -0
  845. data/ext/lpsolver-highs/highs/ipm/ipx/timer.h +25 -0
  846. data/ext/lpsolver-highs/highs/ipm/ipx/utils.cc +95 -0
  847. data/ext/lpsolver-highs/highs/ipm/ipx/utils.h +37 -0
  848. data/ext/lpsolver-highs/highs/lp_data/HConst.h +430 -0
  849. data/ext/lpsolver-highs/highs/lp_data/HStruct.h +213 -0
  850. data/ext/lpsolver-highs/highs/lp_data/Highs.cpp +4949 -0
  851. data/ext/lpsolver-highs/highs/lp_data/HighsAnalysis.h +23 -0
  852. data/ext/lpsolver-highs/highs/lp_data/HighsCallback.cpp +323 -0
  853. data/ext/lpsolver-highs/highs/lp_data/HighsCallback.h +104 -0
  854. data/ext/lpsolver-highs/highs/lp_data/HighsCallbackStruct.h +70 -0
  855. data/ext/lpsolver-highs/highs/lp_data/HighsDebug.cpp +54 -0
  856. data/ext/lpsolver-highs/highs/lp_data/HighsDebug.h +34 -0
  857. data/ext/lpsolver-highs/highs/lp_data/HighsDeprecated.cpp +181 -0
  858. data/ext/lpsolver-highs/highs/lp_data/HighsIis.cpp +1290 -0
  859. data/ext/lpsolver-highs/highs/lp_data/HighsIis.h +139 -0
  860. data/ext/lpsolver-highs/highs/lp_data/HighsInfo.cpp +426 -0
  861. data/ext/lpsolver-highs/highs/lp_data/HighsInfo.h +421 -0
  862. data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.cpp +175 -0
  863. data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.h +27 -0
  864. data/ext/lpsolver-highs/highs/lp_data/HighsInterface.cpp +4344 -0
  865. data/ext/lpsolver-highs/highs/lp_data/HighsLp.cpp +564 -0
  866. data/ext/lpsolver-highs/highs/lp_data/HighsLp.h +97 -0
  867. data/ext/lpsolver-highs/highs/lp_data/HighsLpSolverObject.h +47 -0
  868. data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.cpp +3794 -0
  869. data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.h +330 -0
  870. data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.cpp +1650 -0
  871. data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.h +129 -0
  872. data/ext/lpsolver-highs/highs/lp_data/HighsOptions.cpp +1176 -0
  873. data/ext/lpsolver-highs/highs/lp_data/HighsOptions.h +1715 -0
  874. data/ext/lpsolver-highs/highs/lp_data/HighsRanging.cpp +733 -0
  875. data/ext/lpsolver-highs/highs/lp_data/HighsRanging.h +43 -0
  876. data/ext/lpsolver-highs/highs/lp_data/HighsSolution.cpp +2194 -0
  877. data/ext/lpsolver-highs/highs/lp_data/HighsSolution.h +179 -0
  878. data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.cpp +490 -0
  879. data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.h +87 -0
  880. data/ext/lpsolver-highs/highs/lp_data/HighsSolve.cpp +747 -0
  881. data/ext/lpsolver-highs/highs/lp_data/HighsSolve.h +29 -0
  882. data/ext/lpsolver-highs/highs/lp_data/HighsStatus.cpp +48 -0
  883. data/ext/lpsolver-highs/highs/lp_data/HighsStatus.h +29 -0
  884. data/ext/lpsolver-highs/highs/lp_data/Iis.md +113 -0
  885. data/ext/lpsolver-highs/highs/meson.build +433 -0
  886. data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.cpp +2236 -0
  887. data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.h +329 -0
  888. data/ext/lpsolver-highs/highs/mip/HighsConflictPool.cpp +201 -0
  889. data/ext/lpsolver-highs/highs/mip/HighsConflictPool.h +109 -0
  890. data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.cpp +1491 -0
  891. data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.h +108 -0
  892. data/ext/lpsolver-highs/highs/mip/HighsCutPool.cpp +526 -0
  893. data/ext/lpsolver-highs/highs/mip/HighsCutPool.h +168 -0
  894. data/ext/lpsolver-highs/highs/mip/HighsDebugSol.cpp +313 -0
  895. data/ext/lpsolver-highs/highs/mip/HighsDebugSol.h +133 -0
  896. data/ext/lpsolver-highs/highs/mip/HighsDomain.cpp +3861 -0
  897. data/ext/lpsolver-highs/highs/mip/HighsDomain.h +657 -0
  898. data/ext/lpsolver-highs/highs/mip/HighsDomainChange.h +48 -0
  899. data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.cpp +199 -0
  900. data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.h +104 -0
  901. data/ext/lpsolver-highs/highs/mip/HighsFeasibilityJump.cpp +139 -0
  902. data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.cpp +106 -0
  903. data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.h +439 -0
  904. data/ext/lpsolver-highs/highs/mip/HighsImplications.cpp +915 -0
  905. data/ext/lpsolver-highs/highs/mip/HighsImplications.h +194 -0
  906. data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.cpp +56 -0
  907. data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.h +50 -0
  908. data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.cpp +1609 -0
  909. data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.h +361 -0
  910. data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.cpp +313 -0
  911. data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.h +71 -0
  912. data/ext/lpsolver-highs/highs/mip/HighsMipSolver.cpp +1002 -0
  913. data/ext/lpsolver-highs/highs/mip/HighsMipSolver.h +159 -0
  914. data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.cpp +2936 -0
  915. data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.h +313 -0
  916. data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.cpp +267 -0
  917. data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.h +60 -0
  918. data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.cpp +443 -0
  919. data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.h +312 -0
  920. data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.cpp +124 -0
  921. data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.h +71 -0
  922. data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.cpp +549 -0
  923. data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.h +39 -0
  924. data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.cpp +1673 -0
  925. data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.h +75 -0
  926. data/ext/lpsolver-highs/highs/mip/HighsPseudocost.cpp +129 -0
  927. data/ext/lpsolver-highs/highs/mip/HighsPseudocost.h +366 -0
  928. data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.cpp +316 -0
  929. data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.h +42 -0
  930. data/ext/lpsolver-highs/highs/mip/HighsSearch.cpp +1881 -0
  931. data/ext/lpsolver-highs/highs/mip/HighsSearch.h +241 -0
  932. data/ext/lpsolver-highs/highs/mip/HighsSeparation.cpp +186 -0
  933. data/ext/lpsolver-highs/highs/mip/HighsSeparation.h +41 -0
  934. data/ext/lpsolver-highs/highs/mip/HighsSeparator.cpp +39 -0
  935. data/ext/lpsolver-highs/highs/mip/HighsSeparator.h +60 -0
  936. data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.cpp +244 -0
  937. data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.h +34 -0
  938. data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.cpp +563 -0
  939. data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.h +63 -0
  940. data/ext/lpsolver-highs/highs/mip/MipTimer.h +544 -0
  941. data/ext/lpsolver-highs/highs/mip/feasibilityjump.hh +800 -0
  942. data/ext/lpsolver-highs/highs/model/HighsHessian.cpp +263 -0
  943. data/ext/lpsolver-highs/highs/model/HighsHessian.h +54 -0
  944. data/ext/lpsolver-highs/highs/model/HighsHessianUtils.cpp +584 -0
  945. data/ext/lpsolver-highs/highs/model/HighsHessianUtils.h +47 -0
  946. data/ext/lpsolver-highs/highs/model/HighsModel.cpp +46 -0
  947. data/ext/lpsolver-highs/highs/model/HighsModel.h +42 -0
  948. data/ext/lpsolver-highs/highs/parallel/HighsBinarySemaphore.h +108 -0
  949. data/ext/lpsolver-highs/highs/parallel/HighsCacheAlign.h +82 -0
  950. data/ext/lpsolver-highs/highs/parallel/HighsCombinable.h +116 -0
  951. data/ext/lpsolver-highs/highs/parallel/HighsMutex.h +124 -0
  952. data/ext/lpsolver-highs/highs/parallel/HighsParallel.h +128 -0
  953. data/ext/lpsolver-highs/highs/parallel/HighsRaceTimer.h +38 -0
  954. data/ext/lpsolver-highs/highs/parallel/HighsSchedulerConstants.h +19 -0
  955. data/ext/lpsolver-highs/highs/parallel/HighsSpinMutex.h +48 -0
  956. data/ext/lpsolver-highs/highs/parallel/HighsSplitDeque.h +606 -0
  957. data/ext/lpsolver-highs/highs/parallel/HighsTask.h +170 -0
  958. data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.cpp +43 -0
  959. data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.h +217 -0
  960. data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.cpp +848 -0
  961. data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.h +108 -0
  962. data/ext/lpsolver-highs/highs/pdlp/HiPdlpTimer.h +155 -0
  963. data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.cpp +141 -0
  964. data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.h +26 -0
  965. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Diff +12 -0
  966. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Meld +7 -0
  967. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Merge +2 -0
  968. data/ext/lpsolver-highs/highs/pdlp/cupdlp/README.md +95 -0
  969. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/CMakeLists.txt +58 -0
  970. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu +338 -0
  971. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh +319 -0
  972. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu +386 -0
  973. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh +149 -0
  974. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cublas.c +154 -0
  975. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cuda_linalg.c +79 -0
  976. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp.h +16 -0
  977. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.c +214 -0
  978. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
  979. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
  980. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.c +802 -0
  981. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
  982. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.c +148 -0
  983. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  984. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.c +124 -0
  985. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  986. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.c +425 -0
  987. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  988. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.c +1498 -0
  989. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
  990. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.c +478 -0
  991. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
  992. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
  993. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.h +212 -0
  994. data/ext/lpsolver-highs/highs/pdlp/cupdlp/glbopts.h +342 -0
  995. data/ext/lpsolver-highs/highs/pdlp/hipdlp/defs.hpp +222 -0
  996. data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.cc +231 -0
  997. data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.hpp +61 -0
  998. data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.cc +225 -0
  999. data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.hpp +80 -0
  1000. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cc +2798 -0
  1001. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cu +497 -0
  1002. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.hpp +358 -0
  1003. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg_kernels.hpp +77 -0
  1004. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdlp_gpu_debug.hpp +62 -0
  1005. data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.cc +132 -0
  1006. data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.hpp +96 -0
  1007. data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.cc +307 -0
  1008. data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.hpp +74 -0
  1009. data/ext/lpsolver-highs/highs/pdlp/hipdlp/solver_results.hpp +65 -0
  1010. data/ext/lpsolver-highs/highs/presolve/HPresolve.cpp +8511 -0
  1011. data/ext/lpsolver-highs/highs/presolve/HPresolve.h +505 -0
  1012. data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.cpp +239 -0
  1013. data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.h +52 -0
  1014. data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.cpp +1368 -0
  1015. data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.h +943 -0
  1016. data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.cpp +1921 -0
  1017. data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.h +284 -0
  1018. data/ext/lpsolver-highs/highs/presolve/ICrash.cpp +474 -0
  1019. data/ext/lpsolver-highs/highs/presolve/ICrash.h +124 -0
  1020. data/ext/lpsolver-highs/highs/presolve/ICrashUtil.cpp +267 -0
  1021. data/ext/lpsolver-highs/highs/presolve/ICrashUtil.h +62 -0
  1022. data/ext/lpsolver-highs/highs/presolve/ICrashX.cpp +173 -0
  1023. data/ext/lpsolver-highs/highs/presolve/ICrashX.h +23 -0
  1024. data/ext/lpsolver-highs/highs/presolve/PresolveComponent.cpp +45 -0
  1025. data/ext/lpsolver-highs/highs/presolve/PresolveComponent.h +90 -0
  1026. data/ext/lpsolver-highs/highs/qpsolver/README.md +185 -0
  1027. data/ext/lpsolver-highs/highs/qpsolver/a_asm.cpp +139 -0
  1028. data/ext/lpsolver-highs/highs/qpsolver/a_asm.hpp +77 -0
  1029. data/ext/lpsolver-highs/highs/qpsolver/a_quass.cpp +194 -0
  1030. data/ext/lpsolver-highs/highs/qpsolver/a_quass.hpp +22 -0
  1031. data/ext/lpsolver-highs/highs/qpsolver/basis.cpp +443 -0
  1032. data/ext/lpsolver-highs/highs/qpsolver/basis.hpp +159 -0
  1033. data/ext/lpsolver-highs/highs/qpsolver/crashsolution.hpp +20 -0
  1034. data/ext/lpsolver-highs/highs/qpsolver/dantzigpricing.hpp +80 -0
  1035. data/ext/lpsolver-highs/highs/qpsolver/devexharrispricing.hpp +98 -0
  1036. data/ext/lpsolver-highs/highs/qpsolver/devexpricing.hpp +108 -0
  1037. data/ext/lpsolver-highs/highs/qpsolver/eventhandler.hpp +30 -0
  1038. data/ext/lpsolver-highs/highs/qpsolver/factor.hpp +408 -0
  1039. data/ext/lpsolver-highs/highs/qpsolver/feasibility_bounded.hpp +114 -0
  1040. data/ext/lpsolver-highs/highs/qpsolver/feasibility_highs.hpp +301 -0
  1041. data/ext/lpsolver-highs/highs/qpsolver/gradient.hpp +46 -0
  1042. data/ext/lpsolver-highs/highs/qpsolver/instance.hpp +70 -0
  1043. data/ext/lpsolver-highs/highs/qpsolver/matrix.hpp +342 -0
  1044. data/ext/lpsolver-highs/highs/qpsolver/perturbation.cpp +41 -0
  1045. data/ext/lpsolver-highs/highs/qpsolver/perturbation.hpp +15 -0
  1046. data/ext/lpsolver-highs/highs/qpsolver/pricing.hpp +22 -0
  1047. data/ext/lpsolver-highs/highs/qpsolver/qpconst.hpp +34 -0
  1048. data/ext/lpsolver-highs/highs/qpsolver/qpvector.hpp +242 -0
  1049. data/ext/lpsolver-highs/highs/qpsolver/quass.cpp +551 -0
  1050. data/ext/lpsolver-highs/highs/qpsolver/quass.hpp +27 -0
  1051. data/ext/lpsolver-highs/highs/qpsolver/ratiotest.cpp +146 -0
  1052. data/ext/lpsolver-highs/highs/qpsolver/ratiotest.hpp +26 -0
  1053. data/ext/lpsolver-highs/highs/qpsolver/reducedcosts.hpp +46 -0
  1054. data/ext/lpsolver-highs/highs/qpsolver/reducedgradient.hpp +95 -0
  1055. data/ext/lpsolver-highs/highs/qpsolver/runtime.hpp +45 -0
  1056. data/ext/lpsolver-highs/highs/qpsolver/scaling.cpp +123 -0
  1057. data/ext/lpsolver-highs/highs/qpsolver/scaling.hpp +15 -0
  1058. data/ext/lpsolver-highs/highs/qpsolver/settings.hpp +84 -0
  1059. data/ext/lpsolver-highs/highs/qpsolver/snippets.hpp +36 -0
  1060. data/ext/lpsolver-highs/highs/qpsolver/statistics.hpp +30 -0
  1061. data/ext/lpsolver-highs/highs/qpsolver/steepestedgepricing.hpp +173 -0
  1062. data/ext/lpsolver-highs/highs/simplex/HApp.h +550 -0
  1063. data/ext/lpsolver-highs/highs/simplex/HEkk.cpp +4404 -0
  1064. data/ext/lpsolver-highs/highs/simplex/HEkk.h +419 -0
  1065. data/ext/lpsolver-highs/highs/simplex/HEkkControl.cpp +146 -0
  1066. data/ext/lpsolver-highs/highs/simplex/HEkkDebug.cpp +1722 -0
  1067. data/ext/lpsolver-highs/highs/simplex/HEkkDual.cpp +3003 -0
  1068. data/ext/lpsolver-highs/highs/simplex/HEkkDual.h +513 -0
  1069. data/ext/lpsolver-highs/highs/simplex/HEkkDualMulti.cpp +1020 -0
  1070. data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.cpp +535 -0
  1071. data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.h +134 -0
  1072. data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.cpp +697 -0
  1073. data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.h +201 -0
  1074. data/ext/lpsolver-highs/highs/simplex/HEkkInterface.cpp +26 -0
  1075. data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.cpp +2984 -0
  1076. data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.h +191 -0
  1077. data/ext/lpsolver-highs/highs/simplex/HSimplex.cpp +330 -0
  1078. data/ext/lpsolver-highs/highs/simplex/HSimplex.h +42 -0
  1079. data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.cpp +145 -0
  1080. data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.h +48 -0
  1081. data/ext/lpsolver-highs/highs/simplex/HSimplexNla.cpp +517 -0
  1082. data/ext/lpsolver-highs/highs/simplex/HSimplexNla.h +158 -0
  1083. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaDebug.cpp +373 -0
  1084. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaFreeze.cpp +28 -0
  1085. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaProductForm.cpp +113 -0
  1086. data/ext/lpsolver-highs/highs/simplex/HSimplexReport.cpp +77 -0
  1087. data/ext/lpsolver-highs/highs/simplex/HSimplexReport.h +21 -0
  1088. data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.cpp +1495 -0
  1089. data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.h +500 -0
  1090. data/ext/lpsolver-highs/highs/simplex/SimplexConst.h +273 -0
  1091. data/ext/lpsolver-highs/highs/simplex/SimplexStruct.h +263 -0
  1092. data/ext/lpsolver-highs/highs/simplex/SimplexTimer.h +414 -0
  1093. data/ext/lpsolver-highs/highs/test_kkt/DevKkt.cpp +469 -0
  1094. data/ext/lpsolver-highs/highs/test_kkt/DevKkt.h +143 -0
  1095. data/ext/lpsolver-highs/highs/test_kkt/KktCh2.cpp +305 -0
  1096. data/ext/lpsolver-highs/highs/test_kkt/KktCh2.h +79 -0
  1097. data/ext/lpsolver-highs/highs/util/FactorTimer.h +199 -0
  1098. data/ext/lpsolver-highs/highs/util/HFactor.cpp +2597 -0
  1099. data/ext/lpsolver-highs/highs/util/HFactor.h +587 -0
  1100. data/ext/lpsolver-highs/highs/util/HFactorConst.h +81 -0
  1101. data/ext/lpsolver-highs/highs/util/HFactorDebug.cpp +231 -0
  1102. data/ext/lpsolver-highs/highs/util/HFactorDebug.h +55 -0
  1103. data/ext/lpsolver-highs/highs/util/HFactorExtend.cpp +229 -0
  1104. data/ext/lpsolver-highs/highs/util/HFactorRefactor.cpp +304 -0
  1105. data/ext/lpsolver-highs/highs/util/HFactorUtils.cpp +122 -0
  1106. data/ext/lpsolver-highs/highs/util/HSet.cpp +197 -0
  1107. data/ext/lpsolver-highs/highs/util/HSet.h +89 -0
  1108. data/ext/lpsolver-highs/highs/util/HVector.h +22 -0
  1109. data/ext/lpsolver-highs/highs/util/HVectorBase.cpp +271 -0
  1110. data/ext/lpsolver-highs/highs/util/HVectorBase.h +102 -0
  1111. data/ext/lpsolver-highs/highs/util/HighsCDouble.h +323 -0
  1112. data/ext/lpsolver-highs/highs/util/HighsComponent.h +53 -0
  1113. data/ext/lpsolver-highs/highs/util/HighsDataStack.h +83 -0
  1114. data/ext/lpsolver-highs/highs/util/HighsDisjointSets.h +107 -0
  1115. data/ext/lpsolver-highs/highs/util/HighsHash.cpp +10 -0
  1116. data/ext/lpsolver-highs/highs/util/HighsHash.h +1274 -0
  1117. data/ext/lpsolver-highs/highs/util/HighsHashTree.h +1461 -0
  1118. data/ext/lpsolver-highs/highs/util/HighsInt.h +36 -0
  1119. data/ext/lpsolver-highs/highs/util/HighsIntegers.h +212 -0
  1120. data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.cpp +267 -0
  1121. data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.h +203 -0
  1122. data/ext/lpsolver-highs/highs/util/HighsMatrixPic.cpp +146 -0
  1123. data/ext/lpsolver-highs/highs/util/HighsMatrixPic.h +37 -0
  1124. data/ext/lpsolver-highs/highs/util/HighsMatrixSlice.h +561 -0
  1125. data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.cpp +407 -0
  1126. data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.h +57 -0
  1127. data/ext/lpsolver-highs/highs/util/HighsMemoryAllocation.h +63 -0
  1128. data/ext/lpsolver-highs/highs/util/HighsRandom.h +242 -0
  1129. data/ext/lpsolver-highs/highs/util/HighsRbTree.h +452 -0
  1130. data/ext/lpsolver-highs/highs/util/HighsSort.cpp +364 -0
  1131. data/ext/lpsolver-highs/highs/util/HighsSort.h +131 -0
  1132. data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.cpp +1746 -0
  1133. data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.h +151 -0
  1134. data/ext/lpsolver-highs/highs/util/HighsSparseVectorSum.h +95 -0
  1135. data/ext/lpsolver-highs/highs/util/HighsSplay.h +135 -0
  1136. data/ext/lpsolver-highs/highs/util/HighsTimer.h +385 -0
  1137. data/ext/lpsolver-highs/highs/util/HighsUtils.cpp +1259 -0
  1138. data/ext/lpsolver-highs/highs/util/HighsUtils.h +272 -0
  1139. data/ext/lpsolver-highs/highs/util/stringutil.cpp +131 -0
  1140. data/ext/lpsolver-highs/highs/util/stringutil.h +46 -0
  1141. data/ext/lpsolver-highs/highs.pc.in +12 -0
  1142. data/ext/lpsolver-highs/meson.build +198 -0
  1143. data/ext/lpsolver-highs/meson_options.txt +31 -0
  1144. data/ext/lpsolver-highs/nuget/HiGHS_Logo.png +0 -0
  1145. data/ext/lpsolver-highs/nuget/Highs.csproj +25 -0
  1146. data/ext/lpsolver-highs/nuget/Highs.csproj.in +36 -0
  1147. data/ext/lpsolver-highs/nuget/HowToAlternative.md +77 -0
  1148. data/ext/lpsolver-highs/nuget/README.md +38 -0
  1149. data/ext/lpsolver-highs/nuget/arm-toolchain.cmake +15 -0
  1150. data/ext/lpsolver-highs/nuget/build_linux-arm.sh +13 -0
  1151. data/ext/lpsolver-highs/nuget/build_linux.sh +10 -0
  1152. data/ext/lpsolver-highs/nuget/build_windows.ps1 +27 -0
  1153. data/ext/lpsolver-highs/nuget/generatePackage.ps1 +28 -0
  1154. data/ext/lpsolver-highs/pyproject.toml +221 -0
  1155. data/ext/lpsolver-highs/subprojects/pybind11.wrap +13 -0
  1156. data/ext/lpsolver-highs/tests/test_highspy.py +2310 -0
  1157. data/ext/lpsolver-highs/version.rc.in +50 -0
  1158. data/lib/lpsolver/highs +0 -0
  1159. data/lib/lpsolver/model.rb +35 -7
  1160. data/lib/lpsolver/native.so +0 -0
  1161. data/lib/lpsolver/native_model.rb +261 -0
  1162. data/lib/lpsolver/solution.rb +93 -8
  1163. data/lib/lpsolver/version.rb +1 -1
  1164. data/lpsolver.gemspec +4 -1
  1165. metadata +1176 -4
@@ -0,0 +1,1812 @@
1
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
+ /* */
3
+ /* This file is part of the HiGHS linear optimization suite */
4
+ /* */
5
+ /* Available as open-source under the MIT License */
6
+ /* */
7
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
8
+ /**@file Highs.h
9
+ * @brief The HiGHS class
10
+ */
11
+ #ifndef HIGHS_H_
12
+ #define HIGHS_H_
13
+
14
+ #include <sstream>
15
+
16
+ #include "lp_data/HighsCallback.h"
17
+ #include "lp_data/HighsIis.h"
18
+ #include "lp_data/HighsLpUtils.h"
19
+ #include "lp_data/HighsRanging.h"
20
+ #include "lp_data/HighsSolutionDebug.h"
21
+ #include "model/HighsModel.h"
22
+ #include "presolve/ICrash.h"
23
+ #include "presolve/PresolveComponent.h"
24
+
25
+ /**
26
+ * @brief Return the version
27
+ */
28
+ const char* highsVersion();
29
+
30
+ /**
31
+ * @brief Return detailed version information, githash and compilation
32
+ * date
33
+ */
34
+ HighsInt highsVersionMajor();
35
+ HighsInt highsVersionMinor();
36
+ HighsInt highsVersionPatch();
37
+ const char* highsGithash();
38
+
39
+ /**
40
+ * @brief Class to set parameters and run HiGHS
41
+ */
42
+ class Highs {
43
+ public:
44
+ Highs();
45
+ virtual ~Highs() { this->closeLogFile(); }
46
+
47
+ /**
48
+ * @brief Return the version as a string
49
+ */
50
+ std::string version() const { return highsVersion(); }
51
+
52
+ /**
53
+ * @brief Return major version
54
+ */
55
+ HighsInt versionMajor() const { return highsVersionMajor(); }
56
+
57
+ /**
58
+ * @brief Return minor version
59
+ */
60
+ HighsInt versionMinor() const { return highsVersionMinor(); }
61
+
62
+ /**
63
+ * @brief Return patch version
64
+ */
65
+ HighsInt versionPatch() const { return highsVersionPatch(); }
66
+
67
+ /**
68
+ * @brief Return githash
69
+ */
70
+ std::string githash() const { return highsGithash(); }
71
+
72
+ /**
73
+ * @brief Reset the options and then call clearModel()
74
+ */
75
+ HighsStatus clear();
76
+
77
+ /**
78
+ * @brief Clear the incumbent model and then call clearSolver()
79
+ */
80
+ HighsStatus clearModel();
81
+
82
+ /**
83
+ * @brief Clear all solution data associated with the model
84
+ */
85
+ HighsStatus clearSolver();
86
+
87
+ /**
88
+ * @brief Clear all dual data associated with the model
89
+ */
90
+ HighsStatus clearSolverDualData();
91
+
92
+ /**
93
+ * Methods for model input
94
+ */
95
+
96
+ /**
97
+ * Every model loading module eventually uses
98
+ * passModel(HighsModel model) to communicate the model to HiGHS.
99
+ */
100
+
101
+ /**
102
+ * @brief Pass a HighsModel instance to Highs
103
+ */
104
+ HighsStatus passModel(HighsModel model);
105
+
106
+ /**
107
+ * @brief Pass a HighsLp instance to Highs
108
+ */
109
+ HighsStatus passModel(HighsLp lp);
110
+
111
+ /**
112
+ * @brief Pass a QP (possibly with integrality data) via pointers to vectors
113
+ * of data
114
+ */
115
+ HighsStatus passModel(
116
+ const HighsInt num_col, const HighsInt num_row, const HighsInt num_nz,
117
+ const HighsInt q_num_nz, const HighsInt a_format, const HighsInt q_format,
118
+ const HighsInt sense, const double offset, const double* col_cost,
119
+ const double* col_lower, const double* col_upper, const double* row_lower,
120
+ const double* row_upper, const HighsInt* a_start, const HighsInt* a_index,
121
+ const double* a_value, const HighsInt* q_start, const HighsInt* q_index,
122
+ const double* q_value, const HighsInt* integrality = nullptr);
123
+
124
+ /**
125
+ * @brief Pass an LP (possibly with integrality data) via pointers to vectors
126
+ * of data
127
+ */
128
+ HighsStatus passModel(const HighsInt num_col, const HighsInt num_row,
129
+ const HighsInt num_nz, const HighsInt a_format,
130
+ const HighsInt sense, const double offset,
131
+ const double* col_cost, const double* col_lower,
132
+ const double* col_upper, const double* row_lower,
133
+ const double* row_upper, const HighsInt* a_start,
134
+ const HighsInt* a_index, const double* a_value,
135
+ const HighsInt* integrality = nullptr);
136
+
137
+ /**
138
+ * @brief Pass a HighsHessian instance for the incumbent model
139
+ */
140
+ HighsStatus passHessian(HighsHessian hessian_);
141
+
142
+ /**
143
+ * @brief Pass the Hessian for the incumbent model via pointers to vectors of
144
+ * data
145
+ */
146
+ HighsStatus passHessian(const HighsInt dim, const HighsInt num_nz,
147
+ const HighsInt format, const HighsInt* start,
148
+ const HighsInt* index, const double* value);
149
+ /**
150
+ * @brief Pass multiple linear objectives for the incumbent model
151
+ */
152
+ HighsStatus passLinearObjectives(
153
+ const HighsInt num_linear_objective,
154
+ const HighsLinearObjective* linear_objective);
155
+
156
+ /**
157
+ * @brief Add a linear objective for the incumbent model
158
+ */
159
+ HighsStatus addLinearObjective(const HighsLinearObjective& linear_objective,
160
+ const HighsInt iObj = -1);
161
+
162
+ /**
163
+ * @brief Get number of linear objectives from the incumbent model
164
+ */
165
+ HighsInt getNumLinearObjectives() const {
166
+ return multi_linear_objective_.size();
167
+ }
168
+
169
+ /**
170
+ * @brief Get a linear objective from the incumbent model
171
+ */
172
+ const HighsLinearObjective& getLinearObjective(const HighsInt idx) const {
173
+ assert(idx >= 0 && idx < int(multi_linear_objective_.size()));
174
+ return multi_linear_objective_[idx];
175
+ }
176
+
177
+ /**
178
+ * @brief Clear the multiple linear objective data
179
+ */
180
+ HighsStatus clearLinearObjectives();
181
+
182
+ /**
183
+ * @brief Pass a column name to the incumbent model
184
+ */
185
+ HighsStatus passColName(const HighsInt col, const std::string& name);
186
+
187
+ /**
188
+ * @brief Pass a row name to the incumbent model
189
+ */
190
+ HighsStatus passRowName(const HighsInt row, const std::string& name);
191
+
192
+ /**
193
+ * @brief Pass a model name to the incumbent model
194
+ */
195
+ HighsStatus passModelName(const std::string& name);
196
+
197
+ /**
198
+ * @brief Read in a model
199
+ */
200
+ HighsStatus readModel(const std::string& filename);
201
+
202
+ /**
203
+ * @brief Read in a basis
204
+ */
205
+ HighsStatus readBasis(const std::string& filename);
206
+
207
+ /**
208
+ * @brief Presolve the incumbent model, allowing the presolved model
209
+ * to be extracted. Subsequent solution of the incumbent model will
210
+ * only use presolve if there is no valid basis
211
+ */
212
+ HighsStatus presolve();
213
+
214
+ /**
215
+ * @brief Run the solver, applying file-based options and user
216
+ * scaling before optimization
217
+ */
218
+ HighsStatus run();
219
+
220
+ /**
221
+ * @brief Postsolve the incumbent model using a solution
222
+ */
223
+ HighsStatus postsolve(const HighsSolution& solution);
224
+
225
+ /**
226
+ * @brief Postsolve the incumbent model using a solution and basis
227
+ */
228
+ HighsStatus postsolve(const HighsSolution& solution, const HighsBasis& basis);
229
+
230
+ /**
231
+ * @brief Write the current solution to a file in a given style
232
+ */
233
+ HighsStatus writeSolution(const std::string& filename,
234
+ const HighsInt style = kSolutionStyleRaw);
235
+
236
+ /**
237
+ * @brief Read a HiGHS solution file in a given style
238
+ */
239
+ HighsStatus readSolution(const std::string& filename,
240
+ const HighsInt style = kSolutionStyleRaw);
241
+
242
+ /**
243
+ * @brief Assess the validity, integrality and feasibility of the
244
+ * current primal solution. Of value after calling
245
+ * Highs::readSolution
246
+ */
247
+ HighsStatus assessPrimalSolution(bool& valid, bool& integral,
248
+ bool& feasible) const;
249
+
250
+ /**
251
+ * Methods for HiGHS option input/output
252
+ */
253
+
254
+ /**
255
+ * @brief Set an option to the bool/HighsInt/double/string value if it's
256
+ * legal and, for bool/HighsInt/double, only if it's of the correct type
257
+ */
258
+
259
+ HighsStatus setOptionValue(const std::string& option, const bool value);
260
+
261
+ HighsStatus setOptionValue(const std::string& option, const HighsInt value);
262
+
263
+ #ifdef HIGHSINT64
264
+ HighsStatus setOptionValue(const std::string& option, const int value) {
265
+ return setOptionValue(option, HighsInt{value});
266
+ }
267
+ #endif
268
+
269
+ HighsStatus setOptionValue(const std::string& option, const double value);
270
+
271
+ HighsStatus setOptionValue(const std::string& option,
272
+ const std::string& value);
273
+
274
+ HighsStatus setOptionValue(const std::string& option, const char* value);
275
+
276
+ /**
277
+ * @brief Read option values from a file
278
+ */
279
+ HighsStatus readOptions(const std::string& filename);
280
+
281
+ /**
282
+ * @brief Pass a HighsOptions instance to Highs
283
+ */
284
+ HighsStatus passOptions(const HighsOptions& options);
285
+
286
+ /**
287
+ * @brief Get a const reference to the internal option values
288
+ */
289
+ const HighsOptions& getOptions() const { return options_; }
290
+
291
+ /**
292
+ * @brief Gets an option value as bool/HighsInt/double/string and, for
293
+ * bool/int/double, only if it's of the correct type.
294
+ *
295
+ * NB Deprecate in v2.0, in order to replace with more general
296
+ * get*OptionValues
297
+ */
298
+ HighsStatus getOptionValue(const std::string& option, bool& value) const {
299
+ return this->getBoolOptionValues(option, &value);
300
+ }
301
+
302
+ HighsStatus getOptionValue(const std::string& option, HighsInt& value) const {
303
+ return this->getIntOptionValues(option, &value);
304
+ }
305
+
306
+ HighsStatus getOptionValue(const std::string& option, double& value) const {
307
+ return this->getDoubleOptionValues(option, &value);
308
+ }
309
+
310
+ HighsStatus getOptionValue(const std::string& option,
311
+ std::string& value) const {
312
+ return this->getStringOptionValues(option, &value);
313
+ }
314
+
315
+ /**
316
+ * @brief Get the type expected by an option
317
+ */
318
+ HighsStatus getOptionType(const std::string& option,
319
+ HighsOptionType& type) const {
320
+ return this->getOptionType(option, &type);
321
+ }
322
+
323
+ /**
324
+ * @brief Reset the options to the default values
325
+ */
326
+ HighsStatus resetOptions();
327
+
328
+ /**
329
+ * @brief Write (deviations from default values of) the options to a
330
+ * file, using the standard format used to read options from a file.
331
+ * Possible to write only deviations from default values.
332
+ */
333
+ HighsStatus writeOptions(const std::string& filename, //!< The filename
334
+ const bool report_only_deviations = false);
335
+
336
+ /**
337
+ * @brief Returns the number of user-settable options
338
+ */
339
+ HighsInt getNumOptions() const {
340
+ return this->options_.num_user_settable_options_;
341
+ }
342
+
343
+ /**
344
+ * @brief Get the number of user-settable options
345
+ */
346
+ HighsStatus getOptionName(const HighsInt index, std::string* name) const;
347
+
348
+ /**
349
+ * @brief Get the type of an option
350
+ */
351
+ HighsStatus getOptionType(const std::string& option,
352
+ HighsOptionType* type) const;
353
+
354
+ /**
355
+ * @brief Get the current and default values of a bool option
356
+ */
357
+ HighsStatus getBoolOptionValues(const std::string& option,
358
+ bool* current_value = nullptr,
359
+ bool* default_value = nullptr) const;
360
+
361
+ /**
362
+ * @brief Get the current, min, max and default values of an int option
363
+ */
364
+ HighsStatus getIntOptionValues(const std::string& option,
365
+ HighsInt* current_value = nullptr,
366
+ HighsInt* min_value = nullptr,
367
+ HighsInt* max_value = nullptr,
368
+ HighsInt* default_value = nullptr) const;
369
+
370
+ /**
371
+ * @brief Get the current, min, max and default values of a double option
372
+ */
373
+ HighsStatus getDoubleOptionValues(const std::string& option,
374
+ double* current_value = nullptr,
375
+ double* min_value = nullptr,
376
+ double* max_value = nullptr,
377
+ double* default_value = nullptr) const;
378
+
379
+ /**
380
+ * @brief Get the current and default values of a string option
381
+ */
382
+ HighsStatus getStringOptionValues(const std::string& option,
383
+ std::string* current_value = nullptr,
384
+ std::string* default_value = nullptr) const;
385
+
386
+ /**
387
+ * @brief Get a const reference to the internal info values
388
+ * type.
389
+ */
390
+ const HighsInfo& getInfo() const { return info_; }
391
+
392
+ /**
393
+ * @brief Get an info value as HighsInt/int64_t/double, and only if
394
+ * it's of the correct type.
395
+ */
396
+
397
+ HighsStatus getInfoValue(const std::string& info, HighsInt& value) const;
398
+
399
+ #ifndef HIGHSINT64
400
+ HighsStatus getInfoValue(const std::string& info, int64_t& value) const;
401
+ #endif
402
+
403
+ HighsStatus getInfoValue(const std::string& info, double& value) const;
404
+
405
+ HighsStatus getInfoType(const std::string& info, HighsInfoType& type) const;
406
+
407
+ /**
408
+ * @brief Write info values to a file, with the extension ".html"
409
+ * producing HTML, otherwise using the standard format used to read
410
+ * options from a file.
411
+ */
412
+ HighsStatus writeInfo(const std::string& filename = "") const;
413
+
414
+ /**
415
+ * @brief Get the value of infinity used by HiGHS
416
+ */
417
+ double getInfinity() const { return kHighsInf; }
418
+
419
+ /**
420
+ * @brief Get the size of HighsInt
421
+ */
422
+ HighsInt getSizeofHighsInt() const {
423
+ return sizeof(options_.num_user_settable_options_);
424
+ }
425
+
426
+ /**
427
+ * @brief Get the run time of HiGHS
428
+ */
429
+ double getRunTime() const { return timer_.read(); }
430
+
431
+ /**
432
+ * Methods for model output
433
+ */
434
+
435
+ /**
436
+ * @brief Identify the standard form of the HighsLp instance in
437
+ * HiGHS
438
+ */
439
+ HighsStatus getStandardFormLp(HighsInt& num_col, HighsInt& num_row,
440
+ HighsInt& num_nz, double& offset,
441
+ double* cost = nullptr, double* rhs = nullptr,
442
+ HighsInt* start = nullptr,
443
+ HighsInt* index = nullptr,
444
+ double* value = nullptr);
445
+
446
+ /**
447
+ * @brief Return a const reference to the internal presolved HighsLp
448
+ * instance
449
+ */
450
+ const HighsLp& getPresolvedLp() const { return presolved_model_.lp_; }
451
+
452
+ /**
453
+ * @brief Return a const reference to the internal presolved
454
+ * HighsModel instance
455
+ */
456
+ const HighsModel& getPresolvedModel() const { return presolved_model_; }
457
+
458
+ /**
459
+ * @brief Return a const reference to the logging data for presolve
460
+ */
461
+ const HighsPresolveLog& getPresolveLog() const { return presolve_log_; }
462
+
463
+ /**
464
+ * @brief Return a const pointer to the original column indices for
465
+ * the presolved model
466
+ */
467
+ const HighsInt* getPresolveOrigColsIndex() const {
468
+ return presolve_.data_.postSolveStack.getOrigColsIndex();
469
+ }
470
+
471
+ /**
472
+ * @brief Return a const pointer to the original row indices for the
473
+ * presolved model
474
+ */
475
+ const HighsInt* getPresolveOrigRowsIndex() const {
476
+ return presolve_.data_.postSolveStack.getOrigRowsIndex();
477
+ }
478
+
479
+ /**
480
+ * @brief Return an LP associated with a MIP and its solution, with
481
+ * each integer variable fixed to the value it takes in the MIP
482
+ * solution. If no solution is available, an error is returned.
483
+ */
484
+ HighsStatus getFixedLp(HighsLp& lp) const;
485
+
486
+ /**
487
+ * @brief Return a const reference to the incumbent LP
488
+ */
489
+ const HighsLp& getLp() const { return model_.lp_; }
490
+
491
+ /**
492
+ * @brief Return a const reference to the incumbent model
493
+ */
494
+ const HighsModel& getModel() const { return model_; }
495
+
496
+ /**
497
+ * @brief Return a const reference to the internal HighsSolution
498
+ * instance
499
+ */
500
+ const HighsSolution& getSolution() const { return solution_; }
501
+
502
+ /**
503
+ * @brief Return a const reference to the internal IIS LP instance
504
+ */
505
+ const HighsLp& getIisLp() const { return iis_.model_.lp_; }
506
+
507
+ /**
508
+ * @brief Zero all clocks in the internal HighsTimer instance
509
+ */
510
+ void zeroAllClocks() { timer_.zeroAllClocks(); };
511
+
512
+ /**
513
+ * @brief Return a const reference to the internal HighsSolution
514
+ * instance
515
+ */
516
+ const std::vector<HighsObjectiveSolution>& getSavedMipSolutions() const {
517
+ return saved_objective_and_solution_;
518
+ }
519
+
520
+ /**
521
+ * @brief Return a const reference to the internal ICrash info instance
522
+ */
523
+ const ICrashInfo& getICrashInfo() const { return icrash_info_; };
524
+
525
+ /**
526
+ * @brief Return a const reference to the internal HighsBasis instance
527
+ */
528
+ const HighsBasis& getBasis() const { return basis_; }
529
+
530
+ /**
531
+ * @brief Return the status for the incumbent model.
532
+ */
533
+ const HighsModelStatus& getModelStatus() const { return model_status_; }
534
+
535
+ /**
536
+ * @brief Returns the current model's presolve status
537
+ */
538
+ const HighsPresolveStatus& getModelPresolveStatus() const {
539
+ return model_presolve_status_;
540
+ }
541
+
542
+ /**
543
+ * @brief Indicate whether a dual unbounded ray exists, and (at the
544
+ * expense of solving an LP) gets it if it does not and
545
+ * dual_ray_value is not nullptr
546
+ */
547
+ HighsStatus getDualRay(bool& has_dual_ray, double* dual_ray_value = nullptr);
548
+
549
+ /**
550
+ * @brief Indicate whether a dual unbounded ray exists, and gets it
551
+ * if it does
552
+ */
553
+ HighsStatus getDualRaySparse(bool& has_dual_ray, HVector& row_ep_buffer);
554
+
555
+ /**
556
+ * @brief Indicate whether a dual unboundedness direction exists,
557
+ * and (at the expense of solving an LP) gets it if
558
+ * dual_unboundedness_direction is not nullptr
559
+ */
560
+ HighsStatus getDualUnboundednessDirection(
561
+ bool& has_dual_unboundedness_direction,
562
+ double* dual_unboundedness_direction_value = nullptr);
563
+
564
+ /**
565
+ * @brief Indicate whether a primal unbounded ray exists, and (at
566
+ * the expense of solving an LP) gets it if primal_ray is not
567
+ * nullptr
568
+ */
569
+ HighsStatus getPrimalRay(bool& has_primal_ray,
570
+ double* primal_ray_value = nullptr);
571
+
572
+ /**
573
+ * @brief Get the ranging information for the current LP
574
+ */
575
+ HighsStatus getRanging(HighsRanging& ranging);
576
+
577
+ /**
578
+ * @brief Solve the feasibility relaxation problem
579
+ */
580
+ HighsStatus feasibilityRelaxation(const double global_lower_penalty,
581
+ const double global_upper_penalty,
582
+ const double global_rhs_penalty,
583
+ const double* local_lower_penalty = nullptr,
584
+ const double* local_upper_penalty = nullptr,
585
+ const double* local_rhs_penalty = nullptr);
586
+
587
+ /**
588
+ * @brief Get the ill-conditioning information for the current basis
589
+ */
590
+ HighsStatus getIllConditioning(HighsIllConditioning& ill_conditioning,
591
+ const bool constraint,
592
+ const HighsInt method = 0,
593
+ const double ill_conditioning_bound = 1e-4);
594
+
595
+ /**
596
+ * @brief Get the suggested objective and bound scaling for the incumbent
597
+ * model
598
+ */
599
+ HighsStatus getObjectiveBoundScaling(HighsInt& suggested_objective_scale,
600
+ HighsInt& suggested_bound_scale);
601
+
602
+ /**
603
+ * @brief Get (any) irreducible infeasible subsystem (IIS)
604
+ * information for the incumbent model
605
+ */
606
+ HighsStatus getIis(HighsIis& iis);
607
+
608
+ /**
609
+ * @brief Get the current model objective function value
610
+ */
611
+ double getObjectiveValue() const { return info_.objective_function_value; }
612
+
613
+ /**
614
+ * @brief Try to get the current dual objective function value
615
+ */
616
+ HighsStatus getDualObjectiveValue(double& dual_objective_value) const;
617
+
618
+ /**
619
+ * Methods for operations with the invertible representation of the
620
+ * current basis matrix
621
+ */
622
+
623
+ /**
624
+ * @brief Returns true if an invertible representation of the
625
+ * current basis matrix is available
626
+ */
627
+ bool hasInvert() const;
628
+
629
+ /**
630
+ * @brief Gets the basic variables in the order corresponding to
631
+ * calls to getBasisInverseRow, getBasisInverseCol, getBasisSolve,
632
+ * getBasisTransposeSolve, getReducedRow and
633
+ * getReducedColumn. Non-negative entries are indices of columns,
634
+ * and negative entries are -(row_index+1).
635
+ */
636
+ HighsStatus getBasicVariables(HighsInt* basic_variables);
637
+
638
+ /**
639
+ * @brief Form a row of \f$B^{-1}\f$ for basis matrix \f$B\f$,
640
+ * returning the indices of the nonzeros unless row_num_nz is
641
+ * nullptr
642
+ */
643
+ HighsStatus getBasisInverseRow(const HighsInt row, double* row_vector,
644
+ HighsInt* row_num_nz = nullptr,
645
+ HighsInt* row_indices = nullptr);
646
+
647
+ /**
648
+ * @brief Form a column of \f$B^{-1}\f$ for basis matrix \f$B\f$,
649
+ * returning the indices of the nonzeros unless col_num_nz is
650
+ * nullptr
651
+ */
652
+ HighsStatus getBasisInverseCol(const HighsInt col, double* col_vector,
653
+ HighsInt* col_num_nz = nullptr,
654
+ HighsInt* col_indices = nullptr);
655
+
656
+ /**
657
+ * @brief Form \f$\mathbf{x}=B^{-1}\mathbf{b}\f$ for a given vector
658
+ * \f$\mathbf{b}\f$, returning the indices of the nonzeros unless
659
+ * solution_num_nz is nullptr
660
+ */
661
+ HighsStatus getBasisSolve(const double* rhs, double* solution_vector,
662
+ HighsInt* solution_num_nz = nullptr,
663
+ HighsInt* solution_indices = nullptr);
664
+
665
+ /**
666
+ * @brief Form \f$\mathbf{x}=B^{-T}\mathbf{b}\f$ for a given vector
667
+ * \f$\mathbf{b}\f$, returning the indices of the nonzeros unless
668
+ * solution_num_nz is nullptr
669
+ */
670
+ HighsStatus getBasisTransposeSolve(const double* rhs, double* solution_vector,
671
+ HighsInt* solution_num_nz = nullptr,
672
+ HighsInt* solution_indices = nullptr);
673
+
674
+ /**
675
+ * @brief Form a row of \f$B^{-1}A\f$, returning the indices of the
676
+ * nonzeros unless row_num_nz is nullptr, computing the row using
677
+ * pass_basis_inverse_row_vector unless it is nullptr
678
+ */
679
+ HighsStatus getReducedRow(
680
+ const HighsInt row, double* row_vector, HighsInt* row_num_nz = nullptr,
681
+ HighsInt* row_indices = nullptr,
682
+ const double* pass_basis_inverse_row_vector = nullptr);
683
+
684
+ /**
685
+ * @brief Form a column of \f$B^{-1}A\f$, returning the indices of
686
+ * the nonzeros unless col_num_nz is nullptr
687
+ */
688
+ HighsStatus getReducedColumn(const HighsInt col, double* col_vector,
689
+ HighsInt* col_num_nz = nullptr,
690
+ HighsInt* col_indices = nullptr);
691
+
692
+ /**
693
+ * @brief Get the condition number of the current basis matrix,
694
+ * possibly computing it exactly and reporting the error in the
695
+ * approximate condition number
696
+ */
697
+ HighsStatus getKappa(double& kappa, const bool exact = false,
698
+ const bool report = false) const;
699
+
700
+ /**
701
+ * @brief Get the number of columns in the incumbent model
702
+ */
703
+ HighsInt getNumCol() const { return model_.lp_.num_col_; }
704
+
705
+ /**
706
+ * @brief Get the number of rows in the incumbent model
707
+ */
708
+ HighsInt getNumRow() const { return model_.lp_.num_row_; }
709
+
710
+ /**
711
+ * @brief Get the number of (constraint matrix) nonzeros in the incumbent
712
+ * model
713
+ */
714
+ HighsInt getNumNz() const { return model_.lp_.a_matrix_.numNz(); }
715
+
716
+ /**
717
+ * @brief Get the number of Hessian matrix nonzeros in the incumbent model
718
+ */
719
+ HighsInt getHessianNumNz() const { return model_.hessian_.numNz(); }
720
+
721
+ /**
722
+ * @brief Get the objective sense of the incumbent model
723
+ */
724
+ HighsStatus getObjectiveSense(ObjSense& sense) const;
725
+
726
+ /**
727
+ * @brief Get the objective offset of the incumbent model
728
+ */
729
+ HighsStatus getObjectiveOffset(double& offset) const;
730
+
731
+ /**
732
+ * @brief Get multiple columns from the model given by an interval [from_col,
733
+ * to_col]
734
+ */
735
+ HighsStatus getCols(
736
+ const HighsInt
737
+ from_col, //!< The index of the first column to get from the model
738
+ const HighsInt
739
+ to_col, //!< The index of the last column to get from the model
740
+ HighsInt& num_col, //!< Number of columns got from the model
741
+ double* cost, //!< Array of size num_col with costs
742
+ double* lower, //!< Array of size num_col with lower bounds
743
+ double* upper, //!< Array of size num_col with upper bounds
744
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
745
+ HighsInt*
746
+ start, //!< Array of size num_col with start indices of the columns
747
+ HighsInt*
748
+ index, //!< Array of size num_nz with row indices for the columns
749
+ double* value //!< Array of size num_nz with row values for the columns
750
+ ) const;
751
+
752
+ /**
753
+ * @brief Get multiple columns from the model given by a set
754
+ */
755
+ HighsStatus getCols(
756
+ const HighsInt num_set_entries, //!< The number of indices in the set
757
+ const HighsInt* set, //!< Array of size num_set_entries with indices of
758
+ //!< columns to get
759
+ HighsInt& num_col, //!< Number of columns got from the model
760
+ double* cost, //!< Array of size num_col with costs
761
+ double* lower, //!< Array of size num_col with lower bounds
762
+ double* upper, //!< Array of size num_col with upper bounds
763
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
764
+ HighsInt*
765
+ start, //!< Array of size num_col with start indices of the columns
766
+ HighsInt*
767
+ index, //!< Array of size num_nz with row indices for the columns
768
+ double* value //!< Array of size num_nz with row values for the columns
769
+ ) const;
770
+
771
+ /**
772
+ * @brief Get multiple columns from the model given by a mask
773
+ */
774
+ HighsStatus getCols(
775
+ const HighsInt* mask, //!< Full length array with 1 => get; 0 => not
776
+ HighsInt& num_col, //!< Number of columns got from the model
777
+ double* cost, //!< Array of size num_col with cost
778
+ double* lower, //!< Array of size num_col with lower bounds
779
+ double* upper, //!< Array of size num_col with upper bounds
780
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
781
+ HighsInt*
782
+ start, //!< Array of size num_col with start indices of the columns
783
+ HighsInt*
784
+ index, //!< Array of size num_nz with row indices for the columns
785
+ double* value //!< Array of size num_nz with row values for the columns
786
+ ) const;
787
+
788
+ /**
789
+ * @brief Get a column name from the incumbent model
790
+ */
791
+ HighsStatus getColName(const HighsInt col, std::string& name) const;
792
+
793
+ /**
794
+ * @brief Get column index corresponding to name
795
+ */
796
+ HighsStatus getColByName(const std::string& name, HighsInt& col);
797
+
798
+ /**
799
+ * @brief Get a column integrality from the incumbent model
800
+ */
801
+ HighsStatus getColIntegrality(const HighsInt col,
802
+ HighsVarType& integrality) const;
803
+
804
+ /**
805
+ * @brief Get multiple rows from the model given by an interval [from_row,
806
+ * to_row]
807
+ */
808
+ HighsStatus getRows(
809
+ const HighsInt
810
+ from_row, //!< The index of the first row to get from the model
811
+ const HighsInt
812
+ to_row, //!< The index of the last row to get from the model
813
+ HighsInt& num_row, //!< Number of rows got from the model
814
+ double* lower, //!< Array of size num_row with lower bounds
815
+ double* upper, //!< Array of size num_row with upper bounds
816
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
817
+ HighsInt*
818
+ start, //!< Array of size num_row with start indices of the rows
819
+ HighsInt*
820
+ index, //!< Array of size num_nz with column indices for the rows
821
+ double* value //!< Array of size num_nz with column values for the rows
822
+ ) const;
823
+
824
+ /**
825
+ * @brief Get multiple rows from the model given by a set
826
+ */
827
+ HighsStatus getRows(
828
+ const HighsInt num_set_entries, //!< The number of indices in the set
829
+ const HighsInt*
830
+ set, //!< Array of size num_set_entries with indices of rows to get
831
+ HighsInt& num_row, //!< Number of rows got from the model
832
+ double* lower, //!< Array of size num_row with lower bounds
833
+ double* upper, //!< Array of size num_row with upper bounds
834
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
835
+ HighsInt*
836
+ start, //!< Array of size num_row with start indices of the rows
837
+ HighsInt*
838
+ index, //!< Array of size num_nz with column indices for the rows
839
+ double* value //!< Array of size num_nz with column values for the rows
840
+ ) const;
841
+
842
+ /**
843
+ * @brief Get multiple rows from the model given by a mask
844
+ */
845
+ HighsStatus getRows(
846
+ const HighsInt* mask, //!< Full length array with 1 => get; 0 => not
847
+ HighsInt& num_row, //!< Number of rows got from the model
848
+ double* lower, //!< Array of size num_row with lower bounds
849
+ double* upper, //!< Array of size num_row with upper bounds
850
+ HighsInt& num_nz, //!< Number of nonzeros got from the model
851
+ HighsInt*
852
+ start, //!< Array of size num_row with start indices of the rows
853
+ HighsInt*
854
+ index, //!< Array of size num_nz with column indices for the rows
855
+ double* value //!< Array of size num_nz with column values for the rows
856
+ ) const;
857
+
858
+ /**
859
+ * @brief Get a row name from the incumbent model
860
+ */
861
+ HighsStatus getRowName(const HighsInt row, std::string& name) const;
862
+
863
+ /**
864
+ * @brief Get row index corresponding to name
865
+ */
866
+ HighsStatus getRowByName(const std::string& name, HighsInt& row);
867
+
868
+ /**
869
+ * @brief Get a matrix coefficient
870
+ */
871
+ HighsStatus getCoeff(const HighsInt row, const HighsInt col,
872
+ double& value) const;
873
+
874
+ /**
875
+ * @brief Write out the incumbent model to a file
876
+ */
877
+ HighsStatus writeModel(const std::string& filename = "");
878
+
879
+ /**
880
+ * @brief Write out the incumbent presolved model to a file
881
+ */
882
+ HighsStatus writePresolvedModel(const std::string& filename = "");
883
+
884
+ /**
885
+ * @brief Write out the internal IIS LP instance to a file
886
+ */
887
+ HighsStatus writeIisModel(const std::string& filename = "");
888
+
889
+ /**
890
+ * @brief Write out the given model to a file
891
+ */
892
+ HighsStatus writeLocalModel(HighsModel& model,
893
+ const std::string& filename = "");
894
+
895
+ /**
896
+ * @brief Write out the internal HighsBasis instance to a file
897
+ */
898
+ HighsStatus writeBasis(const std::string& filename = "");
899
+
900
+ /**
901
+ * Methods for incumbent model modification
902
+ */
903
+
904
+ /**
905
+ * @brief Change the objective sense of the incumbent model
906
+ */
907
+ HighsStatus changeObjectiveSense(const ObjSense sense);
908
+
909
+ /**
910
+ * @brief Change the objective offset of the incumbent model
911
+ */
912
+ HighsStatus changeObjectiveOffset(const double offset);
913
+
914
+ /**
915
+ * @brief Change the integrality of a column
916
+ */
917
+ HighsStatus changeColIntegrality(const HighsInt col,
918
+ const HighsVarType integrality);
919
+
920
+ /**
921
+ * @brief Change the integrality of multiple columns given by an
922
+ * interval [from_col, to_col]
923
+ */
924
+ HighsStatus changeColsIntegrality(const HighsInt from_col,
925
+ const HighsInt to_col,
926
+ const HighsVarType* integrality);
927
+
928
+ /**
929
+ * @brief Change the integrality of multiple columns given by a set of indices
930
+ */
931
+ HighsStatus changeColsIntegrality(const HighsInt num_set_entries,
932
+ const HighsInt* set,
933
+ const HighsVarType* integrality);
934
+
935
+ /**
936
+ * @brief Change the integrality of multiple columns given by a mask
937
+ * (full length array with 1 => change; 0 => not)
938
+ */
939
+ HighsStatus changeColsIntegrality(const HighsInt* mask,
940
+ const HighsVarType* integrality);
941
+
942
+ /**
943
+ * @brief Clear the integrality of all columns
944
+ */
945
+ HighsStatus clearIntegrality() {
946
+ this->model_.lp_.integrality_.clear();
947
+ return HighsStatus::kOk;
948
+ }
949
+
950
+ /**
951
+ * @brief Change the cost of a column
952
+ */
953
+ HighsStatus changeColCost(const HighsInt col, const double cost);
954
+
955
+ /**
956
+ * @brief Change the cost of multiple columns given by an interval [from_col,
957
+ * to_col]
958
+ */
959
+ HighsStatus changeColsCost(const HighsInt from_col, const HighsInt to_col,
960
+ const double* cost);
961
+
962
+ /**
963
+ * @brief Change the cost of multiple columns given by a set of indices
964
+ */
965
+ HighsStatus changeColsCost(const HighsInt num_set_entries,
966
+ const HighsInt* set, const double* cost);
967
+
968
+ /**
969
+ * @brief Change the cost of multiple columns given by a mask
970
+ * (full length array with 1 => change; 0 => not)
971
+ */
972
+ HighsStatus changeColsCost(const HighsInt* mask, const double* cost);
973
+
974
+ /**
975
+ * @brief Change the bounds of a column
976
+ */
977
+ HighsStatus changeColBounds(const HighsInt col, const double lower,
978
+ const double upper);
979
+
980
+ /**
981
+ * @brief Change the bounds of multiple columns given by an interval
982
+ * [from_col, to_col]
983
+ */
984
+ HighsStatus changeColsBounds(const HighsInt from_col, const HighsInt to_col,
985
+ const double* lower, const double* upper);
986
+
987
+ /**
988
+ * @brief Change the bounds of multiple columns given by a set of indices
989
+ */
990
+ HighsStatus changeColsBounds(const HighsInt num_set_entries,
991
+ const HighsInt* set, const double* lower,
992
+ const double* upper);
993
+
994
+ /**
995
+ * @brief Change the cost of multiple columns given by a mask (full
996
+ * length array with 1 => change; 0 => not)
997
+ */
998
+ HighsStatus changeColsBounds(const HighsInt* mask, const double* lower,
999
+ const double* upper);
1000
+
1001
+ /**
1002
+ * @brief Change the bounds of a row
1003
+ */
1004
+ HighsStatus changeRowBounds(const HighsInt row, const double lower,
1005
+ const double upper);
1006
+
1007
+ /**
1008
+ * @brief Change the bounds of multiple rows given by an interval [from_row,
1009
+ * to_row]
1010
+ */
1011
+ HighsStatus changeRowsBounds(const HighsInt from_row, const HighsInt to_row,
1012
+ const double* lower, const double* upper);
1013
+
1014
+ /**
1015
+ * @brief Change the bounds of multiple rows given by a set of indices
1016
+ */
1017
+ HighsStatus changeRowsBounds(const HighsInt num_set_entries,
1018
+ const HighsInt* set, const double* lower,
1019
+ const double* upper);
1020
+
1021
+ /**
1022
+ * @brief Change the cost of multiple rows given by a mask (full
1023
+ * length array with 1 => change; 0 => not)
1024
+ */
1025
+ HighsStatus changeRowsBounds(const HighsInt* mask, const double* lower,
1026
+ const double* upper);
1027
+
1028
+ /**
1029
+ * @brief Change a matrix coefficient
1030
+ */
1031
+ HighsStatus changeCoeff(const HighsInt row, const HighsInt col,
1032
+ const double value);
1033
+ /**
1034
+ * @brief Sets the constraint matrix format of the incumbent model
1035
+ */
1036
+ HighsStatus setMatrixFormat(const MatrixFormat desired_format) {
1037
+ this->model_.lp_.setFormat(desired_format);
1038
+ return HighsStatus::kOk;
1039
+ }
1040
+
1041
+ /**
1042
+ * @brief Adds a variable to the incumbent model, without the matrix
1043
+ * coefficients if num_new_nz = 0, in which case indices and values
1044
+ * arrays can be nullptr
1045
+ */
1046
+ HighsStatus addCol(const double cost, const double lower, const double upper,
1047
+ const HighsInt num_new_nz, const HighsInt* indices,
1048
+ const double* values);
1049
+
1050
+ /**
1051
+ * @brief Adds multiple columns to the incumbent model, without the matrix
1052
+ * coefficients if num_new_nz = 0, in which case column-wise starts,
1053
+ * indices and values arrays can be nullptr
1054
+ */
1055
+ HighsStatus addCols(const HighsInt num_new_col, const double* cost,
1056
+ const double* lower, const double* upper,
1057
+ const HighsInt num_new_nz, const HighsInt* starts,
1058
+ const HighsInt* indices, const double* values);
1059
+
1060
+ /**
1061
+ * @brief Adds a variable to the incumbent model, without the cost or matrix
1062
+ * coefficients
1063
+ */
1064
+ HighsStatus addVar(const double lower = 0, const double upper = kHighsInf) {
1065
+ return this->addVars(1, &lower, &upper);
1066
+ }
1067
+
1068
+ /**
1069
+ * @brief Adds multiple variables to the incumbent model, without the costs or
1070
+ * matrix coefficients
1071
+ */
1072
+ HighsStatus addVars(const HighsInt num_new_var, const double* lower,
1073
+ const double* upper);
1074
+
1075
+ /**
1076
+ * @brief Add a row to the incumbent model, without the matrix coefficients if
1077
+ * num_new_nz = 0, in which case indices and values arrays can be
1078
+ * nullptr
1079
+ */
1080
+ HighsStatus addRow(const double lower, const double upper,
1081
+ const HighsInt num_new_nz, const HighsInt* indices,
1082
+ const double* values);
1083
+
1084
+ /**
1085
+ * @brief Adds multiple rows to the incumbent model, without the matrix
1086
+ * coefficients if num_new_nz = 0, in which case row-wise starts,
1087
+ * indices and values arrays can be nullptr
1088
+ */
1089
+ HighsStatus addRows(const HighsInt num_new_row, const double* lower,
1090
+ const double* upper, const HighsInt num_new_nz,
1091
+ const HighsInt* starts, const HighsInt* indices,
1092
+ const double* values);
1093
+
1094
+ HighsStatus ensureColwise() {
1095
+ this->model_.lp_.ensureColwise();
1096
+ return HighsStatus::kOk;
1097
+ }
1098
+
1099
+ HighsStatus ensureRowwise() {
1100
+ this->model_.lp_.ensureRowwise();
1101
+ return HighsStatus::kOk;
1102
+ }
1103
+
1104
+ /**
1105
+ * @brief Delete multiple columns from the incumbent model given by an
1106
+ * interval [from_col, to_col]
1107
+ */
1108
+ HighsStatus deleteCols(const HighsInt from_col, const HighsInt to_col);
1109
+
1110
+ /**
1111
+ * @brief Delete multiple columns from the incumbent model given by a set
1112
+ */
1113
+ HighsStatus deleteCols(const HighsInt num_set_entries, const HighsInt* set);
1114
+
1115
+ /**
1116
+ * @brief Delete multiple columns from the incumbent model given by
1117
+ * a mask (full length array with 1 => delete; 0 => keep). New index
1118
+ * of any column kept is returned in place of the value 0. For
1119
+ * deleted columns, a value of -1 is returned.
1120
+ */
1121
+ HighsStatus deleteCols(HighsInt* mask);
1122
+
1123
+ /**
1124
+ * @brief Delete multiple variables from the incumbent model given by an
1125
+ * interval [from_var, to_var]
1126
+ */
1127
+ HighsStatus deleteVars(const HighsInt from_var, const HighsInt to_var) {
1128
+ return deleteCols(from_var, to_var);
1129
+ }
1130
+
1131
+ /**
1132
+ * @brief Delete multiple variables from the incumbent model given by a set
1133
+ */
1134
+ HighsStatus deleteVars(const HighsInt num_set_entries, const HighsInt* set) {
1135
+ return deleteCols(num_set_entries, set);
1136
+ }
1137
+
1138
+ /**
1139
+ * @brief Delete multiple variables from the incumbent model given
1140
+ * by a mask (full length array with 1 => delete; 0 => keep). New
1141
+ * index of any variable not deleted is returned in place of the
1142
+ * value 0. For deleted variables, a value of -1 is returned.
1143
+ */
1144
+ HighsStatus deleteVars(HighsInt* mask) { return deleteCols(mask); }
1145
+
1146
+ /**
1147
+ * @brief Delete multiple rows from the incumbent model given by an interval
1148
+ * [from_row, to_row]
1149
+ */
1150
+ HighsStatus deleteRows(const HighsInt from_row, const HighsInt to_row);
1151
+
1152
+ /**
1153
+ * @brief Delete multiple rows from the incumbent model given by a set
1154
+ */
1155
+ HighsStatus deleteRows(const HighsInt num_set_entries, const HighsInt* set);
1156
+
1157
+ /**
1158
+ * @brief Delete multiple rows from the incumbent model given by a
1159
+ * mask (full length array with 1 => delete; 0 => keep). New index
1160
+ * of any row not deleted is returned in place of the value 0. For
1161
+ * deleted rows, a value of -1 is returned.
1162
+ */
1163
+ HighsStatus deleteRows(HighsInt* mask);
1164
+
1165
+ /**
1166
+ * @brief Scale a matrix column (and cost) by a constant - flipping bounds if
1167
+ * the constant is negative
1168
+ */
1169
+ HighsStatus scaleCol(const HighsInt col, const double scale_value);
1170
+
1171
+ /**
1172
+ * @brief Scale a matrix row by a constant - flipping bounds if the constant
1173
+ * is negative
1174
+ */
1175
+ HighsStatus scaleRow(const HighsInt row, const double scale_value);
1176
+
1177
+ /**
1178
+ * Other methods for specialist applications
1179
+ */
1180
+
1181
+ /**
1182
+ * Methods for setting basis_ and solution_
1183
+ */
1184
+
1185
+ /**
1186
+ * @brief Pass a HighsSolution instance to set the internal
1187
+ * HighsSolution instance. If any of col_value, col_dual and
1188
+ * row_dual is not set, the internal HighsSolution instance is not
1189
+ * updated
1190
+ */
1191
+ HighsStatus setSolution(const HighsSolution& solution);
1192
+
1193
+ /**
1194
+ * @brief Pass a sparse primal solution
1195
+ */
1196
+ HighsStatus setSolution(const HighsInt num_entries, const HighsInt* index,
1197
+ const double* value);
1198
+
1199
+ /**
1200
+ * @brief Set the callback method to use for HiGHS
1201
+ */
1202
+ HighsStatus setCallback(HighsCallbackFunctionType user_callback,
1203
+ void* user_callback_data = nullptr);
1204
+ HighsStatus setCallback(HighsCCallbackType c_callback,
1205
+ void* user_callback_data = nullptr);
1206
+
1207
+ /**
1208
+ * @brief Start callback of given type
1209
+ */
1210
+ HighsStatus startCallback(const int callback_type);
1211
+ HighsStatus startCallback(const HighsCallbackType callback_type);
1212
+
1213
+ /**
1214
+ * @brief Stop callback of given type
1215
+ */
1216
+ HighsStatus stopCallback(const int callback_type);
1217
+ HighsStatus stopCallback(const HighsCallbackType callback_type);
1218
+
1219
+ /**
1220
+ * @brief Use the HighsBasis passed to set the internal HighsBasis
1221
+ * instance. The origin string is used to identify the source of the
1222
+ * HighsBasis instance.
1223
+ */
1224
+ HighsStatus setBasis(const HighsBasis& basis, const std::string& origin = "");
1225
+
1226
+ /**
1227
+ * @brief Clear the internal HighsBasis instance
1228
+ */
1229
+ HighsStatus setBasis();
1230
+
1231
+ /**
1232
+ * @brief Return a const reference to the internal sub-solver call and time
1233
+ * instance
1234
+ */
1235
+ const HighsSubSolverCallTime& getSubSolverCallTime() const {
1236
+ return sub_solver_call_time_;
1237
+ }
1238
+
1239
+ /**
1240
+ * @brief Report internal sub-solver call and time instance
1241
+ */
1242
+ void reportSubSolverCallTime() const;
1243
+
1244
+ /**
1245
+ * @brief Initialise the internal sub-solver call and time instance
1246
+ */
1247
+ void initialiseSubSolverCallTime() {
1248
+ this->sub_solver_call_time_.initialise();
1249
+ }
1250
+
1251
+ /**
1252
+ * @brief Run IPX crossover from a given HighsSolution instance and,
1253
+ * if successful, set the internal HighsBasis and HighsSolution
1254
+ * instance
1255
+ */
1256
+ HighsStatus crossover(const HighsSolution& user_solution);
1257
+
1258
+ /**
1259
+ * @brief Open a named log file
1260
+ */
1261
+ HighsStatus openLogFile(const std::string& log_file = "");
1262
+
1263
+ /**
1264
+ * @brief Close any open log file
1265
+ */
1266
+ HighsStatus closeLogFile();
1267
+
1268
+ /**
1269
+ * @brief Interpret common qualifiers to string values
1270
+ */
1271
+ std::string presolveStatusToString(
1272
+ const HighsPresolveStatus presolve_status) const;
1273
+ std::string modelStatusToString(const HighsModelStatus model_status) const;
1274
+ std::string solutionStatusToString(const HighsInt solution_status) const;
1275
+ std::string basisStatusToString(const HighsBasisStatus basis_status) const;
1276
+ std::string basisValidityToString(const HighsInt basis_validity) const;
1277
+ std::string presolveRuleTypeToString(const HighsInt presolve_rule) const;
1278
+
1279
+ /**
1280
+ * @brief Releases all resources held by the global scheduler instance. It is
1281
+ * not thread-safe to call this function while calling run() or presolve() on
1282
+ * any other Highs instance in any thread. After this function has terminated
1283
+ * it is guaranteed that eventually all previously created scheduler threads
1284
+ * will terminate and allocated memory will be released. After this function
1285
+ * has returned the option value for the number of threads may be altered to a
1286
+ * new value before the next call to run() or presolve(). If the given bool
1287
+ * parameter has value true, then the function will not return until all
1288
+ * memory is freed, which might be desirable when debugging heap memory but
1289
+ * requires the calling thread to wait for all scheduler threads to wake-up
1290
+ * which is usually not necessary.
1291
+ */
1292
+ static void resetGlobalScheduler(bool blocking = false);
1293
+
1294
+ // Start of advanced methods: only for internal use!
1295
+
1296
+ // Nested methods below Highs::run()
1297
+ //
1298
+ // See highs/HighsRun.md
1299
+ HighsStatus optimizeHighs();
1300
+ HighsStatus optimizeModel();
1301
+ HighsStatus calledOptimizeModel();
1302
+ // Used in MIP solver as minimal LP solve
1303
+ HighsStatus optimizeLp();
1304
+
1305
+ const HighsSimplexStats& getSimplexStats() const {
1306
+ return ekk_instance_.getSimplexStats();
1307
+ }
1308
+ void reportSimplexStats(FILE* file) const {
1309
+ ekk_instance_.reportSimplexStats(file);
1310
+ }
1311
+
1312
+ /**
1313
+ * @brief Put a copy of the current iterate - basis; invertible
1314
+ * representation and dual edge weights - into storage within
1315
+ * HSimplexNla. Advanced method: for HiGHS MIP solver
1316
+ */
1317
+ HighsStatus putIterate();
1318
+
1319
+ /**
1320
+ * @brief Get a copy of the iterate stored within HSimplexNla and
1321
+ * overwrite the current iterate. Advanced method: for HiGHS MIP
1322
+ * solver
1323
+ */
1324
+ HighsStatus getIterate();
1325
+
1326
+ /**
1327
+ * @brief Get the dual edge weights (steepest/devex) in the order of
1328
+ * the basic indices or nullptr when they are not available.
1329
+ */
1330
+ const double* getDualEdgeWeights() const {
1331
+ return ekk_instance_.status_.has_dual_steepest_edge_weights
1332
+ ? ekk_instance_.dual_edge_weight_.data()
1333
+ : nullptr;
1334
+ }
1335
+
1336
+ /**
1337
+ * @brief Gets the internal basic variable index array in the order
1338
+ * corresponding to calls to getBasisInverseRow, getBasisInverseCol,
1339
+ * getBasisSolve, getBasisTransposeSolve, getReducedRow and getReducedColumn.
1340
+ * Entries are indices of columns if in [0,num_col), and entries in [num_col,
1341
+ * num_col+num_row) are (num_col+row_index).
1342
+ */
1343
+ const HighsInt* getBasicVariablesArray() const;
1344
+
1345
+ /**
1346
+ * @brief Form a row of \f$B^{-1}\f$ for basis matrix \f$B\f$,
1347
+ * returning the result in the given HVector buffer which is
1348
+ * expected to be setup with dimension num_row. The buffers
1349
+ * previous contents will be overwritten.
1350
+ */
1351
+ HighsStatus getBasisInverseRowSparse(const HighsInt row,
1352
+ HVector& row_ep_buffer);
1353
+
1354
+ /**
1355
+ * @brief Get the primal simplex phase 1 dual values. Advanced
1356
+ * method: for HiGHS IIS calculation
1357
+ */
1358
+ const std::vector<double>& getPrimalPhase1Dual() const {
1359
+ return ekk_instance_.primal_phase1_dual_;
1360
+ }
1361
+
1362
+ /**
1363
+ * @brief Generalisation of getColName and getRowName. Advanced
1364
+ * method: for HiGHS C++ and C API
1365
+ */
1366
+ HighsStatus getColOrRowName(const HighsLp& lp, const bool is_col,
1367
+ const HighsInt index, std::string& name) const;
1368
+
1369
+ /**
1370
+ * @brief Development methods
1371
+ */
1372
+ HighsInt defineClock(const char* name) {
1373
+ return this->timer_.clock_def(name);
1374
+ }
1375
+ void writeAllClocks() { this->timer_.writeAllClocks(); }
1376
+ HighsStatus clearModelNames() {
1377
+ this->model_.lp_.col_names_.clear();
1378
+ this->model_.lp_.row_names_.clear();
1379
+ return HighsStatus::kOk;
1380
+ }
1381
+
1382
+ // Start of deprecated methods
1383
+
1384
+ std::string compilationDate() const { return "deprecated"; }
1385
+
1386
+ HighsStatus setLogCallback(void (*user_log_callback)(HighsLogType,
1387
+ const char*, void*),
1388
+ void* user_log_callback_data = nullptr);
1389
+
1390
+ HighsInt getNumCols() const {
1391
+ deprecationMessage("getNumCols", "getNumCol");
1392
+ return getNumCol();
1393
+ }
1394
+ HighsInt getNumRows() const {
1395
+ deprecationMessage("getNumRows", "getNumRow");
1396
+ return getNumRow();
1397
+ }
1398
+ HighsInt getNumEntries() {
1399
+ deprecationMessage("getNumEntries", "getNumNz");
1400
+ return getNumNz();
1401
+ }
1402
+
1403
+ HighsStatus setHighsOptionValue(const std::string& option, const bool value);
1404
+
1405
+ HighsStatus setHighsOptionValue(const std::string& option,
1406
+ const HighsInt value);
1407
+
1408
+ #ifdef HIGHSINT64
1409
+ HighsStatus setHighsOptionValue(const std::string& option,
1410
+ const int value //!< The option value
1411
+ ) {
1412
+ deprecationMessage("setHighsOptionValue", "setOptionValue");
1413
+ return setOptionValue(option, HighsInt{value});
1414
+ }
1415
+ #endif
1416
+
1417
+ HighsStatus setHighsOptionValue(const std::string& option,
1418
+ const double value);
1419
+
1420
+ HighsStatus setHighsOptionValue(
1421
+ const std::string& option,
1422
+ const std::string& value //!< The option value
1423
+ );
1424
+
1425
+ HighsStatus setHighsOptionValue(const std::string& option, const char* value);
1426
+
1427
+ HighsStatus readHighsOptions(const std::string& filename //!< The filename
1428
+ );
1429
+
1430
+ HighsStatus passHighsOptions(const HighsOptions& options //!< The options
1431
+ );
1432
+
1433
+ HighsStatus getHighsOptionValue(const std::string& option, bool& value);
1434
+
1435
+ HighsStatus getHighsOptionValue(const std::string& option, HighsInt& value);
1436
+
1437
+ HighsStatus getHighsOptionValue(const std::string& option, double& value);
1438
+
1439
+ HighsStatus getHighsOptionValue(const std::string& option,
1440
+ std::string& value);
1441
+
1442
+ HighsStatus getHighsOptionType(const std::string& option,
1443
+ HighsOptionType& type //!< The option type
1444
+ );
1445
+
1446
+ const HighsOptions& getHighsOptions() const;
1447
+
1448
+ HighsStatus resetHighsOptions();
1449
+
1450
+ HighsStatus writeHighsOptions(const std::string& filename, //!< The filename
1451
+ const bool report_only_deviations = true);
1452
+
1453
+ HighsInt getSimplexIterationCount() {
1454
+ deprecationMessage("getSimplexIterationCount", "None");
1455
+ return info_.simplex_iteration_count;
1456
+ }
1457
+
1458
+ HighsStatus setHighsLogfile(FILE* logfile = nullptr);
1459
+
1460
+ HighsStatus setHighsOutput(FILE* output = nullptr);
1461
+
1462
+ const HighsInfo& getHighsInfo() const;
1463
+
1464
+ HighsStatus getHighsInfoValue(const std::string& info, HighsInt& value);
1465
+
1466
+ HighsStatus getHighsInfoValue(const std::string& info,
1467
+ double& value) const; //!< The info value
1468
+
1469
+ HighsStatus writeHighsInfo(const std::string& filename //!< The filename
1470
+ );
1471
+
1472
+ double getHighsInfinity();
1473
+
1474
+ double getHighsRunTime();
1475
+
1476
+ const HighsModelStatus& getModelStatus(const bool scaled_model) const;
1477
+
1478
+ void logHeader();
1479
+
1480
+ void deprecationMessage(const std::string& method_name,
1481
+ const std::string& alt_method_name) const;
1482
+
1483
+ /**
1484
+ * @brief Get the hot start basis data from the most recent simplex
1485
+ * solve. Advanced method: for HiGHS MIP solver
1486
+ */
1487
+ const HotStart& getHotStart() const { return ekk_instance_.hot_start_; }
1488
+
1489
+ /**
1490
+ * @brief Set up for simplex using the supplied hot start
1491
+ * data. Advanced method: for HiGHS MIP solver
1492
+ */
1493
+ HighsStatus setHotStart(const HotStart& hot_start) {
1494
+ this->deprecationMessage("setHotStart", "None");
1495
+ return HighsStatus::kError;
1496
+ }
1497
+
1498
+ /**
1499
+ * @brief Freeze the current internal HighsBasis instance and
1500
+ * standard NLA, returning a value to be used to recover this basis
1501
+ * and standard NLA at minimal cost. Advanced method: for HiGHS MIP
1502
+ * solver
1503
+ */
1504
+ HighsStatus freezeBasis(HighsInt& frozen_basis_id) {
1505
+ this->deprecationMessage("freezeBasis", "None");
1506
+ return HighsStatus::kError;
1507
+ }
1508
+
1509
+ /**
1510
+ * @brief Unfreeze a frozen HighsBasis instance and standard NLA (if
1511
+ * possible). Advanced method: for HiGHS MIP solver
1512
+ */
1513
+ HighsStatus unfreezeBasis(const HighsInt frozen_basis_id) {
1514
+ this->deprecationMessage("unfreezeBasis", "None");
1515
+ return HighsStatus::kError;
1516
+ }
1517
+
1518
+ /**
1519
+ * @brief Check that all frozen basis data has been
1520
+ * cleared. Advanced method: for HiGHS MIP solver
1521
+ */
1522
+ HighsStatus frozenBasisAllDataClear() {
1523
+ this->deprecationMessage("frozenBasisAllDataClear", "None");
1524
+ return HighsStatus::kError;
1525
+ }
1526
+
1527
+ // End of deprecated methods
1528
+ private:
1529
+ HighsSolution solution_;
1530
+ HighsBasis basis_;
1531
+ ICrashInfo icrash_info_;
1532
+
1533
+ HighsModel model_;
1534
+ std::vector<HighsLinearObjective> multi_linear_objective_;
1535
+
1536
+ HighsModel presolved_model_;
1537
+ HighsTimer timer_;
1538
+
1539
+ HighsCallback callback_;
1540
+ HighsOptions options_;
1541
+ HighsInfo info_;
1542
+ HighsRanging ranging_;
1543
+ HighsIis iis_;
1544
+ std::vector<HighsObjectiveSolution> saved_objective_and_solution_;
1545
+
1546
+ HighsPresolveStatus model_presolve_status_ =
1547
+ HighsPresolveStatus::kNotPresolved;
1548
+ HighsModelStatus model_status_ = HighsModelStatus::kNotset;
1549
+
1550
+ bool standard_form_valid_;
1551
+ double standard_form_offset_;
1552
+ std::vector<double> standard_form_cost_;
1553
+ std::vector<double> standard_form_rhs_;
1554
+ HighsSparseMatrix standard_form_matrix_;
1555
+
1556
+ HEkk ekk_instance_;
1557
+
1558
+ HighsPresolveLog presolve_log_;
1559
+
1560
+ HighsSubSolverCallTime sub_solver_call_time_;
1561
+
1562
+ HighsInt max_threads = 0;
1563
+ // This is strictly for debugging. It's used to check whether
1564
+ // returnFromOptimizeModel() was called after the previous call to
1565
+ // Highs::optimizeModel() and, assuming that this is always done, it checks
1566
+ // whether Highs::optimizeModel() is called recursively.
1567
+ bool called_return_from_optimize_model = true;
1568
+ HighsInt debug_optimize_call_num_ = 0;
1569
+
1570
+ bool written_log_header_ = false;
1571
+
1572
+ void reportModelStats() const;
1573
+
1574
+ void exactResizeModel() {
1575
+ this->model_.lp_.exactResize();
1576
+ this->model_.hessian_.exactResize();
1577
+ }
1578
+
1579
+ HighsStatus completeSolutionFromDiscreteAssignment();
1580
+
1581
+ HighsStatus callSolveLp(HighsLp& lp, const string message);
1582
+ HighsStatus callSolveQp();
1583
+ HighsStatus callSolveMip();
1584
+ HighsStatus callRunPostsolve(const HighsSolution& solution,
1585
+ const HighsBasis& basis);
1586
+
1587
+ PresolveComponent presolve_;
1588
+ HighsPresolveStatus runPresolve(const bool force_lp_presolve,
1589
+ const bool force_presolve = false);
1590
+ HighsPostsolveStatus runPostsolve();
1591
+
1592
+ HighsStatus openWriteFile(const string filename, const string method_name,
1593
+ FILE*& file, HighsFileType& file_type) const;
1594
+
1595
+ void reportModel(const HighsModel& model);
1596
+ void newHighsBasis();
1597
+ void forceHighsSolutionBasisSize();
1598
+ //
1599
+ // For cases where there is no solution data for the model, but its
1600
+ // status is proved otherwise. Sets the model status, then clears any solution
1601
+ // and basis data
1602
+ void setHighsModelStatusAndClearSolutionAndBasis(
1603
+ const HighsModelStatus model_status);
1604
+
1605
+ // Clears derived model properties (like any presolved model,
1606
+ // standard form LP, and ray information) that (unlike solution and
1607
+ // basis) cannot be updated
1608
+ void clearDerivedModelProperties();
1609
+
1610
+ // Clears the presolved model and its status
1611
+ void clearPresolve();
1612
+
1613
+ // Clears the standard form LP
1614
+ void clearStandardFormLp();
1615
+
1616
+ // Clears the ray records
1617
+ void clearRayRecords() { this->ekk_instance_.clearRayRecords(); }
1618
+ //
1619
+ // Methods to clear solver data for users in Highs class members
1620
+ // before (possibly) updating them with data from trying to solve
1621
+ // the incumbent model.
1622
+ //
1623
+ // Invalidates all solver data in Highs class members by calling
1624
+ // invalidateModelStatus(), invalidateSolution(), invalidateBasis(),
1625
+ // invalidateRanging(), invalidateInfo(), invalidateEkk() and
1626
+ // clearIis()
1627
+ void invalidateSolverData();
1628
+
1629
+ // Invalidates all solver dual data in Highs class members by calling
1630
+ // invalidateModelStatus(), invalidateRanging(), and invalidateInfo()
1631
+ //
1632
+ // Used when only the objective changes
1633
+ void invalidateSolverDualData();
1634
+ //
1635
+ // Invalidates the model status, solution_ and info_
1636
+ void invalidateModelStatusSolutionAndInfo();
1637
+ //
1638
+ // Invalidates the model status and info_
1639
+ void invalidateModelStatusAndInfo();
1640
+ //
1641
+ // Sets model status to HighsModelStatus::kNotset
1642
+ void invalidateModelStatus();
1643
+ //
1644
+ // Invalidates primal and dual solution
1645
+ void invalidateSolution();
1646
+ //
1647
+ // Invalidates basis
1648
+ void invalidateBasis();
1649
+ //
1650
+ // Invalidates info_ and resets the values of its members
1651
+ void invalidateInfo();
1652
+ //
1653
+ // Invalidates ranging_
1654
+ void invalidateRanging();
1655
+
1656
+ // Invalidates ekk_instance_
1657
+ void invalidateEkk();
1658
+
1659
+ // Clears iis_
1660
+ void clearIis();
1661
+
1662
+ HighsStatus returnFromWriteSolution(FILE* file,
1663
+ const HighsStatus return_status);
1664
+ HighsStatus returnFromOptimizeModel(const HighsStatus return_status,
1665
+ const bool undo_mods);
1666
+ HighsStatus returnFromHighs(const HighsStatus return_status);
1667
+ void reportSolvedLpQpStats();
1668
+
1669
+ // Interface methods
1670
+ HighsStatus formStandardFormLp();
1671
+ HighsStatus basisForSolution();
1672
+ HighsStatus addColsInterface(
1673
+ HighsInt ext_num_new_col, const double* ext_col_cost,
1674
+ const double* ext_col_lower, const double* ext_col_upper,
1675
+ HighsInt ext_num_new_nz, const HighsInt* ext_a_start,
1676
+ const HighsInt* ext_a_index, const double* ext_a_value);
1677
+
1678
+ HighsStatus addRowsInterface(HighsInt ext_num_new_row,
1679
+ const double* ext_row_lower,
1680
+ const double* ext_row_upper,
1681
+ HighsInt ext_num_new_nz,
1682
+ const HighsInt* ext_ar_start,
1683
+ const HighsInt* ext_ar_index,
1684
+ const double* ext_ar_value);
1685
+
1686
+ void deleteColsInterface(HighsIndexCollection& index_collection);
1687
+
1688
+ void deleteRowsInterface(HighsIndexCollection& index_collection);
1689
+
1690
+ void getColsInterface(const HighsIndexCollection& index_collection,
1691
+ HighsInt& num_col, double* cost, double* lower,
1692
+ double* upper, HighsInt& num_nz, HighsInt* start,
1693
+ HighsInt* index, double* value) const;
1694
+
1695
+ void getRowsInterface(const HighsIndexCollection& index_collection,
1696
+ HighsInt& num_row, double* lower, double* upper,
1697
+ HighsInt& num_nz, HighsInt* start, HighsInt* index,
1698
+ double* value) const;
1699
+
1700
+ void getCoefficientInterface(const HighsInt ext_row, const HighsInt ext_col,
1701
+ double& value) const;
1702
+
1703
+ HighsStatus changeObjectiveSenseInterface(const ObjSense ext_sense);
1704
+ HighsStatus changeObjectiveOffsetInterface(const double ext_offset);
1705
+ HighsStatus changeIntegralityInterface(HighsIndexCollection& index_collection,
1706
+ const HighsVarType* usr_inegrality);
1707
+ HighsStatus changeCostsInterface(HighsIndexCollection& index_collection,
1708
+ const double* usr_col_cost);
1709
+
1710
+ bool feasibleWrtBounds(const bool columns = true) const;
1711
+ HighsStatus changeColBoundsInterface(HighsIndexCollection& index_collection,
1712
+ const double* usr_col_lower,
1713
+ const double* usr_col_upper);
1714
+ HighsStatus changeRowBoundsInterface(HighsIndexCollection& index_collection,
1715
+ const double* usr_row_lower,
1716
+ const double* usr_row_upper);
1717
+ void changeCoefficientInterface(const HighsInt ext_row,
1718
+ const HighsInt ext_col,
1719
+ const double ext_new_value);
1720
+ HighsStatus scaleColInterface(const HighsInt col, const double scale_value);
1721
+ HighsStatus scaleRowInterface(const HighsInt row, const double scale_value);
1722
+
1723
+ void setNonbasicStatusInterface(const HighsIndexCollection& index_collection,
1724
+ const bool columns);
1725
+ void appendNonbasicColsToBasisInterface(const HighsInt ext_num_new_col);
1726
+ void appendBasicRowsToBasisInterface(const HighsInt ext_num_new_row);
1727
+
1728
+ HighsStatus getBasicVariablesInterface(HighsInt* basic_variables);
1729
+ HighsStatus basisSolveInterface(const vector<double>& rhs,
1730
+ double* solution_vector,
1731
+ HighsInt* solution_num_nz,
1732
+ HighsInt* solution_indices, bool transpose);
1733
+
1734
+ void zeroIterationCounts();
1735
+
1736
+ HighsStatus getDualRayInterface(bool& has_dual_ray, double* dual_ray_value);
1737
+
1738
+ HighsStatus getPrimalRayInterface(bool& has_primal_ray,
1739
+ double* primal_ray_value);
1740
+ HighsStatus getRangingInterface();
1741
+
1742
+ HighsStatus getIisInterface();
1743
+ HighsStatus getIisInterfaceReturn(
1744
+ const HighsStatus return_status, const HighsOptions& original_options,
1745
+ const std::vector<bool>& original_callbacks);
1746
+
1747
+ HighsStatus elasticityFilterReturn(
1748
+ const HighsStatus return_status, const std::string& original_model_name,
1749
+ const HighsModelStatus original_model_status,
1750
+ const HighsInt original_num_col, const HighsInt original_num_row,
1751
+ const std::vector<double>& original_col_cost,
1752
+ const std::vector<double>& original_col_lower,
1753
+ const std::vector<double>& original_col_upper,
1754
+ const std::vector<HighsVarType>& original_integrality);
1755
+ HighsStatus elasticityFilter(const double global_lower_penalty,
1756
+ const double global_upper_penalty,
1757
+ const double global_rhs_penalty,
1758
+ const double* local_lower_penalty,
1759
+ const double* local_upper_penalty,
1760
+ const double* local_rhs_penalty,
1761
+ const bool get_iis = false);
1762
+ HighsStatus extractIis(HighsInt& num_iis_col, HighsInt& num_iis_row,
1763
+ HighsInt* iis_col_index, HighsInt* iis_row_index,
1764
+ HighsInt* iis_col_bound, HighsInt* iis_row_bound);
1765
+
1766
+ HighsStatus returnFromLexicographicOptimization(
1767
+ const HighsStatus return_status, HighsInt original_lp_num_row);
1768
+ HighsStatus multiobjectiveSolve();
1769
+
1770
+ bool aFormatOk(const HighsInt num_nz, const HighsInt format);
1771
+ bool qFormatOk(const HighsInt num_nz, const HighsInt format);
1772
+ void clearZeroHessian();
1773
+ HighsStatus checkOptimality(const std::string& solver_type);
1774
+ void callLpKktCheck(const HighsLp& lp, const std::string& message = "");
1775
+ HighsStatus invertRequirementError(std::string method_name) const;
1776
+
1777
+ HighsStatus handleInfCost();
1778
+ void restoreInfCost(HighsStatus& return_status);
1779
+ HighsStatus optionChangeAction();
1780
+
1781
+ HighsStatus userScale(HighsUserScaleData& data);
1782
+ HighsStatus userUnscale(HighsUserScaleData& data);
1783
+ HighsStatus userScaleModel(HighsUserScaleData& data);
1784
+ HighsStatus userScaleSolution(HighsUserScaleData& data,
1785
+ bool update_kkt = false);
1786
+
1787
+ HighsStatus computeIllConditioning(HighsIllConditioning& ill_conditioning,
1788
+ const bool constraint,
1789
+ const HighsInt method,
1790
+ const double ill_conditioning_bound);
1791
+ void formIllConditioningLp0(HighsLp& ill_conditioning_lp,
1792
+ std::vector<HighsInt>& basic_var,
1793
+ const bool constraint);
1794
+ void formIllConditioningLp1(HighsLp& ill_conditioning_lp,
1795
+ std::vector<HighsInt>& basic_var,
1796
+ const bool constraint,
1797
+ const double ill_conditioning_bound);
1798
+ bool infeasibleBoundsOk();
1799
+ bool validLinearObjective(const HighsLinearObjective& linear_objective,
1800
+ const HighsInt iObj) const;
1801
+ bool hasRepeatedLinearObjectivePriorities(
1802
+ const HighsLinearObjective* linear_objective = nullptr) const;
1803
+
1804
+ bool tryPdlpCleanup(HighsInt& pdlp_cleanup_iteration_limit,
1805
+ const HighsInfo& presolved_lp_info) const;
1806
+ };
1807
+
1808
+ // Start of deprecated methods not in the Highs class
1809
+
1810
+ const char* highsCompilationDate();
1811
+
1812
+ #endif