lpsolver 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1165) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +104 -26
  4. data/ext/lpsolver/Makefile +269 -0
  5. data/ext/lpsolver/ext.c +353 -0
  6. data/ext/lpsolver/ext.o +0 -0
  7. data/ext/lpsolver/extconf.rb +79 -0
  8. data/ext/lpsolver/native.so +0 -0
  9. data/ext/lpsolver-highs/AUTHORS +7 -0
  10. data/ext/lpsolver-highs/BUILD.bazel +243 -0
  11. data/ext/lpsolver-highs/CITATION.cff +29 -0
  12. data/ext/lpsolver-highs/CMakeCache.txt +406 -0
  13. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCCompiler.cmake +81 -0
  14. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake +101 -0
  15. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_C.bin +0 -0
  16. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
  17. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeSystem.cmake +15 -0
  18. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/CMakeCCompilerId.c +904 -0
  19. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/a.out +0 -0
  20. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +919 -0
  21. data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/a.out +0 -0
  22. data/ext/lpsolver-highs/CMakeFiles/CMakeConfigureLog.yaml +576 -0
  23. data/ext/lpsolver-highs/CMakeFiles/cmake.check_cache +1 -0
  24. data/ext/lpsolver-highs/CMakeLists.txt +983 -0
  25. data/ext/lpsolver-highs/CODE_OF_CONDUCT.md +128 -0
  26. data/ext/lpsolver-highs/CONTRIBUTING.md +31 -0
  27. data/ext/lpsolver-highs/FEATURES.md +61 -0
  28. data/ext/lpsolver-highs/LICENSE.txt +21 -0
  29. data/ext/lpsolver-highs/MODULE.bazel +38 -0
  30. data/ext/lpsolver-highs/README.md +281 -0
  31. data/ext/lpsolver-highs/THIRD_PARTY_NOTICES.md +78 -0
  32. data/ext/lpsolver-highs/Version.txt +4 -0
  33. data/ext/lpsolver-highs/WORKSPACE +33 -0
  34. data/ext/lpsolver-highs/app/CMakeLists.txt +110 -0
  35. data/ext/lpsolver-highs/app/HighsRuntimeOptions.h +292 -0
  36. data/ext/lpsolver-highs/app/RunHighs.cpp +147 -0
  37. data/ext/lpsolver-highs/app/highs_webdemo_shell.html +73 -0
  38. data/ext/lpsolver-highs/build/bin/highs +0 -0
  39. data/ext/lpsolver-highs/build/include/highs/HConfig.h +22 -0
  40. data/ext/lpsolver-highs/build/include/highs/Highs.h +1812 -0
  41. data/ext/lpsolver-highs/build/include/highs/interfaces/highs_c_api.h +2651 -0
  42. data/ext/lpsolver-highs/build/include/highs/io/Filereader.h +45 -0
  43. data/ext/lpsolver-highs/build/include/highs/io/FilereaderLp.h +49 -0
  44. data/ext/lpsolver-highs/build/include/highs/io/FilereaderMps.h +27 -0
  45. data/ext/lpsolver-highs/build/include/highs/io/HMPSIO.h +78 -0
  46. data/ext/lpsolver-highs/build/include/highs/io/HMpsFF.h +245 -0
  47. data/ext/lpsolver-highs/build/include/highs/io/HighsIO.h +118 -0
  48. data/ext/lpsolver-highs/build/include/highs/io/LoadOptions.h +24 -0
  49. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/builder.hpp +25 -0
  50. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/def.hpp +19 -0
  51. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/model.hpp +68 -0
  52. data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/reader.hpp +10 -0
  53. data/ext/lpsolver-highs/build/include/highs/ipm/IpxSolution.h +32 -0
  54. data/ext/lpsolver-highs/build/include/highs/ipm/IpxWrapper.h +106 -0
  55. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu.h +161 -0
  56. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  57. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  58. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  59. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  60. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  61. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  62. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  63. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  64. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  65. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  66. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  67. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_object.h +30 -0
  68. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  69. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  70. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  71. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_update.h +125 -0
  72. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_def.h +39 -0
  73. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_file.h +21 -0
  74. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_internal.h +220 -0
  75. data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_list.h +173 -0
  76. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
  77. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  78. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basis.h +350 -0
  79. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
  80. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/control.h +167 -0
  81. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/crossover.h +157 -0
  82. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/diagonal_precond.h +45 -0
  83. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
  84. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/guess_basis.h +21 -0
  85. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/indexed_vector.h +113 -0
  86. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/info.h +27 -0
  87. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipm.h +94 -0
  88. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_c.h +47 -0
  89. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_config.h +9 -0
  90. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_info.h +111 -0
  91. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_internal.h +89 -0
  92. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_parameters.h +76 -0
  93. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_status.h +57 -0
  94. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/iterate.h +331 -0
  95. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver.h +70 -0
  96. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  97. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  98. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/linear_operator.h +26 -0
  99. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lp_solver.h +204 -0
  100. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_factorization.h +79 -0
  101. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_update.h +129 -0
  102. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/maxvolume.h +54 -0
  103. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/model.h +413 -0
  104. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/multistream.h +52 -0
  105. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/normal_matrix.h +44 -0
  106. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/power_method.h +44 -0
  107. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_matrix.h +195 -0
  108. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_utils.h +58 -0
  109. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  110. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/starting_basis.h +39 -0
  111. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/symbolic_invert.h +29 -0
  112. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/timer.h +25 -0
  113. data/ext/lpsolver-highs/build/include/highs/ipm/ipx/utils.h +37 -0
  114. data/ext/lpsolver-highs/build/include/highs/lp_data/HConst.h +430 -0
  115. data/ext/lpsolver-highs/build/include/highs/lp_data/HStruct.h +213 -0
  116. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsAnalysis.h +23 -0
  117. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallback.h +104 -0
  118. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallbackStruct.h +70 -0
  119. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsDebug.h +34 -0
  120. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsIis.h +139 -0
  121. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfo.h +421 -0
  122. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfoDebug.h +27 -0
  123. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLp.h +97 -0
  124. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpSolverObject.h +47 -0
  125. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpUtils.h +330 -0
  126. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsModelUtils.h +129 -0
  127. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsOptions.h +1715 -0
  128. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsRanging.h +43 -0
  129. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolution.h +179 -0
  130. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolutionDebug.h +87 -0
  131. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolve.h +29 -0
  132. data/ext/lpsolver-highs/build/include/highs/lp_data/HighsStatus.h +29 -0
  133. data/ext/lpsolver-highs/build/include/highs/mip/HighsCliqueTable.h +329 -0
  134. data/ext/lpsolver-highs/build/include/highs/mip/HighsConflictPool.h +109 -0
  135. data/ext/lpsolver-highs/build/include/highs/mip/HighsCutGeneration.h +108 -0
  136. data/ext/lpsolver-highs/build/include/highs/mip/HighsCutPool.h +168 -0
  137. data/ext/lpsolver-highs/build/include/highs/mip/HighsDebugSol.h +133 -0
  138. data/ext/lpsolver-highs/build/include/highs/mip/HighsDomain.h +657 -0
  139. data/ext/lpsolver-highs/build/include/highs/mip/HighsDomainChange.h +48 -0
  140. data/ext/lpsolver-highs/build/include/highs/mip/HighsDynamicRowMatrix.h +104 -0
  141. data/ext/lpsolver-highs/build/include/highs/mip/HighsGFkSolve.h +439 -0
  142. data/ext/lpsolver-highs/build/include/highs/mip/HighsImplications.h +194 -0
  143. data/ext/lpsolver-highs/build/include/highs/mip/HighsLpAggregator.h +50 -0
  144. data/ext/lpsolver-highs/build/include/highs/mip/HighsLpRelaxation.h +361 -0
  145. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipAnalysis.h +71 -0
  146. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolver.h +159 -0
  147. data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolverData.h +313 -0
  148. data/ext/lpsolver-highs/build/include/highs/mip/HighsModkSeparator.h +60 -0
  149. data/ext/lpsolver-highs/build/include/highs/mip/HighsNodeQueue.h +312 -0
  150. data/ext/lpsolver-highs/build/include/highs/mip/HighsObjectiveFunction.h +71 -0
  151. data/ext/lpsolver-highs/build/include/highs/mip/HighsPathSeparator.h +39 -0
  152. data/ext/lpsolver-highs/build/include/highs/mip/HighsPrimalHeuristics.h +75 -0
  153. data/ext/lpsolver-highs/build/include/highs/mip/HighsPseudocost.h +366 -0
  154. data/ext/lpsolver-highs/build/include/highs/mip/HighsRedcostFixing.h +42 -0
  155. data/ext/lpsolver-highs/build/include/highs/mip/HighsSearch.h +241 -0
  156. data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparation.h +41 -0
  157. data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparator.h +60 -0
  158. data/ext/lpsolver-highs/build/include/highs/mip/HighsTableauSeparator.h +34 -0
  159. data/ext/lpsolver-highs/build/include/highs/mip/HighsTransformedLp.h +63 -0
  160. data/ext/lpsolver-highs/build/include/highs/mip/MipTimer.h +544 -0
  161. data/ext/lpsolver-highs/build/include/highs/mip/feasibilityjump.hh +800 -0
  162. data/ext/lpsolver-highs/build/include/highs/model/HighsHessian.h +54 -0
  163. data/ext/lpsolver-highs/build/include/highs/model/HighsHessianUtils.h +47 -0
  164. data/ext/lpsolver-highs/build/include/highs/model/HighsModel.h +42 -0
  165. data/ext/lpsolver-highs/build/include/highs/parallel/HighsBinarySemaphore.h +108 -0
  166. data/ext/lpsolver-highs/build/include/highs/parallel/HighsCacheAlign.h +82 -0
  167. data/ext/lpsolver-highs/build/include/highs/parallel/HighsCombinable.h +116 -0
  168. data/ext/lpsolver-highs/build/include/highs/parallel/HighsMutex.h +124 -0
  169. data/ext/lpsolver-highs/build/include/highs/parallel/HighsParallel.h +128 -0
  170. data/ext/lpsolver-highs/build/include/highs/parallel/HighsRaceTimer.h +38 -0
  171. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSchedulerConstants.h +19 -0
  172. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSpinMutex.h +48 -0
  173. data/ext/lpsolver-highs/build/include/highs/parallel/HighsSplitDeque.h +606 -0
  174. data/ext/lpsolver-highs/build/include/highs/parallel/HighsTask.h +170 -0
  175. data/ext/lpsolver-highs/build/include/highs/parallel/HighsTaskExecutor.h +217 -0
  176. data/ext/lpsolver-highs/build/include/highs/pdlp/CupdlpWrapper.h +108 -0
  177. data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpTimer.h +155 -0
  178. data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpWrapper.h +26 -0
  179. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
  180. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
  181. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
  182. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  183. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  184. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  185. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
  186. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
  187. data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
  188. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/defs.hpp +222 -0
  189. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/linalg.hpp +61 -0
  190. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/logger.hpp +80 -0
  191. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/pdhg.hpp +358 -0
  192. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/restart.hpp +96 -0
  193. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/scaling.hpp +74 -0
  194. data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/solver_results.hpp +65 -0
  195. data/ext/lpsolver-highs/build/include/highs/pdqsort/pdqsort.h +532 -0
  196. data/ext/lpsolver-highs/build/include/highs/presolve/HPresolve.h +505 -0
  197. data/ext/lpsolver-highs/build/include/highs/presolve/HPresolveAnalysis.h +52 -0
  198. data/ext/lpsolver-highs/build/include/highs/presolve/HighsPostsolveStack.h +943 -0
  199. data/ext/lpsolver-highs/build/include/highs/presolve/HighsSymmetry.h +284 -0
  200. data/ext/lpsolver-highs/build/include/highs/presolve/ICrash.h +124 -0
  201. data/ext/lpsolver-highs/build/include/highs/presolve/ICrashUtil.h +62 -0
  202. data/ext/lpsolver-highs/build/include/highs/presolve/ICrashX.h +23 -0
  203. data/ext/lpsolver-highs/build/include/highs/presolve/PresolveComponent.h +90 -0
  204. data/ext/lpsolver-highs/build/include/highs/qpsolver/a_asm.hpp +77 -0
  205. data/ext/lpsolver-highs/build/include/highs/qpsolver/a_quass.hpp +22 -0
  206. data/ext/lpsolver-highs/build/include/highs/qpsolver/basis.hpp +159 -0
  207. data/ext/lpsolver-highs/build/include/highs/qpsolver/crashsolution.hpp +20 -0
  208. data/ext/lpsolver-highs/build/include/highs/qpsolver/dantzigpricing.hpp +80 -0
  209. data/ext/lpsolver-highs/build/include/highs/qpsolver/devexpricing.hpp +108 -0
  210. data/ext/lpsolver-highs/build/include/highs/qpsolver/eventhandler.hpp +30 -0
  211. data/ext/lpsolver-highs/build/include/highs/qpsolver/factor.hpp +408 -0
  212. data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_bounded.hpp +114 -0
  213. data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_highs.hpp +301 -0
  214. data/ext/lpsolver-highs/build/include/highs/qpsolver/gradient.hpp +46 -0
  215. data/ext/lpsolver-highs/build/include/highs/qpsolver/instance.hpp +70 -0
  216. data/ext/lpsolver-highs/build/include/highs/qpsolver/matrix.hpp +342 -0
  217. data/ext/lpsolver-highs/build/include/highs/qpsolver/perturbation.hpp +15 -0
  218. data/ext/lpsolver-highs/build/include/highs/qpsolver/pricing.hpp +22 -0
  219. data/ext/lpsolver-highs/build/include/highs/qpsolver/qpconst.hpp +34 -0
  220. data/ext/lpsolver-highs/build/include/highs/qpsolver/qpvector.hpp +242 -0
  221. data/ext/lpsolver-highs/build/include/highs/qpsolver/quass.hpp +27 -0
  222. data/ext/lpsolver-highs/build/include/highs/qpsolver/ratiotest.hpp +26 -0
  223. data/ext/lpsolver-highs/build/include/highs/qpsolver/runtime.hpp +45 -0
  224. data/ext/lpsolver-highs/build/include/highs/qpsolver/scaling.hpp +15 -0
  225. data/ext/lpsolver-highs/build/include/highs/qpsolver/settings.hpp +84 -0
  226. data/ext/lpsolver-highs/build/include/highs/qpsolver/snippets.hpp +36 -0
  227. data/ext/lpsolver-highs/build/include/highs/qpsolver/statistics.hpp +30 -0
  228. data/ext/lpsolver-highs/build/include/highs/qpsolver/steepestedgepricing.hpp +173 -0
  229. data/ext/lpsolver-highs/build/include/highs/simplex/HApp.h +550 -0
  230. data/ext/lpsolver-highs/build/include/highs/simplex/HEkk.h +419 -0
  231. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDual.h +513 -0
  232. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRHS.h +134 -0
  233. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRow.h +201 -0
  234. data/ext/lpsolver-highs/build/include/highs/simplex/HEkkPrimal.h +191 -0
  235. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplex.h +42 -0
  236. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexDebug.h +48 -0
  237. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexNla.h +158 -0
  238. data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexReport.h +21 -0
  239. data/ext/lpsolver-highs/build/include/highs/simplex/HighsSimplexAnalysis.h +500 -0
  240. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexConst.h +273 -0
  241. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexStruct.h +263 -0
  242. data/ext/lpsolver-highs/build/include/highs/simplex/SimplexTimer.h +414 -0
  243. data/ext/lpsolver-highs/build/include/highs/test_kkt/DevKkt.h +143 -0
  244. data/ext/lpsolver-highs/build/include/highs/test_kkt/KktCh2.h +79 -0
  245. data/ext/lpsolver-highs/build/include/highs/util/FactorTimer.h +199 -0
  246. data/ext/lpsolver-highs/build/include/highs/util/HFactor.h +587 -0
  247. data/ext/lpsolver-highs/build/include/highs/util/HFactorConst.h +81 -0
  248. data/ext/lpsolver-highs/build/include/highs/util/HFactorDebug.h +55 -0
  249. data/ext/lpsolver-highs/build/include/highs/util/HSet.h +89 -0
  250. data/ext/lpsolver-highs/build/include/highs/util/HVector.h +22 -0
  251. data/ext/lpsolver-highs/build/include/highs/util/HVectorBase.h +102 -0
  252. data/ext/lpsolver-highs/build/include/highs/util/HighsCDouble.h +323 -0
  253. data/ext/lpsolver-highs/build/include/highs/util/HighsComponent.h +53 -0
  254. data/ext/lpsolver-highs/build/include/highs/util/HighsDataStack.h +83 -0
  255. data/ext/lpsolver-highs/build/include/highs/util/HighsDisjointSets.h +107 -0
  256. data/ext/lpsolver-highs/build/include/highs/util/HighsHash.h +1274 -0
  257. data/ext/lpsolver-highs/build/include/highs/util/HighsHashTree.h +1461 -0
  258. data/ext/lpsolver-highs/build/include/highs/util/HighsInt.h +36 -0
  259. data/ext/lpsolver-highs/build/include/highs/util/HighsIntegers.h +212 -0
  260. data/ext/lpsolver-highs/build/include/highs/util/HighsLinearSumBounds.h +203 -0
  261. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixPic.h +37 -0
  262. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixSlice.h +561 -0
  263. data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixUtils.h +57 -0
  264. data/ext/lpsolver-highs/build/include/highs/util/HighsMemoryAllocation.h +63 -0
  265. data/ext/lpsolver-highs/build/include/highs/util/HighsRandom.h +242 -0
  266. data/ext/lpsolver-highs/build/include/highs/util/HighsRbTree.h +452 -0
  267. data/ext/lpsolver-highs/build/include/highs/util/HighsSort.h +131 -0
  268. data/ext/lpsolver-highs/build/include/highs/util/HighsSparseMatrix.h +151 -0
  269. data/ext/lpsolver-highs/build/include/highs/util/HighsSparseVectorSum.h +95 -0
  270. data/ext/lpsolver-highs/build/include/highs/util/HighsSplay.h +135 -0
  271. data/ext/lpsolver-highs/build/include/highs/util/HighsTimer.h +385 -0
  272. data/ext/lpsolver-highs/build/include/highs/util/HighsUtils.h +272 -0
  273. data/ext/lpsolver-highs/build/include/highs/util/stringutil.h +46 -0
  274. data/ext/lpsolver-highs/build/include/highs/zstr/strict_fstream.hpp +237 -0
  275. data/ext/lpsolver-highs/build/include/highs/zstr/zstr.hpp +473 -0
  276. data/ext/lpsolver-highs/build/include/highs_export.h +43 -0
  277. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config-version.cmake +65 -0
  278. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config.cmake +36 -0
  279. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets-release.cmake +19 -0
  280. data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets.cmake +111 -0
  281. data/ext/lpsolver-highs/build/lib/libhighs.a +0 -0
  282. data/ext/lpsolver-highs/build/lib/pkgconfig/highs.pc +12 -0
  283. data/ext/lpsolver-highs/build/share/doc/HIGHS/AUTHORS +7 -0
  284. data/ext/lpsolver-highs/build/share/doc/HIGHS/CITATION.cff +29 -0
  285. data/ext/lpsolver-highs/build/share/doc/HIGHS/CODE_OF_CONDUCT.md +128 -0
  286. data/ext/lpsolver-highs/build/share/doc/HIGHS/CONTRIBUTING.md +31 -0
  287. data/ext/lpsolver-highs/build/share/doc/HIGHS/FEATURES.md +61 -0
  288. data/ext/lpsolver-highs/build/share/doc/HIGHS/LICENSE.txt +21 -0
  289. data/ext/lpsolver-highs/build/share/doc/HIGHS/README.md +281 -0
  290. data/ext/lpsolver-highs/build_webdemo.sh +46 -0
  291. data/ext/lpsolver-highs/check/Avgas.cpp +245 -0
  292. data/ext/lpsolver-highs/check/Avgas.h +44 -0
  293. data/ext/lpsolver-highs/check/CMakeLists.txt +573 -0
  294. data/ext/lpsolver-highs/check/HCheckConfig.h.bazel.in +6 -0
  295. data/ext/lpsolver-highs/check/HCheckConfig.h.in +12 -0
  296. data/ext/lpsolver-highs/check/HCheckConfig.h.meson.in +6 -0
  297. data/ext/lpsolver-highs/check/SpecialLps.h +405 -0
  298. data/ext/lpsolver-highs/check/TestAlienBasis.cpp +720 -0
  299. data/ext/lpsolver-highs/check/TestBasis.cpp +359 -0
  300. data/ext/lpsolver-highs/check/TestBasisSolves.cpp +669 -0
  301. data/ext/lpsolver-highs/check/TestCAPI.c +2513 -0
  302. data/ext/lpsolver-highs/check/TestCallbacks.cpp +608 -0
  303. data/ext/lpsolver-highs/check/TestCheckSolution.cpp +740 -0
  304. data/ext/lpsolver-highs/check/TestCrossover.cpp +111 -0
  305. data/ext/lpsolver-highs/check/TestDualize.cpp +172 -0
  306. data/ext/lpsolver-highs/check/TestEkk.cpp +100 -0
  307. data/ext/lpsolver-highs/check/TestFactor.cpp +389 -0
  308. data/ext/lpsolver-highs/check/TestFilereader.cpp +568 -0
  309. data/ext/lpsolver-highs/check/TestFortranAPI.f90 +65 -0
  310. data/ext/lpsolver-highs/check/TestHSet.cpp +80 -0
  311. data/ext/lpsolver-highs/check/TestHighsCDouble.cpp +109 -0
  312. data/ext/lpsolver-highs/check/TestHighsGFkSolve.cpp +102 -0
  313. data/ext/lpsolver-highs/check/TestHighsHash.cpp +126 -0
  314. data/ext/lpsolver-highs/check/TestHighsHessian.cpp +329 -0
  315. data/ext/lpsolver-highs/check/TestHighsIntegers.cpp +42 -0
  316. data/ext/lpsolver-highs/check/TestHighsModel.cpp +134 -0
  317. data/ext/lpsolver-highs/check/TestHighsParallel.cpp +277 -0
  318. data/ext/lpsolver-highs/check/TestHighsRbTree.cpp +109 -0
  319. data/ext/lpsolver-highs/check/TestHighsSparseMatrix.cpp +126 -0
  320. data/ext/lpsolver-highs/check/TestHighsVersion.cpp +61 -0
  321. data/ext/lpsolver-highs/check/TestHipo.cpp +122 -0
  322. data/ext/lpsolver-highs/check/TestICrash.cpp +46 -0
  323. data/ext/lpsolver-highs/check/TestIO.cpp +163 -0
  324. data/ext/lpsolver-highs/check/TestIis.cpp +1063 -0
  325. data/ext/lpsolver-highs/check/TestInfo.cpp +116 -0
  326. data/ext/lpsolver-highs/check/TestIpm.cpp +226 -0
  327. data/ext/lpsolver-highs/check/TestIpx.cpp +96 -0
  328. data/ext/lpsolver-highs/check/TestLPFileFormat.cpp +22 -0
  329. data/ext/lpsolver-highs/check/TestLogging.cpp +69 -0
  330. data/ext/lpsolver-highs/check/TestLpModification.cpp +2497 -0
  331. data/ext/lpsolver-highs/check/TestLpOrientation.cpp +121 -0
  332. data/ext/lpsolver-highs/check/TestLpSolvers.cpp +555 -0
  333. data/ext/lpsolver-highs/check/TestLpValidation.cpp +689 -0
  334. data/ext/lpsolver-highs/check/TestMain.cpp +6 -0
  335. data/ext/lpsolver-highs/check/TestMipSolver.cpp +1406 -0
  336. data/ext/lpsolver-highs/check/TestModelProperties.cpp +143 -0
  337. data/ext/lpsolver-highs/check/TestMultiObjective.cpp +198 -0
  338. data/ext/lpsolver-highs/check/TestNames.cpp +187 -0
  339. data/ext/lpsolver-highs/check/TestOptions.cpp +544 -0
  340. data/ext/lpsolver-highs/check/TestPdlp.cpp +327 -0
  341. data/ext/lpsolver-highs/check/TestPdlpHi.cpp +40 -0
  342. data/ext/lpsolver-highs/check/TestPresolve.cpp +912 -0
  343. data/ext/lpsolver-highs/check/TestQpSolver.cpp +1345 -0
  344. data/ext/lpsolver-highs/check/TestRanging.cpp +558 -0
  345. data/ext/lpsolver-highs/check/TestRays.cpp +1010 -0
  346. data/ext/lpsolver-highs/check/TestSemiVariables.cpp +329 -0
  347. data/ext/lpsolver-highs/check/TestSetup.cpp +12 -0
  348. data/ext/lpsolver-highs/check/TestSort.cpp +247 -0
  349. data/ext/lpsolver-highs/check/TestSpecialLps.cpp +775 -0
  350. data/ext/lpsolver-highs/check/TestThrow.cpp +83 -0
  351. data/ext/lpsolver-highs/check/TestTspSolver.cpp +19 -0
  352. data/ext/lpsolver-highs/check/TestUserScale.cpp +444 -0
  353. data/ext/lpsolver-highs/check/cublas_example.cpp +76 -0
  354. data/ext/lpsolver-highs/check/cublas_gpu_start.cpp +88 -0
  355. data/ext/lpsolver-highs/check/hipo_test_option_files/hipo_options_0 +1 -0
  356. data/ext/lpsolver-highs/check/instances/1448.lp +1 -0
  357. data/ext/lpsolver-highs/check/instances/1449a.lp +1 -0
  358. data/ext/lpsolver-highs/check/instances/1449b.lp +1 -0
  359. data/ext/lpsolver-highs/check/instances/1451.lp +8 -0
  360. data/ext/lpsolver-highs/check/instances/2122.lp +1822 -0
  361. data/ext/lpsolver-highs/check/instances/2171.mps +717 -0
  362. data/ext/lpsolver-highs/check/instances/25fv47.mps +6919 -0
  363. data/ext/lpsolver-highs/check/instances/2821-duplicate.mps +31 -0
  364. data/ext/lpsolver-highs/check/instances/2821-qmatrix.mps +31 -0
  365. data/ext/lpsolver-highs/check/instances/2821-quadobj.mps +29 -0
  366. data/ext/lpsolver-highs/check/instances/2821-summation.mps +30 -0
  367. data/ext/lpsolver-highs/check/instances/2821.mps +29 -0
  368. data/ext/lpsolver-highs/check/instances/2894.mps +89 -0
  369. data/ext/lpsolver-highs/check/instances/80bau3b.mps +23732 -0
  370. data/ext/lpsolver-highs/check/instances/WithInf.set +3 -0
  371. data/ext/lpsolver-highs/check/instances/adlittle.mps +335 -0
  372. data/ext/lpsolver-highs/check/instances/afiro.mps +83 -0
  373. data/ext/lpsolver-highs/check/instances/avgas.mps +51 -0
  374. data/ext/lpsolver-highs/check/instances/bell5.mps +384 -0
  375. data/ext/lpsolver-highs/check/instances/bgetam.mps +2112 -0
  376. data/ext/lpsolver-highs/check/instances/blending.mps +13 -0
  377. data/ext/lpsolver-highs/check/instances/box1.mps +1085 -0
  378. data/ext/lpsolver-highs/check/instances/chip.mps +13 -0
  379. data/ext/lpsolver-highs/check/instances/comment.mps +23 -0
  380. data/ext/lpsolver-highs/check/instances/cplex1.mps +9674 -0
  381. data/ext/lpsolver-highs/check/instances/dD2e.mps +10 -0
  382. data/ext/lpsolver-highs/check/instances/dcmulti.mps +2310 -0
  383. data/ext/lpsolver-highs/check/instances/e226.mps +1733 -0
  384. data/ext/lpsolver-highs/check/instances/egout-ac.mps +473 -0
  385. data/ext/lpsolver-highs/check/instances/egout.mps +403 -0
  386. data/ext/lpsolver-highs/check/instances/etamacro.mps +2084 -0
  387. data/ext/lpsolver-highs/check/instances/ex72a.mps +849 -0
  388. data/ext/lpsolver-highs/check/instances/fixed-binary.lp +11 -0
  389. data/ext/lpsolver-highs/check/instances/flugpl.mps +111 -0
  390. data/ext/lpsolver-highs/check/instances/flugpl_illegal_integer.sol +24 -0
  391. data/ext/lpsolver-highs/check/instances/flugpl_integer.sol +25 -0
  392. data/ext/lpsolver-highs/check/instances/forest6.mps +261 -0
  393. data/ext/lpsolver-highs/check/instances/galenet.mps +34 -0
  394. data/ext/lpsolver-highs/check/instances/gams10am.mps +478 -0
  395. data/ext/lpsolver-highs/check/instances/garbage.ems +3 -0
  396. data/ext/lpsolver-highs/check/instances/garbage.lp +3 -0
  397. data/ext/lpsolver-highs/check/instances/garbage.mps +3 -0
  398. data/ext/lpsolver-highs/check/instances/gas11.mps +2924 -0
  399. data/ext/lpsolver-highs/check/instances/gesa2.mps +5459 -0
  400. data/ext/lpsolver-highs/check/instances/greenbea.mps +19215 -0
  401. data/ext/lpsolver-highs/check/instances/gt2.mps +534 -0
  402. data/ext/lpsolver-highs/check/instances/infeasible-mip0.mps +140 -0
  403. data/ext/lpsolver-highs/check/instances/infeasible-mip1.mps +371 -0
  404. data/ext/lpsolver-highs/check/instances/israel.mps +1490 -0
  405. data/ext/lpsolver-highs/check/instances/issue-2095.mps +836 -0
  406. data/ext/lpsolver-highs/check/instances/issue-2173.mps +3331 -0
  407. data/ext/lpsolver-highs/check/instances/issue-2204.mps +143 -0
  408. data/ext/lpsolver-highs/check/instances/issue-2290.mps +158 -0
  409. data/ext/lpsolver-highs/check/instances/issue-2388.lp +76 -0
  410. data/ext/lpsolver-highs/check/instances/issue-2402.mps +435 -0
  411. data/ext/lpsolver-highs/check/instances/issue-2446.mps +9154 -0
  412. data/ext/lpsolver-highs/check/instances/issue-2585.lp +16 -0
  413. data/ext/lpsolver-highs/check/instances/issue-2874-3.mps +97 -0
  414. data/ext/lpsolver-highs/check/instances/klein1.mps +422 -0
  415. data/ext/lpsolver-highs/check/instances/lseu.mps +371 -0
  416. data/ext/lpsolver-highs/check/instances/model.xyz +1 -0
  417. data/ext/lpsolver-highs/check/instances/nan0.mps +13 -0
  418. data/ext/lpsolver-highs/check/instances/nan1.mps +13 -0
  419. data/ext/lpsolver-highs/check/instances/nan2.mps +13 -0
  420. data/ext/lpsolver-highs/check/instances/no-newline-eof.lp +5 -0
  421. data/ext/lpsolver-highs/check/instances/p01.mps +909 -0
  422. data/ext/lpsolver-highs/check/instances/p0548.mps +1992 -0
  423. data/ext/lpsolver-highs/check/instances/primal1.mps +3909 -0
  424. data/ext/lpsolver-highs/check/instances/qap04.mps +606 -0
  425. data/ext/lpsolver-highs/check/instances/qcqp.lp +8 -0
  426. data/ext/lpsolver-highs/check/instances/qjh.lp +9 -0
  427. data/ext/lpsolver-highs/check/instances/qjh.mps +18 -0
  428. data/ext/lpsolver-highs/check/instances/qjh_qmatrix.mps +19 -0
  429. data/ext/lpsolver-highs/check/instances/qjh_quadobj.mps +18 -0
  430. data/ext/lpsolver-highs/check/instances/qjh_quadobj_qmatrix.mps +25 -0
  431. data/ext/lpsolver-highs/check/instances/qjh_uncon.lp +10 -0
  432. data/ext/lpsolver-highs/check/instances/qjh_uncon.mps +17 -0
  433. data/ext/lpsolver-highs/check/instances/qpinfeasible.lp +8 -0
  434. data/ext/lpsolver-highs/check/instances/qptestnw.lp +7 -0
  435. data/ext/lpsolver-highs/check/instances/qpunbounded.lp +5 -0
  436. data/ext/lpsolver-highs/check/instances/refinery.mps +1882 -0
  437. data/ext/lpsolver-highs/check/instances/rgn.mps +559 -0
  438. data/ext/lpsolver-highs/check/instances/scrs8.mps +2717 -0
  439. data/ext/lpsolver-highs/check/instances/sctest.mps +66 -0
  440. data/ext/lpsolver-highs/check/instances/semi-continuous.lp +13 -0
  441. data/ext/lpsolver-highs/check/instances/semi-continuous.mps +24 -0
  442. data/ext/lpsolver-highs/check/instances/semi-integer.lp +15 -0
  443. data/ext/lpsolver-highs/check/instances/semi-integer.mps +22 -0
  444. data/ext/lpsolver-highs/check/instances/shell.mps +4039 -0
  445. data/ext/lpsolver-highs/check/instances/silly-names.mps +14 -0
  446. data/ext/lpsolver-highs/check/instances/small_mip.mps +87 -0
  447. data/ext/lpsolver-highs/check/instances/smalllp.mps +21 -0
  448. data/ext/lpsolver-highs/check/instances/sp150x300d.mps +1983 -0
  449. data/ext/lpsolver-highs/check/instances/stair.mps +2499 -0
  450. data/ext/lpsolver-highs/check/instances/standata.mps +2317 -0
  451. data/ext/lpsolver-highs/check/instances/standgub.mps +2428 -0
  452. data/ext/lpsolver-highs/check/instances/standmps.mps +2695 -0
  453. data/ext/lpsolver-highs/check/instances/test.mps +53 -0
  454. data/ext/lpsolver-highs/check/instances/vol1.mps +1895 -0
  455. data/ext/lpsolver-highs/check/instances/warnings.mps +68 -0
  456. data/ext/lpsolver-highs/check/instances/woodinfe.mps +216 -0
  457. data/ext/lpsolver-highs/check/matrix_multiplication.hpp +49 -0
  458. data/ext/lpsolver-highs/check/meson.build +92 -0
  459. data/ext/lpsolver-highs/check/pythontest.py +11 -0
  460. data/ext/lpsolver-highs/check/sample_options_file +8 -0
  461. data/ext/lpsolver-highs/cmake/CheckAtomic.cmake +74 -0
  462. data/ext/lpsolver-highs/cmake/FindCUDAConf.cmake +44 -0
  463. data/ext/lpsolver-highs/cmake/FindHipoDeps.cmake +351 -0
  464. data/ext/lpsolver-highs/cmake/README.md +243 -0
  465. data/ext/lpsolver-highs/cmake/cpp-highs.cmake +243 -0
  466. data/ext/lpsolver-highs/cmake/dotnet.cmake +94 -0
  467. data/ext/lpsolver-highs/cmake/highs-config.cmake.in +22 -0
  468. data/ext/lpsolver-highs/cmake/python-highs.cmake +74 -0
  469. data/ext/lpsolver-highs/cmake/set-version.cmake +26 -0
  470. data/ext/lpsolver-highs/cmake/sources-python.cmake +461 -0
  471. data/ext/lpsolver-highs/cmake/sources.cmake +618 -0
  472. data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeader.pl +78 -0
  473. data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeaderUpdateAll +32 -0
  474. data/ext/lpsolver-highs/docs/Project.toml +7 -0
  475. data/ext/lpsolver-highs/docs/README.md +27 -0
  476. data/ext/lpsolver-highs/docs/c_api_gen/HConfig.h +1 -0
  477. data/ext/lpsolver-highs/docs/c_api_gen/build.jl +48 -0
  478. data/ext/lpsolver-highs/docs/make.jl +115 -0
  479. data/ext/lpsolver-highs/docs/src/assets/logo.png +0 -0
  480. data/ext/lpsolver-highs/docs/src/callbacks.md +171 -0
  481. data/ext/lpsolver-highs/docs/src/executable.md +88 -0
  482. data/ext/lpsolver-highs/docs/src/guide/advanced.md +66 -0
  483. data/ext/lpsolver-highs/docs/src/guide/basic.md +116 -0
  484. data/ext/lpsolver-highs/docs/src/guide/further.md +193 -0
  485. data/ext/lpsolver-highs/docs/src/guide/gpu.md +58 -0
  486. data/ext/lpsolver-highs/docs/src/guide/index.md +18 -0
  487. data/ext/lpsolver-highs/docs/src/guide/kkt.md +219 -0
  488. data/ext/lpsolver-highs/docs/src/guide/numerics.md +55 -0
  489. data/ext/lpsolver-highs/docs/src/index.md +86 -0
  490. data/ext/lpsolver-highs/docs/src/installation.md +130 -0
  491. data/ext/lpsolver-highs/docs/src/interfaces/c_api.md +6 -0
  492. data/ext/lpsolver-highs/docs/src/interfaces/cpp/examples.md +1 -0
  493. data/ext/lpsolver-highs/docs/src/interfaces/cpp/index.md +29 -0
  494. data/ext/lpsolver-highs/docs/src/interfaces/cpp/library.md +107 -0
  495. data/ext/lpsolver-highs/docs/src/interfaces/csharp.md +55 -0
  496. data/ext/lpsolver-highs/docs/src/interfaces/fortran.md +11 -0
  497. data/ext/lpsolver-highs/docs/src/interfaces/julia/index.md +130 -0
  498. data/ext/lpsolver-highs/docs/src/interfaces/other.md +41 -0
  499. data/ext/lpsolver-highs/docs/src/interfaces/python/example-py.md +275 -0
  500. data/ext/lpsolver-highs/docs/src/interfaces/python/index.md +91 -0
  501. data/ext/lpsolver-highs/docs/src/interfaces/python/model-py.md +90 -0
  502. data/ext/lpsolver-highs/docs/src/options/definitions.md +529 -0
  503. data/ext/lpsolver-highs/docs/src/options/intro.md +46 -0
  504. data/ext/lpsolver-highs/docs/src/parallel.md +88 -0
  505. data/ext/lpsolver-highs/docs/src/solvers.md +168 -0
  506. data/ext/lpsolver-highs/docs/src/structures/classes/HighsHessian.md +9 -0
  507. data/ext/lpsolver-highs/docs/src/structures/classes/HighsIis.md +16 -0
  508. data/ext/lpsolver-highs/docs/src/structures/classes/HighsLp.md +19 -0
  509. data/ext/lpsolver-highs/docs/src/structures/classes/HighsModel.md +6 -0
  510. data/ext/lpsolver-highs/docs/src/structures/classes/HighsSparseMatrix.md +10 -0
  511. data/ext/lpsolver-highs/docs/src/structures/classes/index.md +11 -0
  512. data/ext/lpsolver-highs/docs/src/structures/enums.md +114 -0
  513. data/ext/lpsolver-highs/docs/src/structures/index.md +12 -0
  514. data/ext/lpsolver-highs/docs/src/structures/structs/HighsBasis.md +8 -0
  515. data/ext/lpsolver-highs/docs/src/structures/structs/HighsInfo.md +148 -0
  516. data/ext/lpsolver-highs/docs/src/structures/structs/HighsLinearObjective.md +11 -0
  517. data/ext/lpsolver-highs/docs/src/structures/structs/HighsSolution.md +10 -0
  518. data/ext/lpsolver-highs/docs/src/structures/structs/index.md +10 -0
  519. data/ext/lpsolver-highs/docs/src/terminology.md +163 -0
  520. data/ext/lpsolver-highs/examples/CMakeLists.txt +26 -0
  521. data/ext/lpsolver-highs/examples/Docs.py +104 -0
  522. data/ext/lpsolver-highs/examples/branch-and-price.py +465 -0
  523. data/ext/lpsolver-highs/examples/call_highs_from_c.c +685 -0
  524. data/ext/lpsolver-highs/examples/call_highs_from_c_minimal.c +659 -0
  525. data/ext/lpsolver-highs/examples/call_highs_from_cpp.cpp +178 -0
  526. data/ext/lpsolver-highs/examples/call_highs_from_csharp.cs +83 -0
  527. data/ext/lpsolver-highs/examples/call_highs_from_fortran.f90 +579 -0
  528. data/ext/lpsolver-highs/examples/call_highs_from_python.py +448 -0
  529. data/ext/lpsolver-highs/examples/call_highs_from_python_highspy.py +71 -0
  530. data/ext/lpsolver-highs/examples/call_highs_from_python_mps.py +59 -0
  531. data/ext/lpsolver-highs/examples/callback_gap.py +71 -0
  532. data/ext/lpsolver-highs/examples/chip.py +43 -0
  533. data/ext/lpsolver-highs/examples/chip0.py +29 -0
  534. data/ext/lpsolver-highs/examples/distillation.py +77 -0
  535. data/ext/lpsolver-highs/examples/knapsack.py +43 -0
  536. data/ext/lpsolver-highs/examples/minimal.py +11 -0
  537. data/ext/lpsolver-highs/examples/multi_objective.py +139 -0
  538. data/ext/lpsolver-highs/examples/multiple_objective.py +120 -0
  539. data/ext/lpsolver-highs/examples/network_flow.py +37 -0
  540. data/ext/lpsolver-highs/examples/nqueens.py +29 -0
  541. data/ext/lpsolver-highs/examples/plot_highs_log.py +134 -0
  542. data/ext/lpsolver-highs/extern/CLI11.hpp +11546 -0
  543. data/ext/lpsolver-highs/extern/LICENCE_1_0.txt +23 -0
  544. data/ext/lpsolver-highs/extern/amd/License.txt +35 -0
  545. data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.c +54 -0
  546. data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.h +56 -0
  547. data/ext/lpsolver-highs/extern/amd/amd.h +357 -0
  548. data/ext/lpsolver-highs/extern/amd/amd_1.c +172 -0
  549. data/ext/lpsolver-highs/extern/amd/amd_2.c +1761 -0
  550. data/ext/lpsolver-highs/extern/amd/amd_aat.c +179 -0
  551. data/ext/lpsolver-highs/extern/amd/amd_control.c +65 -0
  552. data/ext/lpsolver-highs/extern/amd/amd_defaults.c +37 -0
  553. data/ext/lpsolver-highs/extern/amd/amd_info.c +120 -0
  554. data/ext/lpsolver-highs/extern/amd/amd_internal.h +137 -0
  555. data/ext/lpsolver-highs/extern/amd/amd_order.c +195 -0
  556. data/ext/lpsolver-highs/extern/amd/amd_post_tree.c +105 -0
  557. data/ext/lpsolver-highs/extern/amd/amd_postorder.c +140 -0
  558. data/ext/lpsolver-highs/extern/amd/amd_preprocess.c +107 -0
  559. data/ext/lpsolver-highs/extern/amd/amd_valid.c +93 -0
  560. data/ext/lpsolver-highs/extern/amd/changes.txt +8 -0
  561. data/ext/lpsolver-highs/extern/catch.hpp +18861 -0
  562. data/ext/lpsolver-highs/extern/metis/Changes.txt +31 -0
  563. data/ext/lpsolver-highs/extern/metis/GKlib/GKlib.h +62 -0
  564. data/ext/lpsolver-highs/extern/metis/GKlib/error.c +21 -0
  565. data/ext/lpsolver-highs/extern/metis/GKlib/gk_arch.h +64 -0
  566. data/ext/lpsolver-highs/extern/metis/GKlib/gk_defs.h +19 -0
  567. data/ext/lpsolver-highs/extern/metis/GKlib/gk_macros.h +50 -0
  568. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkblas.h +51 -0
  569. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkmemory.h +80 -0
  570. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkpqueue.h +329 -0
  571. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkrandom.h +89 -0
  572. data/ext/lpsolver-highs/extern/metis/GKlib/gk_mksort.h +271 -0
  573. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_inttypes.h +41 -0
  574. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stat.h +22 -0
  575. data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stdint.h +41 -0
  576. data/ext/lpsolver-highs/extern/metis/GKlib/gk_proto.h +50 -0
  577. data/ext/lpsolver-highs/extern/metis/GKlib/gk_struct.h +66 -0
  578. data/ext/lpsolver-highs/extern/metis/GKlib/gk_types.h +15 -0
  579. data/ext/lpsolver-highs/extern/metis/GKlib/mcore.c +176 -0
  580. data/ext/lpsolver-highs/extern/metis/GKlib/memory.c +23 -0
  581. data/ext/lpsolver-highs/extern/metis/GKlib/random.c +37 -0
  582. data/ext/lpsolver-highs/extern/metis/LICENSE.txt +18 -0
  583. data/ext/lpsolver-highs/extern/metis/libmetis/auxapi.c +27 -0
  584. data/ext/lpsolver-highs/extern/metis/libmetis/balance.c +491 -0
  585. data/ext/lpsolver-highs/extern/metis/libmetis/bucketsort.c +44 -0
  586. data/ext/lpsolver-highs/extern/metis/libmetis/coarsen.c +895 -0
  587. data/ext/lpsolver-highs/extern/metis/libmetis/compress.c +231 -0
  588. data/ext/lpsolver-highs/extern/metis/libmetis/contig.c +83 -0
  589. data/ext/lpsolver-highs/extern/metis/libmetis/defs.h +39 -0
  590. data/ext/lpsolver-highs/extern/metis/libmetis/fm.c +527 -0
  591. data/ext/lpsolver-highs/extern/metis/libmetis/gklib.c +55 -0
  592. data/ext/lpsolver-highs/extern/metis/libmetis/gklib_defs.h +33 -0
  593. data/ext/lpsolver-highs/extern/metis/libmetis/graph.c +268 -0
  594. data/ext/lpsolver-highs/extern/metis/libmetis/initpart.c +385 -0
  595. data/ext/lpsolver-highs/extern/metis/libmetis/macros.h +59 -0
  596. data/ext/lpsolver-highs/extern/metis/libmetis/mcutil.c +162 -0
  597. data/ext/lpsolver-highs/extern/metis/libmetis/metislib.h +35 -0
  598. data/ext/lpsolver-highs/extern/metis/libmetis/mmd.c +598 -0
  599. data/ext/lpsolver-highs/extern/metis/libmetis/ometis.c +661 -0
  600. data/ext/lpsolver-highs/extern/metis/libmetis/options.c +260 -0
  601. data/ext/lpsolver-highs/extern/metis/libmetis/proto.h +172 -0
  602. data/ext/lpsolver-highs/extern/metis/libmetis/refine.c +99 -0
  603. data/ext/lpsolver-highs/extern/metis/libmetis/separator.c +57 -0
  604. data/ext/lpsolver-highs/extern/metis/libmetis/sfm.c +581 -0
  605. data/ext/lpsolver-highs/extern/metis/libmetis/srefine.c +152 -0
  606. data/ext/lpsolver-highs/extern/metis/libmetis/stdheaders.h +29 -0
  607. data/ext/lpsolver-highs/extern/metis/libmetis/struct.h +117 -0
  608. data/ext/lpsolver-highs/extern/metis/libmetis/util.c +59 -0
  609. data/ext/lpsolver-highs/extern/metis/libmetis/wspace.c +91 -0
  610. data/ext/lpsolver-highs/extern/metis/metis.h +271 -0
  611. data/ext/lpsolver-highs/extern/pdqsort/license.txt +16 -0
  612. data/ext/lpsolver-highs/extern/pdqsort/pdqsort.h +532 -0
  613. data/ext/lpsolver-highs/extern/rcm/LICENSE +19 -0
  614. data/ext/lpsolver-highs/extern/rcm/rcm.cpp +873 -0
  615. data/ext/lpsolver-highs/extern/rcm/rcm.h +22 -0
  616. data/ext/lpsolver-highs/extern/zstr/LICENSE +21 -0
  617. data/ext/lpsolver-highs/extern/zstr/strict_fstream.hpp +237 -0
  618. data/ext/lpsolver-highs/extern/zstr/zstr.hpp +473 -0
  619. data/ext/lpsolver-highs/flake.lock +61 -0
  620. data/ext/lpsolver-highs/flake.nix +73 -0
  621. data/ext/lpsolver-highs/highs/CMakeLists.txt +499 -0
  622. data/ext/lpsolver-highs/highs/HConfig.h.bazel.in +25 -0
  623. data/ext/lpsolver-highs/highs/HConfig.h.in +22 -0
  624. data/ext/lpsolver-highs/highs/HConfig.h.meson.in +17 -0
  625. data/ext/lpsolver-highs/highs/Highs.h +1812 -0
  626. data/ext/lpsolver-highs/highs/HighsRun.md +143 -0
  627. data/ext/lpsolver-highs/highs/highs_bindings.cpp +1826 -0
  628. data/ext/lpsolver-highs/highs/highspy/__init__.py +93 -0
  629. data/ext/lpsolver-highs/highs/highspy/__init__.pyi +91 -0
  630. data/ext/lpsolver-highs/highs/highspy/_core/__init__.pyi +1058 -0
  631. data/ext/lpsolver-highs/highs/highspy/_core/cb.pyi +118 -0
  632. data/ext/lpsolver-highs/highs/highspy/_core/simplex_constants.pyi +472 -0
  633. data/ext/lpsolver-highs/highs/highspy/highs.py +2430 -0
  634. data/ext/lpsolver-highs/highs/interfaces/highs_c_api.cpp +1812 -0
  635. data/ext/lpsolver-highs/highs/interfaces/highs_c_api.h +2651 -0
  636. data/ext/lpsolver-highs/highs/interfaces/highs_csharp_api.cs +1142 -0
  637. data/ext/lpsolver-highs/highs/interfaces/highs_fortran_api.f90 +873 -0
  638. data/ext/lpsolver-highs/highs/io/Filereader.cpp +87 -0
  639. data/ext/lpsolver-highs/highs/io/Filereader.h +45 -0
  640. data/ext/lpsolver-highs/highs/io/FilereaderLp.cpp +539 -0
  641. data/ext/lpsolver-highs/highs/io/FilereaderLp.h +49 -0
  642. data/ext/lpsolver-highs/highs/io/FilereaderMps.cpp +86 -0
  643. data/ext/lpsolver-highs/highs/io/FilereaderMps.h +27 -0
  644. data/ext/lpsolver-highs/highs/io/HMPSIO.cpp +1001 -0
  645. data/ext/lpsolver-highs/highs/io/HMPSIO.h +78 -0
  646. data/ext/lpsolver-highs/highs/io/HMpsFF.cpp +2113 -0
  647. data/ext/lpsolver-highs/highs/io/HMpsFF.h +245 -0
  648. data/ext/lpsolver-highs/highs/io/HighsIO.cpp +371 -0
  649. data/ext/lpsolver-highs/highs/io/HighsIO.h +118 -0
  650. data/ext/lpsolver-highs/highs/io/LoadOptions.cpp +60 -0
  651. data/ext/lpsolver-highs/highs/io/LoadOptions.h +24 -0
  652. data/ext/lpsolver-highs/highs/io/filereaderlp/LICENSE +19 -0
  653. data/ext/lpsolver-highs/highs/io/filereaderlp/builder.hpp +25 -0
  654. data/ext/lpsolver-highs/highs/io/filereaderlp/def.hpp +19 -0
  655. data/ext/lpsolver-highs/highs/io/filereaderlp/model.hpp +68 -0
  656. data/ext/lpsolver-highs/highs/io/filereaderlp/reader.cpp +1375 -0
  657. data/ext/lpsolver-highs/highs/io/filereaderlp/reader.hpp +10 -0
  658. data/ext/lpsolver-highs/highs/ipm/IpxSolution.h +32 -0
  659. data/ext/lpsolver-highs/highs/ipm/IpxWrapper.cpp +1526 -0
  660. data/ext/lpsolver-highs/highs/ipm/IpxWrapper.h +106 -0
  661. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu.h +161 -0
  662. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.c +132 -0
  663. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  664. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.c +148 -0
  665. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  666. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.c +24 -0
  667. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  668. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  669. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  670. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  671. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  672. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  673. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  674. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  675. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  676. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.c +325 -0
  677. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.h +30 -0
  678. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.c +46 -0
  679. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  680. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.c +79 -0
  681. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  682. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.c +63 -0
  683. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  684. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.c +44 -0
  685. data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.h +125 -0
  686. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_build_factors.c +441 -0
  687. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_condest.c +124 -0
  688. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_def.h +39 -0
  689. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_dfs.c +141 -0
  690. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_factorize_bump.c +56 -0
  691. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.c +184 -0
  692. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.h +21 -0
  693. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_garbage_perm.c +53 -0
  694. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_initialize.c +56 -0
  695. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.c +352 -0
  696. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.h +220 -0
  697. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_list.h +173 -0
  698. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_markowitz.c +188 -0
  699. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_matrix_norm.c +51 -0
  700. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_pivot.c +1247 -0
  701. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_residual_test.c +155 -0
  702. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_setup_bump.c +198 -0
  703. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_singletons.c +511 -0
  704. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_dense.c +129 -0
  705. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_for_update.c +360 -0
  706. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_sparse.c +284 -0
  707. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_symbolic.c +48 -0
  708. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_triangular.c +140 -0
  709. data/ext/lpsolver-highs/highs/ipm/basiclu/lu_update.c +908 -0
  710. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.cpp +301 -0
  711. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.h +104 -0
  712. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/IntConfig.h +27 -0
  713. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.cpp +193 -0
  714. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.h +30 -0
  715. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.cpp +60 -0
  716. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.h +62 -0
  717. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/OrderingPrint.h +10 -0
  718. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.cpp +117 -0
  719. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.h +59 -0
  720. data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/mycblas.h +85 -0
  721. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.cpp +1367 -0
  722. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.h +122 -0
  723. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.cpp +114 -0
  724. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.h +46 -0
  725. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.cpp +82 -0
  726. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.h +83 -0
  727. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.cpp +326 -0
  728. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.h +86 -0
  729. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFact.h +48 -0
  730. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactHybrid.cpp +279 -0
  731. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactKernel.cpp +284 -0
  732. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.cpp +38 -0
  733. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.h +32 -0
  734. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.cpp +57 -0
  735. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.h +112 -0
  736. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h +63 -0
  737. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.cpp +405 -0
  738. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.h +85 -0
  739. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.cpp +46 -0
  740. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.h +95 -0
  741. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp +238 -0
  742. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.h +31 -0
  743. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp +272 -0
  744. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.h +26 -0
  745. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.cpp +83 -0
  746. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.h +45 -0
  747. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.cpp +54 -0
  748. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.h +46 -0
  749. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/ReturnValues.h +19 -0
  750. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.cpp +10 -0
  751. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.h +48 -0
  752. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.cpp +70 -0
  753. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.h +19 -0
  754. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.cpp +101 -0
  755. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.h +220 -0
  756. data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Timing.h +114 -0
  757. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.cpp +38 -0
  758. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.h +41 -0
  759. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp +887 -0
  760. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.h +92 -0
  761. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Info.h +58 -0
  762. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.cpp +8 -0
  763. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.h +37 -0
  764. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.cpp +640 -0
  765. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.h +172 -0
  766. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LinearSolver.h +81 -0
  767. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.cpp +71 -0
  768. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.h +33 -0
  769. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.cpp +403 -0
  770. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.h +136 -0
  771. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Options.h +35 -0
  772. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Parameters.h +63 -0
  773. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.cpp +646 -0
  774. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.h +94 -0
  775. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Refine.cpp +214 -0
  776. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.cpp +1346 -0
  777. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.h +338 -0
  778. data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Status.h +88 -0
  779. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.cc +71 -0
  780. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.h +20 -0
  781. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.cc +299 -0
  782. data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  783. data/ext/lpsolver-highs/highs/ipm/ipx/basis.cc +966 -0
  784. data/ext/lpsolver-highs/highs/ipm/ipx/basis.h +350 -0
  785. data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.cc +217 -0
  786. data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.h +74 -0
  787. data/ext/lpsolver-highs/highs/ipm/ipx/control.cc +151 -0
  788. data/ext/lpsolver-highs/highs/ipm/ipx/control.h +167 -0
  789. data/ext/lpsolver-highs/highs/ipm/ipx/crossover.cc +479 -0
  790. data/ext/lpsolver-highs/highs/ipm/ipx/crossover.h +157 -0
  791. data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.cc +70 -0
  792. data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.h +45 -0
  793. data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.cc +360 -0
  794. data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.h +102 -0
  795. data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.cc +233 -0
  796. data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.h +21 -0
  797. data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.cc +30 -0
  798. data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.h +113 -0
  799. data/ext/lpsolver-highs/highs/ipm/ipx/info.cc +124 -0
  800. data/ext/lpsolver-highs/highs/ipm/ipx/info.h +27 -0
  801. data/ext/lpsolver-highs/highs/ipm/ipx/ipm.cc +897 -0
  802. data/ext/lpsolver-highs/highs/ipm/ipx/ipm.h +94 -0
  803. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.cc +83 -0
  804. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.h +47 -0
  805. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_config.h +9 -0
  806. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_info.h +111 -0
  807. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_internal.h +89 -0
  808. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_parameters.h +76 -0
  809. data/ext/lpsolver-highs/highs/ipm/ipx/ipx_status.h +57 -0
  810. data/ext/lpsolver-highs/highs/ipm/ipx/iterate.cc +683 -0
  811. data/ext/lpsolver-highs/highs/ipm/ipx/iterate.h +331 -0
  812. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.cc +23 -0
  813. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.h +70 -0
  814. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.cc +387 -0
  815. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  816. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.cc +120 -0
  817. data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  818. data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.cc +10 -0
  819. data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.h +26 -0
  820. data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.cc +686 -0
  821. data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.h +204 -0
  822. data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.cc +131 -0
  823. data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.h +79 -0
  824. data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.cc +62 -0
  825. data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.h +129 -0
  826. data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.cc +337 -0
  827. data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.h +54 -0
  828. data/ext/lpsolver-highs/highs/ipm/ipx/model.cc +1528 -0
  829. data/ext/lpsolver-highs/highs/ipm/ipx/model.h +413 -0
  830. data/ext/lpsolver-highs/highs/ipm/ipx/multistream.h +52 -0
  831. data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.cc +126 -0
  832. data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.h +44 -0
  833. data/ext/lpsolver-highs/highs/ipm/ipx/power_method.h +44 -0
  834. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.cc +382 -0
  835. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.h +195 -0
  836. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.cc +92 -0
  837. data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.h +58 -0
  838. data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.cc +117 -0
  839. data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  840. data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.cc +182 -0
  841. data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.h +39 -0
  842. data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.cc +183 -0
  843. data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.h +29 -0
  844. data/ext/lpsolver-highs/highs/ipm/ipx/timer.cc +16 -0
  845. data/ext/lpsolver-highs/highs/ipm/ipx/timer.h +25 -0
  846. data/ext/lpsolver-highs/highs/ipm/ipx/utils.cc +95 -0
  847. data/ext/lpsolver-highs/highs/ipm/ipx/utils.h +37 -0
  848. data/ext/lpsolver-highs/highs/lp_data/HConst.h +430 -0
  849. data/ext/lpsolver-highs/highs/lp_data/HStruct.h +213 -0
  850. data/ext/lpsolver-highs/highs/lp_data/Highs.cpp +4949 -0
  851. data/ext/lpsolver-highs/highs/lp_data/HighsAnalysis.h +23 -0
  852. data/ext/lpsolver-highs/highs/lp_data/HighsCallback.cpp +323 -0
  853. data/ext/lpsolver-highs/highs/lp_data/HighsCallback.h +104 -0
  854. data/ext/lpsolver-highs/highs/lp_data/HighsCallbackStruct.h +70 -0
  855. data/ext/lpsolver-highs/highs/lp_data/HighsDebug.cpp +54 -0
  856. data/ext/lpsolver-highs/highs/lp_data/HighsDebug.h +34 -0
  857. data/ext/lpsolver-highs/highs/lp_data/HighsDeprecated.cpp +181 -0
  858. data/ext/lpsolver-highs/highs/lp_data/HighsIis.cpp +1290 -0
  859. data/ext/lpsolver-highs/highs/lp_data/HighsIis.h +139 -0
  860. data/ext/lpsolver-highs/highs/lp_data/HighsInfo.cpp +426 -0
  861. data/ext/lpsolver-highs/highs/lp_data/HighsInfo.h +421 -0
  862. data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.cpp +175 -0
  863. data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.h +27 -0
  864. data/ext/lpsolver-highs/highs/lp_data/HighsInterface.cpp +4344 -0
  865. data/ext/lpsolver-highs/highs/lp_data/HighsLp.cpp +564 -0
  866. data/ext/lpsolver-highs/highs/lp_data/HighsLp.h +97 -0
  867. data/ext/lpsolver-highs/highs/lp_data/HighsLpSolverObject.h +47 -0
  868. data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.cpp +3794 -0
  869. data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.h +330 -0
  870. data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.cpp +1650 -0
  871. data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.h +129 -0
  872. data/ext/lpsolver-highs/highs/lp_data/HighsOptions.cpp +1176 -0
  873. data/ext/lpsolver-highs/highs/lp_data/HighsOptions.h +1715 -0
  874. data/ext/lpsolver-highs/highs/lp_data/HighsRanging.cpp +733 -0
  875. data/ext/lpsolver-highs/highs/lp_data/HighsRanging.h +43 -0
  876. data/ext/lpsolver-highs/highs/lp_data/HighsSolution.cpp +2194 -0
  877. data/ext/lpsolver-highs/highs/lp_data/HighsSolution.h +179 -0
  878. data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.cpp +490 -0
  879. data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.h +87 -0
  880. data/ext/lpsolver-highs/highs/lp_data/HighsSolve.cpp +747 -0
  881. data/ext/lpsolver-highs/highs/lp_data/HighsSolve.h +29 -0
  882. data/ext/lpsolver-highs/highs/lp_data/HighsStatus.cpp +48 -0
  883. data/ext/lpsolver-highs/highs/lp_data/HighsStatus.h +29 -0
  884. data/ext/lpsolver-highs/highs/lp_data/Iis.md +113 -0
  885. data/ext/lpsolver-highs/highs/meson.build +433 -0
  886. data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.cpp +2236 -0
  887. data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.h +329 -0
  888. data/ext/lpsolver-highs/highs/mip/HighsConflictPool.cpp +201 -0
  889. data/ext/lpsolver-highs/highs/mip/HighsConflictPool.h +109 -0
  890. data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.cpp +1491 -0
  891. data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.h +108 -0
  892. data/ext/lpsolver-highs/highs/mip/HighsCutPool.cpp +526 -0
  893. data/ext/lpsolver-highs/highs/mip/HighsCutPool.h +168 -0
  894. data/ext/lpsolver-highs/highs/mip/HighsDebugSol.cpp +313 -0
  895. data/ext/lpsolver-highs/highs/mip/HighsDebugSol.h +133 -0
  896. data/ext/lpsolver-highs/highs/mip/HighsDomain.cpp +3861 -0
  897. data/ext/lpsolver-highs/highs/mip/HighsDomain.h +657 -0
  898. data/ext/lpsolver-highs/highs/mip/HighsDomainChange.h +48 -0
  899. data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.cpp +199 -0
  900. data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.h +104 -0
  901. data/ext/lpsolver-highs/highs/mip/HighsFeasibilityJump.cpp +139 -0
  902. data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.cpp +106 -0
  903. data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.h +439 -0
  904. data/ext/lpsolver-highs/highs/mip/HighsImplications.cpp +915 -0
  905. data/ext/lpsolver-highs/highs/mip/HighsImplications.h +194 -0
  906. data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.cpp +56 -0
  907. data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.h +50 -0
  908. data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.cpp +1609 -0
  909. data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.h +361 -0
  910. data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.cpp +313 -0
  911. data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.h +71 -0
  912. data/ext/lpsolver-highs/highs/mip/HighsMipSolver.cpp +1002 -0
  913. data/ext/lpsolver-highs/highs/mip/HighsMipSolver.h +159 -0
  914. data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.cpp +2936 -0
  915. data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.h +313 -0
  916. data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.cpp +267 -0
  917. data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.h +60 -0
  918. data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.cpp +443 -0
  919. data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.h +312 -0
  920. data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.cpp +124 -0
  921. data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.h +71 -0
  922. data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.cpp +549 -0
  923. data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.h +39 -0
  924. data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.cpp +1673 -0
  925. data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.h +75 -0
  926. data/ext/lpsolver-highs/highs/mip/HighsPseudocost.cpp +129 -0
  927. data/ext/lpsolver-highs/highs/mip/HighsPseudocost.h +366 -0
  928. data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.cpp +316 -0
  929. data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.h +42 -0
  930. data/ext/lpsolver-highs/highs/mip/HighsSearch.cpp +1881 -0
  931. data/ext/lpsolver-highs/highs/mip/HighsSearch.h +241 -0
  932. data/ext/lpsolver-highs/highs/mip/HighsSeparation.cpp +186 -0
  933. data/ext/lpsolver-highs/highs/mip/HighsSeparation.h +41 -0
  934. data/ext/lpsolver-highs/highs/mip/HighsSeparator.cpp +39 -0
  935. data/ext/lpsolver-highs/highs/mip/HighsSeparator.h +60 -0
  936. data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.cpp +244 -0
  937. data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.h +34 -0
  938. data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.cpp +563 -0
  939. data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.h +63 -0
  940. data/ext/lpsolver-highs/highs/mip/MipTimer.h +544 -0
  941. data/ext/lpsolver-highs/highs/mip/feasibilityjump.hh +800 -0
  942. data/ext/lpsolver-highs/highs/model/HighsHessian.cpp +263 -0
  943. data/ext/lpsolver-highs/highs/model/HighsHessian.h +54 -0
  944. data/ext/lpsolver-highs/highs/model/HighsHessianUtils.cpp +584 -0
  945. data/ext/lpsolver-highs/highs/model/HighsHessianUtils.h +47 -0
  946. data/ext/lpsolver-highs/highs/model/HighsModel.cpp +46 -0
  947. data/ext/lpsolver-highs/highs/model/HighsModel.h +42 -0
  948. data/ext/lpsolver-highs/highs/parallel/HighsBinarySemaphore.h +108 -0
  949. data/ext/lpsolver-highs/highs/parallel/HighsCacheAlign.h +82 -0
  950. data/ext/lpsolver-highs/highs/parallel/HighsCombinable.h +116 -0
  951. data/ext/lpsolver-highs/highs/parallel/HighsMutex.h +124 -0
  952. data/ext/lpsolver-highs/highs/parallel/HighsParallel.h +128 -0
  953. data/ext/lpsolver-highs/highs/parallel/HighsRaceTimer.h +38 -0
  954. data/ext/lpsolver-highs/highs/parallel/HighsSchedulerConstants.h +19 -0
  955. data/ext/lpsolver-highs/highs/parallel/HighsSpinMutex.h +48 -0
  956. data/ext/lpsolver-highs/highs/parallel/HighsSplitDeque.h +606 -0
  957. data/ext/lpsolver-highs/highs/parallel/HighsTask.h +170 -0
  958. data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.cpp +43 -0
  959. data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.h +217 -0
  960. data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.cpp +848 -0
  961. data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.h +108 -0
  962. data/ext/lpsolver-highs/highs/pdlp/HiPdlpTimer.h +155 -0
  963. data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.cpp +141 -0
  964. data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.h +26 -0
  965. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Diff +12 -0
  966. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Meld +7 -0
  967. data/ext/lpsolver-highs/highs/pdlp/cupdlp/Merge +2 -0
  968. data/ext/lpsolver-highs/highs/pdlp/cupdlp/README.md +95 -0
  969. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/CMakeLists.txt +58 -0
  970. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu +338 -0
  971. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh +319 -0
  972. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu +386 -0
  973. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh +149 -0
  974. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cublas.c +154 -0
  975. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cuda_linalg.c +79 -0
  976. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp.h +16 -0
  977. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.c +214 -0
  978. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
  979. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
  980. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.c +802 -0
  981. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
  982. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.c +148 -0
  983. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  984. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.c +124 -0
  985. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  986. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.c +425 -0
  987. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  988. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.c +1498 -0
  989. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
  990. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.c +478 -0
  991. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
  992. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
  993. data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.h +212 -0
  994. data/ext/lpsolver-highs/highs/pdlp/cupdlp/glbopts.h +342 -0
  995. data/ext/lpsolver-highs/highs/pdlp/hipdlp/defs.hpp +222 -0
  996. data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.cc +231 -0
  997. data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.hpp +61 -0
  998. data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.cc +225 -0
  999. data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.hpp +80 -0
  1000. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cc +2798 -0
  1001. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cu +497 -0
  1002. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.hpp +358 -0
  1003. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg_kernels.hpp +77 -0
  1004. data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdlp_gpu_debug.hpp +62 -0
  1005. data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.cc +132 -0
  1006. data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.hpp +96 -0
  1007. data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.cc +307 -0
  1008. data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.hpp +74 -0
  1009. data/ext/lpsolver-highs/highs/pdlp/hipdlp/solver_results.hpp +65 -0
  1010. data/ext/lpsolver-highs/highs/presolve/HPresolve.cpp +8511 -0
  1011. data/ext/lpsolver-highs/highs/presolve/HPresolve.h +505 -0
  1012. data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.cpp +239 -0
  1013. data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.h +52 -0
  1014. data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.cpp +1368 -0
  1015. data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.h +943 -0
  1016. data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.cpp +1921 -0
  1017. data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.h +284 -0
  1018. data/ext/lpsolver-highs/highs/presolve/ICrash.cpp +474 -0
  1019. data/ext/lpsolver-highs/highs/presolve/ICrash.h +124 -0
  1020. data/ext/lpsolver-highs/highs/presolve/ICrashUtil.cpp +267 -0
  1021. data/ext/lpsolver-highs/highs/presolve/ICrashUtil.h +62 -0
  1022. data/ext/lpsolver-highs/highs/presolve/ICrashX.cpp +173 -0
  1023. data/ext/lpsolver-highs/highs/presolve/ICrashX.h +23 -0
  1024. data/ext/lpsolver-highs/highs/presolve/PresolveComponent.cpp +45 -0
  1025. data/ext/lpsolver-highs/highs/presolve/PresolveComponent.h +90 -0
  1026. data/ext/lpsolver-highs/highs/qpsolver/README.md +185 -0
  1027. data/ext/lpsolver-highs/highs/qpsolver/a_asm.cpp +139 -0
  1028. data/ext/lpsolver-highs/highs/qpsolver/a_asm.hpp +77 -0
  1029. data/ext/lpsolver-highs/highs/qpsolver/a_quass.cpp +194 -0
  1030. data/ext/lpsolver-highs/highs/qpsolver/a_quass.hpp +22 -0
  1031. data/ext/lpsolver-highs/highs/qpsolver/basis.cpp +443 -0
  1032. data/ext/lpsolver-highs/highs/qpsolver/basis.hpp +159 -0
  1033. data/ext/lpsolver-highs/highs/qpsolver/crashsolution.hpp +20 -0
  1034. data/ext/lpsolver-highs/highs/qpsolver/dantzigpricing.hpp +80 -0
  1035. data/ext/lpsolver-highs/highs/qpsolver/devexharrispricing.hpp +98 -0
  1036. data/ext/lpsolver-highs/highs/qpsolver/devexpricing.hpp +108 -0
  1037. data/ext/lpsolver-highs/highs/qpsolver/eventhandler.hpp +30 -0
  1038. data/ext/lpsolver-highs/highs/qpsolver/factor.hpp +408 -0
  1039. data/ext/lpsolver-highs/highs/qpsolver/feasibility_bounded.hpp +114 -0
  1040. data/ext/lpsolver-highs/highs/qpsolver/feasibility_highs.hpp +301 -0
  1041. data/ext/lpsolver-highs/highs/qpsolver/gradient.hpp +46 -0
  1042. data/ext/lpsolver-highs/highs/qpsolver/instance.hpp +70 -0
  1043. data/ext/lpsolver-highs/highs/qpsolver/matrix.hpp +342 -0
  1044. data/ext/lpsolver-highs/highs/qpsolver/perturbation.cpp +41 -0
  1045. data/ext/lpsolver-highs/highs/qpsolver/perturbation.hpp +15 -0
  1046. data/ext/lpsolver-highs/highs/qpsolver/pricing.hpp +22 -0
  1047. data/ext/lpsolver-highs/highs/qpsolver/qpconst.hpp +34 -0
  1048. data/ext/lpsolver-highs/highs/qpsolver/qpvector.hpp +242 -0
  1049. data/ext/lpsolver-highs/highs/qpsolver/quass.cpp +551 -0
  1050. data/ext/lpsolver-highs/highs/qpsolver/quass.hpp +27 -0
  1051. data/ext/lpsolver-highs/highs/qpsolver/ratiotest.cpp +146 -0
  1052. data/ext/lpsolver-highs/highs/qpsolver/ratiotest.hpp +26 -0
  1053. data/ext/lpsolver-highs/highs/qpsolver/reducedcosts.hpp +46 -0
  1054. data/ext/lpsolver-highs/highs/qpsolver/reducedgradient.hpp +95 -0
  1055. data/ext/lpsolver-highs/highs/qpsolver/runtime.hpp +45 -0
  1056. data/ext/lpsolver-highs/highs/qpsolver/scaling.cpp +123 -0
  1057. data/ext/lpsolver-highs/highs/qpsolver/scaling.hpp +15 -0
  1058. data/ext/lpsolver-highs/highs/qpsolver/settings.hpp +84 -0
  1059. data/ext/lpsolver-highs/highs/qpsolver/snippets.hpp +36 -0
  1060. data/ext/lpsolver-highs/highs/qpsolver/statistics.hpp +30 -0
  1061. data/ext/lpsolver-highs/highs/qpsolver/steepestedgepricing.hpp +173 -0
  1062. data/ext/lpsolver-highs/highs/simplex/HApp.h +550 -0
  1063. data/ext/lpsolver-highs/highs/simplex/HEkk.cpp +4404 -0
  1064. data/ext/lpsolver-highs/highs/simplex/HEkk.h +419 -0
  1065. data/ext/lpsolver-highs/highs/simplex/HEkkControl.cpp +146 -0
  1066. data/ext/lpsolver-highs/highs/simplex/HEkkDebug.cpp +1722 -0
  1067. data/ext/lpsolver-highs/highs/simplex/HEkkDual.cpp +3003 -0
  1068. data/ext/lpsolver-highs/highs/simplex/HEkkDual.h +513 -0
  1069. data/ext/lpsolver-highs/highs/simplex/HEkkDualMulti.cpp +1020 -0
  1070. data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.cpp +535 -0
  1071. data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.h +134 -0
  1072. data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.cpp +697 -0
  1073. data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.h +201 -0
  1074. data/ext/lpsolver-highs/highs/simplex/HEkkInterface.cpp +26 -0
  1075. data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.cpp +2984 -0
  1076. data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.h +191 -0
  1077. data/ext/lpsolver-highs/highs/simplex/HSimplex.cpp +330 -0
  1078. data/ext/lpsolver-highs/highs/simplex/HSimplex.h +42 -0
  1079. data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.cpp +145 -0
  1080. data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.h +48 -0
  1081. data/ext/lpsolver-highs/highs/simplex/HSimplexNla.cpp +517 -0
  1082. data/ext/lpsolver-highs/highs/simplex/HSimplexNla.h +158 -0
  1083. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaDebug.cpp +373 -0
  1084. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaFreeze.cpp +28 -0
  1085. data/ext/lpsolver-highs/highs/simplex/HSimplexNlaProductForm.cpp +113 -0
  1086. data/ext/lpsolver-highs/highs/simplex/HSimplexReport.cpp +77 -0
  1087. data/ext/lpsolver-highs/highs/simplex/HSimplexReport.h +21 -0
  1088. data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.cpp +1495 -0
  1089. data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.h +500 -0
  1090. data/ext/lpsolver-highs/highs/simplex/SimplexConst.h +273 -0
  1091. data/ext/lpsolver-highs/highs/simplex/SimplexStruct.h +263 -0
  1092. data/ext/lpsolver-highs/highs/simplex/SimplexTimer.h +414 -0
  1093. data/ext/lpsolver-highs/highs/test_kkt/DevKkt.cpp +469 -0
  1094. data/ext/lpsolver-highs/highs/test_kkt/DevKkt.h +143 -0
  1095. data/ext/lpsolver-highs/highs/test_kkt/KktCh2.cpp +305 -0
  1096. data/ext/lpsolver-highs/highs/test_kkt/KktCh2.h +79 -0
  1097. data/ext/lpsolver-highs/highs/util/FactorTimer.h +199 -0
  1098. data/ext/lpsolver-highs/highs/util/HFactor.cpp +2597 -0
  1099. data/ext/lpsolver-highs/highs/util/HFactor.h +587 -0
  1100. data/ext/lpsolver-highs/highs/util/HFactorConst.h +81 -0
  1101. data/ext/lpsolver-highs/highs/util/HFactorDebug.cpp +231 -0
  1102. data/ext/lpsolver-highs/highs/util/HFactorDebug.h +55 -0
  1103. data/ext/lpsolver-highs/highs/util/HFactorExtend.cpp +229 -0
  1104. data/ext/lpsolver-highs/highs/util/HFactorRefactor.cpp +304 -0
  1105. data/ext/lpsolver-highs/highs/util/HFactorUtils.cpp +122 -0
  1106. data/ext/lpsolver-highs/highs/util/HSet.cpp +197 -0
  1107. data/ext/lpsolver-highs/highs/util/HSet.h +89 -0
  1108. data/ext/lpsolver-highs/highs/util/HVector.h +22 -0
  1109. data/ext/lpsolver-highs/highs/util/HVectorBase.cpp +271 -0
  1110. data/ext/lpsolver-highs/highs/util/HVectorBase.h +102 -0
  1111. data/ext/lpsolver-highs/highs/util/HighsCDouble.h +323 -0
  1112. data/ext/lpsolver-highs/highs/util/HighsComponent.h +53 -0
  1113. data/ext/lpsolver-highs/highs/util/HighsDataStack.h +83 -0
  1114. data/ext/lpsolver-highs/highs/util/HighsDisjointSets.h +107 -0
  1115. data/ext/lpsolver-highs/highs/util/HighsHash.cpp +10 -0
  1116. data/ext/lpsolver-highs/highs/util/HighsHash.h +1274 -0
  1117. data/ext/lpsolver-highs/highs/util/HighsHashTree.h +1461 -0
  1118. data/ext/lpsolver-highs/highs/util/HighsInt.h +36 -0
  1119. data/ext/lpsolver-highs/highs/util/HighsIntegers.h +212 -0
  1120. data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.cpp +267 -0
  1121. data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.h +203 -0
  1122. data/ext/lpsolver-highs/highs/util/HighsMatrixPic.cpp +146 -0
  1123. data/ext/lpsolver-highs/highs/util/HighsMatrixPic.h +37 -0
  1124. data/ext/lpsolver-highs/highs/util/HighsMatrixSlice.h +561 -0
  1125. data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.cpp +407 -0
  1126. data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.h +57 -0
  1127. data/ext/lpsolver-highs/highs/util/HighsMemoryAllocation.h +63 -0
  1128. data/ext/lpsolver-highs/highs/util/HighsRandom.h +242 -0
  1129. data/ext/lpsolver-highs/highs/util/HighsRbTree.h +452 -0
  1130. data/ext/lpsolver-highs/highs/util/HighsSort.cpp +364 -0
  1131. data/ext/lpsolver-highs/highs/util/HighsSort.h +131 -0
  1132. data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.cpp +1746 -0
  1133. data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.h +151 -0
  1134. data/ext/lpsolver-highs/highs/util/HighsSparseVectorSum.h +95 -0
  1135. data/ext/lpsolver-highs/highs/util/HighsSplay.h +135 -0
  1136. data/ext/lpsolver-highs/highs/util/HighsTimer.h +385 -0
  1137. data/ext/lpsolver-highs/highs/util/HighsUtils.cpp +1259 -0
  1138. data/ext/lpsolver-highs/highs/util/HighsUtils.h +272 -0
  1139. data/ext/lpsolver-highs/highs/util/stringutil.cpp +131 -0
  1140. data/ext/lpsolver-highs/highs/util/stringutil.h +46 -0
  1141. data/ext/lpsolver-highs/highs.pc.in +12 -0
  1142. data/ext/lpsolver-highs/meson.build +198 -0
  1143. data/ext/lpsolver-highs/meson_options.txt +31 -0
  1144. data/ext/lpsolver-highs/nuget/HiGHS_Logo.png +0 -0
  1145. data/ext/lpsolver-highs/nuget/Highs.csproj +25 -0
  1146. data/ext/lpsolver-highs/nuget/Highs.csproj.in +36 -0
  1147. data/ext/lpsolver-highs/nuget/HowToAlternative.md +77 -0
  1148. data/ext/lpsolver-highs/nuget/README.md +38 -0
  1149. data/ext/lpsolver-highs/nuget/arm-toolchain.cmake +15 -0
  1150. data/ext/lpsolver-highs/nuget/build_linux-arm.sh +13 -0
  1151. data/ext/lpsolver-highs/nuget/build_linux.sh +10 -0
  1152. data/ext/lpsolver-highs/nuget/build_windows.ps1 +27 -0
  1153. data/ext/lpsolver-highs/nuget/generatePackage.ps1 +28 -0
  1154. data/ext/lpsolver-highs/pyproject.toml +221 -0
  1155. data/ext/lpsolver-highs/subprojects/pybind11.wrap +13 -0
  1156. data/ext/lpsolver-highs/tests/test_highspy.py +2310 -0
  1157. data/ext/lpsolver-highs/version.rc.in +50 -0
  1158. data/lib/lpsolver/highs +0 -0
  1159. data/lib/lpsolver/model.rb +35 -7
  1160. data/lib/lpsolver/native.so +0 -0
  1161. data/lib/lpsolver/native_model.rb +261 -0
  1162. data/lib/lpsolver/solution.rb +93 -8
  1163. data/lib/lpsolver/version.rb +1 -1
  1164. data/lpsolver.gemspec +4 -1
  1165. metadata +1176 -4
