lpsolver 0.1.0 → 0.2.0

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 +70 -26
  4. data/ext/lpsolver/Makefile +273 -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 +28 -4
  1160. data/lib/lpsolver/native.so +0 -0
  1161. data/lib/lpsolver/native_model.rb +261 -0
  1162. data/lib/lpsolver/solution.rb +72 -7
  1163. data/lib/lpsolver/version.rb +1 -1
  1164. data/lpsolver.gemspec +4 -1
  1165. metadata +1176 -4
@@ -0,0 +1,1526 @@
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 ipm/IpxWrapper.cpp
9
+ * @brief
10
+ * @author Julian Hall, Ivet Galabova and Michael Feldmeier
11
+ */
12
+ #include "ipm/IpxWrapper.h"
13
+
14
+ #include <cassert>
15
+
16
+ #include "lp_data/HighsOptions.h"
17
+ #include "lp_data/HighsSolution.h"
18
+
19
+ using std::min;
20
+
21
+ HighsStatus solveLpIpx(HighsLpSolverObject& solver_object) {
22
+ return solveLpIpx(solver_object.options_, solver_object.timer_,
23
+ solver_object.lp_, solver_object.basis_,
24
+ solver_object.solution_, solver_object.model_status_,
25
+ solver_object.highs_info_, solver_object.callback_);
26
+ }
27
+
28
+ HighsStatus solveLpIpx(const HighsOptions& options, HighsTimer& timer,
29
+ const HighsLp& lp, HighsBasis& highs_basis,
30
+ HighsSolution& highs_solution,
31
+ HighsModelStatus& model_status, HighsInfo& highs_info,
32
+ HighsCallback& callback) {
33
+ // Use IPX to try to solve the LP
34
+ //
35
+ // Can return HighsModelStatus (HighsStatus) values:
36
+ //
37
+ // 1. kSolveError (kError) if various unlikely solution errors occur
38
+ //
39
+ // 2. kTimeLimit (kWarning) if time limit is reached
40
+ //
41
+ // 3. kIterationLimit (kWarning) if iteration limit is reached
42
+ //
43
+ // 4. kUnknown (kWarning) if IPM makes no progress or if
44
+ // IPM/crossover are imprecise
45
+ //
46
+ // 5. kInfeasible (kOk) if IPM identifies primal infeasibility
47
+ //
48
+ // 6. kUnboundedOrInfeasible (kOk) if IPM identifies dual
49
+ // infeasibility
50
+ //
51
+ // kOptimal (kOk) if IPM/crossover identify optimality
52
+ //
53
+ // With a non-error return, if just IPM has been run then a
54
+ // non-vertex primal solution is obtained; if crossover has been run
55
+ // then a basis and primal+dual solution are obtained.
56
+ //
57
+ //
58
+ // Indicate that there is no valid primal solution, dual solution or basis
59
+ highs_basis.valid = false;
60
+ highs_solution.value_valid = false;
61
+ highs_solution.dual_valid = false;
62
+ // Indicate that no imprecise solution has (yet) been found
63
+ resetModelStatusAndHighsInfo(model_status, highs_info);
64
+ // Create the LpSolver instance
65
+ ipx::LpSolver lps;
66
+ // Use the current HiGHS time as an offset for the lps.control_
67
+ // elapsed time
68
+ lps.setTimerOffset(timer.read());
69
+
70
+ // Set IPX parameters
71
+ //
72
+ // Cannot set internal IPX parameters directly since they are
73
+ // private, so create instance of parameters
74
+ ipx::Parameters parameters;
75
+ // Set IPX parameters from options
76
+ //
77
+ // Set display according to output
78
+ parameters.display = 1;
79
+ if (!options.output_flag | !options.log_to_console) parameters.display = 0;
80
+ // Modify parameters.debug according to log_dev_level
81
+ parameters.debug = 0;
82
+ if (options.log_dev_level == kHighsLogDevLevelDetailed) {
83
+ // Default options.log_dev_level setting is kHighsLogDevLevelNone, yielding
84
+ // default setting debug = 0
85
+ parameters.debug = 0;
86
+ } else if (options.log_dev_level == kHighsLogDevLevelInfo) {
87
+ parameters.debug = 2;
88
+ } else if (options.log_dev_level == kHighsLogDevLevelVerbose) {
89
+ parameters.debug = 4;
90
+ }
91
+ parameters.highs_logging = true;
92
+ parameters.timeless_log = options.timeless_log;
93
+ // Use this to change print_interval from default value (5s) to
94
+ // other value for debugging
95
+ //
96
+ // parameters.print_interval = 1e-4;
97
+ parameters.log_options = &options.log_options;
98
+ // Just test feasibility and optimality tolerances for now
99
+ // ToDo Set more parameters
100
+ //
101
+ // Translate dualization option
102
+ //
103
+ // parameters.dualize = -2 => Possibly dualize - Filippo style
104
+ // parameters.dualize = -1 => Possibly dualize - Lukas style
105
+ // parameters.dualize = 0 => No dualization
106
+ // parameters.dualize = 1 => Perform dualization
107
+ if (options.ipx_dualize_strategy == kIpxDualizeStrategyOn) {
108
+ parameters.dualize = 1;
109
+ } else if (options.ipx_dualize_strategy == kIpxDualizeStrategyOff) {
110
+ parameters.dualize = 0;
111
+ } else if (options.ipx_dualize_strategy == kIpxDualizeStrategyLukas) {
112
+ parameters.dualize = -1;
113
+ } else if (options.ipx_dualize_strategy == kIpxDualizeStrategyFilippo) {
114
+ parameters.dualize = -2;
115
+ } else {
116
+ assert(111 == 222);
117
+ }
118
+
119
+ parameters.ipm_feasibility_tol = min(options.primal_feasibility_tolerance,
120
+ options.dual_feasibility_tolerance);
121
+ parameters.ipm_optimality_tol = options.ipm_optimality_tolerance;
122
+ parameters.start_crossover_tol = options.start_crossover_tolerance;
123
+
124
+ if (options.kkt_tolerance != kDefaultKktTolerance) {
125
+ parameters.ipm_feasibility_tol = options.kkt_tolerance;
126
+ parameters.ipm_optimality_tol = 1e-1 * options.kkt_tolerance;
127
+ parameters.start_crossover_tol = 1e-1 * options.kkt_tolerance;
128
+ }
129
+
130
+ parameters.analyse_basis_data =
131
+ kHighsAnalysisLevelNlaData & options.highs_analysis_level;
132
+ // Now that the lps.control_ elapsed time includes the HiGHS time,
133
+ // can use the HiGHS time limit
134
+ parameters.time_limit = options.time_limit;
135
+ parameters.ipm_maxiter =
136
+ options.ipm_iteration_limit - highs_info.ipm_iteration_count;
137
+ // Determine if crossover is to be run or not
138
+ //
139
+ // When doing analytic centring calculations, crossover must not be
140
+ // run
141
+ if (options.run_centring) {
142
+ parameters.run_crossover = 0;
143
+ } else if (options.run_crossover == kHighsOnString) {
144
+ parameters.run_crossover = 1;
145
+ } else if (options.run_crossover == kHighsOffString) {
146
+ parameters.run_crossover = 0;
147
+ } else {
148
+ assert(options.run_crossover == kHighsChooseString);
149
+ parameters.run_crossover = -1;
150
+ }
151
+ if (!parameters.run_crossover) {
152
+ // If crossover is sure not to be run, then set crossover_start_ to
153
+ // -1 so that IPX can terminate according to its feasibility and
154
+ // optimality tolerances
155
+ parameters.start_crossover_tol = -1;
156
+ }
157
+
158
+ parameters.run_centring = options.run_centring ? 1 : 0;
159
+ parameters.max_centring_steps = options.max_centring_steps;
160
+ parameters.centring_ratio_tolerance = options.centring_ratio_tolerance;
161
+
162
+ // Set the internal IPX parameters
163
+ lps.SetParameters(parameters);
164
+
165
+ // Set pointer to any callback
166
+ lps.SetCallback(&callback);
167
+
168
+ ipx::Int num_col, num_row;
169
+ double offset;
170
+ std::vector<ipx::Int> Ap, Ai;
171
+ std::vector<double> objective, col_lb, col_ub, Av, rhs;
172
+ std::vector<char> constraint_type;
173
+ fillInIpxData(lp, num_col, num_row, offset, objective, col_lb, col_ub, Ap, Ai,
174
+ Av, rhs, constraint_type);
175
+ highsLogUser(options.log_options, HighsLogType::kInfo,
176
+ "IPX model has %" HIGHSINT_FORMAT " rows, %" HIGHSINT_FORMAT
177
+ " columns and %" HIGHSINT_FORMAT " nonzeros\n",
178
+ num_row, num_col, Ap[num_col]);
179
+
180
+ ipx::Int load_status = lps.LoadModel(
181
+ num_col, offset, objective.data(), col_lb.data(), col_ub.data(), num_row,
182
+ Ap.data(), Ai.data(), Av.data(), rhs.data(), constraint_type.data());
183
+
184
+ if (load_status) {
185
+ model_status = HighsModelStatus::kSolveError;
186
+ return HighsStatus::kError;
187
+ }
188
+
189
+ // Use IPX to solve the LP!
190
+ ipx::Int solve_status = lps.Solve();
191
+
192
+ const bool report_solve_data =
193
+ kHighsAnalysisLevelSolverSummaryData & options.highs_analysis_level;
194
+ // Get solver and solution information.
195
+ // Struct ipx_info defined in ipx/ipx_info.h
196
+ const ipx::Info ipx_info = lps.GetInfo();
197
+ if (report_solve_data) reportSolveData(options.log_options, ipx_info);
198
+ highs_info.ipm_iteration_count += (HighsInt)ipx_info.iter;
199
+ highs_info.crossover_iteration_count += (HighsInt)ipx_info.updates_crossover;
200
+
201
+ // If not solved...
202
+ if (solve_status != IPX_STATUS_solved) {
203
+ const HighsStatus solve_return_status =
204
+ reportIpxSolveStatus(options, solve_status, ipx_info.errflag);
205
+ // Return error if IPX solve error has occurred
206
+ if (solve_return_status == HighsStatus::kError) {
207
+ model_status = HighsModelStatus::kSolveError;
208
+ return HighsStatus::kError;
209
+ }
210
+ }
211
+ bool ipm_status = true;
212
+ const HighsStatus ipm_return_status =
213
+ reportIpxIpmCrossoverStatus(options, ipx_info.status_ipm, ipm_status);
214
+ ipm_status = false;
215
+ const HighsStatus crossover_return_status = reportIpxIpmCrossoverStatus(
216
+ options, ipx_info.status_crossover, ipm_status);
217
+ // Return error if IPX IPM or crossover error has occurred
218
+ if (ipm_return_status == HighsStatus::kError ||
219
+ crossover_return_status == HighsStatus::kError) {
220
+ model_status = HighsModelStatus::kSolveError;
221
+ return HighsStatus::kError;
222
+ }
223
+ // Should only reach here if Solve() returned IPX_STATUS_solved or
224
+ // IPX_STATUS_stopped
225
+ if (ipxStatusError(
226
+ solve_status != IPX_STATUS_solved &&
227
+ solve_status != IPX_STATUS_stopped,
228
+ options, "Ipx",
229
+ "solve_status should be solved or stopped here but value is",
230
+ (int)solve_status))
231
+ return HighsStatus::kError;
232
+
233
+ // Only error returns so far
234
+ //
235
+
236
+ if (solve_status == IPX_STATUS_stopped) {
237
+ // IPX stopped, so there's certainly no basic solution. Get the
238
+ // non-vertex solution, though. This needs the model status to
239
+ // know whether to worry about dual infeasibilities.
240
+ const HighsModelStatus local_model_status = HighsModelStatus::kUnknown;
241
+ getHighsNonVertexSolution(options, lp, num_col, num_row, rhs,
242
+ constraint_type, lps, local_model_status,
243
+ highs_solution);
244
+ //
245
+ // Look at the reason why IPX stopped
246
+ //
247
+ // Return error if stopped status settings occur that JAJH doesn't
248
+ // think should happen
249
+ //
250
+ //==============
251
+ // For crossover
252
+ //==============
253
+ if (illegalIpxStoppedCrossoverStatus(ipx_info, options))
254
+ return HighsStatus::kError;
255
+ // Can stop and reach time limit
256
+ if (ipx_info.status_crossover == IPX_STATUS_time_limit) {
257
+ model_status = HighsModelStatus::kTimeLimit;
258
+ return HighsStatus::kWarning;
259
+ }
260
+ //========
261
+ // For IPM
262
+ //========
263
+ //
264
+ // Note that IPX can stop with IPM optimal, imprecise,
265
+ // primal_infeas or dual_infeas, due to crossover stopping with
266
+ // time limit, and this is why crossover returns are tested first
267
+ if (illegalIpxStoppedIpmStatus(ipx_info, options))
268
+ return HighsStatus::kError;
269
+ // Can stop with user interrupt
270
+ // Can stop with time limit
271
+ // Can stop with iter limit
272
+ // Can stop with no progress
273
+ if (ipx_info.status_ipm == IPX_STATUS_user_interrupt) {
274
+ model_status = HighsModelStatus::kInterrupt;
275
+ return HighsStatus::kWarning;
276
+ } else if (ipx_info.status_ipm == IPX_STATUS_time_limit) {
277
+ model_status = HighsModelStatus::kTimeLimit;
278
+ return HighsStatus::kWarning;
279
+ } else if (ipx_info.status_ipm == IPX_STATUS_iter_limit) {
280
+ model_status = HighsModelStatus::kIterationLimit;
281
+ return HighsStatus::kWarning;
282
+ } else {
283
+ assert(ipx_info.status_ipm == IPX_STATUS_no_progress);
284
+ reportIpmNoProgress(options, ipx_info);
285
+ model_status = HighsModelStatus::kUnknown;
286
+ return HighsStatus::kWarning;
287
+ }
288
+ }
289
+ // Should only reach here if Solve() returned IPX_STATUS_solved
290
+ if (ipxStatusError(solve_status != IPX_STATUS_solved, options, "Ipx",
291
+ "solve_status should be solved here but value is",
292
+ (int)solve_status))
293
+ return HighsStatus::kError;
294
+ // Return error if solved status settings occur that JAJH doesn't
295
+ // think should happen
296
+ if (illegalIpxSolvedStatus(ipx_info, options)) return HighsStatus::kError;
297
+ //==============
298
+ // For crossover
299
+ //==============
300
+ // Can be not run
301
+ // Can solve and be optimal
302
+ // Can solve and be imprecise
303
+ //========
304
+ // For IPM
305
+ //========
306
+ // Can solve and be optimal
307
+ // Can solve and be imprecise
308
+ // Can solve and be primal_infeas
309
+ // Can solve and be dual_infeas
310
+ if (ipx_info.status_ipm == IPX_STATUS_primal_infeas ||
311
+ ipx_info.status_ipm == IPX_STATUS_dual_infeas) {
312
+ // IPM identified primal or dual infeasibility: crossover will not
313
+ // have run, so get the non-vertex solution and return
314
+ if (ipx_info.status_ipm == IPX_STATUS_primal_infeas) {
315
+ model_status = HighsModelStatus::kInfeasible;
316
+ } else if (ipx_info.status_ipm == IPX_STATUS_dual_infeas) {
317
+ model_status = HighsModelStatus::kUnboundedOrInfeasible;
318
+ }
319
+ getHighsNonVertexSolution(options, lp, num_col, num_row, rhs,
320
+ constraint_type, lps, model_status,
321
+ highs_solution);
322
+ return HighsStatus::kOk;
323
+ }
324
+
325
+ // Should only reach here if IPM is optimal or imprecise
326
+ if (ipxStatusError(ipx_info.status_ipm != IPX_STATUS_optimal &&
327
+ ipx_info.status_ipm != IPX_STATUS_imprecise,
328
+ options, "Ipx",
329
+ "ipm status should be not run, optimal or imprecise "
330
+ "but value is",
331
+ (int)ipx_info.status_ipm))
332
+ return HighsStatus::kError;
333
+
334
+ // Should only reach here if crossover is not run, optimal or imprecise
335
+ if (ipxStatusError(ipx_info.status_crossover != IPX_STATUS_not_run &&
336
+ ipx_info.status_crossover != IPX_STATUS_optimal &&
337
+ ipx_info.status_crossover != IPX_STATUS_imprecise,
338
+ options, "Ipx",
339
+ "crossover status should be not run, optimal or imprecise "
340
+ "but value is",
341
+ (int)ipx_info.status_crossover))
342
+ return HighsStatus::kError;
343
+
344
+ // Basic solution depends on crossover being run
345
+ const bool have_basic_solution =
346
+ ipx_info.status_crossover != IPX_STATUS_not_run;
347
+ // Both crossover and IPM can be imprecise
348
+ const bool imprecise_solution =
349
+ ipx_info.status_crossover == IPX_STATUS_imprecise ||
350
+ ipx_info.status_ipm == IPX_STATUS_imprecise;
351
+ if (have_basic_solution) {
352
+ IpxSolution ipx_solution;
353
+ ipx_solution.num_col = num_col;
354
+ ipx_solution.num_row = num_row;
355
+ ipx_solution.ipx_col_value.resize(num_col);
356
+ ipx_solution.ipx_row_value.resize(num_row);
357
+ ipx_solution.ipx_col_dual.resize(num_col);
358
+ ipx_solution.ipx_row_dual.resize(num_row);
359
+ ipx_solution.ipx_row_status.resize(num_row);
360
+ ipx_solution.ipx_col_status.resize(num_col);
361
+ ipx::Int errflag = lps.GetBasicSolution(
362
+ ipx_solution.ipx_col_value.data(), ipx_solution.ipx_row_value.data(),
363
+ ipx_solution.ipx_row_dual.data(), ipx_solution.ipx_col_dual.data(),
364
+ ipx_solution.ipx_row_status.data(), ipx_solution.ipx_col_status.data());
365
+ if (errflag != 0) {
366
+ highsLogUser(options.log_options, HighsLogType::kError,
367
+ "IPX crossover getting basic solution: flag = %d\n",
368
+ (int)errflag);
369
+ return HighsStatus::kError;
370
+ }
371
+ // Convert the IPX basic solution to a HiGHS basic solution
372
+ HighsStatus status = ipxBasicSolutionToHighsBasicSolution(
373
+ options.log_options, lp, rhs, constraint_type, ipx_solution,
374
+ highs_basis, highs_solution);
375
+ if (status != HighsStatus::kOk) {
376
+ highsLogUser(
377
+ options.log_options, HighsLogType::kError,
378
+ "Failed to convert IPX basic solution to Highs basic solution\n");
379
+ return HighsStatus::kError;
380
+ }
381
+
382
+ } else {
383
+ // No basic solution, so get a non-vertex HiGHS solution. This
384
+ // needs the model status to know whether to worry about dual
385
+ // infeasibilities.
386
+ const HighsModelStatus local_model_status =
387
+ imprecise_solution ? HighsModelStatus::kUnknown
388
+ : HighsModelStatus::kOptimal;
389
+ getHighsNonVertexSolution(options, lp, num_col, num_row, rhs,
390
+ constraint_type, lps, local_model_status,
391
+ highs_solution);
392
+ assert(!highs_basis.valid);
393
+ }
394
+ highs_info.basis_validity =
395
+ highs_basis.valid ? kBasisValidityValid : kBasisValidityInvalid;
396
+ HighsStatus return_status;
397
+ if (imprecise_solution) {
398
+ model_status = HighsModelStatus::kUnknown;
399
+ return_status = HighsStatus::kWarning;
400
+ } else {
401
+ model_status = HighsModelStatus::kOptimal;
402
+ return_status = HighsStatus::kOk;
403
+ }
404
+ return return_status;
405
+ }
406
+
407
+ #ifdef HIPO
408
+ HighsStatus solveLpHipo(HighsLpSolverObject& solver_object) {
409
+ return solveHipo(solver_object.options_, solver_object.timer_,
410
+ solver_object.lp_, HighsHessian{}, solver_object.basis_,
411
+ solver_object.solution_, solver_object.model_status_,
412
+ solver_object.highs_info_, solver_object.callback_);
413
+ }
414
+
415
+ #ifdef HIPO_USES_OPENBLAS
416
+ // function to set number of threads of openblas
417
+ extern "C" {
418
+ void openblas_set_num_threads(int num_threads);
419
+ }
420
+ #endif
421
+
422
+ HighsStatus solveHipo(const HighsOptions& options, HighsTimer& timer,
423
+ const HighsLp& lp, const HighsHessian& Q,
424
+ HighsBasis& highs_basis, HighsSolution& highs_solution,
425
+ HighsModelStatus& model_status, HighsInfo& highs_info,
426
+ HighsCallback& callback) {
427
+ // Use HiPO
428
+ //
429
+ // Can return HighsModelStatus (HighsStatus) values:
430
+ //
431
+ // 1. kSolveError (kError) if various unlikely solution errors occur
432
+ //
433
+ // 2. kTimeLimit (kWarning) if time limit is reached
434
+ //
435
+ // 3. kIterationLimit (kWarning) if iteration limit is reached
436
+ //
437
+ // 4. kUnknown (kWarning) if HiPO makes no progress or if
438
+ // IPM/crossover are imprecise
439
+ //
440
+ // 5. kInfeasible (kOk) if HiPO identifies primal infeasibility
441
+ //
442
+ // 6. kUnboundedOrInfeasible (kOk) if HiPO identifies dual
443
+ // infeasibility
444
+ //
445
+ // kOptimal (kOk) if HiPO/crossover identify optimality
446
+ //
447
+ // With a non-error return, if just HiPO has been run then a
448
+ // non-vertex primal solution is obtained; if crossover has been run
449
+ // then a basis and primal+dual solution are obtained.
450
+ //
451
+ //
452
+ // Indicate that there is no valid primal solution, dual solution or basis
453
+ highs_basis.valid = false;
454
+ highs_solution.value_valid = false;
455
+ highs_solution.dual_valid = false;
456
+ // Indicate that no imprecise solution has (yet) been found
457
+ resetModelStatusAndHighsInfo(model_status, highs_info);
458
+
459
+ #ifdef HIPO_USES_OPENBLAS
460
+ // force openblas to run in serial, for determinism and better performance
461
+ openblas_set_num_threads(1);
462
+ #endif
463
+
464
+ // Create solver instance
465
+ hipo::Solver hipo{};
466
+ // This creates ipx::LpSolver ipx_lps_, in case HiPO has to switch
467
+ // to IPX, so use the current HiGHS time as an offset for the
468
+ // ipx_lps.control_ elapsed time
469
+ hipo.setIpxTimerOffset(timer.read());
470
+
471
+ if (options.kkt_tolerance != kDefaultKktTolerance) {
472
+ highsLogUser(options.log_options, HighsLogType::kInfo,
473
+ "IpxWrapper: feasibility_tol = %g; optimality_tol = %g; "
474
+ "crossover_tol = %g\n",
475
+ options.kkt_tolerance, 1e-1 * options.kkt_tolerance,
476
+ 1e-1 * options.kkt_tolerance);
477
+ }
478
+
479
+ hipo.setOptions(options);
480
+ hipo.setTimer(timer);
481
+ hipo.setCallback(callback);
482
+
483
+ // Load the problem
484
+ hipo::Int load_status = hipo.load(lp, Q);
485
+ if (load_status) {
486
+ model_status = HighsModelStatus::kSolveError;
487
+ return HighsStatus::kError;
488
+ }
489
+
490
+ // This information about the problem loaded into HiPO is needed for later
491
+ HighsInt num_row, num_col;
492
+ hipo.getOriginalDims(num_row, num_col);
493
+ std::vector<double> rhs;
494
+ std::vector<char> constraints;
495
+ fillInRhsAndConstraints(lp, rhs, constraints);
496
+
497
+ hipo.solve();
498
+
499
+ // const bool report_solve_data =
500
+ // kHighsAnalysisLevelSolverSummaryData & options.highs_analysis_level;
501
+
502
+ // Differently from IPX, HiPO returns a single status. So, dealing with
503
+ // statuses is a bit different.
504
+ // hipo.solved(), hipo.stopped(), hipo.failed() can be used to query if the
505
+ // status belongs to the solved, stopped or failed group.
506
+ // If primal-dual feasible solution is found (non-vertex solution), then the
507
+ // status is kStatusPDfeas.
508
+ // If crossover is successful, then the status is kStatusBasic.
509
+ // Otherwise, the specific crossover status can be accessed through the
510
+ // ipx_info stored in hipo_info.
511
+
512
+ // Get solver and solution information.
513
+ const hipo::Info hipo_info = hipo.getInfo();
514
+ hipo::Status solve_status = hipo_info.status;
515
+ highs_info.ipm_iteration_count +=
516
+ hipo_info.ipm_iter + hipo_info.ipx_info.iter;
517
+ highs_info.crossover_iteration_count += hipo_info.ipx_info.updates_crossover;
518
+
519
+ // Report hipo status
520
+ const HighsStatus solve_return_status =
521
+ reportHipoStatus(options, solve_status, hipo);
522
+ if (solve_return_status == HighsStatus::kError) {
523
+ model_status = HighsModelStatus::kSolveError;
524
+ return HighsStatus::kError;
525
+ }
526
+
527
+ // Report crossover status
528
+ const HighsStatus crossover_return_status = reportHipoCrossoverStatus(
529
+ options, hipo_info.ipx_info.status_crossover, !Q.empty());
530
+ if (crossover_return_status == HighsStatus::kError) {
531
+ model_status = HighsModelStatus::kSolveError;
532
+ return HighsStatus::kError;
533
+ }
534
+
535
+ // Failures should have been handled. Status should be stopped or solved.
536
+ if (ipxStatusError(!hipo.solved() && !hipo.stopped(), options, "Hipo",
537
+ "status should be solved or stopped but value is",
538
+ solve_status))
539
+ return HighsStatus::kError;
540
+
541
+ if (hipo.stopped()) {
542
+ const HighsModelStatus local_model_status = HighsModelStatus::kUnknown;
543
+
544
+ getHipoNonVertexSolution(options, lp, num_col, num_row, rhs, constraints,
545
+ hipo, local_model_status, highs_solution);
546
+
547
+ // For crossover
548
+ if (illegalIpxStoppedCrossoverStatus(hipo_info.ipx_info, options))
549
+ return HighsStatus::kError;
550
+ // Can stop and reach time limit
551
+ if (hipo_info.ipx_info.status_crossover == IPX_STATUS_time_limit) {
552
+ model_status = HighsModelStatus::kTimeLimit;
553
+ return HighsStatus::kWarning;
554
+ }
555
+
556
+ // if crossover didn't time out, then solver can only stop as follows
557
+ if (solve_status == hipo::kStatusUserInterrupt) {
558
+ model_status = HighsModelStatus::kInterrupt;
559
+ return HighsStatus::kWarning;
560
+ } else if (solve_status == hipo::kStatusTimeLimit) {
561
+ model_status = HighsModelStatus::kTimeLimit;
562
+ return HighsStatus::kWarning;
563
+ } else if (solve_status == hipo::kStatusMaxIter) {
564
+ model_status = HighsModelStatus::kIterationLimit;
565
+ return HighsStatus::kWarning;
566
+ } else if (solve_status == hipo::kStatusNoProgress) {
567
+ reportHipoNoProgress(options, hipo_info);
568
+ model_status = HighsModelStatus::kUnknown;
569
+ return HighsStatus::kWarning;
570
+ } else {
571
+ assert(1 == 0);
572
+ }
573
+ }
574
+
575
+ // Stopped status should have been handled. Status should be solved.
576
+ if (ipxStatusError(!hipo.solved(), options, "Hipo",
577
+ "status should be solved but value is", solve_status))
578
+ return HighsStatus::kError;
579
+
580
+ // primal/dual infeasible
581
+ if (solve_status == hipo::kStatusPrimalInfeasible ||
582
+ solve_status == hipo::kStatusDualInfeasible) {
583
+ if (solve_status == hipo::kStatusPrimalInfeasible)
584
+ model_status = HighsModelStatus::kInfeasible;
585
+ else
586
+ model_status = HighsModelStatus::kUnboundedOrInfeasible;
587
+
588
+ getHipoNonVertexSolution(options, lp, num_col, num_row, rhs, constraints,
589
+ hipo, model_status, highs_solution);
590
+
591
+ return HighsStatus::kOk;
592
+ }
593
+
594
+ // Status should be optimal or imprecise
595
+ if (ipxStatusError(solve_status != hipo::kStatusPDFeas &&
596
+ solve_status != hipo::kStatusBasic &&
597
+ solve_status != hipo::kStatusImprecise,
598
+ options, "Hipo",
599
+ "status should be optimal or imprecise but value is",
600
+ solve_status))
601
+ return HighsStatus::kError;
602
+
603
+ const bool have_basic_solution =
604
+ hipo_info.ipx_used &&
605
+ hipo_info.ipx_info.status_crossover != IPX_STATUS_not_run;
606
+
607
+ const bool imprecise_solution =
608
+ hipo_info.status == hipo::kStatusImprecise ||
609
+ hipo_info.ipx_info.status_crossover == IPX_STATUS_imprecise;
610
+
611
+ if (have_basic_solution) {
612
+ IpxSolution hipo_solution;
613
+ hipo_solution.num_col = num_col;
614
+ hipo_solution.num_row = num_row;
615
+ hipo_solution.ipx_col_value.resize(num_col);
616
+ hipo_solution.ipx_row_value.resize(num_row);
617
+ hipo_solution.ipx_col_dual.resize(num_col);
618
+ hipo_solution.ipx_row_dual.resize(num_row);
619
+ hipo_solution.ipx_row_status.resize(num_row);
620
+ hipo_solution.ipx_col_status.resize(num_col);
621
+
622
+ hipo::Int errflag = hipo.getBasicSolution(
623
+ hipo_solution.ipx_col_value, hipo_solution.ipx_row_value,
624
+ hipo_solution.ipx_row_dual, hipo_solution.ipx_col_dual,
625
+ hipo_solution.ipx_row_status.data(),
626
+ hipo_solution.ipx_col_status.data());
627
+
628
+ if (errflag) {
629
+ highsLogUser(options.log_options, HighsLogType::kError,
630
+ "IPX crossover getting basic solution: flag = %d\n",
631
+ (int)errflag);
632
+ return HighsStatus::kError;
633
+ }
634
+ // Convert the IPX basic solution to a HiGHS basic solution
635
+ HighsStatus status = ipxBasicSolutionToHighsBasicSolution(
636
+ options.log_options, lp, rhs, constraints, hipo_solution, highs_basis,
637
+ highs_solution);
638
+ if (status != HighsStatus::kOk) {
639
+ highsLogUser(
640
+ options.log_options, HighsLogType::kError,
641
+ "Failed to convert IPX basic solution to Highs basic solution\n");
642
+ return HighsStatus::kError;
643
+ }
644
+ } else {
645
+ const HighsModelStatus local_model_status =
646
+ imprecise_solution ? HighsModelStatus::kUnknown
647
+ : HighsModelStatus::kOptimal;
648
+ getHipoNonVertexSolution(options, lp, num_col, num_row, rhs, constraints,
649
+ hipo, local_model_status, highs_solution);
650
+ assert(!highs_basis.valid);
651
+ }
652
+
653
+ highs_info.basis_validity =
654
+ highs_basis.valid ? kBasisValidityValid : kBasisValidityInvalid;
655
+
656
+ HighsStatus return_status;
657
+ if (imprecise_solution) {
658
+ model_status = HighsModelStatus::kUnknown;
659
+ return_status = HighsStatus::kWarning;
660
+ } else {
661
+ model_status = HighsModelStatus::kOptimal;
662
+ return_status = HighsStatus::kOk;
663
+ }
664
+ return return_status;
665
+ }
666
+ #endif
667
+
668
+ void fillInIpxData(const HighsLp& lp, ipx::Int& num_col, ipx::Int& num_row,
669
+ double& offset, std::vector<double>& obj,
670
+ std::vector<double>& col_lb, std::vector<double>& col_ub,
671
+ std::vector<ipx::Int>& Ap, std::vector<ipx::Int>& Ai,
672
+ std::vector<double>& Ax, std::vector<double>& rhs,
673
+ std::vector<char>& constraint_type) {
674
+ num_col = lp.num_col_;
675
+ num_row = lp.num_row_;
676
+
677
+ // For each row with both a lower and an upper bound introduce one new column
678
+ // so num_col may increase. Ignore each free row so num_row may decrease.
679
+ // lba <= a'x <= uba becomes
680
+ // a'x-s = 0 and lba <= s <= uba.
681
+
682
+ // For each row with bounds on both sides introduce explicit slack and
683
+ // transfer bounds.
684
+ assert((HighsInt)lp.row_lower_.size() == num_row);
685
+ assert((HighsInt)lp.row_upper_.size() == num_row);
686
+
687
+ std::vector<HighsInt> general_bounded_rows;
688
+ std::vector<HighsInt> free_rows;
689
+
690
+ for (HighsInt row = 0; row < num_row; row++)
691
+ if (lp.row_lower_[row] < lp.row_upper_[row] &&
692
+ lp.row_lower_[row] > -kHighsInf && lp.row_upper_[row] < kHighsInf)
693
+ general_bounded_rows.push_back(row);
694
+ else if (lp.row_lower_[row] <= -kHighsInf &&
695
+ lp.row_upper_[row] >= kHighsInf)
696
+ free_rows.push_back(row);
697
+
698
+ const HighsInt num_slack = general_bounded_rows.size();
699
+
700
+ fillInRhsAndConstraints(lp, rhs, constraint_type);
701
+
702
+ std::vector<HighsInt> reduced_rowmap(lp.num_row_, -1);
703
+ if (free_rows.size() > 0) {
704
+ HighsInt counter = 0;
705
+ HighsInt findex = 0;
706
+ for (HighsInt row = 0; row < lp.num_row_; row++) {
707
+ if (free_rows[findex] == row) {
708
+ findex++;
709
+ continue;
710
+ } else {
711
+ reduced_rowmap[row] = counter;
712
+ counter++;
713
+ }
714
+ }
715
+ } else {
716
+ for (HighsInt k = 0; k < lp.num_row_; k++) reduced_rowmap[k] = k;
717
+ }
718
+ num_row -= free_rows.size();
719
+ num_col += num_slack;
720
+
721
+ std::vector<HighsInt> sizes(num_col, 0);
722
+
723
+ for (HighsInt col = 0; col < lp.num_col_; col++)
724
+ for (HighsInt k = lp.a_matrix_.start_[col];
725
+ k < lp.a_matrix_.start_[col + 1]; k++) {
726
+ HighsInt row = lp.a_matrix_.index_[k];
727
+ if (lp.row_lower_[row] > -kHighsInf || lp.row_upper_[row] < kHighsInf)
728
+ sizes[col]++;
729
+ }
730
+ // Copy Astart and Aindex to ipx::Int array.
731
+ HighsInt nnz = lp.a_matrix_.index_.size();
732
+ Ap.resize(num_col + 1);
733
+ Ai.reserve(nnz + num_slack);
734
+ Ax.reserve(nnz + num_slack);
735
+
736
+ // Set starting points of original and newly introduced columns.
737
+ Ap[0] = 0;
738
+ for (HighsInt col = 0; col < lp.num_col_; col++) {
739
+ Ap[col + 1] = Ap[col] + sizes[col];
740
+ }
741
+ for (HighsInt col = lp.num_col_; col < (HighsInt)num_col; col++) {
742
+ Ap[col + 1] = Ap[col] + 1;
743
+ }
744
+ for (HighsInt k = 0; k < nnz; k++) {
745
+ HighsInt row = lp.a_matrix_.index_[k];
746
+ if (lp.row_lower_[row] > -kHighsInf || lp.row_upper_[row] < kHighsInf) {
747
+ Ai.push_back(reduced_rowmap[lp.a_matrix_.index_[k]]);
748
+ Ax.push_back(lp.a_matrix_.value_[k]);
749
+ }
750
+ }
751
+
752
+ for (HighsInt k = 0; k < num_slack; k++) {
753
+ Ai.push_back((ipx::Int)general_bounded_rows[k]);
754
+ Ax.push_back(-1);
755
+ }
756
+
757
+ // Column bound vectors.
758
+ col_lb.resize(num_col);
759
+ col_ub.resize(num_col);
760
+ for (HighsInt col = 0; col < lp.num_col_; col++) {
761
+ if (lp.col_lower_[col] <= -kHighsInf)
762
+ col_lb[col] = -INFINITY;
763
+ else
764
+ col_lb[col] = lp.col_lower_[col];
765
+
766
+ if (lp.col_upper_[col] >= kHighsInf)
767
+ col_ub[col] = INFINITY;
768
+ else
769
+ col_ub[col] = lp.col_upper_[col];
770
+ }
771
+ for (HighsInt slack = 0; slack < num_slack; slack++) {
772
+ const int row = general_bounded_rows[slack];
773
+ col_lb[lp.num_col_ + slack] = lp.row_lower_[row];
774
+ col_ub[lp.num_col_ + slack] = lp.row_upper_[row];
775
+ }
776
+
777
+ offset = HighsInt(lp.sense_) * lp.offset_;
778
+ obj.resize(num_col);
779
+ for (HighsInt col = 0; col < lp.num_col_; col++) {
780
+ obj[col] = (HighsInt)lp.sense_ * lp.col_cost_[col];
781
+ }
782
+ }
783
+
784
+ void fillInRhsAndConstraints(const HighsLp& lp, std::vector<double>& rhs,
785
+ std::vector<char>& constraint_type) {
786
+ // For each row except free rows add entry to char array and set up rhs
787
+ // vector
788
+
789
+ const HighsInt num_row = lp.num_row_;
790
+
791
+ rhs.reserve(num_row);
792
+ constraint_type.reserve(num_row);
793
+
794
+ for (int row = 0; row < num_row; row++) {
795
+ if (lp.row_lower_[row] > -kHighsInf && lp.row_upper_[row] >= kHighsInf) {
796
+ rhs.push_back(lp.row_lower_[row]);
797
+ constraint_type.push_back('>');
798
+ } else if (lp.row_lower_[row] <= -kHighsInf &&
799
+ lp.row_upper_[row] < kHighsInf) {
800
+ rhs.push_back(lp.row_upper_[row]);
801
+ constraint_type.push_back('<');
802
+ } else if (lp.row_lower_[row] == lp.row_upper_[row]) {
803
+ rhs.push_back(lp.row_upper_[row]);
804
+ constraint_type.push_back('=');
805
+ } else if (lp.row_lower_[row] > -kHighsInf &&
806
+ lp.row_upper_[row] < kHighsInf) {
807
+ // general bounded
808
+ rhs.push_back(0);
809
+ constraint_type.push_back('=');
810
+ }
811
+ }
812
+ }
813
+
814
+ HighsStatus reportIpxSolveStatus(const HighsOptions& options,
815
+ const ipx::Int solve_status,
816
+ const ipx::Int error_flag) {
817
+ if (solve_status == IPX_STATUS_solved) {
818
+ highsLogUser(options.log_options, HighsLogType::kInfo, "Ipx: Solved\n");
819
+ return HighsStatus::kOk;
820
+ } else if (solve_status == IPX_STATUS_stopped) {
821
+ highsLogUser(options.log_options, HighsLogType::kWarning, "Ipx: Stopped\n");
822
+ return HighsStatus::kWarning;
823
+ // Remaining cases are errors so drop through to return HighsStatus::kError;
824
+ } else if (solve_status == IPX_STATUS_no_model) {
825
+ if (error_flag == IPX_ERROR_argument_null) {
826
+ highsLogUser(options.log_options, HighsLogType::kError,
827
+ "Ipx: Invalid input - argument_null\n");
828
+ } else if (error_flag == IPX_ERROR_invalid_dimension) {
829
+ highsLogUser(options.log_options, HighsLogType::kError,
830
+ "Ipx: Invalid input - invalid dimension\n");
831
+ } else if (error_flag == IPX_ERROR_invalid_matrix) {
832
+ highsLogUser(options.log_options, HighsLogType::kError,
833
+ "Ipx: Invalid input - invalid matrix\n");
834
+ } else if (error_flag == IPX_ERROR_invalid_vector) {
835
+ highsLogUser(options.log_options, HighsLogType::kError,
836
+ "Ipx: Invalid input - invalid vector\n");
837
+ } else if (error_flag == IPX_ERROR_invalid_basis) {
838
+ highsLogUser(options.log_options, HighsLogType::kError,
839
+ "Ipx: Invalid input - invalid basis\n");
840
+ } else {
841
+ highsLogUser(options.log_options, HighsLogType::kError,
842
+ "Ipx: Invalid input - unrecognised error\n");
843
+ }
844
+ } else if (solve_status == IPX_STATUS_out_of_memory) {
845
+ highsLogUser(options.log_options, HighsLogType::kError,
846
+ "Ipx: Out of memory\n");
847
+ } else if (solve_status == IPX_STATUS_internal_error) {
848
+ highsLogUser(options.log_options, HighsLogType::kError,
849
+ "Ipx: Internal error %" HIGHSINT_FORMAT "\n", (int)error_flag);
850
+ } else {
851
+ highsLogUser(options.log_options, HighsLogType::kError,
852
+ "Ipx: unrecognised solve status = %" HIGHSINT_FORMAT "\n",
853
+ (int)solve_status);
854
+ }
855
+ return HighsStatus::kError;
856
+ }
857
+
858
+ HighsStatus reportIpxIpmCrossoverStatus(const HighsOptions& options,
859
+ const ipx::Int status,
860
+ const bool ipm_status) {
861
+ std::string method_name;
862
+ if (ipm_status)
863
+ method_name = "IPM ";
864
+ else
865
+ method_name = "Crossover";
866
+ if (status == IPX_STATUS_not_run) {
867
+ if (ipm_status || options.run_crossover == kHighsOnString) {
868
+ // Warn if method not run is IPM or method not run is crossover
869
+ // and run_crossover option is "on"
870
+ highsLogUser(options.log_options, HighsLogType::kWarning,
871
+ "Ipx: %s not run\n", method_name.c_str());
872
+ return HighsStatus::kWarning;
873
+ }
874
+ // OK if method not run is crossover and run_crossover option is
875
+ // not "on"
876
+ return HighsStatus::kOk;
877
+ } else if (status == IPX_STATUS_optimal) {
878
+ highsLogUser(options.log_options, HighsLogType::kInfo, "Ipx: %s optimal\n",
879
+ method_name.c_str());
880
+ return HighsStatus::kOk;
881
+ } else if (status == IPX_STATUS_imprecise) {
882
+ highsLogUser(options.log_options, HighsLogType::kWarning,
883
+ "Ipx: %s imprecise\n", method_name.c_str());
884
+ return HighsStatus::kWarning;
885
+ } else if (status == IPX_STATUS_primal_infeas) {
886
+ highsLogUser(options.log_options, HighsLogType::kWarning,
887
+ "Ipx: %s primal infeasible\n", method_name.c_str());
888
+ return HighsStatus::kWarning;
889
+ } else if (status == IPX_STATUS_dual_infeas) {
890
+ highsLogUser(options.log_options, HighsLogType::kWarning,
891
+ "Ipx: %s dual infeasible\n", method_name.c_str());
892
+ return HighsStatus::kWarning;
893
+ } else if (status == IPX_STATUS_user_interrupt) {
894
+ highsLogUser(options.log_options, HighsLogType::kWarning,
895
+ "Ipx: %s user interrupt\n", method_name.c_str());
896
+ return HighsStatus::kOk;
897
+ } else if (status == IPX_STATUS_time_limit) {
898
+ highsLogUser(options.log_options, HighsLogType::kWarning,
899
+ "Ipx: %s reached time limit\n", method_name.c_str());
900
+ return HighsStatus::kWarning;
901
+ } else if (status == IPX_STATUS_iter_limit) {
902
+ highsLogUser(options.log_options, HighsLogType::kWarning,
903
+ "Ipx: %s reached iteration limit\n", method_name.c_str());
904
+ return HighsStatus::kWarning;
905
+ } else if (status == IPX_STATUS_no_progress) {
906
+ highsLogUser(options.log_options, HighsLogType::kWarning,
907
+ "Ipx: %s no progress\n", method_name.c_str());
908
+ return HighsStatus::kWarning;
909
+ } else if (status == IPX_STATUS_failed) {
910
+ highsLogUser(options.log_options, HighsLogType::kError, "Ipx: %s failed\n",
911
+ method_name.c_str());
912
+ return HighsStatus::kError;
913
+ } else if (status == IPX_STATUS_debug) {
914
+ highsLogUser(options.log_options, HighsLogType::kError, "Ipx: %s debug\n",
915
+ method_name.c_str());
916
+ return HighsStatus::kError;
917
+ } else {
918
+ highsLogUser(options.log_options, HighsLogType::kError,
919
+ "Ipx: %s unrecognised status\n", method_name.c_str());
920
+ return HighsStatus::kError;
921
+ }
922
+ return HighsStatus::kError;
923
+ }
924
+
925
+ bool ipxStatusError(const bool status_error, const HighsOptions& options,
926
+ const std::string& solver, const std::string& message,
927
+ const int value) {
928
+ if (status_error) {
929
+ if (value < 0) {
930
+ highsLogUser(options.log_options, HighsLogType::kError, "%s: %s\n",
931
+ solver.c_str(), message.c_str());
932
+ } else {
933
+ highsLogUser(options.log_options, HighsLogType::kError, "%s: %s %d\n",
934
+ solver.c_str(), message.c_str(), value);
935
+ }
936
+ fflush(NULL);
937
+ }
938
+ assert(!status_error);
939
+ return status_error;
940
+ }
941
+
942
+ bool illegalIpxSolvedStatus(const ipx::Info& ipx_info,
943
+ const HighsOptions& options) {
944
+ bool found_illegal_status = false;
945
+ //========
946
+ // For IPX
947
+ //========
948
+ // Can solve and be optimal
949
+ // Can solve and be imprecise
950
+ // Can solve and be primal_infeas
951
+ // Can solve and be dual_infeas
952
+ // Cannot solve and reach time limit
953
+ found_illegal_status =
954
+ found_illegal_status ||
955
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_time_limit, options,
956
+ "Ipx",
957
+ "solved status_ipm should not be IPX_STATUS_time_limit");
958
+ // Cannot solve and reach iteration limit
959
+ found_illegal_status =
960
+ found_illegal_status ||
961
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_iter_limit, options,
962
+ "Ipx",
963
+ "solved status_ipm should not be IPX_STATUS_iter_limit");
964
+ // Cannot solve and make no progress
965
+ found_illegal_status =
966
+ found_illegal_status ||
967
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_no_progress, options,
968
+ "Ipx",
969
+ "solved status_ipm should not be IPX_STATUS_no_progress");
970
+ // Cannot solve and failed
971
+ found_illegal_status =
972
+ found_illegal_status ||
973
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_failed, options, "Ipx",
974
+ "solved status_ipm should not be IPX_STATUS_failed");
975
+ // Cannot solve and debug
976
+ found_illegal_status =
977
+ found_illegal_status ||
978
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_debug, options, "Ipx",
979
+ "solved status_ipm should not be IPX_STATUS_debug");
980
+ //==============
981
+ // For crossover
982
+ //==============
983
+ // Can solve and be optimal
984
+ // Can solve and be imprecise
985
+ // Cannot solve with primal infeasibility
986
+ found_illegal_status =
987
+ found_illegal_status ||
988
+ ipxStatusError(
989
+ ipx_info.status_crossover == IPX_STATUS_primal_infeas, options, "Ipx",
990
+ "solved status_crossover should not be IPX_STATUS_primal_infeas");
991
+ // Cannot solve with dual infeasibility
992
+ found_illegal_status =
993
+ found_illegal_status ||
994
+ ipxStatusError(
995
+ ipx_info.status_crossover == IPX_STATUS_dual_infeas, options, "Ipx",
996
+ "solved status_crossover should not be IPX_STATUS_dual_infeas");
997
+ // Cannot solve and reach time limit
998
+ found_illegal_status =
999
+ found_illegal_status ||
1000
+ ipxStatusError(
1001
+ ipx_info.status_crossover == IPX_STATUS_time_limit, options, "Ipx",
1002
+ "solved status_crossover should not be IPX_STATUS_time_limit");
1003
+ // Cannot solve and reach time limit
1004
+ found_illegal_status =
1005
+ found_illegal_status ||
1006
+ ipxStatusError(
1007
+ ipx_info.status_crossover == IPX_STATUS_iter_limit, options, "Ipx",
1008
+ "solved status_crossover should not be IPX_STATUS_iter_limit");
1009
+ // Cannot solve and make no progress
1010
+ found_illegal_status =
1011
+ found_illegal_status ||
1012
+ ipxStatusError(
1013
+ ipx_info.status_crossover == IPX_STATUS_no_progress, options, "Ipx",
1014
+ "solved status_crossover should not be IPX_STATUS_no_progress");
1015
+ // Cannot solve and failed
1016
+ found_illegal_status =
1017
+ found_illegal_status ||
1018
+ ipxStatusError(
1019
+ ipx_info.status_crossover == IPX_STATUS_failed, options, "Ipx",
1020
+ "solved status_crossover should not be IPX_STATUS_failed");
1021
+ // Cannot solve and debug
1022
+ found_illegal_status =
1023
+ found_illegal_status ||
1024
+ ipxStatusError(ipx_info.status_crossover == IPX_STATUS_debug, options,
1025
+ "Ipx",
1026
+ "solved status_crossover should not be IPX_STATUS_debug");
1027
+ return found_illegal_status;
1028
+ }
1029
+
1030
+ bool illegalIpxStoppedIpmStatus(const ipx::Info& ipx_info,
1031
+ const HighsOptions& options) {
1032
+ bool found_illegal_status = false;
1033
+ // Cannot stop and be optimal
1034
+ found_illegal_status =
1035
+ found_illegal_status ||
1036
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_optimal, options, "Ipx",
1037
+ "stopped status_ipm should not be IPX_STATUS_optimal");
1038
+ // Cannot stop and be imprecise
1039
+ found_illegal_status =
1040
+ found_illegal_status ||
1041
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_imprecise, options,
1042
+ "Ipx",
1043
+ "stopped status_ipm should not be IPX_STATUS_imprecise");
1044
+ // Cannot stop with primal infeasibility
1045
+ found_illegal_status =
1046
+ found_illegal_status ||
1047
+ ipxStatusError(
1048
+ ipx_info.status_ipm == IPX_STATUS_primal_infeas, options, "Ipx",
1049
+ "stopped status_ipm should not be IPX_STATUS_primal_infeas");
1050
+ // Cannot stop with dual infeasibility
1051
+ found_illegal_status =
1052
+ found_illegal_status ||
1053
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_dual_infeas, options,
1054
+ "Ipx",
1055
+ "stopped status_ipm should not be IPX_STATUS_dual_infeas");
1056
+ // Can stop with time limit
1057
+ // Can stop with iter limit
1058
+ // Can stop with no progress
1059
+ // Cannot stop and failed - should be error return earlier
1060
+ found_illegal_status =
1061
+ found_illegal_status ||
1062
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_failed, options, "Ipx",
1063
+ "stopped status_ipm should not be IPX_STATUS_failed");
1064
+ // Cannot stop and debug - should be error return earlier
1065
+ found_illegal_status =
1066
+ found_illegal_status ||
1067
+ ipxStatusError(ipx_info.status_ipm == IPX_STATUS_debug, options, "Ipx",
1068
+ "stopped status_ipm should not be IPX_STATUS_debug");
1069
+ return found_illegal_status;
1070
+ }
1071
+
1072
+ bool illegalIpxStoppedCrossoverStatus(const ipx::Info& ipx_info,
1073
+ const HighsOptions& options) {
1074
+ bool found_illegal_status = false;
1075
+ // Cannot stop and be optimal
1076
+ found_illegal_status =
1077
+ found_illegal_status ||
1078
+ ipxStatusError(
1079
+ ipx_info.status_crossover == IPX_STATUS_optimal, options, "Ipx",
1080
+ "stopped status_crossover should not be IPX_STATUS_optimal");
1081
+ // Cannot stop and be imprecise
1082
+ found_illegal_status =
1083
+ found_illegal_status ||
1084
+ ipxStatusError(
1085
+ ipx_info.status_crossover == IPX_STATUS_imprecise, options, "Ipx",
1086
+ "stopped status_crossover should not be IPX_STATUS_imprecise");
1087
+ // Cannot stop with primal infeasibility
1088
+ found_illegal_status =
1089
+ found_illegal_status ||
1090
+ ipxStatusError(
1091
+ ipx_info.status_crossover == IPX_STATUS_primal_infeas, options, "Ipx",
1092
+ "stopped status_crossover should not be IPX_STATUS_primal_infeas");
1093
+ // Cannot stop with dual infeasibility
1094
+ found_illegal_status =
1095
+ found_illegal_status ||
1096
+ ipxStatusError(
1097
+ ipx_info.status_crossover == IPX_STATUS_dual_infeas, options, "Ipx",
1098
+ "stopped status_crossover should not be IPX_STATUS_dual_infeas");
1099
+ // Cannot stop and reach iteration limit
1100
+ found_illegal_status =
1101
+ found_illegal_status ||
1102
+ ipxStatusError(
1103
+ ipx_info.status_crossover == IPX_STATUS_iter_limit, options, "Ipx",
1104
+ "stopped status_crossover should not be IPX_STATUS_iter_limit");
1105
+ // Can stop and reach time limit
1106
+ // Cannot stop with no_progress
1107
+ found_illegal_status =
1108
+ found_illegal_status ||
1109
+ ipxStatusError(
1110
+ ipx_info.status_crossover == IPX_STATUS_no_progress, options, "Ipx",
1111
+ "stopped status_crossover should not be IPX_STATUS_no_progress");
1112
+ // Cannot stop and failed - should be error return earlier
1113
+ found_illegal_status =
1114
+ found_illegal_status ||
1115
+ ipxStatusError(
1116
+ ipx_info.status_crossover == IPX_STATUS_failed, options, "Ipx",
1117
+ "stopped status_crossover should not be IPX_STATUS_failed");
1118
+ // Cannot stop and debug - should be error return earlier
1119
+ found_illegal_status =
1120
+ found_illegal_status ||
1121
+ ipxStatusError(ipx_info.status_crossover == IPX_STATUS_debug, options,
1122
+ "Ipx",
1123
+ "stopped status_crossover should not be IPX_STATUS_debug");
1124
+ return found_illegal_status;
1125
+ }
1126
+
1127
+ void reportIpmNoProgress(const HighsOptions& options,
1128
+ const ipx::Info& ipx_info) {
1129
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1130
+ "No progress: primal objective value = %11.4g\n",
1131
+ ipx_info.pobjval);
1132
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1133
+ "No progress: max absolute primal residual = %11.4g\n",
1134
+ ipx_info.abs_presidual);
1135
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1136
+ "No progress: max absolute dual residual = %11.4g\n",
1137
+ ipx_info.abs_dresidual);
1138
+ }
1139
+
1140
+ #ifdef HIPO
1141
+ void reportHipoNoProgress(const HighsOptions& options,
1142
+ const hipo::Info& hipo_info) {
1143
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1144
+ "No progress: primal objective value = %11.4g\n",
1145
+ hipo_info.p_obj);
1146
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1147
+ "No progress: max absolute primal residual = %11.4g\n",
1148
+ hipo_info.p_res_abs);
1149
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1150
+ "No progress: max absolute dual residual = %11.4g\n",
1151
+ hipo_info.d_res_abs);
1152
+ }
1153
+ #endif
1154
+
1155
+ void getHighsNonVertexSolution(const HighsOptions& options, const HighsLp& lp,
1156
+ const ipx::Int num_col, const ipx::Int num_row,
1157
+ const std::vector<double>& rhs,
1158
+ const std::vector<char>& constraint_type,
1159
+ const ipx::LpSolver& lps,
1160
+ const HighsModelStatus model_status,
1161
+ HighsSolution& highs_solution) {
1162
+ // Get the interior solution (available if IPM was started).
1163
+ // GetInteriorSolution() returns the final IPM iterate, regardless if the
1164
+ // IPM terminated successfully or not. (Only in case of out-of-memory no
1165
+ // solution exists.)
1166
+ std::vector<double> x(num_col);
1167
+ std::vector<double> xl(num_col);
1168
+ std::vector<double> xu(num_col);
1169
+ std::vector<double> zl(num_col);
1170
+ std::vector<double> zu(num_col);
1171
+ std::vector<double> slack(num_row);
1172
+ std::vector<double> y(num_row);
1173
+
1174
+ lps.GetInteriorSolution(x.data(), xl.data(), xu.data(), slack.data(),
1175
+ y.data(), zl.data(), zu.data());
1176
+
1177
+ ipxSolutionToHighsSolution(options, lp, rhs, constraint_type, num_col,
1178
+ num_row, x, slack, y, zl, zu, highs_solution);
1179
+ }
1180
+
1181
+ #ifdef HIPO
1182
+ void getHipoNonVertexSolution(const HighsOptions& options, const HighsLp& lp,
1183
+ const hipo::Int num_col, const hipo::Int num_row,
1184
+ const std::vector<double>& rhs,
1185
+ const std::vector<char>& constraint_type,
1186
+ const hipo::Solver& hipo,
1187
+ const HighsModelStatus model_status,
1188
+ HighsSolution& highs_solution) {
1189
+ std::vector<double> x(num_col);
1190
+ std::vector<double> xl(num_col);
1191
+ std::vector<double> xu(num_col);
1192
+ std::vector<double> zl(num_col);
1193
+ std::vector<double> zu(num_col);
1194
+ std::vector<double> slack(num_row);
1195
+ std::vector<double> y(num_row);
1196
+
1197
+ hipo.getInteriorSolution(x, xl, xu, slack, y, zl, zu);
1198
+ ipxSolutionToHighsSolution(options, lp, rhs, constraint_type, num_col,
1199
+ num_row, x, slack, y, zl, zu, highs_solution);
1200
+ }
1201
+ #endif
1202
+
1203
+ void reportSolveData(const HighsLogOptions& log_options,
1204
+ const ipx::Info& ipx_info) {
1205
+ highsLogDev(log_options, HighsLogType::kInfo, "\nIPX Solve data\n");
1206
+ highsLogDev(log_options, HighsLogType::kInfo, " IPX status = %4d\n",
1207
+ (int)ipx_info.status);
1208
+ highsLogDev(log_options, HighsLogType::kInfo, " IPM status = %4d\n",
1209
+ (int)ipx_info.status_ipm);
1210
+ highsLogDev(log_options, HighsLogType::kInfo, " Crossover status = %4d\n",
1211
+ (int)ipx_info.status_crossover);
1212
+ highsLogDev(log_options, HighsLogType::kInfo,
1213
+ " IPX errflag = %4d\n\n", (int)ipx_info.errflag);
1214
+
1215
+ highsLogDev(log_options, HighsLogType::kInfo, " LP variables = %8d\n",
1216
+ (int)ipx_info.num_var);
1217
+ highsLogDev(log_options, HighsLogType::kInfo, " LP constraints = %8d\n",
1218
+ (int)ipx_info.num_constr);
1219
+ highsLogDev(log_options, HighsLogType::kInfo, " LP entries = %8d\n\n",
1220
+ (int)ipx_info.num_entries);
1221
+
1222
+ highsLogDev(log_options, HighsLogType::kInfo, " Solver columns = %8d\n",
1223
+ (int)ipx_info.num_cols_solver);
1224
+ highsLogDev(log_options, HighsLogType::kInfo, " Solver rows = %8d\n",
1225
+ (int)ipx_info.num_rows_solver);
1226
+ highsLogDev(log_options, HighsLogType::kInfo, " Solver entries = %8d\n\n",
1227
+ (int)ipx_info.num_entries_solver);
1228
+
1229
+ highsLogDev(log_options, HighsLogType::kInfo, " Dualized = %d\n",
1230
+ (int)ipx_info.dualized);
1231
+ highsLogDev(log_options, HighsLogType::kInfo,
1232
+ " Number of dense columns detected = %d\n\n",
1233
+ (int)ipx_info.dense_cols);
1234
+
1235
+ highsLogDev(log_options, HighsLogType::kInfo, " Dependent rows = %d\n",
1236
+ (int)ipx_info.dependent_rows);
1237
+ highsLogDev(log_options, HighsLogType::kInfo, " Dependent cols = %d\n",
1238
+ (int)ipx_info.dependent_cols);
1239
+ highsLogDev(log_options, HighsLogType::kInfo, " Inconsistent rows = %d\n",
1240
+ (int)ipx_info.rows_inconsistent);
1241
+ highsLogDev(log_options, HighsLogType::kInfo, " Inconsistent cols = %d\n",
1242
+ (int)ipx_info.cols_inconsistent);
1243
+ highsLogDev(log_options, HighsLogType::kInfo, " Primal dropped = %d\n",
1244
+ (int)ipx_info.primal_dropped);
1245
+ highsLogDev(log_options, HighsLogType::kInfo,
1246
+ " Dual dropped = %d\n\n", (int)ipx_info.dual_dropped);
1247
+
1248
+ highsLogDev(log_options, HighsLogType::kInfo,
1249
+ " |Absolute primal residual| = %11.4g\n",
1250
+ ipx_info.abs_presidual);
1251
+ highsLogDev(log_options, HighsLogType::kInfo,
1252
+ " |Absolute dual residual| = %11.4g\n",
1253
+ ipx_info.abs_dresidual);
1254
+ highsLogDev(log_options, HighsLogType::kInfo,
1255
+ " |Relative primal residual| = %11.4g\n",
1256
+ ipx_info.rel_presidual);
1257
+ highsLogDev(log_options, HighsLogType::kInfo,
1258
+ " |Relative dual residual| = %11.4g\n\n",
1259
+ ipx_info.rel_dresidual);
1260
+
1261
+ highsLogDev(log_options, HighsLogType::kInfo,
1262
+ " Primal objective value = %11.4g\n", ipx_info.pobjval);
1263
+ highsLogDev(log_options, HighsLogType::kInfo,
1264
+ " Dual objective value = %11.4g\n", ipx_info.dobjval);
1265
+ highsLogDev(log_options, HighsLogType::kInfo,
1266
+ " Relative objective gap = %11.4g\n", ipx_info.rel_objgap);
1267
+ highsLogDev(log_options, HighsLogType::kInfo,
1268
+ " Complementarity = %11.4g\n\n",
1269
+ ipx_info.complementarity);
1270
+
1271
+ highsLogDev(log_options, HighsLogType::kInfo, " |x| = %11.4g\n",
1272
+ ipx_info.normx);
1273
+ highsLogDev(log_options, HighsLogType::kInfo, " |y| = %11.4g\n",
1274
+ ipx_info.normy);
1275
+ highsLogDev(log_options, HighsLogType::kInfo, " |z| = %11.4g\n\n",
1276
+ ipx_info.normz);
1277
+
1278
+ highsLogDev(log_options, HighsLogType::kInfo,
1279
+ " Objective value = %11.4g\n", ipx_info.objval);
1280
+ highsLogDev(log_options, HighsLogType::kInfo,
1281
+ " Primal infeasibility = %11.4g\n", ipx_info.primal_infeas);
1282
+ highsLogDev(log_options, HighsLogType::kInfo,
1283
+ " Dual infeasibility = %11.4g\n\n", ipx_info.dual_infeas);
1284
+
1285
+ highsLogDev(log_options, HighsLogType::kInfo, " IPM iter = %d\n",
1286
+ (int)ipx_info.iter);
1287
+ highsLogDev(log_options, HighsLogType::kInfo, " KKT iter 1 = %d\n",
1288
+ (int)ipx_info.kktiter1);
1289
+ highsLogDev(log_options, HighsLogType::kInfo, " KKT iter 2 = %d\n",
1290
+ (int)ipx_info.kktiter2);
1291
+ highsLogDev(log_options, HighsLogType::kInfo, " Basis repairs = %d\n",
1292
+ (int)ipx_info.basis_repairs);
1293
+ highsLogDev(log_options, HighsLogType::kInfo, " Updates start = %d\n",
1294
+ (int)ipx_info.updates_start);
1295
+ highsLogDev(log_options, HighsLogType::kInfo, " Updates ipm = %d\n",
1296
+ (int)ipx_info.updates_ipm);
1297
+ highsLogDev(log_options, HighsLogType::kInfo,
1298
+ " Updates crossover = %d\n\n",
1299
+ (int)ipx_info.updates_crossover);
1300
+
1301
+ highsLogDev(log_options, HighsLogType::kInfo,
1302
+ " Time total = %8.2f\n\n", ipx_info.time_total);
1303
+ double sum_time = 0;
1304
+ highsLogDev(log_options, HighsLogType::kInfo,
1305
+ " Time IPM 1 = %8.2f\n", ipx_info.time_ipm1);
1306
+ sum_time += ipx_info.time_ipm1;
1307
+ highsLogDev(log_options, HighsLogType::kInfo,
1308
+ " Time IPM 2 = %8.2f\n", ipx_info.time_ipm2);
1309
+ sum_time += ipx_info.time_ipm2;
1310
+ highsLogDev(log_options, HighsLogType::kInfo,
1311
+ " Time starting basis = %8.2f\n",
1312
+ ipx_info.time_starting_basis);
1313
+ sum_time += ipx_info.time_starting_basis;
1314
+ highsLogDev(log_options, HighsLogType::kInfo,
1315
+ " Time crossover = %8.2f\n", ipx_info.time_crossover);
1316
+ highsLogDev(log_options, HighsLogType::kInfo,
1317
+ " Sum = %8.2f\n\n", sum_time);
1318
+
1319
+ sum_time = 0;
1320
+ highsLogDev(log_options, HighsLogType::kInfo,
1321
+ " Time kkt_factorize = %8.2f\n", ipx_info.time_kkt_factorize);
1322
+ sum_time += ipx_info.time_kkt_factorize;
1323
+ highsLogDev(log_options, HighsLogType::kInfo,
1324
+ " Time kkt_solve = %8.2f\n", ipx_info.time_kkt_solve);
1325
+ sum_time += ipx_info.time_kkt_solve;
1326
+ highsLogDev(log_options, HighsLogType::kInfo,
1327
+ " Sum = %8.2f\n\n", sum_time);
1328
+
1329
+ sum_time = 0;
1330
+ highsLogDev(log_options, HighsLogType::kInfo,
1331
+ " Time maxvol = %8.2f\n", ipx_info.time_maxvol);
1332
+ sum_time += ipx_info.time_maxvol;
1333
+ highsLogDev(log_options, HighsLogType::kInfo,
1334
+ " Time cr1 = %8.2f\n", ipx_info.time_cr1);
1335
+ sum_time += ipx_info.time_cr1;
1336
+ highsLogDev(log_options, HighsLogType::kInfo,
1337
+ " Time cr2 = %8.2f\n", ipx_info.time_cr2);
1338
+ sum_time += ipx_info.time_cr2;
1339
+ highsLogDev(log_options, HighsLogType::kInfo,
1340
+ " Sum = %8.2f\n\n", sum_time);
1341
+
1342
+ sum_time = 0;
1343
+ highsLogDev(log_options, HighsLogType::kInfo,
1344
+ " Time cr1_AAt = %8.2f\n", ipx_info.time_cr1_AAt);
1345
+ sum_time += ipx_info.time_cr1_AAt;
1346
+ highsLogDev(log_options, HighsLogType::kInfo,
1347
+ " Time cr1_pre = %8.2f\n", ipx_info.time_cr1_pre);
1348
+ sum_time += ipx_info.time_cr1_pre;
1349
+ highsLogDev(log_options, HighsLogType::kInfo,
1350
+ " Sum cr1 = %8.2f\n\n", sum_time);
1351
+
1352
+ sum_time = 0;
1353
+ highsLogDev(log_options, HighsLogType::kInfo,
1354
+ " Time cr2_NNt = %8.2f\n", ipx_info.time_cr2_NNt);
1355
+ sum_time += ipx_info.time_cr2_NNt;
1356
+ highsLogDev(log_options, HighsLogType::kInfo,
1357
+ " Time cr2_B = %8.2f\n", ipx_info.time_cr2_B);
1358
+ sum_time += ipx_info.time_cr2_B;
1359
+ highsLogDev(log_options, HighsLogType::kInfo,
1360
+ " Time cr2_Bt = %8.2f\n", ipx_info.time_cr2_Bt);
1361
+ sum_time += ipx_info.time_cr2_Bt;
1362
+ highsLogDev(log_options, HighsLogType::kInfo,
1363
+ " Sum cr2 = %8.2f\n\n", sum_time);
1364
+
1365
+ highsLogDev(log_options, HighsLogType::kInfo,
1366
+ " Proportion of sparse FTRAN = %11.4g\n",
1367
+ ipx_info.ftran_sparse);
1368
+ highsLogDev(log_options, HighsLogType::kInfo,
1369
+ " Proportion of sparse BTRAN = %11.4g\n\n",
1370
+ ipx_info.btran_sparse);
1371
+
1372
+ highsLogDev(log_options, HighsLogType::kInfo,
1373
+ " Time FTRAN = %8.2f\n", ipx_info.time_ftran);
1374
+ highsLogDev(log_options, HighsLogType::kInfo,
1375
+ " Time BTRAN = %8.2f\n", ipx_info.time_btran);
1376
+ highsLogDev(log_options, HighsLogType::kInfo,
1377
+ " Time LU INVERT = %8.2f\n", ipx_info.time_lu_invert);
1378
+ highsLogDev(log_options, HighsLogType::kInfo,
1379
+ " Time LU UPDATE = %8.2f\n", ipx_info.time_lu_update);
1380
+ highsLogDev(log_options, HighsLogType::kInfo,
1381
+ " Mean fill-in = %11.4g\n", ipx_info.mean_fill);
1382
+ highsLogDev(log_options, HighsLogType::kInfo,
1383
+ " Max fill-in = %11.4g\n", ipx_info.max_fill);
1384
+ highsLogDev(log_options, HighsLogType::kInfo,
1385
+ " Time symb INVERT = %11.4g\n\n", ipx_info.time_symb_invert);
1386
+
1387
+ highsLogDev(log_options, HighsLogType::kInfo,
1388
+ " Maxvol updates = %d\n", (int)ipx_info.maxvol_updates);
1389
+ highsLogDev(log_options, HighsLogType::kInfo,
1390
+ " Maxvol skipped = %d\n", (int)ipx_info.maxvol_skipped);
1391
+ highsLogDev(log_options, HighsLogType::kInfo,
1392
+ " Maxvol passes = %d\n", (int)ipx_info.maxvol_passes);
1393
+ highsLogDev(log_options, HighsLogType::kInfo,
1394
+ " Tableau num nonzeros = %d\n", (int)ipx_info.tbl_nnz);
1395
+ highsLogDev(log_options, HighsLogType::kInfo,
1396
+ " Tbl max? = %11.4g\n", ipx_info.tbl_max);
1397
+ highsLogDev(log_options, HighsLogType::kInfo,
1398
+ " Frobnorm squared = %11.4g\n", ipx_info.frobnorm_squared);
1399
+ highsLogDev(log_options, HighsLogType::kInfo,
1400
+ " Lambda max = %11.4g\n", ipx_info.lambdamax);
1401
+ highsLogDev(log_options, HighsLogType::kInfo,
1402
+ " Volume increase = %11.4g\n\n",
1403
+ ipx_info.volume_increase);
1404
+ }
1405
+
1406
+ #ifdef HIPO
1407
+ HighsStatus reportHipoStatus(const HighsOptions& options,
1408
+ const hipo::Int status, const hipo::Solver& hipo) {
1409
+ if (hipo.solved()) {
1410
+ highsLogUser(options.log_options, HighsLogType::kInfo, "Hipo: Solved\n");
1411
+ return HighsStatus::kOk;
1412
+ }
1413
+
1414
+ // these are warnings
1415
+ else if (status == hipo::kStatusTimeLimit) {
1416
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1417
+ "Hipo: Time limit\n");
1418
+ return HighsStatus::kWarning;
1419
+ } else if (status == hipo::kStatusUserInterrupt) {
1420
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1421
+ "Hipo: User interrupt\n");
1422
+ return HighsStatus::kWarning;
1423
+ } else if (status == hipo::kStatusMaxIter) {
1424
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1425
+ "Hipo: Reached maximum iterations\n");
1426
+ return HighsStatus::kWarning;
1427
+ } else if (status == hipo::kStatusNoProgress) {
1428
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1429
+ "Hipo: No progress\n");
1430
+ return HighsStatus::kWarning;
1431
+ } else if (status == hipo::kStatusImprecise) {
1432
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1433
+ "Hipo: Imprecise solution\n");
1434
+ return HighsStatus::kWarning;
1435
+ }
1436
+
1437
+ // these are errors
1438
+ else if (status == hipo::kStatusError) {
1439
+ highsLogUser(options.log_options, HighsLogType::kError,
1440
+ "Hipo: Internal error\n");
1441
+ } else if (status == hipo::kStatusOverflow) {
1442
+ highsLogUser(options.log_options, HighsLogType::kError,
1443
+ "Hipo: Integer overflow\n");
1444
+ } else if (status == hipo::kStatusErrorAnalyse) {
1445
+ highsLogUser(options.log_options, HighsLogType::kError,
1446
+ "Hipo: Error in analyse phase\n");
1447
+ } else if (status == hipo::kStatusErrorFactorise) {
1448
+ highsLogUser(options.log_options, HighsLogType::kError,
1449
+ "Hipo: Error in factorise phase\n");
1450
+ } else if (status == hipo::kStatusErrorSolve) {
1451
+ highsLogUser(options.log_options, HighsLogType::kError,
1452
+ "Hipo: Error in solve phase\n");
1453
+ } else if (status == hipo::kStatusBadModel) {
1454
+ highsLogUser(options.log_options, HighsLogType::kError,
1455
+ "Hipo: Invalid model\n");
1456
+ } else {
1457
+ highsLogUser(options.log_options, HighsLogType::kError,
1458
+ "Hipo: Unrecognized status\n");
1459
+ }
1460
+ return HighsStatus::kError;
1461
+ }
1462
+
1463
+ HighsStatus reportHipoCrossoverStatus(const HighsOptions& options,
1464
+ const ipx::Int status, bool is_qp) {
1465
+ if (is_qp && options.run_crossover == kHighsOnString) {
1466
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1467
+ "Hipo: Crossover not available for QP\n");
1468
+ return HighsStatus::kWarning;
1469
+ }
1470
+
1471
+ if (status == IPX_STATUS_not_run) {
1472
+ if (options.run_crossover == kHighsOnString) {
1473
+ // Warn if crossover not run and run_crossover option is "on"
1474
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1475
+ "Hipo: Crossover not run\n");
1476
+ return HighsStatus::kWarning;
1477
+ }
1478
+ return HighsStatus::kOk;
1479
+ } else if (status == IPX_STATUS_optimal) {
1480
+ highsLogUser(options.log_options, HighsLogType::kInfo,
1481
+ "Hipo: Crossover optimal\n");
1482
+ return HighsStatus::kOk;
1483
+ } else if (status == IPX_STATUS_imprecise) {
1484
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1485
+ "Hipo: Crossover imprecise\n");
1486
+ return HighsStatus::kWarning;
1487
+ } else if (status == IPX_STATUS_primal_infeas) {
1488
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1489
+ "Hipo: Crossover primal infeasible\n");
1490
+ return HighsStatus::kWarning;
1491
+ } else if (status == IPX_STATUS_dual_infeas) {
1492
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1493
+ "Hipo: Crossover dual infeasible\n");
1494
+ return HighsStatus::kWarning;
1495
+ } else if (status == IPX_STATUS_user_interrupt) {
1496
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1497
+ "Hipo: Crossover user interrupt\n");
1498
+ return HighsStatus::kOk;
1499
+ } else if (status == IPX_STATUS_time_limit) {
1500
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1501
+ "Hipo: Crossover reached time limit\n");
1502
+ return HighsStatus::kWarning;
1503
+ } else if (status == IPX_STATUS_iter_limit) {
1504
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1505
+ "Hipo: Crossover reached iteration limit\n");
1506
+ return HighsStatus::kWarning;
1507
+ } else if (status == IPX_STATUS_no_progress) {
1508
+ highsLogUser(options.log_options, HighsLogType::kWarning,
1509
+ "Hipo: Crossover no progress\n");
1510
+ return HighsStatus::kWarning;
1511
+ } else if (status == IPX_STATUS_failed) {
1512
+ highsLogUser(options.log_options, HighsLogType::kError,
1513
+ "Hipo: Crossover failed\n");
1514
+ return HighsStatus::kError;
1515
+ } else if (status == IPX_STATUS_debug) {
1516
+ highsLogUser(options.log_options, HighsLogType::kError,
1517
+ "Hipo: Crossover debug\n");
1518
+ return HighsStatus::kError;
1519
+ } else {
1520
+ highsLogUser(options.log_options, HighsLogType::kError,
1521
+ "Hipo: Crossover unrecognised status\n");
1522
+ return HighsStatus::kError;
1523
+ }
1524
+ return HighsStatus::kError;
1525
+ }
1526
+ #endif