@@ -0,0 +1,1812 @@
1
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
+ /* */
3
+ /* This file is part of the HiGHS linear optimization suite */
4
+ /* */
5
+ /* Available as open-source under the MIT License */
6
+ /* */
7
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
8
+ #include "highs_c_api.h"
9
+
10
+ #include "Highs.h"
11
+
12
+ HighsInt Highs_lpCall(const HighsInt num_col, const HighsInt num_row,
13
+ const HighsInt num_nz, const HighsInt a_format,
14
+ const HighsInt sense, const double offset,
15
+ const double* col_cost, const double* col_lower,
16
+ const double* col_upper, const double* row_lower,
17
+ const double* row_upper, const HighsInt* a_start,
18
+ const HighsInt* a_index, const double* a_value,
19
+ double* col_value, double* col_dual, double* row_value,
20
+ double* row_dual, HighsInt* col_basis_status,
21
+ HighsInt* row_basis_status, HighsInt* model_status) {
22
+ Highs highs;
23
+ highs.setOptionValue("output_flag", false);
24
+ *model_status = kHighsModelStatusNotset;
25
+ HighsStatus status = highs.passModel(
26
+ num_col, num_row, num_nz, a_format, sense, offset, col_cost, col_lower,
27
+ col_upper, row_lower, row_upper, a_start, a_index, a_value);
28
+ if (status == HighsStatus::kError) return (HighsInt)status;
29
+
30
+ status = highs.run();
31
+
32
+ if (status == HighsStatus::kOk) {
33
+ const HighsSolution& solution = highs.getSolution();
34
+ const HighsBasis& basis = highs.getBasis();
35
+ *model_status = (HighsInt)highs.getModelStatus();
36
+ const HighsInfo& info = highs.getInfo();
37
+
38
+ const bool copy_col_value =
39
+ col_value != nullptr &&
40
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
41
+ const bool copy_col_dual =
42
+ col_dual != nullptr &&
43
+ info.dual_solution_status != SolutionStatus::kSolutionStatusNone;
44
+ const bool copy_col_basis = col_basis_status != nullptr && basis.valid;
45
+ for (HighsInt i = 0; i < num_col; i++) {
46
+ if (copy_col_value) col_value[i] = solution.col_value[i];
47
+ if (copy_col_dual) col_dual[i] = solution.col_dual[i];
48
+ if (copy_col_basis) col_basis_status[i] = (HighsInt)basis.col_status[i];
49
+ }
50
+
51
+ const bool copy_row_value =
52
+ row_value != nullptr &&
53
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
54
+ const bool copy_row_dual =
55
+ row_dual != nullptr &&
56
+ info.dual_solution_status != SolutionStatus::kSolutionStatusNone;
57
+ const bool copy_row_basis = row_basis_status != nullptr && basis.valid;
58
+ for (HighsInt i = 0; i < num_row; i++) {
59
+ if (copy_row_value) row_value[i] = solution.row_value[i];
60
+ if (copy_row_dual) row_dual[i] = solution.row_dual[i];
61
+ if (copy_row_basis) row_basis_status[i] = (HighsInt)basis.row_status[i];
62
+ }
63
+ }
64
+
65
+ highs.resetGlobalScheduler(true);
66
+
67
+ return (HighsInt)status;
68
+ }
69
+
70
+ HighsInt Highs_mipCall(const HighsInt num_col, const HighsInt num_row,
71
+ const HighsInt num_nz, const HighsInt a_format,
72
+ const HighsInt sense, const double offset,
73
+ const double* col_cost, const double* col_lower,
74
+ const double* col_upper, const double* row_lower,
75
+ const double* row_upper, const HighsInt* a_start,
76
+ const HighsInt* a_index, const double* a_value,
77
+ const HighsInt* integrality, double* col_value,
78
+ double* row_value, HighsInt* model_status) {
79
+ Highs highs;
80
+ highs.setOptionValue("output_flag", false);
81
+ *model_status = kHighsModelStatusNotset;
82
+ HighsStatus status = highs.passModel(
83
+ num_col, num_row, num_nz, a_format, sense, offset, col_cost, col_lower,
84
+ col_upper, row_lower, row_upper, a_start, a_index, a_value, integrality);
85
+ if (status == HighsStatus::kError) return (HighsInt)status;
86
+
87
+ status = highs.run();
88
+
89
+ if (status == HighsStatus::kOk) {
90
+ const HighsSolution& solution = highs.getSolution();
91
+ *model_status = (HighsInt)highs.getModelStatus();
92
+ const HighsInfo& info = highs.getInfo();
93
+ const bool copy_col_value =
94
+ col_value != nullptr &&
95
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
96
+
97
+ if (copy_col_value) {
98
+ for (HighsInt i = 0; i < num_col; i++)
99
+ col_value[i] = solution.col_value[i];
100
+ }
101
+ const bool copy_row_value =
102
+ row_value != nullptr &&
103
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
104
+ if (copy_row_value) {
105
+ for (HighsInt i = 0; i < num_row; i++)
106
+ row_value[i] = solution.row_value[i];
107
+ }
108
+ }
109
+
110
+ highs.resetGlobalScheduler(true);
111
+
112
+ return (HighsInt)status;
113
+ }
114
+
115
+ HighsInt Highs_qpCall(
116
+ const HighsInt num_col, const HighsInt num_row, const HighsInt num_nz,
117
+ const HighsInt q_num_nz, const HighsInt a_format, const HighsInt q_format,
118
+ const HighsInt sense, const double offset, const double* col_cost,
119
+ const double* col_lower, const double* col_upper, const double* row_lower,
120
+ const double* row_upper, const HighsInt* a_start, const HighsInt* a_index,
121
+ const double* a_value, const HighsInt* q_start, const HighsInt* q_index,
122
+ const double* q_value, double* col_value, double* col_dual,
123
+ double* row_value, double* row_dual, HighsInt* col_basis_status,
124
+ HighsInt* row_basis_status, HighsInt* model_status) {
125
+ Highs highs;
126
+ highs.setOptionValue("output_flag", false);
127
+ *model_status = kHighsModelStatusNotset;
128
+ HighsStatus status = highs.passModel(
129
+ num_col, num_row, num_nz, q_num_nz, a_format, q_format, sense, offset,
130
+ col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index,
131
+ a_value, q_start, q_index, q_value);
132
+ if (status == HighsStatus::kError) return (HighsInt)status;
133
+
134
+ status = highs.run();
135
+
136
+ if (status == HighsStatus::kOk) {
137
+ const HighsSolution& solution = highs.getSolution();
138
+ const HighsBasis& basis = highs.getBasis();
139
+ *model_status = (HighsInt)highs.getModelStatus();
140
+ const HighsInfo& info = highs.getInfo();
141
+
142
+ const bool copy_col_value =
143
+ col_value != nullptr &&
144
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
145
+ const bool copy_col_dual =
146
+ col_dual != nullptr &&
147
+ info.dual_solution_status != SolutionStatus::kSolutionStatusNone;
148
+ const bool copy_col_basis = col_basis_status != nullptr && basis.valid;
149
+ for (HighsInt i = 0; i < num_col; i++) {
150
+ if (copy_col_value) col_value[i] = solution.col_value[i];
151
+ if (copy_col_dual) col_dual[i] = solution.col_dual[i];
152
+ if (copy_col_basis) col_basis_status[i] = (HighsInt)basis.col_status[i];
153
+ }
154
+
155
+ const bool copy_row_value =
156
+ row_value != nullptr &&
157
+ info.primal_solution_status != SolutionStatus::kSolutionStatusNone;
158
+ const bool copy_row_dual =
159
+ row_dual != nullptr &&
160
+ info.dual_solution_status != SolutionStatus::kSolutionStatusNone;
161
+ const bool copy_row_basis = row_basis_status != nullptr && basis.valid;
162
+ for (HighsInt i = 0; i < num_row; i++) {
163
+ if (copy_row_value) row_value[i] = solution.row_value[i];
164
+ if (copy_row_dual) row_dual[i] = solution.row_dual[i];
165
+ if (copy_row_basis) row_basis_status[i] = (HighsInt)basis.row_status[i];
166
+ }
167
+ }
168
+
169
+ highs.resetGlobalScheduler(true);
170
+
171
+ return (HighsInt)status;
172
+ }
173
+
174
+ void* Highs_create(void) { return new Highs(); }
175
+
176
+ void Highs_destroy(void* highs) {
177
+ Highs::resetGlobalScheduler(true);
178
+ delete (Highs*)highs;
179
+ }
180
+
181
+ const char* Highs_version(void) { return highsVersion(); }
182
+ HighsInt Highs_versionMajor(void) { return highsVersionMajor(); }
183
+ HighsInt Highs_versionMinor(void) { return highsVersionMinor(); }
184
+ HighsInt Highs_versionPatch(void) { return highsVersionPatch(); }
185
+ const char* Highs_githash(void) { return highsGithash(); }
186
+
187
+ HighsInt Highs_presolve(void* highs) {
188
+ return (HighsInt)((Highs*)highs)->presolve();
189
+ }
190
+
191
+ HighsInt Highs_run(void* highs) { return (HighsInt)((Highs*)highs)->run(); }
192
+
193
+ HighsInt Highs_postsolve(void* highs, const double* col_value,
194
+ const double* col_dual, const double* row_dual) {
195
+ const HighsLp& presolved_lp = ((Highs*)highs)->getPresolvedLp();
196
+ HighsInt num_col = presolved_lp.num_col_;
197
+ HighsInt num_row = presolved_lp.num_row_;
198
+ // Create a HighsSolution from what's been passed
199
+ HighsSolution solution;
200
+ if (col_value) {
201
+ solution.value_valid = true;
202
+ solution.col_value.resize(num_col);
203
+ // No need for primal row values, but resize the vector for later
204
+ // use
205
+ solution.row_value.resize(num_row);
206
+ }
207
+ if (col_dual || row_dual) {
208
+ // If column or row duals are passed, assume that they are
209
+ // valid. If either is a null pointer, then the corresponding
210
+ // vector will have no data, and the size check will fail
211
+ solution.dual_valid = true;
212
+ if (col_dual) solution.col_dual.resize(num_col);
213
+ if (row_dual) solution.row_dual.resize(num_row);
214
+ }
215
+ for (HighsInt iCol = 0; iCol < num_col; iCol++) {
216
+ if (col_value) solution.col_value[iCol] = col_value[iCol];
217
+ if (col_dual) solution.col_dual[iCol] = col_dual[iCol];
218
+ }
219
+ if (row_dual) {
220
+ for (HighsInt iRow = 0; iRow < num_row; iRow++)
221
+ solution.row_dual[iRow] = row_dual[iRow];
222
+ }
223
+ return (HighsInt)((Highs*)highs)->postsolve(solution);
224
+ }
225
+
226
+ HighsInt Highs_readModel(void* highs, const char* filename) {
227
+ return (HighsInt)((Highs*)highs)->readModel(std::string(filename));
228
+ }
229
+
230
+ HighsInt Highs_writeModel(void* highs, const char* filename) {
231
+ return (HighsInt)((Highs*)highs)->writeModel(std::string(filename));
232
+ }
233
+
234
+ HighsInt Highs_writePresolvedModel(void* highs, const char* filename) {
235
+ return (HighsInt)((Highs*)highs)->writePresolvedModel(std::string(filename));
236
+ }
237
+
238
+ HighsInt Highs_writeSolution(const void* highs, const char* filename) {
239
+ return (HighsInt)((Highs*)highs)
240
+ ->writeSolution(std::string(filename), kSolutionStyleRaw);
241
+ }
242
+
243
+ HighsInt Highs_writeSolutionPretty(const void* highs, const char* filename) {
244
+ return (HighsInt)((Highs*)highs)
245
+ ->writeSolution(std::string(filename), kSolutionStylePretty);
246
+ }
247
+
248
+ HighsInt Highs_passLp(void* highs, const HighsInt num_col,
249
+ const HighsInt num_row, const HighsInt num_nz,
250
+ const HighsInt a_format, const HighsInt sense,
251
+ const double offset, const double* col_cost,
252
+ const double* col_lower, const double* col_upper,
253
+ const double* row_lower, const double* row_upper,
254
+ const HighsInt* a_start, const HighsInt* a_index,
255
+ const double* a_value) {
256
+ return (HighsInt)((Highs*)highs)
257
+ ->passModel(num_col, num_row, num_nz, a_format, sense, offset, col_cost,
258
+ col_lower, col_upper, row_lower, row_upper, a_start, a_index,
259
+ a_value);
260
+ }
261
+
262
+ HighsInt Highs_passMip(void* highs, const HighsInt num_col,
263
+ const HighsInt num_row, const HighsInt num_nz,
264
+ const HighsInt a_format, const HighsInt sense,
265
+ const double offset, const double* col_cost,
266
+ const double* col_lower, const double* col_upper,
267
+ const double* row_lower, const double* row_upper,
268
+ const HighsInt* a_start, const HighsInt* a_index,
269
+ const double* a_value, const HighsInt* integrality) {
270
+ return (HighsInt)((Highs*)highs)
271
+ ->passModel(num_col, num_row, num_nz, a_format, sense, offset, col_cost,
272
+ col_lower, col_upper, row_lower, row_upper, a_start, a_index,
273
+ a_value, integrality);
274
+ }
275
+
276
+ HighsInt Highs_passModel(void* highs, const HighsInt num_col,
277
+ const HighsInt num_row, const HighsInt num_nz,
278
+ const HighsInt q_num_nz, const HighsInt a_format,
279
+ const HighsInt q_format, const HighsInt sense,
280
+ const double offset, const double* col_cost,
281
+ const double* col_lower, const double* col_upper,
282
+ const double* row_lower, const double* row_upper,
283
+ const HighsInt* a_start, const HighsInt* a_index,
284
+ const double* a_value, const HighsInt* q_start,
285
+ const HighsInt* q_index, const double* q_value,
286
+ const HighsInt* integrality) {
287
+ return (HighsInt)((Highs*)highs)
288
+ ->passModel(num_col, num_row, num_nz, q_num_nz, a_format, q_format, sense,
289
+ offset, col_cost, col_lower, col_upper, row_lower, row_upper,
290
+ a_start, a_index, a_value, q_start, q_index, q_value,
291
+ integrality);
292
+ }
293
+
294
+ HighsInt Highs_passHessian(void* highs, const HighsInt dim,
295
+ const HighsInt num_nz, const HighsInt format,
296
+ const HighsInt* start, const HighsInt* index,
297
+ const double* value) {
298
+ return (HighsInt)((Highs*)highs)
299
+ ->passHessian(dim, num_nz, format, start, index, value);
300
+ }
301
+
302
+ HighsInt Highs_passLinearObjectives(const void* highs,
303
+ const HighsInt num_linear_objective,
304
+ const double* weight, const double* offset,
305
+ const double* coefficients,
306
+ const double* abs_tolerance,
307
+ const double* rel_tolerance,
308
+ const HighsInt* priority) {
309
+ HighsInt status = Highs_clearLinearObjectives(highs);
310
+ if (status != kHighsStatusOk) return status;
311
+ HighsLinearObjective linear_objective;
312
+ for (HighsInt iObj = 0; iObj < num_linear_objective; iObj++) {
313
+ HighsInt num_col = Highs_getNumCol(highs);
314
+ linear_objective.weight = weight[iObj];
315
+ linear_objective.offset = offset[iObj];
316
+ for (HighsInt iCol = 0; iCol < num_col; iCol++)
317
+ linear_objective.coefficients.push_back(
318
+ coefficients[iObj * num_col + iCol]);
319
+ linear_objective.abs_tolerance = abs_tolerance[iObj];
320
+ linear_objective.rel_tolerance = rel_tolerance[iObj];
321
+ linear_objective.priority = priority[iObj];
322
+ linear_objective.weight = weight[iObj];
323
+ status =
324
+ HighsInt(((Highs*)highs)->addLinearObjective(linear_objective, iObj));
325
+ if (status != kHighsStatusOk) return status;
326
+ linear_objective.coefficients.clear();
327
+ }
328
+ return kHighsStatusOk;
329
+ }
330
+
331
+ HighsInt Highs_addLinearObjective(const void* highs, const double weight,
332
+ const double offset,
333
+ const double* coefficients,
334
+ const double abs_tolerance,
335
+ const double rel_tolerance,
336
+ const HighsInt priority) {
337
+ HighsLinearObjective linear_objective;
338
+ HighsInt num_col = Highs_getNumCol(highs);
339
+ linear_objective.weight = weight;
340
+ linear_objective.offset = offset;
341
+ for (HighsInt iCol = 0; iCol < num_col; iCol++)
342
+ linear_objective.coefficients.push_back(coefficients[iCol]);
343
+ linear_objective.abs_tolerance = abs_tolerance;
344
+ linear_objective.rel_tolerance = rel_tolerance;
345
+ linear_objective.priority = priority;
346
+ linear_objective.weight = weight;
347
+ return HighsInt(((Highs*)highs)->addLinearObjective(linear_objective));
348
+ }
349
+
350
+ HighsInt Highs_clearLinearObjectives(const void* highs) {
351
+ return HighsInt(((Highs*)highs)->clearLinearObjectives());
352
+ }
353
+
354
+ HighsInt Highs_passRowName(const void* highs, const HighsInt row,
355
+ const char* name) {
356
+ return (HighsInt)((Highs*)highs)->passRowName(row, std::string(name));
357
+ }
358
+
359
+ HighsInt Highs_passColName(const void* highs, const HighsInt col,
360
+ const char* name) {
361
+ return (HighsInt)((Highs*)highs)->passColName(col, std::string(name));
362
+ }
363
+
364
+ HighsInt Highs_passModelName(const void* highs, const char* name) {
365
+ return (HighsInt)((Highs*)highs)->passModelName(std::string(name));
366
+ }
367
+
368
+ HighsInt Highs_readOptions(const void* highs, const char* filename) {
369
+ return (HighsInt)((Highs*)highs)->readOptions(filename);
370
+ }
371
+
372
+ HighsInt Highs_clear(void* highs) { return (HighsInt)((Highs*)highs)->clear(); }
373
+
374
+ HighsInt Highs_clearModel(void* highs) {
375
+ return (HighsInt)((Highs*)highs)->clearModel();
376
+ }
377
+
378
+ HighsInt Highs_clearSolver(void* highs) {
379
+ return (HighsInt)((Highs*)highs)->clearSolver();
380
+ }
381
+
382
+ HighsInt Highs_setBoolOptionValue(void* highs, const char* option,
383
+ const HighsInt value) {
384
+ return (HighsInt)((Highs*)highs)
385
+ ->setOptionValue(std::string(option), (bool)value);
386
+ }
387
+
388
+ HighsInt Highs_setIntOptionValue(void* highs, const char* option,
389
+ const HighsInt value) {
390
+ return (HighsInt)((Highs*)highs)->setOptionValue(std::string(option), value);
391
+ }
392
+
393
+ HighsInt Highs_setDoubleOptionValue(void* highs, const char* option,
394
+ const double value) {
395
+ return (HighsInt)((Highs*)highs)->setOptionValue(std::string(option), value);
396
+ }
397
+
398
+ HighsInt Highs_setStringOptionValue(void* highs, const char* option,
399
+ const char* value) {
400
+ return (HighsInt)((Highs*)highs)
401
+ ->setOptionValue(std::string(option), std::string(value));
402
+ }
403
+
404
+ HighsInt Highs_getNumOptions(const void* highs) {
405
+ return ((Highs*)highs)->getNumOptions();
406
+ }
407
+
408
+ HighsInt Highs_getOptionName(const void* highs, const HighsInt index,
409
+ char** name) {
410
+ std::string name_v;
411
+ HighsInt retcode = (HighsInt)((Highs*)highs)->getOptionName(index, &name_v);
412
+ // Guess we have to add one (for Windows, lol!) because char* is
413
+ // null-terminated
414
+ const HighsInt malloc_size = sizeof(char) * (name_v.length() + 1);
415
+ *name = (char*)malloc(malloc_size);
416
+ strcpy(*name, name_v.c_str());
417
+ return retcode;
418
+ }
419
+
420
+ HighsInt Highs_getBoolOptionValue(const void* highs, const char* option,
421
+ HighsInt* value) {
422
+ return Highs_getBoolOptionValues(highs, option, value, nullptr);
423
+ }
424
+
425
+ HighsInt Highs_getIntOptionValue(const void* highs, const char* option,
426
+ HighsInt* value) {
427
+ return Highs_getIntOptionValues(highs, option, value, nullptr, nullptr,
428
+ nullptr);
429
+ }
430
+
431
+ HighsInt Highs_getDoubleOptionValue(const void* highs, const char* option,
432
+ double* value) {
433
+ return Highs_getDoubleOptionValues(highs, option, value, nullptr, nullptr,
434
+ nullptr);
435
+ }
436
+
437
+ HighsInt Highs_getStringOptionValue(const void* highs, const char* option,
438
+ char* value) {
439
+ return Highs_getStringOptionValues(highs, option, value, nullptr);
440
+ }
441
+
442
+ HighsInt Highs_getOptionType(const void* highs, const char* option,
443
+ HighsInt* type) {
444
+ HighsOptionType t;
445
+ HighsInt retcode =
446
+ (HighsInt)((Highs*)highs)->getOptionType(std::string(option), t);
447
+ *type = (HighsInt)t;
448
+ return retcode;
449
+ }
450
+
451
+ HighsInt Highs_getBoolOptionValues(const void* highs, const char* option,
452
+ HighsInt* current_value,
453
+ HighsInt* default_value) {
454
+ bool current_v;
455
+ bool default_v;
456
+ HighsInt retcode =
457
+ (HighsInt)((Highs*)highs)
458
+ ->getBoolOptionValues(std::string(option), &current_v, &default_v);
459
+ if (current_value) *current_value = current_v;
460
+ if (default_value) *default_value = default_v;
461
+ return retcode;
462
+ }
463
+
464
+ HighsInt Highs_getIntOptionValues(const void* highs, const char* option,
465
+ HighsInt* current_value, HighsInt* min_value,
466
+ HighsInt* max_value,
467
+ HighsInt* default_value) {
468
+ return (HighsInt)((Highs*)highs)
469
+ ->getIntOptionValues(std::string(option), current_value, min_value,
470
+ max_value, default_value);
471
+ }
472
+
473
+ HighsInt Highs_getDoubleOptionValues(const void* highs, const char* option,
474
+ double* current_value, double* min_value,
475
+ double* max_value, double* default_value) {
476
+ return (HighsInt)((Highs*)highs)
477
+ ->getDoubleOptionValues(std::string(option), current_value, min_value,
478
+ max_value, default_value);
479
+ }
480
+
481
+ HighsInt Highs_getStringOptionValues(const void* highs, const char* option,
482
+ char* current_value, char* default_value) {
483
+ std::string current_v;
484
+ std::string default_v;
485
+ // Inherited from Highs_getStringOptionValue: cannot see why this
486
+ // was ever useful. Must assume that current_value is of length at
487
+ // least 7, which isn't necessarily true
488
+ //
489
+ // if (current_value) memset(current_value, 0, 7);
490
+ // if (default_value) memset(default_value, 0, 7);
491
+ HighsInt retcode =
492
+ (HighsInt)((Highs*)highs)
493
+ ->getStringOptionValues(std::string(option), &current_v, &default_v);
494
+ // current_value and default_value are nullptr by default
495
+ if (current_value) strcpy(current_value, current_v.c_str());
496
+ if (default_value) strcpy(default_value, default_v.c_str());
497
+ return retcode;
498
+ }
499
+
500
+ HighsInt Highs_resetOptions(void* highs) {
501
+ return (HighsInt)((Highs*)highs)->resetOptions();
502
+ }
503
+
504
+ HighsInt Highs_writeOptions(const void* highs, const char* filename) {
505
+ return (HighsInt)((Highs*)highs)->writeOptions(filename);
506
+ }
507
+
508
+ HighsInt Highs_writeOptionsDeviations(const void* highs, const char* filename) {
509
+ return (HighsInt)((Highs*)highs)->writeOptions(filename, true);
510
+ }
511
+
512
+ HighsInt Highs_getIntInfoValue(const void* highs, const char* info,
513
+ HighsInt* value) {
514
+ return (HighsInt)((Highs*)highs)->getInfoValue(info, *value);
515
+ }
516
+
517
+ HighsInt Highs_getDoubleInfoValue(const void* highs, const char* info,
518
+ double* value) {
519
+ return (HighsInt)((Highs*)highs)->getInfoValue(info, *value);
520
+ }
521
+
522
+ HighsInt Highs_getInt64InfoValue(const void* highs, const char* info,
523
+ int64_t* value) {
524
+ return (HighsInt)((Highs*)highs)->getInfoValue(info, *value);
525
+ }
526
+
527
+ HighsInt Highs_getInfoType(const void* highs, const char* info,
528
+ HighsInt* type) {
529
+ HighsInfoType t;
530
+ HighsInt retcode =
531
+ (HighsInt)((Highs*)highs)->getInfoType(std::string(info), t);
532
+ *type = (HighsInt)t;
533
+ return retcode;
534
+ }
535
+
536
+ HighsInt Highs_getSolution(const void* highs, double* col_value,
537
+ double* col_dual, double* row_value,
538
+ double* row_dual) {
539
+ const HighsSolution& solution = ((Highs*)highs)->getSolution();
540
+
541
+ if (col_value != nullptr) {
542
+ for (size_t i = 0; i < solution.col_value.size(); i++) {
543
+ col_value[i] = solution.col_value[i];
544
+ }
545
+ }
546
+
547
+ if (col_dual != nullptr) {
548
+ for (size_t i = 0; i < solution.col_dual.size(); i++) {
549
+ col_dual[i] = solution.col_dual[i];
550
+ }
551
+ }
552
+
553
+ if (row_value != nullptr) {
554
+ for (size_t i = 0; i < solution.row_value.size(); i++) {
555
+ row_value[i] = solution.row_value[i];
556
+ }
557
+ }
558
+
559
+ if (row_dual != nullptr) {
560
+ for (size_t i = 0; i < solution.row_dual.size(); i++) {
561
+ row_dual[i] = solution.row_dual[i];
562
+ }
563
+ }
564
+ return kHighsStatusOk;
565
+ }
566
+
567
+ HighsInt Highs_getBasis(const void* highs, HighsInt* col_status,
568
+ HighsInt* row_status) {
569
+ const HighsBasis& basis = ((Highs*)highs)->getBasis();
570
+ for (size_t i = 0; i < basis.col_status.size(); i++) {
571
+ col_status[i] = static_cast<HighsInt>(basis.col_status[i]);
572
+ }
573
+
574
+ for (size_t i = 0; i < basis.row_status.size(); i++) {
575
+ row_status[i] = static_cast<HighsInt>(basis.row_status[i]);
576
+ }
577
+ return kHighsStatusOk;
578
+ }
579
+
580
+ HighsInt Highs_getModelStatus(const void* highs) {
581
+ return (HighsInt)((Highs*)highs)->getModelStatus();
582
+ }
583
+
584
+ HighsInt Highs_getDualRay(const void* highs, HighsInt* has_dual_ray,
585
+ double* dual_ray_value) {
586
+ bool v;
587
+ HighsInt retcode = (HighsInt)((Highs*)highs)->getDualRay(v, dual_ray_value);
588
+ *has_dual_ray = (HighsInt)v;
589
+ return retcode;
590
+ }
591
+
592
+ HighsInt Highs_getDualUnboundednessDirection(
593
+ const void* highs, HighsInt* has_dual_unboundedness_direction,
594
+ double* dual_unboundedness_direction_value) {
595
+ bool v;
596
+ HighsInt retcode = (HighsInt)((Highs*)highs)
597
+ ->getDualUnboundednessDirection(
598
+ v, dual_unboundedness_direction_value);
599
+ *has_dual_unboundedness_direction = (HighsInt)v;
600
+ return retcode;
601
+ }
602
+
603
+ HighsInt Highs_getPrimalRay(const void* highs, HighsInt* has_primal_ray,
604
+ double* primal_ray_value) {
605
+ bool v;
606
+ HighsInt retcode =
607
+ (HighsInt)((Highs*)highs)->getPrimalRay(v, primal_ray_value);
608
+ *has_primal_ray = (HighsInt)v;
609
+ return retcode;
610
+ }
611
+
612
+ double Highs_getObjectiveValue(const void* highs) {
613
+ return ((Highs*)highs)->getObjectiveValue();
614
+ }
615
+
616
+ HighsInt Highs_getBasicVariables(const void* highs, HighsInt* basic_variables) {
617
+ return (HighsInt)((Highs*)highs)->getBasicVariables(basic_variables);
618
+ }
619
+
620
+ HighsInt Highs_getBasisInverseRow(const void* highs, const HighsInt row,
621
+ double* row_vector, HighsInt* row_num_nz,
622
+ HighsInt* row_index) {
623
+ return (HighsInt)((Highs*)highs)
624
+ ->getBasisInverseRow(row, row_vector, row_num_nz, row_index);
625
+ }
626
+
627
+ HighsInt Highs_getBasisInverseCol(const void* highs, const HighsInt col,
628
+ double* col_vector, HighsInt* col_num_nz,
629
+ HighsInt* col_index) {
630
+ return (HighsInt)((Highs*)highs)
631
+ ->getBasisInverseCol(col, col_vector, col_num_nz, col_index);
632
+ }
633
+
634
+ HighsInt Highs_getBasisSolve(const void* highs, const double* rhs,
635
+ double* solution_vector, HighsInt* solution_num_nz,
636
+ HighsInt* solution_index) {
637
+ return (HighsInt)((Highs*)highs)
638
+ ->getBasisSolve(rhs, solution_vector, solution_num_nz, solution_index);
639
+ }
640
+
641
+ HighsInt Highs_getBasisTransposeSolve(const void* highs, const double* rhs,
642
+ double* solution_vector,
643
+ HighsInt* solution_nz,
644
+ HighsInt* solution_index) {
645
+ return (HighsInt)((Highs*)highs)
646
+ ->getBasisTransposeSolve(rhs, solution_vector, solution_nz,
647
+ solution_index);
648
+ }
649
+
650
+ HighsInt Highs_getReducedRow(const void* highs, const HighsInt row,
651
+ double* row_vector, HighsInt* row_num_nz,
652
+ HighsInt* row_index) {
653
+ return (HighsInt)((Highs*)highs)
654
+ ->getReducedRow(row, row_vector, row_num_nz, row_index);
655
+ }
656
+
657
+ HighsInt Highs_getReducedColumn(const void* highs, const HighsInt col,
658
+ double* col_vector, HighsInt* col_num_nz,
659
+ HighsInt* col_index) {
660
+ return (HighsInt)((Highs*)highs)
661
+ ->getReducedColumn(col, col_vector, col_num_nz, col_index);
662
+ }
663
+
664
+ HighsInt Highs_setBasis(void* highs, const HighsInt* col_status,
665
+ const HighsInt* row_status) {
666
+ HighsBasis basis;
667
+ const HighsInt num__col = Highs_getNumCol(highs);
668
+ if (num__col > 0) {
669
+ basis.col_status.resize(num__col);
670
+ for (HighsInt i = 0; i < num__col; i++) {
671
+ if (col_status[i] == (HighsInt)HighsBasisStatus::kLower) {
672
+ basis.col_status[i] = HighsBasisStatus::kLower;
673
+ } else if (col_status[i] == (HighsInt)HighsBasisStatus::kBasic) {
674
+ basis.col_status[i] = HighsBasisStatus::kBasic;
675
+ } else if (col_status[i] == (HighsInt)HighsBasisStatus::kUpper) {
676
+ basis.col_status[i] = HighsBasisStatus::kUpper;
677
+ } else if (col_status[i] == (HighsInt)HighsBasisStatus::kZero) {
678
+ basis.col_status[i] = HighsBasisStatus::kZero;
679
+ } else if (col_status[i] == (HighsInt)HighsBasisStatus::kNonbasic) {
680
+ basis.col_status[i] = HighsBasisStatus::kNonbasic;
681
+ } else {
682
+ return (HighsInt)HighsStatus::kError;
683
+ }
684
+ }
685
+ }
686
+ const HighsInt num__row = Highs_getNumRow(highs);
687
+ if (num__row > 0) {
688
+ basis.row_status.resize(num__row);
689
+ for (HighsInt i = 0; i < num__row; i++) {
690
+ if (row_status[i] == (HighsInt)HighsBasisStatus::kLower) {
691
+ basis.row_status[i] = HighsBasisStatus::kLower;
692
+ } else if (row_status[i] == (HighsInt)HighsBasisStatus::kBasic) {
693
+ basis.row_status[i] = HighsBasisStatus::kBasic;
694
+ } else if (row_status[i] == (HighsInt)HighsBasisStatus::kUpper) {
695
+ basis.row_status[i] = HighsBasisStatus::kUpper;
696
+ } else if (row_status[i] == (HighsInt)HighsBasisStatus::kZero) {
697
+ basis.row_status[i] = HighsBasisStatus::kZero;
698
+ } else if (row_status[i] == (HighsInt)HighsBasisStatus::kNonbasic) {
699
+ basis.row_status[i] = HighsBasisStatus::kNonbasic;
700
+ } else {
701
+ return (HighsInt)HighsStatus::kError;
702
+ }
703
+ }
704
+ }
705
+ return (HighsInt)((Highs*)highs)->setBasis(basis);
706
+ }
707
+
708
+ HighsInt Highs_setLogicalBasis(void* highs) {
709
+ return (HighsInt)((Highs*)highs)->setBasis();
710
+ }
711
+
712
+ HighsInt Highs_setSolution(void* highs, const double* col_value,
713
+ const double* row_value, const double* col_dual,
714
+ const double* row_dual) {
715
+ HighsSolution solution;
716
+ const HighsInt num__col = Highs_getNumCol(highs);
717
+ if (num__col > 0) {
718
+ if (col_value) {
719
+ solution.col_value.resize(num__col);
720
+ for (HighsInt i = 0; i < num__col; i++)
721
+ solution.col_value[i] = col_value[i];
722
+ }
723
+ if (col_dual) {
724
+ solution.col_dual.resize(num__col);
725
+ for (HighsInt i = 0; i < num__col; i++)
726
+ solution.col_dual[i] = col_dual[i];
727
+ }
728
+ }
729
+ const HighsInt num__row = Highs_getNumRow(highs);
730
+ if (num__row > 0) {
731
+ if (row_value) {
732
+ solution.row_value.resize(num__row);
733
+ for (HighsInt i = 0; i < num__row; i++)
734
+ solution.row_value[i] = row_value[i];
735
+ }
736
+ if (row_dual) {
737
+ solution.row_dual.resize(num__row);
738
+ for (HighsInt i = 0; i < num__row; i++)
739
+ solution.row_dual[i] = row_dual[i];
740
+ }
741
+ }
742
+
743
+ return (HighsInt)((Highs*)highs)->setSolution(solution);
744
+ }
745
+
746
+ HighsInt Highs_setSparseSolution(void* highs, const HighsInt num_entries,
747
+ const HighsInt* index, const double* value) {
748
+ return (HighsInt)((Highs*)highs)->setSolution(num_entries, index, value);
749
+ }
750
+
751
+ HighsInt Highs_setCallback(void* highs, HighsCCallbackType user_callback,
752
+ void* user_callback_data) {
753
+ auto status = static_cast<Highs*>(highs)->setCallback(user_callback,
754
+ user_callback_data);
755
+ return static_cast<int>(status);
756
+ }
757
+
758
+ HighsInt Highs_startCallback(void* highs, const HighsInt callback_type) {
759
+ return (HighsInt)((Highs*)highs)->startCallback(callback_type);
760
+ }
761
+
762
+ HighsInt Highs_stopCallback(void* highs, const HighsInt callback_type) {
763
+ return (HighsInt)((Highs*)highs)->stopCallback(callback_type);
764
+ }
765
+
766
+ double Highs_getRunTime(const void* highs) {
767
+ return (double)((Highs*)highs)->getRunTime();
768
+ }
769
+
770
+ HighsInt Highs_zeroAllClocks(const void* highs) {
771
+ ((Highs*)highs)->zeroAllClocks();
772
+ return (HighsInt)HighsStatus::kOk;
773
+ }
774
+
775
+ HighsInt Highs_addCol(void* highs, const double cost, const double lower,
776
+ const double upper, const HighsInt num_new_nz,
777
+ const HighsInt* index, const double* value) {
778
+ return (HighsInt)((Highs*)highs)
779
+ ->addCol(cost, lower, upper, num_new_nz, index, value);
780
+ }
781
+
782
+ HighsInt Highs_addCols(void* highs, const HighsInt num_new_col,
783
+ const double* costs, const double* lower,
784
+ const double* upper, const HighsInt num_new_nz,
785
+ const HighsInt* starts, const HighsInt* index,
786
+ const double* value) {
787
+ return (HighsInt)((Highs*)highs)
788
+ ->addCols(num_new_col, costs, lower, upper, num_new_nz, starts, index,
789
+ value);
790
+ }
791
+
792
+ HighsInt Highs_addVar(void* highs, const double lower, const double upper) {
793
+ return (HighsInt)((Highs*)highs)->addVar(lower, upper);
794
+ }
795
+
796
+ HighsInt Highs_addVars(void* highs, const HighsInt num_new_var,
797
+ const double* lower, const double* upper) {
798
+ return (HighsInt)((Highs*)highs)->addVars(num_new_var, lower, upper);
799
+ }
800
+
801
+ HighsInt Highs_addRow(void* highs, const double lower, const double upper,
802
+ const HighsInt num_new_nz, const HighsInt* index,
803
+ const double* value) {
804
+ return (HighsInt)((Highs*)highs)
805
+ ->addRow(lower, upper, num_new_nz, index, value);
806
+ }
807
+
808
+ HighsInt Highs_addRows(void* highs, const HighsInt num_new_row,
809
+ const double* lower, const double* upper,
810
+ const HighsInt num_new_nz, const HighsInt* starts,
811
+ const HighsInt* index, const double* value) {
812
+ return (HighsInt)((Highs*)highs)
813
+ ->addRows(num_new_row, lower, upper, num_new_nz, starts, index, value);
814
+ }
815
+
816
+ HighsInt Highs_ensureColwise(void* highs) {
817
+ return (HighsInt)((Highs*)highs)->ensureColwise();
818
+ }
819
+
820
+ HighsInt Highs_ensureRowwise(void* highs) {
821
+ return (HighsInt)((Highs*)highs)->ensureRowwise();
822
+ }
823
+
824
+ HighsInt Highs_changeObjectiveSense(void* highs, const HighsInt sense) {
825
+ ObjSense pass_sense = ObjSense::kMinimize;
826
+ if (sense == (HighsInt)ObjSense::kMaximize) pass_sense = ObjSense::kMaximize;
827
+ return (HighsInt)((Highs*)highs)->changeObjectiveSense(pass_sense);
828
+ }
829
+
830
+ HighsInt Highs_changeObjectiveOffset(void* highs, const double offset) {
831
+ return (HighsInt)((Highs*)highs)->changeObjectiveOffset(offset);
832
+ }
833
+
834
+ HighsInt Highs_changeColIntegrality(void* highs, const HighsInt col,
835
+ const HighsInt integrality) {
836
+ return (HighsInt)((Highs*)highs)
837
+ ->changeColIntegrality(col, (HighsVarType)integrality);
838
+ }
839
+
840
+ HighsInt Highs_changeColsIntegralityByRange(void* highs,
841
+ const HighsInt from_col,
842
+ const HighsInt to_col,
843
+ const HighsInt* integrality) {
844
+ vector<HighsVarType> pass_integrality;
845
+ HighsInt num_ix = to_col - from_col + 1;
846
+ if (num_ix > 0) {
847
+ pass_integrality.resize(num_ix);
848
+ for (HighsInt ix = 0; ix < num_ix; ix++) {
849
+ pass_integrality[ix] = (HighsVarType)integrality[ix];
850
+ }
851
+ }
852
+ return (HighsInt)((Highs*)highs)
853
+ ->changeColsIntegrality(from_col, to_col, pass_integrality.data());
854
+ }
855
+
856
+ HighsInt Highs_changeColsIntegralityBySet(void* highs,
857
+ const HighsInt num_set_entries,
858
+ const HighsInt* set,
859
+ const HighsInt* integrality) {
860
+ vector<HighsVarType> pass_integrality;
861
+ if (num_set_entries > 0) {
862
+ pass_integrality.resize(num_set_entries);
863
+ for (HighsInt ix = 0; ix < num_set_entries; ix++) {
864
+ pass_integrality[ix] = (HighsVarType)integrality[ix];
865
+ }
866
+ }
867
+ return (HighsInt)((Highs*)highs)
868
+ ->changeColsIntegrality(num_set_entries, set, pass_integrality.data());
869
+ }
870
+
871
+ HighsInt Highs_changeColsIntegralityByMask(void* highs, const HighsInt* mask,
872
+ const HighsInt* integrality) {
873
+ const HighsInt num__col = Highs_getNumCol(highs);
874
+ vector<HighsVarType> pass_integrality;
875
+ if (num__col > 0) {
876
+ pass_integrality.resize(num__col);
877
+ for (HighsInt iCol = 0; iCol < num__col; iCol++) {
878
+ pass_integrality[iCol] = (HighsVarType)integrality[iCol];
879
+ }
880
+ }
881
+ return (HighsInt)((Highs*)highs)
882
+ ->changeColsIntegrality(mask, pass_integrality.data());
883
+ }
884
+
885
+ HighsInt Highs_clearIntegrality(void* highs) {
886
+ return (HighsInt)((Highs*)highs)->clearIntegrality();
887
+ }
888
+
889
+ HighsInt Highs_changeColCost(void* highs, const HighsInt col,
890
+ const double cost) {
891
+ return (HighsInt)((Highs*)highs)->changeColCost(col, cost);
892
+ }
893
+
894
+ HighsInt Highs_changeColsCostByRange(void* highs, const HighsInt from_col,
895
+ const HighsInt to_col,
896
+ const double* cost) {
897
+ return (HighsInt)((Highs*)highs)->changeColsCost(from_col, to_col, cost);
898
+ }
899
+
900
+ HighsInt Highs_changeColsCostBySet(void* highs, const HighsInt num_set_entries,
901
+ const HighsInt* set, const double* cost) {
902
+ return (HighsInt)((Highs*)highs)->changeColsCost(num_set_entries, set, cost);
903
+ }
904
+
905
+ HighsInt Highs_changeColsCostByMask(void* highs, const HighsInt* mask,
906
+ const double* cost) {
907
+ return (HighsInt)((Highs*)highs)->changeColsCost(mask, cost);
908
+ }
909
+
910
+ HighsInt Highs_changeColBounds(void* highs, const HighsInt col,
911
+ const double lower, const double upper) {
912
+ return (HighsInt)((Highs*)highs)->changeColBounds(col, lower, upper);
913
+ }
914
+
915
+ HighsInt Highs_changeColsBoundsByRange(void* highs, const HighsInt from_col,
916
+ const HighsInt to_col,
917
+ const double* lower,
918
+ const double* upper) {
919
+ return (HighsInt)((Highs*)highs)
920
+ ->changeColsBounds(from_col, to_col, lower, upper);
921
+ }
922
+
923
+ HighsInt Highs_changeColsBoundsBySet(void* highs,
924
+ const HighsInt num_set_entries,
925
+ const HighsInt* set, const double* lower,
926
+ const double* upper) {
927
+ return (HighsInt)((Highs*)highs)
928
+ ->changeColsBounds(num_set_entries, set, lower, upper);
929
+ }
930
+
931
+ HighsInt Highs_changeColsBoundsByMask(void* highs, const HighsInt* mask,
932
+ const double* lower,
933
+ const double* upper) {
934
+ return (HighsInt)((Highs*)highs)->changeColsBounds(mask, lower, upper);
935
+ }
936
+
937
+ HighsInt Highs_changeRowBounds(void* highs, const HighsInt row,
938
+ const double lower, const double upper) {
939
+ return (HighsInt)((Highs*)highs)->changeRowBounds(row, lower, upper);
940
+ }
941
+
942
+ HighsInt Highs_changeRowsBoundsByRange(void* highs, const HighsInt from_row,
943
+ const HighsInt to_row,
944
+ const double* lower,
945
+ const double* upper) {
946
+ return (HighsInt)((Highs*)highs)
947
+ ->changeRowsBounds(from_row, to_row, lower, upper);
948
+ }
949
+
950
+ HighsInt Highs_changeRowsBoundsBySet(void* highs,
951
+ const HighsInt num_set_entries,
952
+ const HighsInt* set, const double* lower,
953
+ const double* upper) {
954
+ return (HighsInt)((Highs*)highs)
955
+ ->changeRowsBounds(num_set_entries, set, lower, upper);
956
+ }
957
+
958
+ HighsInt Highs_changeRowsBoundsByMask(void* highs, const HighsInt* mask,
959
+ const double* lower,
960
+ const double* upper) {
961
+ return (HighsInt)((Highs*)highs)->changeRowsBounds(mask, lower, upper);
962
+ }
963
+
964
+ HighsInt Highs_changeCoeff(void* highs, const HighsInt row, const HighsInt col,
965
+ const double value) {
966
+ return (HighsInt)((Highs*)highs)->changeCoeff(row, col, value);
967
+ }
968
+
969
+ HighsInt Highs_getObjectiveSense(const void* highs, HighsInt* sense) {
970
+ ObjSense get_sense;
971
+ HighsStatus status = ((Highs*)highs)->getObjectiveSense(get_sense);
972
+ *sense = (HighsInt)get_sense;
973
+ return (HighsInt)status;
974
+ }
975
+
976
+ HighsInt Highs_getObjectiveOffset(const void* highs, double* offset) {
977
+ return (HighsInt)((Highs*)highs)->getObjectiveOffset(*offset);
978
+ }
979
+
980
+ HighsInt Highs_getColsByRange(const void* highs, const HighsInt from_col,
981
+ const HighsInt to_col, HighsInt* num_col,
982
+ double* costs, double* lower, double* upper,
983
+ HighsInt* num_nz, HighsInt* matrix_start,
984
+ HighsInt* matrix_index, double* matrix_value) {
985
+ HighsInt local_num_col, local_num_nz;
986
+ HighsStatus status =
987
+ ((Highs*)highs)
988
+ ->getCols(from_col, to_col, local_num_col, costs, lower, upper,
989
+ local_num_nz, matrix_start, matrix_index, matrix_value);
990
+ *num_col = local_num_col;
991
+ *num_nz = local_num_nz;
992
+ return (HighsInt)status;
993
+ }
994
+
995
+ HighsInt Highs_getColsBySet(const void* highs, const HighsInt num_set_entries,
996
+ const HighsInt* set, HighsInt* num_col,
997
+ double* costs, double* lower, double* upper,
998
+ HighsInt* num_nz, HighsInt* matrix_start,
999
+ HighsInt* matrix_index, double* matrix_value) {
1000
+ HighsInt local_num_col, local_num_nz;
1001
+ HighsStatus status =
1002
+ ((Highs*)highs)
1003
+ ->getCols(num_set_entries, set, local_num_col, costs, lower, upper,
1004
+ local_num_nz, matrix_start, matrix_index, matrix_value);
1005
+ *num_col = local_num_col;
1006
+ *num_nz = local_num_nz;
1007
+ return (HighsInt)status;
1008
+ }
1009
+
1010
+ HighsInt Highs_getColsByMask(const void* highs, const HighsInt* mask,
1011
+ HighsInt* num_col, double* costs, double* lower,
1012
+ double* upper, HighsInt* num_nz,
1013
+ HighsInt* matrix_start, HighsInt* matrix_index,
1014
+ double* matrix_value) {
1015
+ HighsInt local_num_col, local_num_nz;
1016
+ HighsStatus status =
1017
+ ((Highs*)highs)
1018
+ ->getCols(mask, local_num_col, costs, lower, upper, local_num_nz,
1019
+ matrix_start, matrix_index, matrix_value);
1020
+ *num_col = local_num_col;
1021
+ *num_nz = local_num_nz;
1022
+ return (HighsInt)status;
1023
+ }
1024
+
1025
+ HighsInt Highs_getRowsByRange(const void* highs, const HighsInt from_row,
1026
+ const HighsInt to_row, HighsInt* num_row,
1027
+ double* lower, double* upper, HighsInt* num_nz,
1028
+ HighsInt* matrix_start, HighsInt* matrix_index,
1029
+ double* matrix_value) {
1030
+ HighsInt local_num_row, local_num_nz;
1031
+ HighsStatus status =
1032
+ ((Highs*)highs)
1033
+ ->getRows(from_row, to_row, local_num_row, lower, upper, local_num_nz,
1034
+ matrix_start, matrix_index, matrix_value);
1035
+ *num_row = local_num_row;
1036
+ *num_nz = local_num_nz;
1037
+ return (HighsInt)status;
1038
+ }
1039
+
1040
+ HighsInt Highs_getRowsBySet(const void* highs, const HighsInt num_set_entries,
1041
+ const HighsInt* set, HighsInt* num_row,
1042
+ double* lower, double* upper, HighsInt* num_nz,
1043
+ HighsInt* matrix_start, HighsInt* matrix_index,
1044
+ double* matrix_value) {
1045
+ HighsInt local_num_row, local_num_nz;
1046
+ HighsStatus status =
1047
+ ((Highs*)highs)
1048
+ ->getRows(num_set_entries, set, local_num_row, lower, upper,
1049
+ local_num_nz, matrix_start, matrix_index, matrix_value);
1050
+ *num_row = local_num_row;
1051
+ *num_nz = local_num_nz;
1052
+ return (HighsInt)status;
1053
+ }
1054
+
1055
+ HighsInt Highs_getRowsByMask(const void* highs, const HighsInt* mask,
1056
+ HighsInt* num_row, double* lower, double* upper,
1057
+ HighsInt* num_nz, HighsInt* matrix_start,
1058
+ HighsInt* matrix_index, double* matrix_value) {
1059
+ HighsInt local_num_row, local_num_nz;
1060
+ HighsStatus status =
1061
+ ((Highs*)highs)
1062
+ ->getRows(mask, local_num_row, lower, upper, local_num_nz,
1063
+ matrix_start, matrix_index, matrix_value);
1064
+ *num_row = local_num_row;
1065
+ *num_nz = local_num_nz;
1066
+ return (HighsInt)status;
1067
+ }
1068
+
1069
+ static HighsInt Highs_getHighsLpColOrRowName(const void* highs,
1070
+ const HighsLp& lp,
1071
+ const bool is_col,
1072
+ const HighsInt index, char* name) {
1073
+ std::string name_v;
1074
+ HighsStatus status =
1075
+ ((Highs*)highs)->getColOrRowName(lp, is_col, index, name_v);
1076
+ if (status == HighsStatus::kError) return kHighsStatusError;
1077
+ strcpy(name, name_v.c_str());
1078
+ return kHighsStatusOk;
1079
+ }
1080
+
1081
+ HighsInt Highs_getRowName(const void* highs, const HighsInt row, char* name) {
1082
+ return Highs_getHighsLpColOrRowName(highs, ((Highs*)highs)->getLp(), false,
1083
+ row, name);
1084
+ }
1085
+
1086
+ HighsInt Highs_getRowByName(const void* highs, const char* name,
1087
+ HighsInt* row) {
1088
+ HighsInt local_row;
1089
+ HighsInt retcode = (HighsInt)((Highs*)highs)->getRowByName(name, local_row);
1090
+ *row = local_row;
1091
+ return retcode;
1092
+ }
1093
+
1094
+ HighsInt Highs_getColName(const void* highs, const HighsInt col, char* name) {
1095
+ return Highs_getHighsLpColOrRowName(highs, ((Highs*)highs)->getLp(), true,
1096
+ col, name);
1097
+ }
1098
+
1099
+ HighsInt Highs_getColByName(const void* highs, const char* name,
1100
+ HighsInt* col) {
1101
+ HighsInt local_col;
1102
+ HighsInt retcode = (HighsInt)((Highs*)highs)->getColByName(name, local_col);
1103
+ *col = local_col;
1104
+ return retcode;
1105
+ }
1106
+
1107
+ HighsInt Highs_getColIntegrality(const void* highs, const HighsInt col,
1108
+ HighsInt* integrality) {
1109
+ HighsVarType integrality_v;
1110
+ HighsInt retcode =
1111
+ (HighsInt)((Highs*)highs)->getColIntegrality(col, integrality_v);
1112
+ *integrality = HighsInt(integrality_v);
1113
+ return retcode;
1114
+ }
1115
+
1116
+ HighsInt Highs_deleteColsByRange(void* highs, const HighsInt from_col,
1117
+ const HighsInt to_col) {
1118
+ return (HighsInt)((Highs*)highs)->deleteCols(from_col, to_col);
1119
+ }
1120
+
1121
+ HighsInt Highs_deleteColsBySet(void* highs, const HighsInt num_set_entries,
1122
+ const HighsInt* set) {
1123
+ return (HighsInt)((Highs*)highs)->deleteCols(num_set_entries, set);
1124
+ }
1125
+
1126
+ HighsInt Highs_deleteColsByMask(void* highs, HighsInt* mask) {
1127
+ return (HighsInt)((Highs*)highs)->deleteCols(mask);
1128
+ }
1129
+
1130
+ HighsInt Highs_deleteRowsByRange(void* highs, const HighsInt from_row,
1131
+ const HighsInt to_row) {
1132
+ return (HighsInt)((Highs*)highs)->deleteRows(from_row, to_row);
1133
+ }
1134
+
1135
+ HighsInt Highs_deleteRowsBySet(void* highs, const HighsInt num_set_entries,
1136
+ const HighsInt* set) {
1137
+ return (HighsInt)((Highs*)highs)->deleteRows(num_set_entries, set);
1138
+ }
1139
+
1140
+ HighsInt Highs_deleteRowsByMask(void* highs, HighsInt* mask) {
1141
+ return (HighsInt)((Highs*)highs)->deleteRows(mask);
1142
+ }
1143
+
1144
+ HighsInt Highs_scaleCol(void* highs, const HighsInt col,
1145
+ const double scaleval) {
1146
+ return (HighsInt)((Highs*)highs)->scaleCol(col, scaleval);
1147
+ }
1148
+
1149
+ HighsInt Highs_scaleRow(void* highs, const HighsInt row,
1150
+ const double scaleval) {
1151
+ return (HighsInt)((Highs*)highs)->scaleRow(row, scaleval);
1152
+ }
1153
+
1154
+ double Highs_getInfinity(const void* highs) {
1155
+ return ((Highs*)highs)->getInfinity();
1156
+ }
1157
+
1158
+ HighsInt Highs_getSizeofHighsInt(const void* highs) {
1159
+ return ((Highs*)highs)->getSizeofHighsInt();
1160
+ }
1161
+
1162
+ HighsInt Highs_getNumCol(const void* highs) {
1163
+ return ((Highs*)highs)->getNumCol();
1164
+ }
1165
+
1166
+ HighsInt Highs_getNumRow(const void* highs) {
1167
+ return ((Highs*)highs)->getNumRow();
1168
+ }
1169
+
1170
+ HighsInt Highs_getNumNz(const void* highs) {
1171
+ return ((Highs*)highs)->getNumNz();
1172
+ }
1173
+
1174
+ HighsInt Highs_getHessianNumNz(const void* highs) {
1175
+ return ((Highs*)highs)->getHessianNumNz();
1176
+ }
1177
+
1178
+ HighsInt Highs_getPresolvedNumCol(const void* highs) {
1179
+ return ((Highs*)highs)->getPresolvedLp().num_col_;
1180
+ }
1181
+
1182
+ HighsInt Highs_getPresolvedNumRow(const void* highs) {
1183
+ return ((Highs*)highs)->getPresolvedLp().num_row_;
1184
+ }
1185
+
1186
+ HighsInt Highs_getPresolvedNumNz(const void* highs) {
1187
+ return ((Highs*)highs)->getPresolvedLp().a_matrix_.numNz();
1188
+ }
1189
+
1190
+ // Gets pointers to all the public data members of HighsLp: avoids
1191
+ // duplicate code in Highs_getModel, Highs_getPresolvedLp,
1192
+ static HighsInt Highs_getHighsLpData(const HighsLp& lp, const HighsInt a_format,
1193
+ HighsInt* num_col, HighsInt* num_row,
1194
+ HighsInt* num_nz, HighsInt* sense,
1195
+ double* offset, double* col_cost,
1196
+ double* col_lower, double* col_upper,
1197
+ double* row_lower, double* row_upper,
1198
+ HighsInt* a_start, HighsInt* a_index,
1199
+ double* a_value, HighsInt* integrality) {
1200
+ const MatrixFormat desired_a_format =
1201
+ a_format == HighsInt(MatrixFormat::kColwise) ? MatrixFormat::kColwise
1202
+ : MatrixFormat::kRowwise;
1203
+ *sense = (HighsInt)lp.sense_;
1204
+ *offset = lp.offset_;
1205
+ *num_col = lp.num_col_;
1206
+ *num_row = lp.num_row_;
1207
+ *num_nz = 0; // In case one of the matrix dimensions is zero
1208
+ if (*num_col > 0) {
1209
+ if (col_cost)
1210
+ memcpy(col_cost, lp.col_cost_.data(), *num_col * sizeof(double));
1211
+ if (col_lower)
1212
+ memcpy(col_lower, lp.col_lower_.data(), *num_col * sizeof(double));
1213
+ if (col_upper)
1214
+ memcpy(col_upper, lp.col_upper_.data(), *num_col * sizeof(double));
1215
+ }
1216
+ if (*num_row > 0) {
1217
+ if (row_lower)
1218
+ memcpy(row_lower, lp.row_lower_.data(), *num_row * sizeof(double));
1219
+ if (row_upper)
1220
+ memcpy(row_upper, lp.row_upper_.data(), *num_row * sizeof(double));
1221
+ }
1222
+
1223
+ // Nothing to do if one of the matrix dimensions is zero
1224
+ if (*num_col > 0 && *num_row > 0) {
1225
+ // Determine the desired orientation and number of start entries to
1226
+ // be copied
1227
+ const HighsInt num_start_entries =
1228
+ desired_a_format == MatrixFormat::kColwise ? *num_col : *num_row;
1229
+ if ((desired_a_format == MatrixFormat::kColwise &&
1230
+ lp.a_matrix_.isColwise()) ||
1231
+ (desired_a_format == MatrixFormat::kRowwise &&
1232
+ lp.a_matrix_.isRowwise())) {
1233
+ // Incumbent format is OK
1234
+ *num_nz = lp.a_matrix_.numNz();
1235
+ if (a_start)
1236
+ memcpy(a_start, lp.a_matrix_.start_.data(),
1237
+ num_start_entries * sizeof(HighsInt));
1238
+ if (a_index)
1239
+ memcpy(a_index, lp.a_matrix_.index_.data(), *num_nz * sizeof(HighsInt));
1240
+ if (a_value)
1241
+ memcpy(a_value, lp.a_matrix_.value_.data(), *num_nz * sizeof(double));
1242
+ } else {
1243
+ // Take a copy and transpose it
1244
+ HighsSparseMatrix local_matrix = lp.a_matrix_;
1245
+ if (desired_a_format == MatrixFormat::kColwise) {
1246
+ assert(local_matrix.isRowwise());
1247
+ local_matrix.ensureColwise();
1248
+ } else {
1249
+ assert(local_matrix.isColwise());
1250
+ local_matrix.ensureRowwise();
1251
+ }
1252
+ *num_nz = local_matrix.numNz();
1253
+ if (a_start)
1254
+ memcpy(a_start, local_matrix.start_.data(),
1255
+ num_start_entries * sizeof(HighsInt));
1256
+ if (a_index)
1257
+ memcpy(a_index, local_matrix.index_.data(), *num_nz * sizeof(HighsInt));
1258
+ if (a_value)
1259
+ memcpy(a_value, local_matrix.value_.data(), *num_nz * sizeof(double));
1260
+ }
1261
+ }
1262
+ if (HighsInt(lp.integrality_.size()) && integrality) {
1263
+ for (int iCol = 0; iCol < *num_col; iCol++)
1264
+ integrality[iCol] = HighsInt(lp.integrality_[iCol]);
1265
+ }
1266
+ return kHighsStatusOk;
1267
+ }
1268
+
1269
+ HighsInt Highs_getModel(const void* highs, const HighsInt a_format,
1270
+ const HighsInt q_format, HighsInt* num_col,
1271
+ HighsInt* num_row, HighsInt* num_nz, HighsInt* q_num_nz,
1272
+ HighsInt* sense, double* offset, double* col_cost,
1273
+ double* col_lower, double* col_upper, double* row_lower,
1274
+ double* row_upper, HighsInt* a_start, HighsInt* a_index,
1275
+ double* a_value, HighsInt* q_start, HighsInt* q_index,
1276
+ double* q_value, HighsInt* integrality) {
1277
+ HighsInt return_status = Highs_getHighsLpData(
1278
+ ((Highs*)highs)->getLp(), a_format, num_col, num_row, num_nz, sense,
1279
+ offset, col_cost, col_lower, col_upper, row_lower, row_upper, a_start,
1280
+ a_index, a_value, integrality);
1281
+ if (return_status != kHighsStatusOk) return return_status;
1282
+ const HighsHessian& hessian = ((Highs*)highs)->getModel().hessian_;
1283
+ if (hessian.dim_ > 0) {
1284
+ *q_num_nz = hessian.start_[*num_col];
1285
+ if (q_start)
1286
+ memcpy(q_start, hessian.start_.data(), *num_col * sizeof(HighsInt));
1287
+ if (q_index)
1288
+ memcpy(q_index, hessian.index_.data(), *q_num_nz * sizeof(HighsInt));
1289
+ if (q_value)
1290
+ memcpy(q_value, hessian.value_.data(), *q_num_nz * sizeof(double));
1291
+ }
1292
+ return kHighsStatusOk;
1293
+ }
1294
+
1295
+ HighsInt Highs_getLp(const void* highs, const HighsInt a_format,
1296
+ HighsInt* num_col, HighsInt* num_row, HighsInt* num_nz,
1297
+ HighsInt* sense, double* offset, double* col_cost,
1298
+ double* col_lower, double* col_upper, double* row_lower,
1299
+ double* row_upper, HighsInt* a_start, HighsInt* a_index,
1300
+ double* a_value, HighsInt* integrality) {
1301
+ return Highs_getHighsLpData(((Highs*)highs)->getLp(), a_format, num_col,
1302
+ num_row, num_nz, sense, offset, col_cost,
1303
+ col_lower, col_upper, row_lower, row_upper,
1304
+ a_start, a_index, a_value, integrality);
1305
+ }
1306
+
1307
+ HighsInt Highs_getFixedLp(const void* highs, const HighsInt a_format,
1308
+ HighsInt* num_col, HighsInt* num_row,
1309
+ HighsInt* num_nz, HighsInt* sense, double* offset,
1310
+ double* col_cost, double* col_lower,
1311
+ double* col_upper, double* row_lower,
1312
+ double* row_upper, HighsInt* a_start,
1313
+ HighsInt* a_index, double* a_value) {
1314
+ HighsLp lp;
1315
+ HighsInt status = HighsInt(((Highs*)highs)->getFixedLp(lp));
1316
+ if (status == kHighsStatusError) return status;
1317
+ HighsInt* integrality = nullptr;
1318
+ Highs_getHighsLpData(lp, a_format, num_col, num_row, num_nz, sense, offset,
1319
+ col_cost, col_lower, col_upper, row_lower, row_upper,
1320
+ a_start, a_index, a_value, integrality);
1321
+ return status;
1322
+ }
1323
+
1324
+ HighsInt Highs_getPresolvedLp(const void* highs, const HighsInt a_format,
1325
+ HighsInt* num_col, HighsInt* num_row,
1326
+ HighsInt* num_nz, HighsInt* sense, double* offset,
1327
+ double* col_cost, double* col_lower,
1328
+ double* col_upper, double* row_lower,
1329
+ double* row_upper, HighsInt* a_start,
1330
+ HighsInt* a_index, double* a_value,
1331
+ HighsInt* integrality) {
1332
+ return Highs_getHighsLpData(((Highs*)highs)->getPresolvedLp(), a_format,
1333
+ num_col, num_row, num_nz, sense, offset, col_cost,
1334
+ col_lower, col_upper, row_lower, row_upper,
1335
+ a_start, a_index, a_value, integrality);
1336
+ }
1337
+
1338
+ HighsInt Highs_getPresolvedColName(const void* highs, const HighsInt col,
1339
+ char* name) {
1340
+ return Highs_getHighsLpColOrRowName(highs, ((Highs*)highs)->getPresolvedLp(),
1341
+ true, col, name);
1342
+ }
1343
+
1344
+ HighsInt Highs_getPresolvedRowName(const void* highs, const HighsInt row,
1345
+ char* name) {
1346
+ return Highs_getHighsLpColOrRowName(highs, ((Highs*)highs)->getPresolvedLp(),
1347
+ false, row, name);
1348
+ }
1349
+
1350
+ HighsInt Highs_getIis(void* highs, HighsInt* iis_num_col, HighsInt* iis_num_row,
1351
+ HighsInt* col_index, HighsInt* row_index,
1352
+ HighsInt* col_bound, HighsInt* row_bound,
1353
+ HighsInt* col_status, HighsInt* row_status) {
1354
+ HighsIis iis;
1355
+ HighsInt status = (HighsInt)((Highs*)highs)->getIis(iis);
1356
+ if (status == (HighsInt)HighsStatus::kError) return status;
1357
+ *iis_num_col = iis.col_index_.size();
1358
+ *iis_num_row = iis.row_index_.size();
1359
+ if (col_index != nullptr) {
1360
+ for (size_t i = 0; i < static_cast<size_t>(*iis_num_col); i++) {
1361
+ col_index[i] = iis.col_index_[i];
1362
+ }
1363
+ }
1364
+ if (row_index != nullptr) {
1365
+ for (size_t i = 0; i < static_cast<size_t>(*iis_num_row); i++) {
1366
+ row_index[i] = iis.row_index_[i];
1367
+ }
1368
+ }
1369
+ if (col_bound != nullptr) {
1370
+ for (size_t i = 0; i < static_cast<size_t>(*iis_num_col); i++) {
1371
+ col_bound[i] = iis.col_bound_[i];
1372
+ }
1373
+ }
1374
+ if (row_bound != nullptr) {
1375
+ for (size_t i = 0; i < static_cast<size_t>(*iis_num_row); i++) {
1376
+ row_bound[i] = iis.row_bound_[i];
1377
+ }
1378
+ }
1379
+ if (col_status != nullptr) {
1380
+ for (size_t i = 0;
1381
+ i < static_cast<size_t>(((Highs*)highs)->getLp().num_col_); i++) {
1382
+ col_status[i] = iis.col_status_[i];
1383
+ }
1384
+ }
1385
+ if (row_status != nullptr) {
1386
+ for (size_t i = 0;
1387
+ i < static_cast<size_t>(((Highs*)highs)->getLp().num_row_); i++) {
1388
+ row_status[i] = iis.row_status_[i];
1389
+ }
1390
+ }
1391
+ return status;
1392
+ }
1393
+
1394
+ HighsInt Highs_getIisLp(const void* highs, const HighsInt a_format,
1395
+ HighsInt* num_col, HighsInt* num_row, HighsInt* num_nz,
1396
+ HighsInt* sense, double* offset, double* col_cost,
1397
+ double* col_lower, double* col_upper, double* row_lower,
1398
+ double* row_upper, HighsInt* a_start, HighsInt* a_index,
1399
+ double* a_value, HighsInt* integrality) {
1400
+ return Highs_getHighsLpData(((Highs*)highs)->getIisLp(), a_format, num_col,
1401
+ num_row, num_nz, sense, offset, col_cost,
1402
+ col_lower, col_upper, row_lower, row_upper,
1403
+ a_start, a_index, a_value, integrality);
1404
+ }
1405
+
1406
+ HighsInt Highs_crossover(void* highs, const HighsInt num_col,
1407
+ const HighsInt num_row, const double* col_value,
1408
+ const double* col_dual, const double* row_dual) {
1409
+ HighsSolution solution;
1410
+ if (col_value) {
1411
+ solution.value_valid = true;
1412
+ solution.col_value.resize(num_col);
1413
+ for (int col = 0; col < num_col; col++)
1414
+ solution.col_value[col] = col_value[col];
1415
+ }
1416
+
1417
+ if (col_dual && row_dual) {
1418
+ solution.dual_valid = true;
1419
+ solution.col_dual.resize(num_col);
1420
+ solution.row_dual.resize(num_row);
1421
+ for (int col = 0; col < num_col; col++)
1422
+ solution.col_dual[col] = col_dual[col];
1423
+ for (int row = 0; row < num_row; row++)
1424
+ solution.row_dual[row] = row_dual[row];
1425
+ }
1426
+
1427
+ return (HighsInt)((Highs*)highs)->crossover(solution);
1428
+ }
1429
+
1430
+ HighsInt Highs_getRanging(
1431
+ void* highs,
1432
+ //
1433
+ double* col_cost_up_value, double* col_cost_up_objective,
1434
+ HighsInt* col_cost_up_in_var, HighsInt* col_cost_up_ou_var,
1435
+ double* col_cost_dn_value, double* col_cost_dn_objective,
1436
+ HighsInt* col_cost_dn_in_var, HighsInt* col_cost_dn_ou_var,
1437
+ double* col_bound_up_value, double* col_bound_up_objective,
1438
+ HighsInt* col_bound_up_in_var, HighsInt* col_bound_up_ou_var,
1439
+ double* col_bound_dn_value, double* col_bound_dn_objective,
1440
+ HighsInt* col_bound_dn_in_var, HighsInt* col_bound_dn_ou_var,
1441
+ double* row_bound_up_value, double* row_bound_up_objective,
1442
+ HighsInt* row_bound_up_in_var, HighsInt* row_bound_up_ou_var,
1443
+ double* row_bound_dn_value, double* row_bound_dn_objective,
1444
+ HighsInt* row_bound_dn_in_var, HighsInt* row_bound_dn_ou_var) {
1445
+ HighsRanging ranging;
1446
+ HighsInt status = (HighsInt)((Highs*)highs)->getRanging(ranging);
1447
+ if (status == (HighsInt)HighsStatus::kError) return status;
1448
+ HighsInt num_col = ((Highs*)highs)->getNumCol();
1449
+ HighsInt num_row = ((Highs*)highs)->getNumRow();
1450
+ if (col_cost_up_value)
1451
+ memcpy(col_cost_up_value, ranging.col_cost_up.value_.data(),
1452
+ num_col * sizeof(double));
1453
+ if (col_cost_up_objective)
1454
+ memcpy(col_cost_up_objective, ranging.col_cost_up.objective_.data(),
1455
+ num_col * sizeof(double));
1456
+ if (col_cost_up_in_var)
1457
+ memcpy(col_cost_up_in_var, ranging.col_cost_up.in_var_.data(),
1458
+ num_col * sizeof(HighsInt));
1459
+ if (col_cost_up_ou_var)
1460
+ memcpy(col_cost_up_ou_var, ranging.col_cost_up.ou_var_.data(),
1461
+ num_col * sizeof(HighsInt));
1462
+
1463
+ if (col_cost_dn_value)
1464
+ memcpy(col_cost_dn_value, ranging.col_cost_dn.value_.data(),
1465
+ num_col * sizeof(double));
1466
+ if (col_cost_dn_objective)
1467
+ memcpy(col_cost_dn_objective, ranging.col_cost_dn.objective_.data(),
1468
+ num_col * sizeof(double));
1469
+ if (col_cost_dn_in_var)
1470
+ memcpy(col_cost_dn_in_var, ranging.col_cost_dn.in_var_.data(),
1471
+ num_col * sizeof(HighsInt));
1472
+ if (col_cost_dn_ou_var)
1473
+ memcpy(col_cost_dn_ou_var, ranging.col_cost_dn.ou_var_.data(),
1474
+ num_col * sizeof(HighsInt));
1475
+
1476
+ if (col_bound_up_value)
1477
+ memcpy(col_bound_up_value, ranging.col_bound_up.value_.data(),
1478
+ num_col * sizeof(double));
1479
+ if (col_bound_up_objective)
1480
+ memcpy(col_bound_up_objective, ranging.col_bound_up.objective_.data(),
1481
+ num_col * sizeof(double));
1482
+ if (col_bound_up_in_var)
1483
+ memcpy(col_bound_up_in_var, ranging.col_bound_up.in_var_.data(),
1484
+ num_col * sizeof(HighsInt));
1485
+ if (col_bound_up_ou_var)
1486
+ memcpy(col_bound_up_ou_var, ranging.col_bound_up.ou_var_.data(),
1487
+ num_col * sizeof(HighsInt));
1488
+
1489
+ if (col_bound_dn_value)
1490
+ memcpy(col_bound_dn_value, ranging.col_bound_dn.value_.data(),
1491
+ num_col * sizeof(double));
1492
+ if (col_bound_dn_objective)
1493
+ memcpy(col_bound_dn_objective, ranging.col_bound_dn.objective_.data(),
1494
+ num_col * sizeof(double));
1495
+ if (col_bound_dn_in_var)
1496
+ memcpy(col_bound_dn_in_var, ranging.col_bound_dn.in_var_.data(),
1497
+ num_col * sizeof(HighsInt));
1498
+ if (col_bound_dn_ou_var)
1499
+ memcpy(col_bound_dn_ou_var, ranging.col_bound_dn.ou_var_.data(),
1500
+ num_col * sizeof(HighsInt));
1501
+
1502
+ if (row_bound_up_value)
1503
+ memcpy(row_bound_up_value, ranging.row_bound_up.value_.data(),
1504
+ num_row * sizeof(double));
1505
+ if (row_bound_up_objective)
1506
+ memcpy(row_bound_up_objective, ranging.row_bound_up.objective_.data(),
1507
+ num_row * sizeof(double));
1508
+ if (row_bound_up_in_var)
1509
+ memcpy(row_bound_up_in_var, ranging.row_bound_up.in_var_.data(),
1510
+ num_row * sizeof(HighsInt));
1511
+ if (row_bound_up_ou_var)
1512
+ memcpy(row_bound_up_ou_var, ranging.row_bound_up.ou_var_.data(),
1513
+ num_row * sizeof(HighsInt));
1514
+
1515
+ if (row_bound_dn_value)
1516
+ memcpy(row_bound_dn_value, ranging.row_bound_dn.value_.data(),
1517
+ num_row * sizeof(double));
1518
+ if (row_bound_dn_objective)
1519
+ memcpy(row_bound_dn_objective, ranging.row_bound_dn.objective_.data(),
1520
+ num_row * sizeof(double));
1521
+ if (row_bound_dn_in_var)
1522
+ memcpy(row_bound_dn_in_var, ranging.row_bound_dn.in_var_.data(),
1523
+ num_row * sizeof(HighsInt));
1524
+ if (row_bound_dn_ou_var)
1525
+ memcpy(row_bound_dn_ou_var, ranging.row_bound_dn.ou_var_.data(),
1526
+ num_row * sizeof(HighsInt));
1527
+
1528
+ return status;
1529
+ }
1530
+
1531
+ HighsInt Highs_feasibilityRelaxation(void* highs,
1532
+ const double global_lower_penalty,
1533
+ const double global_upper_penalty,
1534
+ const double global_rhs_penalty,
1535
+ const double* local_lower_penalty,
1536
+ const double* local_upper_penalty,
1537
+ const double* local_rhs_penalty) {
1538
+ return (HighsInt)((Highs*)highs)
1539
+ ->feasibilityRelaxation(global_lower_penalty, global_upper_penalty,
1540
+ global_rhs_penalty, local_lower_penalty,
1541
+ local_upper_penalty, local_rhs_penalty);
1542
+ }
1543
+
1544
+ void Highs_resetGlobalScheduler(HighsInt blocking) {
1545
+ Highs::resetGlobalScheduler(blocking != 0);
1546
+ }
1547
+
1548
+ const void* Highs_getCallbackDataOutItem(const HighsCallbackDataOut* data_out,
1549
+ const char* item_name) {
1550
+ // Accessor function for HighsCallbackDataOut
1551
+ //
1552
+ // Remember that pointers in HighsCallbackDataOut don't need to be referenced!
1553
+ if (!strcmp(item_name, kHighsCallbackDataOutLogTypeName)) {
1554
+ return (void*)(&data_out->log_type);
1555
+ } else if (!strcmp(item_name, kHighsCallbackDataOutRunningTimeName)) {
1556
+ return (void*)(&data_out->running_time);
1557
+ } else if (!strcmp(item_name,
1558
+ kHighsCallbackDataOutSimplexIterationCountName)) {
1559
+ return (void*)(&data_out->simplex_iteration_count);
1560
+ } else if (!strcmp(item_name, kHighsCallbackDataOutIpmIterationCountName)) {
1561
+ return (void*)(&data_out->ipm_iteration_count);
1562
+ } else if (!strcmp(item_name, kHighsCallbackDataOutPdlpIterationCountName)) {
1563
+ return (void*)(&data_out->pdlp_iteration_count);
1564
+ } else if (!strcmp(item_name,
1565
+ kHighsCallbackDataOutObjectiveFunctionValueName)) {
1566
+ return (void*)(&data_out->objective_function_value);
1567
+ } else if (!strcmp(item_name, kHighsCallbackDataOutMipNodeCountName)) {
1568
+ return (void*)(&data_out->mip_node_count);
1569
+ } else if (!strcmp(item_name,
1570
+ kHighsCallbackDataOutMipTotalLpIterationsName)) {
1571
+ return (void*)(&data_out->mip_total_lp_iterations);
1572
+ } else if (!strcmp(item_name, kHighsCallbackDataOutMipPrimalBoundName)) {
1573
+ return (void*)(&data_out->mip_primal_bound);
1574
+ } else if (!strcmp(item_name, kHighsCallbackDataOutMipDualBoundName)) {
1575
+ return (void*)(&data_out->mip_dual_bound);
1576
+ } else if (!strcmp(item_name, kHighsCallbackDataOutMipGapName)) {
1577
+ return (void*)(&data_out->mip_gap);
1578
+ } else if (!strcmp(item_name, kHighsCallbackDataOutMipSolutionName)) {
1579
+ return (void*)(data_out->mip_solution);
1580
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolNumColName)) {
1581
+ return (void*)(&data_out->cutpool_num_col);
1582
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolNumCutName)) {
1583
+ return (void*)(&data_out->cutpool_num_cut);
1584
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolNumNzName)) {
1585
+ return (void*)(&data_out->cutpool_num_nz);
1586
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolStartName)) {
1587
+ return (void*)(data_out->cutpool_start);
1588
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolIndexName)) {
1589
+ return (void*)(data_out->cutpool_index);
1590
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolValueName)) {
1591
+ return (void*)(data_out->cutpool_value);
1592
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolLowerName)) {
1593
+ return (void*)(data_out->cutpool_lower);
1594
+ } else if (!strcmp(item_name, kHighsCallbackDataOutCutpoolUpperName)) {
1595
+ return (void*)(data_out->cutpool_upper);
1596
+ }
1597
+ return nullptr;
1598
+ }
1599
+
1600
+ HighsInt Highs_setCallbackSolution(HighsCallbackDataIn* data_in,
1601
+ HighsInt num_entries, const double* value) {
1602
+ if (data_in != nullptr && data_in->cbdata != nullptr) {
1603
+ HighsCallbackInput* obj = static_cast<HighsCallbackInput*>(data_in->cbdata);
1604
+ return static_cast<int>(obj->setSolution(num_entries, value));
1605
+ } else
1606
+ return static_cast<int>(HighsStatus::kError);
1607
+ }
1608
+
1609
+ HighsInt Highs_setCallbackSparseSolution(HighsCallbackDataIn* data_in,
1610
+ HighsInt num_entries,
1611
+ const HighsInt* index,
1612
+ const double* value) {
1613
+ if (data_in != nullptr && data_in->cbdata != nullptr) {
1614
+ HighsCallbackInput* obj = static_cast<HighsCallbackInput*>(data_in->cbdata);
1615
+ return static_cast<int>(obj->setSolution(num_entries, index, value));
1616
+ } else
1617
+ return static_cast<int>(HighsStatus::kError);
1618
+ }
1619
+
1620
+ HighsInt Highs_repairCallbackSolution(HighsCallbackDataIn* data_in) {
1621
+ if (data_in != nullptr && data_in->cbdata != nullptr) {
1622
+ HighsCallbackInput* obj = static_cast<HighsCallbackInput*>(data_in->cbdata);
1623
+ return static_cast<int>(obj->repairSolution());
1624
+ } else
1625
+ return static_cast<int>(HighsStatus::kError);
1626
+ }
1627
+
1628
+ // *********************
1629
+ // * Deprecated methods*
1630
+ // *********************
1631
+
1632
+ #pragma GCC diagnostic push
1633
+ #pragma GCC diagnostic ignored "-Wunused-function"
1634
+ const char* Highs_compilationDate(void) { return "Deprecated"; }
1635
+ #pragma GCC diagnostic pop
1636
+
1637
+ HighsInt Highs_call(const HighsInt num_col, const HighsInt num_row,
1638
+ const HighsInt num_nz, const double* col_cost,
1639
+ const double* col_lower, const double* col_upper,
1640
+ const double* row_lower, const double* row_upper,
1641
+ const HighsInt* a_start, const HighsInt* a_index,
1642
+ const double* a_value, double* col_value, double* col_dual,
1643
+ double* row_value, double* row_dual,
1644
+ HighsInt* col_basis_status, HighsInt* row_basis_status,
1645
+ HighsInt* model_status) {
1646
+ printf(
1647
+ "Method Highs_call is deprecated: alternative method is Highs_lpCall\n");
1648
+ const HighsInt aformat_columnwise = 1;
1649
+ const HighsInt sense = 1;
1650
+ const double offset = 0;
1651
+ return Highs_lpCall(num_col, num_row, num_nz, aformat_columnwise, sense,
1652
+ offset, col_cost, col_lower, col_upper, row_lower,
1653
+ row_upper, a_start, a_index, a_value, col_value, col_dual,
1654
+ row_value, row_dual, col_basis_status, row_basis_status,
1655
+ model_status);
1656
+ }
1657
+
1658
+ HighsInt Highs_setOptionValue(void* highs, const char* option,
1659
+ const char* value) {
1660
+ ((Highs*)highs)
1661
+ ->deprecationMessage("Highs_setOptionValue",
1662
+ "Highs_setStringOptionValue");
1663
+ return (HighsInt)((Highs*)highs)
1664
+ ->setOptionValue(std::string(option), std::string(value));
1665
+ }
1666
+
1667
+ HighsInt Highs_runQuiet(void* highs) {
1668
+ ((Highs*)highs)->deprecationMessage("Highs_runQuiet", "None");
1669
+ return (HighsInt)((Highs*)highs)->setOptionValue("output_flag", false);
1670
+ }
1671
+
1672
+ HighsInt Highs_setHighsLogfile(void* highs, const void* logfile) {
1673
+ ((Highs*)highs)->deprecationMessage("Highs_setHighsLogfile", "None");
1674
+ return (HighsInt)((Highs*)highs)->setOptionValue("output_flag", false);
1675
+ }
1676
+
1677
+ HighsInt Highs_setHighsOutput(void* highs, const void* outputfile) {
1678
+ ((Highs*)highs)->deprecationMessage("Highs_setHighsOutput", "None");
1679
+ return (HighsInt)((Highs*)highs)->setOptionValue("output_flag", false);
1680
+ }
1681
+
1682
+ HighsInt Highs_getIterationCount(const void* highs) {
1683
+ ((Highs*)highs)
1684
+ ->deprecationMessage("Highs_getIterationCount", "Highs_getIntInfoValue");
1685
+ return (HighsInt)((Highs*)highs)->getInfo().simplex_iteration_count;
1686
+ }
1687
+
1688
+ HighsInt Highs_getSimplexIterationCount(const void* highs) {
1689
+ ((Highs*)highs)
1690
+ ->deprecationMessage("Highs_getSimplexIterationCount",
1691
+ "Highs_getIntInfoValue");
1692
+ return (HighsInt)((Highs*)highs)->getInfo().simplex_iteration_count;
1693
+ }
1694
+
1695
+ HighsInt Highs_setHighsBoolOptionValue(void* highs, const char* option,
1696
+ const HighsInt value) {
1697
+ ((Highs*)highs)
1698
+ ->deprecationMessage("Highs_setHighsBoolOptionValue",
1699
+ "Highs_setBoolOptionValue");
1700
+ return Highs_setBoolOptionValue(highs, option, value);
1701
+ }
1702
+
1703
+ HighsInt Highs_setHighsIntOptionValue(void* highs, const char* option,
1704
+ const HighsInt value) {
1705
+ ((Highs*)highs)
1706
+ ->deprecationMessage("Highs_setHighsIntOptionValue",
1707
+ "Highs_setIntOptionValue");
1708
+ return Highs_setIntOptionValue(highs, option, value);
1709
+ }
1710
+
1711
+ HighsInt Highs_setHighsDoubleOptionValue(void* highs, const char* option,
1712
+ const double value) {
1713
+ ((Highs*)highs)
1714
+ ->deprecationMessage("Highs_setHighsDoubleOptionValue",
1715
+ "Highs_setDoubleOptionValue");
1716
+ return Highs_setDoubleOptionValue(highs, option, value);
1717
+ }
1718
+
1719
+ HighsInt Highs_setHighsStringOptionValue(void* highs, const char* option,
1720
+ const char* value) {
1721
+ ((Highs*)highs)
1722
+ ->deprecationMessage("Highs_setHighsStringOptionValue",
1723
+ "Highs_setStringOptionValue");
1724
+ return Highs_setStringOptionValue(highs, option, value);
1725
+ }
1726
+
1727
+ HighsInt Highs_setHighsOptionValue(void* highs, const char* option,
1728
+ const char* value) {
1729
+ ((Highs*)highs)
1730
+ ->deprecationMessage("Highs_setHighsOptionValue", "Highs_setOptionValue");
1731
+ return Highs_setOptionValue(highs, option, value);
1732
+ }
1733
+
1734
+ HighsInt Highs_getHighsBoolOptionValue(const void* highs, const char* option,
1735
+ HighsInt* value) {
1736
+ ((Highs*)highs)
1737
+ ->deprecationMessage("Highs_getHighsBoolOptionValue",
1738
+ "Highs_getBoolOptionValue");
1739
+ return Highs_getBoolOptionValue(highs, option, value);
1740
+ }
1741
+
1742
+ HighsInt Highs_getHighsIntOptionValue(const void* highs, const char* option,
1743
+ HighsInt* value) {
1744
+ ((Highs*)highs)
1745
+ ->deprecationMessage("Highs_getHighsIntOptionValue",
1746
+ "Highs_getIntOptionValue");
1747
+ return Highs_getIntOptionValue(highs, option, value);
1748
+ }
1749
+
1750
+ HighsInt Highs_getHighsDoubleOptionValue(const void* highs, const char* option,
1751
+ double* value) {
1752
+ ((Highs*)highs)
1753
+ ->deprecationMessage("Highs_getHighsDoubleOptionValue",
1754
+ "Highs_getDoubleOptionValue");
1755
+ return Highs_getDoubleOptionValue(highs, option, value);
1756
+ }
1757
+
1758
+ HighsInt Highs_getHighsStringOptionValue(const void* highs, const char* option,
1759
+ char* value) {
1760
+ ((Highs*)highs)
1761
+ ->deprecationMessage("Highs_getHighsStringOptionValue",
1762
+ "Highs_getStringOptionValue");
1763
+ return Highs_getStringOptionValue(highs, option, value);
1764
+ }
1765
+
1766
+ HighsInt Highs_getHighsOptionType(const void* highs, const char* option,
1767
+ HighsInt* type) {
1768
+ ((Highs*)highs)
1769
+ ->deprecationMessage("Highs_getHighsOptionType", "Highs_getOptionType");
1770
+ return Highs_getOptionType(highs, option, type);
1771
+ }
1772
+
1773
+ HighsInt Highs_resetHighsOptions(void* highs) {
1774
+ ((Highs*)highs)
1775
+ ->deprecationMessage("Highs_resetHighsOptions", "Highs_resetOptions");
1776
+ return Highs_resetOptions(highs);
1777
+ }
1778
+
1779
+ HighsInt Highs_getHighsIntInfoValue(const void* highs, const char* info,
1780
+ HighsInt* value) {
1781
+ ((Highs*)highs)
1782
+ ->deprecationMessage("Highs_getHighsIntInfoValue",
1783
+ "Highs_getIntInfoValue");
1784
+ return Highs_getIntInfoValue(highs, info, value);
1785
+ }
1786
+
1787
+ HighsInt Highs_getHighsDoubleInfoValue(const void* highs, const char* info,
1788
+ double* value) {
1789
+ ((Highs*)highs)
1790
+ ->deprecationMessage("Highs_getHighsDoubleInfoValue",
1791
+ "Highs_getDoubleInfoValue");
1792
+ return Highs_getDoubleInfoValue(highs, info, value);
1793
+ }
1794
+
1795
+ HighsInt Highs_getNumCols(const void* highs) { return Highs_getNumCol(highs); }
1796
+ HighsInt Highs_getNumRows(const void* highs) { return Highs_getNumRow(highs); }
1797
+
1798
+ double Highs_getHighsRunTime(const void* highs) {
1799
+ ((Highs*)highs)
1800
+ ->deprecationMessage("Highs_getHighsRunTime", "Highs_getRunTime");
1801
+ return Highs_getRunTime(highs);
1802
+ }
1803
+
1804
+ double Highs_getHighsInfinity(const void* highs) {
1805
+ ((Highs*)highs)
1806
+ ->deprecationMessage("Highs_getHighsInfinity", "Highs_getInfinity");
1807
+ return Highs_getInfinity(highs);
1808
+ }
1809
+
1810
+ HighsInt Highs_getScaledModelStatus(const void* highs) {
1811
+ return (HighsInt)((Highs*)highs)->getModelStatus();
1812
+ }