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,2651 @@
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
+ #ifndef HIGHS_C_API
9
+ #define HIGHS_C_API
10
+ //
11
+ // Welcome to the HiGHS C API!
12
+ //
13
+ // The simplest way to use HiGHS to solve an LP, MIP or QP from C is
14
+ // to pass the problem data to the appropriate method Highs_lpCall,
15
+ // Highs_mipCall or Highs_qpCall, and these methods return the
16
+ // appropriate solution information
17
+ //
18
+ // For sophisticated applications, where esoteric solution
19
+ // information is needed, or if a sequence of modified models need to
20
+ // be solved, use the Highs_create method to generate a pointer to an
21
+ // instance of the C++ Highs class, and then use any of a large number
22
+ // of models for which this pointer is the first parameter.
23
+ //
24
+ #include "lp_data/HighsCallbackStruct.h"
25
+
26
+ static const HighsInt kHighsMaximumStringLength = 512;
27
+
28
+ static const HighsInt kHighsStatusError = -1;
29
+ static const HighsInt kHighsStatusOk = 0;
30
+ static const HighsInt kHighsStatusWarning = 1;
31
+
32
+ static const HighsInt kHighsVarTypeContinuous = 0;
33
+ static const HighsInt kHighsVarTypeInteger = 1;
34
+ static const HighsInt kHighsVarTypeSemiContinuous = 2;
35
+ static const HighsInt kHighsVarTypeSemiInteger = 3;
36
+ static const HighsInt kHighsVarTypeImplicitInteger = 4;
37
+
38
+ static const HighsInt kHighsOptionTypeBool = 0;
39
+ static const HighsInt kHighsOptionTypeInt = 1;
40
+ static const HighsInt kHighsOptionTypeDouble = 2;
41
+ static const HighsInt kHighsOptionTypeString = 3;
42
+
43
+ static const HighsInt kHighsInfoTypeInt64 = -1;
44
+ static const HighsInt kHighsInfoTypeInt = 1;
45
+ static const HighsInt kHighsInfoTypeDouble = 2;
46
+
47
+ static const HighsInt kHighsObjSenseMinimize = 1;
48
+ static const HighsInt kHighsObjSenseMaximize = -1;
49
+
50
+ static const HighsInt kHighsMatrixFormatColwise = 1;
51
+ static const HighsInt kHighsMatrixFormatRowwise = 2;
52
+
53
+ static const HighsInt kHighsHessianFormatTriangular = 1;
54
+ static const HighsInt kHighsHessianFormatSquare = 2;
55
+
56
+ static const HighsInt kHighsSolutionStatusNone = 0;
57
+ static const HighsInt kHighsSolutionStatusInfeasible = 1;
58
+ static const HighsInt kHighsSolutionStatusFeasible = 2;
59
+
60
+ static const HighsInt kHighsBasisValidityInvalid = 0;
61
+ static const HighsInt kHighsBasisValidityValid = 1;
62
+
63
+ static const HighsInt kHighsPresolveStatusNotPresolved = -1;
64
+ static const HighsInt kHighsPresolveStatusNotReduced = 0;
65
+ static const HighsInt kHighsPresolveStatusInfeasible = 1;
66
+ static const HighsInt kHighsPresolveStatusUnboundedOrInfeasible = 2;
67
+ static const HighsInt kHighsPresolveStatusReduced = 3;
68
+ static const HighsInt kHighsPresolveStatusReducedToEmpty = 4;
69
+ static const HighsInt kHighsPresolveStatusTimeout = 5;
70
+ static const HighsInt kHighsPresolveStatusNullError = 6;
71
+ static const HighsInt kHighsPresolveStatusOptionsError = 7;
72
+ static const HighsInt kHighsPresolveStatusOutOfMemory = 8;
73
+
74
+ static const HighsInt kHighsModelStatusNotset = 0;
75
+ static const HighsInt kHighsModelStatusLoadError = 1;
76
+ static const HighsInt kHighsModelStatusModelError = 2;
77
+ static const HighsInt kHighsModelStatusPresolveError = 3;
78
+ static const HighsInt kHighsModelStatusSolveError = 4;
79
+ static const HighsInt kHighsModelStatusPostsolveError = 5;
80
+ static const HighsInt kHighsModelStatusModelEmpty = 6;
81
+ static const HighsInt kHighsModelStatusOptimal = 7;
82
+ static const HighsInt kHighsModelStatusInfeasible = 8;
83
+ static const HighsInt kHighsModelStatusUnboundedOrInfeasible = 9;
84
+ static const HighsInt kHighsModelStatusUnbounded = 10;
85
+ static const HighsInt kHighsModelStatusObjectiveBound = 11;
86
+ static const HighsInt kHighsModelStatusObjectiveTarget = 12;
87
+ static const HighsInt kHighsModelStatusTimeLimit = 13;
88
+ static const HighsInt kHighsModelStatusIterationLimit = 14;
89
+ static const HighsInt kHighsModelStatusUnknown = 15;
90
+ static const HighsInt kHighsModelStatusSolutionLimit = 16;
91
+ static const HighsInt kHighsModelStatusInterrupt = 17;
92
+
93
+ static const HighsInt kHighsBasisStatusLower = 0;
94
+ static const HighsInt kHighsBasisStatusBasic = 1;
95
+ static const HighsInt kHighsBasisStatusUpper = 2;
96
+ static const HighsInt kHighsBasisStatusZero = 3;
97
+ static const HighsInt kHighsBasisStatusNonbasic = 4;
98
+
99
+ static const HighsInt kHighsCallbackLogging = 0;
100
+ static const HighsInt kHighsCallbackSimplexInterrupt = 1;
101
+ static const HighsInt kHighsCallbackIpmInterrupt = 2;
102
+ static const HighsInt kHighsCallbackMipSolution = 3;
103
+ static const HighsInt kHighsCallbackMipImprovingSolution = 4;
104
+ static const HighsInt kHighsCallbackMipLogging = 5;
105
+ static const HighsInt kHighsCallbackMipInterrupt = 6;
106
+ static const HighsInt kHighsCallbackMipGetCutPool = 7;
107
+ static const HighsInt kHighsCallbackMipDefineLazyConstraints = 8;
108
+ static const HighsInt kHighsCallbackCallbackMipUserSolution = 9;
109
+
110
+ static const char* const kHighsCallbackDataOutLogTypeName = "log_type";
111
+ static const char* const kHighsCallbackDataOutRunningTimeName = "running_time";
112
+ static const char* const kHighsCallbackDataOutSimplexIterationCountName =
113
+ "simplex_iteration_count";
114
+ static const char* const kHighsCallbackDataOutIpmIterationCountName =
115
+ "ipm_iteration_count";
116
+ static const char* const kHighsCallbackDataOutPdlpIterationCountName =
117
+ "pdlp_iteration_count";
118
+ static const char* const kHighsCallbackDataOutObjectiveFunctionValueName =
119
+ "objective_function_value";
120
+ static const char* const kHighsCallbackDataOutMipNodeCountName =
121
+ "mip_node_count";
122
+ static const char* const kHighsCallbackDataOutMipTotalLpIterationsName =
123
+ "mip_total_lp_iterations";
124
+ static const char* const kHighsCallbackDataOutMipPrimalBoundName =
125
+ "mip_primal_bound";
126
+ static const char* const kHighsCallbackDataOutMipDualBoundName =
127
+ "mip_dual_bound";
128
+ static const char* const kHighsCallbackDataOutMipGapName = "mip_gap";
129
+ static const char* const kHighsCallbackDataOutMipSolutionName = "mip_solution";
130
+ static const char* const kHighsCallbackDataOutCutpoolNumColName =
131
+ "cutpool_num_col";
132
+ static const char* const kHighsCallbackDataOutCutpoolNumCutName =
133
+ "cutpool_num_cut";
134
+ static const char* const kHighsCallbackDataOutCutpoolNumNzName =
135
+ "cutpool_num_nz";
136
+ static const char* const kHighsCallbackDataOutCutpoolStartName =
137
+ "cutpool_start";
138
+ static const char* const kHighsCallbackDataOutCutpoolIndexName =
139
+ "cutpool_index";
140
+ static const char* const kHighsCallbackDataOutCutpoolValueName =
141
+ "cutpool_value";
142
+ static const char* const kHighsCallbackDataOutCutpoolLowerName =
143
+ "cutpool_lower";
144
+ static const char* const kHighsCallbackDataOutCutpoolUpperName =
145
+ "cutpool_upper";
146
+
147
+ const HighsInt kHighsIisStrategyLight = 0;
148
+ // Forces full IIS calculation as before - ie with the
149
+ // kIisStrategyIrreducible = 4 bit set, as well as the
150
+ // kIisStrategyFromLp = 2 bit set, and possibly the
151
+ // kIisStrategyColPriority = 8 bit set
152
+ const HighsInt kHighsIisStrategyFromLpRowPriority = 6;
153
+ const HighsInt kHighsIisStrategyFromLpColPriority = 14;
154
+
155
+ const HighsInt kHighsIisBoundFree = 1;
156
+ const HighsInt kHighsIisBoundLower = 2;
157
+ const HighsInt kHighsIisBoundUpper = 3;
158
+ const HighsInt kHighsIisBoundBoxed = 4;
159
+
160
+ const HighsInt kHighsIisStatusNotInConflict = -1;
161
+ const HighsInt kHighsIisStatusMaybeInConflict = 0;
162
+ const HighsInt kHighsIisStatusInConflict = 1;
163
+
164
+ #ifdef __cplusplus
165
+ extern "C" {
166
+ #endif
167
+
168
+ /**
169
+ * Formulate and solve a linear program using HiGHS.
170
+ *
171
+ * @param num_col The number of columns.
172
+ * @param num_row The number of rows.
173
+ * @param num_nz The number of nonzeros in the constraint matrix.
174
+ * @param a_format The format of the constraint matrix as a
175
+ * `kHighsMatrixFormat` constant.
176
+ * @param sense The optimization sense as a `kHighsObjSense` constant.
177
+ * @param offset The objective constant.
178
+ * @param col_cost An array of length [num_col] with the column costs.
179
+ * @param col_lower An array of length [num_col] with the column lower bounds.
180
+ * @param col_upper An array of length [num_col] with the column upper bounds.
181
+ * @param row_lower An array of length [num_row] with the row lower bounds.
182
+ * @param row_upper An array of length [num_row] with the row upper bounds.
183
+ * @param a_start The constraint matrix is provided to HiGHS in compressed
184
+ * sparse column form (if `a_format` is
185
+ * `kHighsMatrixFormatColwise`, otherwise compressed sparse row
186
+ * form). The sparse matrix consists of three arrays,
187
+ * `a_start`, `a_index`, and `a_value`. `a_start` is an array
188
+ * of length [num_col] containing the starting index of each
189
+ * column in `a_index`. If `a_format` is
190
+ * `kHighsMatrixFormatRowwise` the array is of length [num_row]
191
+ * corresponding to each row.
192
+ * @param a_index An array of length [num_nz] with indices of matrix entries.
193
+ * @param a_value An array of length [num_nz] with values of matrix entries.
194
+ *
195
+ * @param col_value An array of length [num_col], to be filled with the
196
+ * primal column solution.
197
+ * @param col_dual An array of length [num_col], to be filled with the
198
+ * dual column solution.
199
+ * @param row_value An array of length [num_row], to be filled with the
200
+ * primal row solution.
201
+ * @param row_dual An array of length [num_row], to be filled with the
202
+ * dual row solution.
203
+ * @param col_basis_status An array of length [num_col], to be filled with the
204
+ * basis status of the columns in the form of a
205
+ * `kHighsBasisStatus` constant.
206
+ * @param row_basis_status An array of length [num_row], to be filled with the
207
+ * basis status of the rows in the form of a
208
+ * `kHighsBasisStatus` constant.
209
+ * @param model_status The location in which to place the termination
210
+ * status of the model after the solve in the form of a
211
+ * `kHighsModelStatus` constant.
212
+ *
213
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
214
+ */
215
+ HighsInt Highs_lpCall(const HighsInt num_col, const HighsInt num_row,
216
+ const HighsInt num_nz, const HighsInt a_format,
217
+ const HighsInt sense, const double offset,
218
+ const double* col_cost, const double* col_lower,
219
+ const double* col_upper, const double* row_lower,
220
+ const double* row_upper, const HighsInt* a_start,
221
+ const HighsInt* a_index, const double* a_value,
222
+ double* col_value, double* col_dual, double* row_value,
223
+ double* row_dual, HighsInt* col_basis_status,
224
+ HighsInt* row_basis_status, HighsInt* model_status);
225
+
226
+ /**
227
+ * Formulate and solve a mixed-integer linear program using HiGHS.
228
+ *
229
+ * The signature of this method is identical to `Highs_lpCall`, except that it
230
+ * has an additional `integrality` argument, and that it is missing the
231
+ * `col_dual`, `row_dual`, `col_basis_status` and `row_basis_status` arguments.
232
+ *
233
+ * @param integrality An array of length [num_col], containing a
234
+ * `kHighsVarType` constant for each column.
235
+ *
236
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
237
+ */
238
+ HighsInt Highs_mipCall(const HighsInt num_col, const HighsInt num_row,
239
+ const HighsInt num_nz, const HighsInt a_format,
240
+ const HighsInt sense, const double offset,
241
+ const double* col_cost, const double* col_lower,
242
+ const double* col_upper, const double* row_lower,
243
+ const double* row_upper, const HighsInt* a_start,
244
+ const HighsInt* a_index, const double* a_value,
245
+ const HighsInt* integrality, double* col_value,
246
+ double* row_value, HighsInt* model_status);
247
+
248
+ /**
249
+ * Formulate and solve a quadratic program using HiGHS.
250
+ *
251
+ * The signature of this method is identical to `Highs_lpCall`, except that it
252
+ * has additional arguments for specifying the Hessian matrix.
253
+ *
254
+ * @param q_num_nz The number of nonzeros in the Hessian matrix.
255
+ * @param q_format The format of the Hessian matrix in the form of a
256
+ * `kHighsHessianStatus` constant. If q_num_nz > 0, this must
257
+ * be `kHighsHessianFormatTriangular`.
258
+ * @param q_start The Hessian matrix is provided to HiGHS as the lower
259
+ * triangular component in compressed sparse column form
260
+ * (or, equivalently, as the upper triangular component
261
+ * in compressed sparse row form). The sparse matrix consists
262
+ * of three arrays, `q_start`, `q_index`, and `q_value`.
263
+ * `q_start` is an array of length [num_col].
264
+ * @param q_index An array of length [q_num_nz] with indices of matrix
265
+ * entries.
266
+ * @param q_value An array of length [q_num_nz] with values of matrix entries.
267
+ *
268
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
269
+ */
270
+ HighsInt Highs_qpCall(
271
+ const HighsInt num_col, const HighsInt num_row, const HighsInt num_nz,
272
+ const HighsInt q_num_nz, const HighsInt a_format, const HighsInt q_format,
273
+ const HighsInt sense, const double offset, const double* col_cost,
274
+ const double* col_lower, const double* col_upper, const double* row_lower,
275
+ const double* row_upper, const HighsInt* a_start, const HighsInt* a_index,
276
+ const double* a_value, const HighsInt* q_start, const HighsInt* q_index,
277
+ const double* q_value, double* col_value, double* col_dual,
278
+ double* row_value, double* row_dual, HighsInt* col_basis_status,
279
+ HighsInt* row_basis_status, HighsInt* model_status);
280
+
281
+ /**
282
+ * Create a Highs instance and return the reference.
283
+ *
284
+ * Call `Highs_destroy` on the returned reference to clean up allocated memory.
285
+ *
286
+ * @returns A pointer to the Highs instance.
287
+ */
288
+ void* Highs_create(void);
289
+
290
+ /**
291
+ * Destroy the model `highs` created by `Highs_create` and free all
292
+ * corresponding memory. Future calls using `highs` are not allowed.
293
+ *
294
+ * To empty a model without invalidating `highs`, see `Highs_clearModel`.
295
+ *
296
+ * @param highs A pointer to the Highs instance.
297
+ */
298
+ void Highs_destroy(void* highs);
299
+
300
+ /**
301
+ * Return the HiGHS version number as a string of the form "vX.Y.Z".
302
+ *
303
+ * @returns The HiGHS version as a `char*`.
304
+ */
305
+ const char* Highs_version(void);
306
+
307
+ /**
308
+ * Return the HiGHS major version number.
309
+ *
310
+ * @returns The HiGHS major version number.
311
+ */
312
+ HighsInt Highs_versionMajor(void);
313
+
314
+ /**
315
+ * Return the HiGHS minor version number.
316
+ *
317
+ * @returns The HiGHS minor version number.
318
+ */
319
+ HighsInt Highs_versionMinor(void);
320
+
321
+ /**
322
+ * Return the HiGHS patch version number.
323
+ *
324
+ * @returns The HiGHS patch version number.
325
+ */
326
+ HighsInt Highs_versionPatch(void);
327
+
328
+ /**
329
+ * Return the HiGHS githash.
330
+ *
331
+ * @returns The HiGHS githash.
332
+ */
333
+ const char* Highs_githash(void);
334
+
335
+ /**
336
+ * Read a model from `filename` into `highs`.
337
+ *
338
+ * @param highs A pointer to the Highs instance.
339
+ * @param filename The filename to read.
340
+ *
341
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
342
+ */
343
+ HighsInt Highs_readModel(void* highs, const char* filename);
344
+
345
+ /**
346
+ * Write the model in `highs` to `filename`.
347
+ *
348
+ * @param highs A pointer to the Highs instance.
349
+ * @param filename The filename to write.
350
+ *
351
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
352
+ */
353
+ HighsInt Highs_writeModel(void* highs, const char* filename);
354
+
355
+ /**
356
+ * Write the presolved model in `highs` to `filename`.
357
+ *
358
+ * @param highs A pointer to the Highs instance.
359
+ * @param filename The filename to write.
360
+ *
361
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
362
+ */
363
+ HighsInt Highs_writePresolvedModel(void* highs, const char* filename);
364
+
365
+ /**
366
+ * Reset the options and then call `clearModel`.
367
+ *
368
+ * See `Highs_destroy` to free all associated memory.
369
+ *
370
+ * @param highs A pointer to the Highs instance.
371
+ *
372
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
373
+ */
374
+ HighsInt Highs_clear(void* highs);
375
+
376
+ /**
377
+ * Remove all variables and constraints from the model `highs`, but do not
378
+ * invalidate the pointer `highs`. Future calls (for example, adding new
379
+ * variables and constraints) are allowed.
380
+ *
381
+ * @param highs A pointer to the Highs instance.
382
+ *
383
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
384
+ */
385
+ HighsInt Highs_clearModel(void* highs);
386
+
387
+ /**
388
+ * Clear all solution data associated with the model.
389
+ *
390
+ * See `Highs_destroy` to clear the model and free all associated memory.
391
+ *
392
+ * @param highs A pointer to the Highs instance.
393
+ *
394
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
395
+ */
396
+ HighsInt Highs_clearSolver(void* highs);
397
+
398
+ /**
399
+ * Presolve a model.
400
+ *
401
+ * @param highs A pointer to the Highs instance.
402
+ *
403
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
404
+ */
405
+ HighsInt Highs_presolve(void* highs);
406
+
407
+ /**
408
+ * Optimize a model. The algorithm used by HiGHS depends on the options that
409
+ * have been set.
410
+ *
411
+ * @param highs A pointer to the Highs instance.
412
+ *
413
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
414
+ */
415
+ HighsInt Highs_run(void* highs);
416
+
417
+ /**
418
+ * Postsolve a model using a primal (and possibly dual) solution. The
419
+ * postsolved solution can be retrieved later by calling
420
+ * `Highs_getSolution`.
421
+ *
422
+ * @param highs A pointer to the Highs instance.
423
+ * @param col_value An array of length [num_col] with the column solution
424
+ * values.
425
+ * @param col_dual An array of length [num_col] with the column dual
426
+ * values, or a null pointer if not known.
427
+ * @param row_dual An array of length [num_row] with the row dual values,
428
+ * or a null pointer if not known.
429
+ *
430
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
431
+ */
432
+ HighsInt Highs_postsolve(void* highs, const double* col_value,
433
+ const double* col_dual, const double* row_dual);
434
+
435
+ /**
436
+ * Write the solution information (including dual and basis status, if
437
+ * available) to a file.
438
+ *
439
+ * See also: `Highs_writeSolutionPretty`.
440
+ *
441
+ * @param highs A pointer to the Highs instance.
442
+ * @param filename The name of the file to write the results to.
443
+ *
444
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
445
+ */
446
+ HighsInt Highs_writeSolution(const void* highs, const char* filename);
447
+
448
+ /**
449
+ * Write the solution information (including dual and basis status, if
450
+ * available) to a file in a human-readable format.
451
+ *
452
+ * The method identical to `Highs_writeSolution`, except that the
453
+ * printout is in a human-readable format.
454
+ *
455
+ * @param highs A pointer to the Highs instance.
456
+ * @param filename The name of the file to write the results to.
457
+ *
458
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
459
+ */
460
+ HighsInt Highs_writeSolutionPretty(const void* highs, const char* filename);
461
+
462
+ /**
463
+ * Pass a linear program (LP) to HiGHS in a single function call.
464
+ *
465
+ * The signature of this function is identical to `Highs_passModel`, without the
466
+ * arguments for passing the Hessian matrix of a quadratic program and the
467
+ * integrality vector.
468
+ *
469
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
470
+ */
471
+ HighsInt Highs_passLp(void* highs, const HighsInt num_col,
472
+ const HighsInt num_row, const HighsInt num_nz,
473
+ const HighsInt a_format, const HighsInt sense,
474
+ const double offset, const double* col_cost,
475
+ const double* col_lower, const double* col_upper,
476
+ const double* row_lower, const double* row_upper,
477
+ const HighsInt* a_start, const HighsInt* a_index,
478
+ const double* a_value);
479
+
480
+ /**
481
+ * Pass a mixed-integer linear program (MILP) to HiGHS in a single function
482
+ * call.
483
+ *
484
+ * The signature of function is identical to `Highs_passModel`, without the
485
+ * arguments for passing the Hessian matrix of a quadratic program.
486
+ *
487
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
488
+ */
489
+ HighsInt Highs_passMip(void* highs, const HighsInt num_col,
490
+ const HighsInt num_row, const HighsInt num_nz,
491
+ const HighsInt a_format, const HighsInt sense,
492
+ const double offset, const double* col_cost,
493
+ const double* col_lower, const double* col_upper,
494
+ const double* row_lower, const double* row_upper,
495
+ const HighsInt* a_start, const HighsInt* a_index,
496
+ const double* a_value, const HighsInt* integrality);
497
+
498
+ /**
499
+ * Pass a model to HiGHS in a single function call. This is faster than
500
+ * constructing the model using `Highs_addRow` and `Highs_addCol`.
501
+ *
502
+ * @param highs A pointer to the Highs instance.
503
+ * @param num_col The number of columns.
504
+ * @param num_row The number of rows.
505
+ * @param num_nz The number of elements in the constraint matrix.
506
+ * @param q_num_nz The number of elements in the Hessian matrix.
507
+ * @param a_format The format of the constraint matrix to use in the form of
508
+ * a `kHighsMatrixFormat` constant.
509
+ * @param q_format The format of the Hessian matrix to use in the form of a
510
+ * `kHighsHessianFormat` constant.
511
+ * @param sense The optimization sense in the form of a `kHighsObjSense`
512
+ * constant.
513
+ * @param offset The constant term in the objective function.
514
+ * @param col_cost An array of length [num_col] with the objective
515
+ * coefficients.
516
+ * @param col_lower An array of length [num_col] with the lower column bounds.
517
+ * @param col_upper An array of length [num_col] with the upper column bounds.
518
+ * @param row_lower An array of length [num_row] with the upper row bounds.
519
+ * @param row_upper An array of length [num_row] with the upper row bounds.
520
+ * @param a_start The constraint matrix is provided to HiGHS in compressed
521
+ * sparse column form (if `a_format` is
522
+ * `kHighsMatrixFormatColwise`, otherwise compressed sparse
523
+ * row form). The sparse matrix consists of three arrays,
524
+ * `a_start`, `a_index`, and `a_value`. `a_start` is an array
525
+ * of length [num_col] containing the starting index of each
526
+ * column in `a_index`. If `a_format` is
527
+ * `kHighsMatrixFormatRowwise` the array is of length
528
+ * [num_row] corresponding to each row.
529
+ * @param a_index An array of length [num_nz] with indices of matrix
530
+ * entries.
531
+ * @param a_value An array of length [num_nz] with values of matrix entries.
532
+ * @param q_start The Hessian matrix is provided to HiGHS as the lower
533
+ * triangular component in compressed sparse column form
534
+ * (or, equivalently, as the upper triangular component
535
+ * in compressed sparse row form). The sparse matrix consists
536
+ * of three arrays, `q_start`, `q_index`, and `q_value`.
537
+ * `q_start` is an array of length [num_col]. If the model
538
+ * is linear, pass NULL.
539
+ * @param q_index An array of length [q_num_nz] with indices of matrix
540
+ * entries. If the model is linear, pass NULL.
541
+ * @param q_value An array of length [q_num_nz] with values of matrix
542
+ * entries. If the model is linear, pass NULL.
543
+ * @param integrality An array of length [num_col] containing a `kHighsVarType`
544
+ * constant for each column.
545
+ *
546
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
547
+ */
548
+ HighsInt Highs_passModel(void* highs, const HighsInt num_col,
549
+ const HighsInt num_row, const HighsInt num_nz,
550
+ const HighsInt q_num_nz, const HighsInt a_format,
551
+ const HighsInt q_format, const HighsInt sense,
552
+ const double offset, const double* col_cost,
553
+ const double* col_lower, const double* col_upper,
554
+ const double* row_lower, const double* row_upper,
555
+ const HighsInt* a_start, const HighsInt* a_index,
556
+ const double* a_value, const HighsInt* q_start,
557
+ const HighsInt* q_index, const double* q_value,
558
+ const HighsInt* integrality);
559
+
560
+ /**
561
+ * Set the Hessian matrix for a quadratic objective.
562
+ *
563
+ * @param highs A pointer to the Highs instance.
564
+ * @param dim The dimension of the Hessian matrix. Should be [num_col].
565
+ * @param num_nz The number of non-zero elements in the Hessian matrix.
566
+ * @param format The format of the Hessian matrix as a `kHighsHessianFormat`
567
+ * constant. This must be `kHighsHessianFormatTriangular`.
568
+ * @param start The Hessian matrix is provided to HiGHS as the lower
569
+ * triangular component in compressed sparse column form
570
+ * (or, equivalently, as the upper triangular component
571
+ * in compressed sparse row form), using `q_start`, `q_index`,
572
+ * and `q_value`.The Hessian matrix is provided to HiGHS as the
573
+ * lower triangular component in compressed sparse column form.
574
+ * The sparse matrix consists of three arrays, `start`,
575
+ * `index`, and `value`. `start` is an array of length
576
+ * [num_col] containing the starting index of each column in
577
+ * `index`.
578
+ * @param index An array of length [num_nz] with indices of matrix entries.
579
+ * @param value An array of length [num_nz] with values of matrix entries.
580
+ *
581
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
582
+ */
583
+ HighsInt Highs_passHessian(void* highs, const HighsInt dim,
584
+ const HighsInt num_nz, const HighsInt format,
585
+ const HighsInt* start, const HighsInt* index,
586
+ const double* value);
587
+
588
+ /**
589
+ * Passes multiple linear objective data to HiGHS, clearing any such
590
+ * data already in HiGHS
591
+ *
592
+ * @param highs A pointer to the Highs instance.
593
+ * @param weight A pointer to the weights of the linear objective, with
594
+ * its positive/negative sign determining whether it is
595
+ * minimized or maximized during lexicographic optimization
596
+ * @param offset A pointer to the objective offsets
597
+ * @param coefficients A pointer to the objective coefficients
598
+ * @param abs_tolerance A pointer to the absolute tolerances used when
599
+ * constructing objective constraints during lexicographic
600
+ * optimization
601
+ * @param rel_tolerance A pointer to the relative tolerances used when
602
+ * constructing objective constraints during lexicographic
603
+ * optimization
604
+ * @param priority A pointer to the priorities of the objectives during
605
+ * lexicographic optimization
606
+ *
607
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
608
+ */
609
+
610
+ HighsInt Highs_passLinearObjectives(const void* highs,
611
+ const HighsInt num_linear_objective,
612
+ const double* weight, const double* offset,
613
+ const double* coefficients,
614
+ const double* abs_tolerance,
615
+ const double* rel_tolerance,
616
+ const HighsInt* priority);
617
+
618
+ /**
619
+ * Adds linear objective data to HiGHS
620
+ *
621
+ * @param highs A pointer to the Highs instance.
622
+ * @param weight The weight of the linear objective, with its
623
+ * positive/negative sign determining whether it is
624
+ * minimized or maximized during lexicographic
625
+ * optimization
626
+ * @param offset The objective offset
627
+ * @param coefficients A pointer to the objective coefficients
628
+ * @param abs_tolerance The absolute tolerance used when constructing an
629
+ * objective constraint during lexicographic optimization
630
+ * @param rel_tolerance The relative tolerance used when constructing an
631
+ * objective constraint during lexicographic optimization
632
+ * @param priority The priority of this objective during lexicographic
633
+ * optimization
634
+ *
635
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
636
+ */
637
+
638
+ HighsInt Highs_addLinearObjective(const void* highs, const double weight,
639
+ const double offset,
640
+ const double* coefficients,
641
+ const double abs_tolerance,
642
+ const double rel_tolerance,
643
+ const HighsInt priority);
644
+
645
+ /**
646
+ * Clears any multiple linear objective data in HiGHS
647
+ *
648
+ * @param highs A pointer to the Highs instance.
649
+ *
650
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
651
+ */
652
+
653
+ HighsInt Highs_clearLinearObjectives(const void* highs);
654
+ /**
655
+ * Pass the name of a row.
656
+ *
657
+ * @param highs A pointer to the Highs instance.
658
+ * @param row The row for which the name is supplied.
659
+ * @param name The name of the row.
660
+ *
661
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
662
+ */
663
+ HighsInt Highs_passRowName(const void* highs, const HighsInt row,
664
+ const char* name);
665
+
666
+ /**
667
+ * Pass the name of a column.
668
+ *
669
+ * @param highs A pointer to the Highs instance.
670
+ * @param col The column for which the name is supplied.
671
+ * @param name The name of the column.
672
+ *
673
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
674
+ */
675
+ HighsInt Highs_passColName(const void* highs, const HighsInt col,
676
+ const char* name);
677
+
678
+ /**
679
+ * Pass the name of the model.
680
+ *
681
+ * @param highs A pointer to the Highs instance.
682
+ * @param name The name of the model.
683
+ *
684
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
685
+ */
686
+ HighsInt Highs_passModelName(const void* highs, const char* name);
687
+
688
+ /**
689
+ * Read the option values from file.
690
+ *
691
+ * @param highs A pointer to the Highs instance.
692
+ * @param filename The filename from which to read the option values.
693
+ *
694
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
695
+ */
696
+ HighsInt Highs_readOptions(const void* highs, const char* filename);
697
+
698
+ /**
699
+ * Set a boolean-valued option.
700
+ *
701
+ * @param highs A pointer to the Highs instance.
702
+ * @param option The name of the option.
703
+ * @param value The new value of the option.
704
+ *
705
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
706
+ */
707
+ HighsInt Highs_setBoolOptionValue(void* highs, const char* option,
708
+ const HighsInt value);
709
+
710
+ /**
711
+ * Set an int-valued option.
712
+ *
713
+ * @param highs A pointer to the Highs instance.
714
+ * @param option The name of the option.
715
+ * @param value The new value of the option.
716
+ *
717
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
718
+ */
719
+ HighsInt Highs_setIntOptionValue(void* highs, const char* option,
720
+ const HighsInt value);
721
+
722
+ /**
723
+ * Set a double-valued option.
724
+ *
725
+ * @param highs A pointer to the Highs instance.
726
+ * @param option The name of the option.
727
+ * @param value The new value of the option.
728
+ *
729
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
730
+ */
731
+ HighsInt Highs_setDoubleOptionValue(void* highs, const char* option,
732
+ const double value);
733
+
734
+ /**
735
+ * Set a string-valued option.
736
+ *
737
+ * @param highs A pointer to the Highs instance.
738
+ * @param option The name of the option.
739
+ * @param value The new value of the option.
740
+ *
741
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
742
+ */
743
+ HighsInt Highs_setStringOptionValue(void* highs, const char* option,
744
+ const char* value);
745
+
746
+ /**
747
+ * Get a boolean-valued option.
748
+ *
749
+ * @param highs A pointer to the Highs instance.
750
+ * @param option The name of the option.
751
+ * @param value The location in which the current value of the option should
752
+ * be placed.
753
+ *
754
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
755
+ */
756
+ HighsInt Highs_getBoolOptionValue(const void* highs, const char* option,
757
+ HighsInt* value);
758
+
759
+ /**
760
+ * Get an int-valued option.
761
+ *
762
+ * @param highs A pointer to the Highs instance.
763
+ * @param option The name of the option.
764
+ * @param value The location in which the current value of the option should
765
+ * be placed.
766
+ *
767
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
768
+ */
769
+ HighsInt Highs_getIntOptionValue(const void* highs, const char* option,
770
+ HighsInt* value);
771
+
772
+ /**
773
+ * Get a double-valued option.
774
+ *
775
+ * @param highs A pointer to the Highs instance.
776
+ * @param option The name of the option.
777
+ * @param value The location in which the current value of the option should
778
+ * be placed.
779
+ *
780
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
781
+ */
782
+ HighsInt Highs_getDoubleOptionValue(const void* highs, const char* option,
783
+ double* value);
784
+
785
+ /**
786
+ * Get a string-valued option.
787
+ *
788
+ * @param highs A pointer to the Highs instance.
789
+ * @param option The name of the option.
790
+ * @param value A pointer to allocated memory (of at least
791
+ * `kMaximumStringLength`) to store the current value of the
792
+ * option.
793
+ *
794
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
795
+ */
796
+ HighsInt Highs_getStringOptionValue(const void* highs, const char* option,
797
+ char* value);
798
+
799
+ /**
800
+ * Get the type expected by an option.
801
+ *
802
+ * @param highs A pointer to the Highs instance.
803
+ * @param option The name of the option.
804
+ * @param type A HighsInt in which the corresponding `kHighsOptionType`
805
+ * constant should be placed.
806
+ *
807
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
808
+ */
809
+ HighsInt Highs_getOptionType(const void* highs, const char* option,
810
+ HighsInt* type);
811
+
812
+ /**
813
+ * Reset all options to their default value.
814
+ *
815
+ * @param highs A pointer to the Highs instance.
816
+ *
817
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
818
+ */
819
+ HighsInt Highs_resetOptions(void* highs);
820
+
821
+ /**
822
+ * Write the current options to file.
823
+ *
824
+ * @param highs A pointer to the Highs instance.
825
+ * @param filename The filename to write the options to.
826
+ *
827
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
828
+ */
829
+ HighsInt Highs_writeOptions(const void* highs, const char* filename);
830
+
831
+ /**
832
+ * Write the value of non-default options to file.
833
+ *
834
+ * This is similar to `Highs_writeOptions`, except only options with
835
+ * non-default value are written to `filename`.
836
+ *
837
+ * @param highs A pointer to the Highs instance.
838
+ * @param filename The filename to write the options to.
839
+ *
840
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
841
+ */
842
+ HighsInt Highs_writeOptionsDeviations(const void* highs, const char* filename);
843
+
844
+ /**
845
+ * Return the number of options
846
+ *
847
+ * @param highs A pointer to the Highs instance.
848
+ */
849
+ HighsInt Highs_getNumOptions(const void* highs);
850
+
851
+ /**
852
+ * Get the name of an option identified by index
853
+ *
854
+ * @param highs A pointer to the Highs instance.
855
+ * @param index The index of the option.
856
+ * @param name The name of the option.
857
+ *
858
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
859
+ */
860
+ HighsInt Highs_getOptionName(const void* highs, const HighsInt index,
861
+ char** name);
862
+
863
+ /**
864
+ * Get the current and default values of a bool option
865
+ *
866
+ * @param highs A pointer to the Highs instance.
867
+ * @param current_value A pointer to the current value of the option.
868
+ * @param default_value A pointer to the default value of the option.
869
+ *
870
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
871
+ */
872
+ HighsInt Highs_getBoolOptionValues(const void* highs, const char* option,
873
+ HighsInt* current_value,
874
+ HighsInt* default_value);
875
+ /**
876
+ * Get the current and default values of a HighsInt option
877
+ *
878
+ * @param highs A pointer to the Highs instance.
879
+ * @param current_value A pointer to the current value of the option.
880
+ * @param min_value A pointer to the minimum value of the option.
881
+ * @param max_value A pointer to the maximum value of the option.
882
+ * @param default_value A pointer to the default value of the option.
883
+ *
884
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
885
+ */
886
+ HighsInt Highs_getIntOptionValues(const void* highs, const char* option,
887
+ HighsInt* current_value, HighsInt* min_value,
888
+ HighsInt* max_value, HighsInt* default_value);
889
+
890
+ /**
891
+ * Get the current and default values of a double option
892
+ *
893
+ * @param highs A pointer to the Highs instance.
894
+ * @param current_value A pointer to the current value of the option.
895
+ * @param min_value A pointer to the minimum value of the option.
896
+ * @param max_value A pointer to the maximum value of the option.
897
+ * @param default_value A pointer to the default value of the option.
898
+ *
899
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
900
+ */
901
+ HighsInt Highs_getDoubleOptionValues(const void* highs, const char* option,
902
+ double* current_value, double* min_value,
903
+ double* max_value, double* default_value);
904
+
905
+ /**
906
+ * Get the current and default values of a string option
907
+ *
908
+ * @param highs A pointer to the Highs instance.
909
+ * @param current_value A pointer to the current value of the option.
910
+ * @param default_value A pointer to the default value of the option.
911
+ *
912
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
913
+ */
914
+ HighsInt Highs_getStringOptionValues(const void* highs, const char* option,
915
+ char* current_value, char* default_value);
916
+
917
+ /**
918
+ * Get an int-valued info value.
919
+ *
920
+ * @param highs A pointer to the Highs instance.
921
+ * @param info The name of the info item.
922
+ * @param value A reference to an integer that the result will be stored in.
923
+ *
924
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
925
+ */
926
+ HighsInt Highs_getIntInfoValue(const void* highs, const char* info,
927
+ HighsInt* value);
928
+
929
+ /**
930
+ * Get a double-valued info value.
931
+ *
932
+ * @param highs A pointer to the Highs instance.
933
+ * @param info The name of the info item.
934
+ * @param value A reference to a double that the result will be stored in.
935
+ *
936
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
937
+ */
938
+ HighsInt Highs_getDoubleInfoValue(const void* highs, const char* info,
939
+ double* value);
940
+
941
+ /**
942
+ * Get an int64-valued info value.
943
+ *
944
+ * @param highs A pointer to the Highs instance.
945
+ * @param info The name of the info item.
946
+ * @param value A reference to an int64 that the result will be stored in.
947
+ *
948
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
949
+ */
950
+ HighsInt Highs_getInt64InfoValue(const void* highs, const char* info,
951
+ int64_t* value);
952
+
953
+ /**
954
+ * Get the type expected by an info item.
955
+ *
956
+ * @param highs A pointer to the Highs instance.
957
+ * @param info The name of the info item.
958
+ * @param type A HighsInt in which the corresponding `kHighsOptionType`
959
+ * constant is stored.
960
+ *
961
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
962
+ */
963
+ HighsInt Highs_getInfoType(const void* highs, const char* info, HighsInt* type);
964
+
965
+ /**
966
+ * Get the primal and dual solution from an optimized model.
967
+ *
968
+ * @param highs A pointer to the Highs instance.
969
+ * @param col_value An array of length [num_col], to be filled with primal
970
+ * column values.
971
+ * @param col_dual An array of length [num_col], to be filled with dual column
972
+ * values.
973
+ * @param row_value An array of length [num_row], to be filled with primal row
974
+ * values.
975
+ * @param row_dual An array of length [num_row], to be filled with dual row
976
+ * values.
977
+ *
978
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
979
+ */
980
+ HighsInt Highs_getSolution(const void* highs, double* col_value,
981
+ double* col_dual, double* row_value,
982
+ double* row_dual);
983
+
984
+ /**
985
+ * Given a linear program with a basic feasible solution, get the column and row
986
+ * basis statuses.
987
+ *
988
+ * @param highs A pointer to the Highs instance.
989
+ * @param col_status An array of length [num_col], to be filled with the column
990
+ * basis statuses in the form of a `kHighsBasisStatus`
991
+ * constant.
992
+ * @param row_status An array of length [num_row], to be filled with the row
993
+ * basis statuses in the form of a `kHighsBasisStatus`
994
+ * constant.
995
+ *
996
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
997
+ */
998
+ HighsInt Highs_getBasis(const void* highs, HighsInt* col_status,
999
+ HighsInt* row_status);
1000
+
1001
+ /**
1002
+ * Return the optimization status of the model in the form of a
1003
+ * `kHighsModelStatus` constant.
1004
+ *
1005
+ * @param highs A pointer to the Highs instance.
1006
+ *
1007
+ * @returns An integer corresponding to the `kHighsModelStatus` constant
1008
+ */
1009
+ HighsInt Highs_getModelStatus(const void* highs);
1010
+
1011
+ /**
1012
+ * Indicates whether a dual ray that is a certificate of primal
1013
+ * infeasibility currently exists, and (at the expense of solving an
1014
+ * LP) gets it if it does not and dual_ray_value is not nullptr.
1015
+ *
1016
+ * @param highs A pointer to the Highs instance.
1017
+ * @param has_dual_ray A pointer to a HighsInt to store 1 if a dual ray
1018
+ * currently exists.
1019
+ * @param dual_ray_value An array of length [num_row] filled with the
1020
+ * unbounded ray.
1021
+ *
1022
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1023
+ */
1024
+ HighsInt Highs_getDualRay(const void* highs, HighsInt* has_dual_ray,
1025
+ double* dual_ray_value);
1026
+
1027
+ /**
1028
+ * Indicates whether a dual unboundedness direction (corresponding to a
1029
+ * certificate of primal infeasibility) exists, and (at the expense of
1030
+ * solving an LP) gets it if it does not and
1031
+ * dual_unboundedness_direction is not nullptr
1032
+ *
1033
+ * @param highs A pointer to the Highs
1034
+ * instance.
1035
+ * @param has_dual_unboundedness_direction A pointer to a HighsInt to
1036
+ * store 1 if the dual
1037
+ * unboundedness direction
1038
+ * exists.
1039
+ * @param dual_unboundedness_direction_value An array of length [num_col]
1040
+ * filled with the unboundedness
1041
+ * direction.
1042
+ */
1043
+ HighsInt Highs_getDualUnboundednessDirection(
1044
+ const void* highs, HighsInt* has_dual_unboundedness_direction,
1045
+ double* dual_unboundedness_direction_value);
1046
+
1047
+ /**
1048
+ * Indicates whether a primal ray that is a certificate of primal
1049
+ * unboundedness currently exists, and (at the expense of solving an
1050
+ * LP) gets it if it does not and primal_ray_value is not nullptr.
1051
+ *
1052
+ * @param highs A pointer to the Highs instance.
1053
+ * @param has_primal_ray A pointer to a HighsInt to store 1 if the primal ray
1054
+ * exists.
1055
+ * @param primal_ray_value An array of length [num_col] filled with the
1056
+ * unbounded ray.
1057
+ *
1058
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1059
+ */
1060
+ HighsInt Highs_getPrimalRay(const void* highs, HighsInt* has_primal_ray,
1061
+ double* primal_ray_value);
1062
+
1063
+ /**
1064
+ * Get the primal objective function value.
1065
+ *
1066
+ * @param highs A pointer to the Highs instance.
1067
+ *
1068
+ * @returns The primal objective function value
1069
+ */
1070
+ double Highs_getObjectiveValue(const void* highs);
1071
+
1072
+ /**
1073
+ * Get the indices of the rows and columns that make up the basis matrix ``B``
1074
+ * of a basic feasible solution.
1075
+ *
1076
+ * Non-negative entries are indices of columns, and negative entries are
1077
+ * `-row_index - 1`. For example, `{1, -1}` would be the second column and first
1078
+ * row.
1079
+ *
1080
+ * The order of these rows and columns is important for calls to the functions:
1081
+ *
1082
+ * - `Highs_getBasisInverseRow`
1083
+ * - `Highs_getBasisInverseCol`
1084
+ * - `Highs_getBasisSolve`
1085
+ * - `Highs_getBasisTransposeSolve`
1086
+ * - `Highs_getReducedRow`
1087
+ * - `Highs_getReducedColumn`
1088
+ *
1089
+ * @param highs A pointer to the Highs instance.
1090
+ * @param basic_variables An array of size [num_rows], filled with the indices
1091
+ * of the basic variables.
1092
+ *
1093
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1094
+ */
1095
+ HighsInt Highs_getBasicVariables(const void* highs, HighsInt* basic_variables);
1096
+
1097
+ /**
1098
+ * Get a row of the inverse basis matrix ``B^{-1}``.
1099
+ *
1100
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1101
+ *
1102
+ * The arrays `row_vector` and `row_index` must have an allocated length of
1103
+ * [num_row]. However, check `row_num_nz` to see how many non-zero elements are
1104
+ * actually stored.
1105
+ *
1106
+ * @param highs A pointer to the Highs instance.
1107
+ * @param row The index of the row to compute.
1108
+ * @param row_vector An array of length [num_row] in which to store the
1109
+ * values of the non-zero elements.
1110
+ * @param row_num_nz The number of non-zeros in the row.
1111
+ * @param row_index An array of length [num_row] in which to store the
1112
+ * indices of the non-zero elements.
1113
+ *
1114
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1115
+ */
1116
+ HighsInt Highs_getBasisInverseRow(const void* highs, const HighsInt row,
1117
+ double* row_vector, HighsInt* row_num_nz,
1118
+ HighsInt* row_index);
1119
+
1120
+ /**
1121
+ * Get a column of the inverse basis matrix ``B^{-1}``.
1122
+ *
1123
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1124
+ *
1125
+ * The arrays `col_vector` and `col_index` must have an allocated length of
1126
+ * [num_row]. However, check `col_num_nz` to see how many non-zero elements are
1127
+ * actually stored.
1128
+ *
1129
+ * @param highs A pointer to the Highs instance.
1130
+ * @param col The index of the column to compute.
1131
+ * @param col_vector An array of length [num_row] in which to store the
1132
+ * values of the non-zero elements.
1133
+ * @param col_num_nz The number of non-zeros in the column.
1134
+ * @param col_index An array of length [num_row] in which to store the
1135
+ * indices of the non-zero elements.
1136
+
1137
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1138
+ */
1139
+ HighsInt Highs_getBasisInverseCol(const void* highs, const HighsInt col,
1140
+ double* col_vector, HighsInt* col_num_nz,
1141
+ HighsInt* col_index);
1142
+
1143
+ /**
1144
+ * Compute ``\mathbf{x}=B^{-1}\mathbf{b}`` for a given vector
1145
+ * ``\mathbf{b}``.
1146
+ *
1147
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1148
+ *
1149
+ * The arrays `solution_vector` and `solution_index` must have an allocated
1150
+ * length of [num_row]. However, check `solution_num_nz` to see how many
1151
+ * non-zero elements are actually stored.
1152
+ *
1153
+ * @param highs A pointer to the Highs instance.
1154
+ * @param rhs The right-hand side vector ``b``.
1155
+ * @param solution_vector An array of length [num_row] in which to store the
1156
+ * values of the non-zero elements.
1157
+ * @param solution_num_nz The number of non-zeros in the solution.
1158
+ * @param solution_index An array of length [num_row] in which to store the
1159
+ * indices of the non-zero elements.
1160
+ *
1161
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1162
+ */
1163
+ HighsInt Highs_getBasisSolve(const void* highs, const double* rhs,
1164
+ double* solution_vector, HighsInt* solution_num_nz,
1165
+ HighsInt* solution_index);
1166
+
1167
+ /**
1168
+ * Compute ``\mathbf{x}=B^{-T}\mathbf{b}`` for a given vector
1169
+ * ``\mathbf{b}``.
1170
+ *
1171
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1172
+ *
1173
+ * The arrays `solution_vector` and `solution_index` must have an allocated
1174
+ * length of [num_row]. However, check `solution_num_nz` to see how many
1175
+ * non-zero elements are actually stored.
1176
+ *
1177
+ * @param highs A pointer to the Highs instance.
1178
+ * @param rhs The right-hand side vector ``b``
1179
+ * @param solution_vector An array of length [num_row] in which to store the
1180
+ * values of the non-zero elements.
1181
+ * @param solution_num_nz The number of non-zeros in the solution.
1182
+ * @param solution_index An array of length [num_row] in which to store the
1183
+ * indices of the non-zero elements.
1184
+ *
1185
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1186
+ */
1187
+ HighsInt Highs_getBasisTransposeSolve(const void* highs, const double* rhs,
1188
+ double* solution_vector,
1189
+ HighsInt* solution_nz,
1190
+ HighsInt* solution_index);
1191
+
1192
+ /**
1193
+ * Compute a row of ``B^{-1}A``.
1194
+ *
1195
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1196
+ *
1197
+ * The arrays `row_vector` and `row_index` must have an allocated length of
1198
+ * [num_col]. However, check `row_num_nz` to see how many non-zero elements are
1199
+ * actually stored.
1200
+ *
1201
+ * @param highs A pointer to the Highs instance.
1202
+ * @param row The index of the row to compute.
1203
+ * @param row_vector An array of length [num_col] in which to store the
1204
+ * values of the non-zero elements.
1205
+ * @param row_num_nz The number of non-zeros in the row.
1206
+ * @param row_index An array of length [num_col] in which to store the
1207
+ * indices of the non-zero elements.
1208
+ *
1209
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1210
+ */
1211
+ HighsInt Highs_getReducedRow(const void* highs, const HighsInt row,
1212
+ double* row_vector, HighsInt* row_num_nz,
1213
+ HighsInt* row_index);
1214
+
1215
+ /**
1216
+ * Compute a column of ``B^{-1}A``.
1217
+ *
1218
+ * See `Highs_getBasicVariables` for a description of the ``B`` matrix.
1219
+ *
1220
+ * The arrays `col_vector` and `col_index` must have an allocated length of
1221
+ * [num_row]. However, check `col_num_nz` to see how many non-zero elements are
1222
+ * actually stored.
1223
+ *
1224
+ * @param highs A pointer to the Highs instance.
1225
+ * @param col The index of the column to compute.
1226
+ * @param col_vector An array of length [num_row] in which to store the
1227
+ * values of the non-zero elements.
1228
+ * @param col_num_nz The number of non-zeros in the column.
1229
+ * @param col_index An array of length [num_row] in which to store the
1230
+ * indices of the non-zero elements.
1231
+
1232
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1233
+ */
1234
+ HighsInt Highs_getReducedColumn(const void* highs, const HighsInt col,
1235
+ double* col_vector, HighsInt* col_num_nz,
1236
+ HighsInt* col_index);
1237
+
1238
+ /**
1239
+ * Set a basic feasible solution by passing the column and row basis statuses to
1240
+ * the model.
1241
+ *
1242
+ * @param highs A pointer to the Highs instance.
1243
+ * @param col_status an array of length [num_col] with the column basis status
1244
+ * in the form of `kHighsBasisStatus` constants
1245
+ * @param row_status an array of length [num_row] with the row basis status
1246
+ * in the form of `kHighsBasisStatus` constants
1247
+ *
1248
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1249
+ */
1250
+ HighsInt Highs_setBasis(void* highs, const HighsInt* col_status,
1251
+ const HighsInt* row_status);
1252
+
1253
+ /**
1254
+ * Set a logical basis in the model.
1255
+ *
1256
+ * @param highs A pointer to the Highs instance.
1257
+ *
1258
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1259
+ */
1260
+ HighsInt Highs_setLogicalBasis(void* highs);
1261
+
1262
+ /**
1263
+ * Set a solution by passing the column and row primal and dual solution values.
1264
+ *
1265
+ * For any values that are unavailable, pass NULL.
1266
+ *
1267
+ * @param highs A pointer to the Highs instance.
1268
+ * @param col_value An array of length [num_col] with the column solution
1269
+ * values.
1270
+ * @param row_value An array of length [num_row] with the row solution
1271
+ * values.
1272
+ * @param col_dual An array of length [num_col] with the column dual values.
1273
+ * @param row_dual An array of length [num_row] with the row dual values.
1274
+ *
1275
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1276
+ */
1277
+ HighsInt Highs_setSolution(void* highs, const double* col_value,
1278
+ const double* row_value, const double* col_dual,
1279
+ const double* row_dual);
1280
+
1281
+ /**
1282
+ * Set a partial primal solution by passing values for a set of variables
1283
+ *
1284
+ * @param highs A pointer to the Highs instance.
1285
+ * @param num_entries Number of variables in the set
1286
+ * @param index Indices of variables in the set
1287
+ * @param value Values of variables in the set
1288
+ *
1289
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1290
+ */
1291
+ HighsInt Highs_setSparseSolution(void* highs, const HighsInt num_entries,
1292
+ const HighsInt* index, const double* value);
1293
+
1294
+ /**
1295
+ * Set the callback method to use for HiGHS
1296
+ *
1297
+ * @param highs A pointer to the Highs instance.
1298
+ * @param user_callback A pointer to the user callback
1299
+ * @param user_callback_data A pointer to the user callback data
1300
+ *
1301
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1302
+ */
1303
+ HighsInt Highs_setCallback(void* highs, HighsCCallbackType user_callback,
1304
+ void* user_callback_data);
1305
+
1306
+ /**
1307
+ * Start callback of given type
1308
+ *
1309
+ * @param highs A pointer to the Highs instance.
1310
+ * @param callback_type The type of callback to be started
1311
+ *
1312
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1313
+ */
1314
+ HighsInt Highs_startCallback(void* highs, const HighsInt callback_type);
1315
+
1316
+ /**
1317
+ * Stop callback of given type
1318
+ *
1319
+ * @param highs A pointer to the Highs instance.
1320
+ * @param callback_type The type of callback to be stopped
1321
+ *
1322
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1323
+ */
1324
+ HighsInt Highs_stopCallback(void* highs, const HighsInt callback_type);
1325
+
1326
+ /**
1327
+ * Return the cumulative wall-clock time spent in `Highs_run`.
1328
+ *
1329
+ * @param highs A pointer to the Highs instance.
1330
+ *
1331
+ * @returns The cumulative wall-clock time spent in `Highs_run`
1332
+ */
1333
+ double Highs_getRunTime(const void* highs);
1334
+
1335
+ /**
1336
+ * Reset the clocks in a `highs` model.
1337
+ *
1338
+ * Each `highs` model contains a single instance of clock that records how much
1339
+ * time is spent in various parts of the algorithm. This clock is not reset on
1340
+ * entry to `Highs_run`, so repeated calls to `Highs_run` report the cumulative
1341
+ * time spent in the algorithm. A side-effect is that this will trigger a time
1342
+ * limit termination once the cumulative run time exceeds the time limit, rather
1343
+ * than the run time of each individual call to `Highs_run`.
1344
+ *
1345
+ * As a work-around, call `Highs_zeroAllClocks` before each call to `Highs_run`.
1346
+ *
1347
+ * @param highs A pointer to the Highs instance.
1348
+ *
1349
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1350
+ */
1351
+ HighsInt Highs_zeroAllClocks(const void* highs);
1352
+
1353
+ /**
1354
+ * Add a new column (variable) to the model.
1355
+ *
1356
+ * @param highs A pointer to the Highs instance.
1357
+ * @param cost The objective coefficient of the column.
1358
+ * @param lower The lower bound of the column.
1359
+ * @param upper The upper bound of the column.
1360
+ * @param num_new_nz The number of non-zeros in the column.
1361
+ * @param index An array of size [num_new_nz] with the row indices.
1362
+ * @param value An array of size [num_new_nz] with row values.
1363
+ *
1364
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1365
+ */
1366
+ HighsInt Highs_addCol(void* highs, const double cost, const double lower,
1367
+ const double upper, const HighsInt num_new_nz,
1368
+ const HighsInt* index, const double* value);
1369
+
1370
+ /**
1371
+ * Add multiple columns (variables) to the model.
1372
+ *
1373
+ * @param highs A pointer to the Highs instance.
1374
+ * @param num_new_col The number of new columns to add.
1375
+ * @param costs An array of size [num_new_col] with objective
1376
+ * coefficients.
1377
+ * @param lower An array of size [num_new_col] with lower bounds.
1378
+ * @param upper An array of size [num_new_col] with upper bounds.
1379
+ * @param num_new_nz The number of new nonzeros in the constraint matrix.
1380
+ * @param starts The constraint coefficients are given as a matrix in
1381
+ * compressed sparse column form by the arrays `starts`,
1382
+ * `index`, and `value`. `starts` is an array of size
1383
+ * [num_new_cols] with the start index of each row in
1384
+ * indices and values.
1385
+ * @param index An array of size [num_new_nz] with row indices.
1386
+ * @param value An array of size [num_new_nz] with row values.
1387
+ *
1388
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1389
+ */
1390
+ HighsInt Highs_addCols(void* highs, const HighsInt num_new_col,
1391
+ const double* costs, const double* lower,
1392
+ const double* upper, const HighsInt num_new_nz,
1393
+ const HighsInt* starts, const HighsInt* index,
1394
+ const double* value);
1395
+
1396
+ /**
1397
+ * Add a new variable to the model.
1398
+ *
1399
+ * @param highs A pointer to the Highs instance.
1400
+ * @param lower The lower bound of the column.
1401
+ * @param upper The upper bound of the column.
1402
+ *
1403
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1404
+ */
1405
+ HighsInt Highs_addVar(void* highs, const double lower, const double upper);
1406
+
1407
+ /**
1408
+ * Add multiple variables to the model.
1409
+ *
1410
+ * @param highs A pointer to the Highs instance.
1411
+ * @param num_new_var The number of new variables to add.
1412
+ * @param lower An array of size [num_new_var] with lower bounds.
1413
+ * @param upper An array of size [num_new_var] with upper bounds.
1414
+ *
1415
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1416
+ */
1417
+ HighsInt Highs_addVars(void* highs, const HighsInt num_new_var,
1418
+ const double* lower, const double* upper);
1419
+
1420
+ /**
1421
+ * Add a new row (a linear constraint) to the model.
1422
+ *
1423
+ * @param highs A pointer to the Highs instance.
1424
+ * @param lower The lower bound of the row.
1425
+ * @param upper The upper bound of the row.
1426
+ * @param num_new_nz The number of non-zeros in the row
1427
+ * @param index An array of size [num_new_nz] with column indices.
1428
+ * @param value An array of size [num_new_nz] with column values.
1429
+ *
1430
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1431
+ */
1432
+ HighsInt Highs_addRow(void* highs, const double lower, const double upper,
1433
+ const HighsInt num_new_nz, const HighsInt* index,
1434
+ const double* value);
1435
+
1436
+ /**
1437
+ * Add multiple rows (linear constraints) to the model.
1438
+ *
1439
+ * @param highs A pointer to the Highs instance.
1440
+ * @param num_new_row The number of new rows to add
1441
+ * @param lower An array of size [num_new_row] with the lower bounds of
1442
+ * the rows.
1443
+ * @param upper An array of size [num_new_row] with the upper bounds of
1444
+ * the rows.
1445
+ * @param num_new_nz The number of non-zeros in the rows.
1446
+ * @param starts The constraint coefficients are given as a matrix in
1447
+ * compressed sparse row form by the arrays `starts`,
1448
+ * `index`, and `value`. `starts` is an array of size
1449
+ * [num_new_rows] with the start index of each row in
1450
+ * indices and values.
1451
+ * @param index An array of size [num_new_nz] with column indices.
1452
+ * @param value An array of size [num_new_nz] with column values.
1453
+ *
1454
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1455
+ */
1456
+ HighsInt Highs_addRows(void* highs, const HighsInt num_new_row,
1457
+ const double* lower, const double* upper,
1458
+ const HighsInt num_new_nz, const HighsInt* starts,
1459
+ const HighsInt* index, const double* value);
1460
+
1461
+ /**
1462
+ * Ensure that the constraint matrix of the incumbent model is stored
1463
+ * column-wise.
1464
+ *
1465
+ * @param highs A pointer to the Highs instance.
1466
+ *
1467
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1468
+ */
1469
+ HighsInt Highs_ensureColwise(void* highs);
1470
+
1471
+ /**
1472
+ * Ensure that the constraint matrix of the incumbent model is stored row-wise.
1473
+ *
1474
+ * @param highs A pointer to the Highs instance.
1475
+ *
1476
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1477
+ */
1478
+ HighsInt Highs_ensureRowwise(void* highs);
1479
+
1480
+ /**
1481
+ * Change the objective sense of the model.
1482
+ *
1483
+ * @param highs A pointer to the Highs instance.
1484
+ * @param sense The new optimization sense in the form of a `kHighsObjSense`
1485
+ * constant.
1486
+ *
1487
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1488
+ */
1489
+ HighsInt Highs_changeObjectiveSense(void* highs, const HighsInt sense);
1490
+
1491
+ /**
1492
+ * Change the objective offset of the model.
1493
+ *
1494
+ * @param highs A pointer to the Highs instance.
1495
+ * @param offset The new objective offset.
1496
+ *
1497
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1498
+ */
1499
+ HighsInt Highs_changeObjectiveOffset(void* highs, const double offset);
1500
+
1501
+ /**
1502
+ * Change the integrality of a column.
1503
+ *
1504
+ * @param highs A pointer to the Highs instance.
1505
+ * @param col The column index to change.
1506
+ * @param integrality The new integrality of the column in the form of a
1507
+ * `kHighsVarType` constant.
1508
+ *
1509
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1510
+ */
1511
+ HighsInt Highs_changeColIntegrality(void* highs, const HighsInt col,
1512
+ const HighsInt integrality);
1513
+
1514
+ /**
1515
+ * Change the integrality of multiple adjacent columns.
1516
+ *
1517
+ * @param highs A pointer to the Highs instance.
1518
+ * @param from_col The index of the first column whose integrality changes.
1519
+ * @param to_col The index of the last column whose integrality
1520
+ * changes.
1521
+ * @param integrality An array of length [to_col - from_col + 1] with the new
1522
+ * integralities of the columns in the form of
1523
+ * `kHighsVarType` constants.
1524
+ *
1525
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1526
+ */
1527
+ HighsInt Highs_changeColsIntegralityByRange(void* highs,
1528
+ const HighsInt from_col,
1529
+ const HighsInt to_col,
1530
+ const HighsInt* integrality);
1531
+
1532
+ /**
1533
+ * Change the integrality of multiple columns given by an array of indices.
1534
+ *
1535
+ * @param highs A pointer to the Highs instance.
1536
+ * @param num_set_entries The number of columns to change.
1537
+ * @param set An array of size [num_set_entries] with the indices
1538
+ * of the columns to change.
1539
+ * @param integrality An array of length [num_set_entries] with the new
1540
+ * integralities of the columns in the form of
1541
+ * `kHighsVarType` constants.
1542
+ *
1543
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1544
+ */
1545
+ HighsInt Highs_changeColsIntegralityBySet(void* highs,
1546
+ const HighsInt num_set_entries,
1547
+ const HighsInt* set,
1548
+ const HighsInt* integrality);
1549
+
1550
+ /**
1551
+ * Change the integrality of multiple columns given by a mask.
1552
+ *
1553
+ * @param highs A pointer to the Highs instance.
1554
+ * @param mask An array of length [num_col] with 1 if the column
1555
+ * integrality should be changed and 0 otherwise.
1556
+ * @param integrality An array of length [num_col] with the new
1557
+ * integralities of the columns in the form of
1558
+ * `kHighsVarType` constants.
1559
+ *
1560
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1561
+ */
1562
+ HighsInt Highs_changeColsIntegralityByMask(void* highs, const HighsInt* mask,
1563
+ const HighsInt* integrality);
1564
+
1565
+ /**
1566
+ * Clear the integrality of all columns
1567
+ *
1568
+ * @param highs A pointer to the Highs instance.
1569
+ *
1570
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1571
+ */
1572
+ HighsInt Highs_clearIntegrality(void* highs);
1573
+
1574
+ /**
1575
+ * Change the objective coefficient of a column.
1576
+ *
1577
+ * @param highs A pointer to the Highs instance.
1578
+ * @param col The index of the column fo change.
1579
+ * @param cost The new objective coefficient.
1580
+ *
1581
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1582
+ */
1583
+ HighsInt Highs_changeColCost(void* highs, const HighsInt col,
1584
+ const double cost);
1585
+
1586
+ /**
1587
+ * Change the cost coefficients of multiple adjacent columns.
1588
+ *
1589
+ * @param highs A pointer to the Highs instance.
1590
+ * @param from_col The index of the first column whose cost changes.
1591
+ * @param to_col The index of the last column whose cost changes.
1592
+ * @param cost An array of length [to_col - from_col + 1] with the new
1593
+ * objective coefficients.
1594
+ *
1595
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1596
+ */
1597
+ HighsInt Highs_changeColsCostByRange(void* highs, const HighsInt from_col,
1598
+ const HighsInt to_col, const double* cost);
1599
+
1600
+ /**
1601
+ * Change the cost of multiple columns given by an array of indices.
1602
+ *
1603
+ * @param highs A pointer to the Highs instance.
1604
+ * @param num_set_entries The number of columns to change.
1605
+ * @param set An array of size [num_set_entries] with the indices
1606
+ * of the columns to change.
1607
+ * @param cost An array of length [num_set_entries] with the new
1608
+ * costs of the columns.
1609
+ *
1610
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1611
+ */
1612
+ HighsInt Highs_changeColsCostBySet(void* highs, const HighsInt num_set_entries,
1613
+ const HighsInt* set, const double* cost);
1614
+
1615
+ /**
1616
+ * Change the cost of multiple columns given by a mask.
1617
+ *
1618
+ * @param highs A pointer to the Highs instance.
1619
+ * @param mask An array of length [num_col] with 1 if the column
1620
+ * cost should be changed and 0 otherwise.
1621
+ * @param cost An array of length [num_col] with the new costs.
1622
+ *
1623
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1624
+ */
1625
+ HighsInt Highs_changeColsCostByMask(void* highs, const HighsInt* mask,
1626
+ const double* cost);
1627
+
1628
+ /**
1629
+ * Change the variable bounds of a column.
1630
+ *
1631
+ * @param highs A pointer to the Highs instance.
1632
+ * @param col The index of the column whose bounds are to change.
1633
+ * @param lower The new lower bound.
1634
+ * @param upper The new upper bound.
1635
+ *
1636
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1637
+ */
1638
+ HighsInt Highs_changeColBounds(void* highs, const HighsInt col,
1639
+ const double lower, const double upper);
1640
+
1641
+ /**
1642
+ * Change the variable bounds of multiple adjacent columns.
1643
+ *
1644
+ * @param highs A pointer to the Highs instance.
1645
+ * @param from_col The index of the first column whose bound changes.
1646
+ * @param to_col The index of the last column whose bound changes.
1647
+ * @param lower An array of length [to_col - from_col + 1] with the new
1648
+ * lower bounds.
1649
+ * @param upper An array of length [to_col - from_col + 1] with the new
1650
+ * upper bounds.
1651
+ *
1652
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1653
+ */
1654
+ HighsInt Highs_changeColsBoundsByRange(void* highs, const HighsInt from_col,
1655
+ const HighsInt to_col,
1656
+ const double* lower,
1657
+ const double* upper);
1658
+
1659
+ /**
1660
+ * Change the bounds of multiple columns given by an array of indices.
1661
+ *
1662
+ * @param highs A pointer to the Highs instance.
1663
+ * @param num_set_entries The number of columns to change.
1664
+ * @param set An array of size [num_set_entries] with the indices
1665
+ * of the columns to change.
1666
+ * @param lower An array of length [num_set_entries] with the new
1667
+ * lower bounds.
1668
+ * @param upper An array of length [num_set_entries] with the new
1669
+ * upper bounds.
1670
+ *
1671
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1672
+ */
1673
+ HighsInt Highs_changeColsBoundsBySet(void* highs,
1674
+ const HighsInt num_set_entries,
1675
+ const HighsInt* set, const double* lower,
1676
+ const double* upper);
1677
+
1678
+ /**
1679
+ * Change the variable bounds of multiple columns given by a mask.
1680
+ *
1681
+ * @param highs A pointer to the Highs instance.
1682
+ * @param mask An array of length [num_col] with 1 if the column
1683
+ * bounds should be changed and 0 otherwise.
1684
+ * @param lower An array of length [num_col] with the new lower bounds.
1685
+ * @param upper An array of length [num_col] with the new upper bounds.
1686
+ *
1687
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1688
+ */
1689
+ HighsInt Highs_changeColsBoundsByMask(void* highs, const HighsInt* mask,
1690
+ const double* lower, const double* upper);
1691
+
1692
+ /**
1693
+ * Change the bounds of a row.
1694
+ *
1695
+ * @param highs A pointer to the Highs instance.
1696
+ * @param row The index of the row whose bounds are to change.
1697
+ * @param lower The new lower bound.
1698
+ * @param upper The new upper bound.
1699
+ *
1700
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1701
+ */
1702
+ HighsInt Highs_changeRowBounds(void* highs, const HighsInt row,
1703
+ const double lower, const double upper);
1704
+
1705
+ /**
1706
+ * Change the variable bounds of multiple adjacent rows.
1707
+ *
1708
+ * @param highs A pointer to the Highs instance.
1709
+ * @param from_row The index of the first row whose bound changes.
1710
+ * @param to_row The index of the last row whose bound changes.
1711
+ * @param lower An array of length [to_row - from_row + 1] with the new
1712
+ * lower bounds.
1713
+ * @param upper An array of length [to_row - from_row + 1] with the new
1714
+ * upper bounds.
1715
+ *
1716
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1717
+ */
1718
+ HighsInt Highs_changeRowsBoundsByRange(void* highs, const HighsInt from_row,
1719
+ const HighsInt to_row,
1720
+ const double* lower,
1721
+ const double* upper);
1722
+
1723
+ /**
1724
+ * Change the bounds of multiple rows given by an array of indices.
1725
+ *
1726
+ * @param highs A pointer to the Highs instance.
1727
+ * @param num_set_entries The number of rows to change.
1728
+ * @param set An array of size [num_set_entries] with the indices
1729
+ * of the rows to change.
1730
+ * @param lower An array of length [num_set_entries] with the new
1731
+ * lower bounds.
1732
+ * @param upper An array of length [num_set_entries] with the new
1733
+ * upper bounds.
1734
+ *
1735
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1736
+ */
1737
+ HighsInt Highs_changeRowsBoundsBySet(void* highs,
1738
+ const HighsInt num_set_entries,
1739
+ const HighsInt* set, const double* lower,
1740
+ const double* upper);
1741
+
1742
+ /**
1743
+ * Change the bounds of multiple rows given by a mask.
1744
+ *
1745
+ * @param highs A pointer to the Highs instance.
1746
+ * @param mask An array of length [num_row] with 1 if the row
1747
+ * bounds should be changed and 0 otherwise.
1748
+ * @param lower An array of length [num_row] with the new lower bounds.
1749
+ * @param upper An array of length [num_row] with the new upper bounds.
1750
+ *
1751
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1752
+ */
1753
+ HighsInt Highs_changeRowsBoundsByMask(void* highs, const HighsInt* mask,
1754
+ const double* lower, const double* upper);
1755
+
1756
+ /**
1757
+ * Change a coefficient in the constraint matrix.
1758
+ *
1759
+ * @param highs A pointer to the Highs instance.
1760
+ * @param row The index of the row to change.
1761
+ * @param col The index of the column to change.
1762
+ * @param value The new constraint coefficient.
1763
+ *
1764
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1765
+ */
1766
+ HighsInt Highs_changeCoeff(void* highs, const HighsInt row, const HighsInt col,
1767
+ const double value);
1768
+
1769
+ /**
1770
+ * Get the objective sense.
1771
+ *
1772
+ * @param highs A pointer to the Highs instance.
1773
+ * @param sense The location in which the current objective sense should be
1774
+ * placed. The sense is a `kHighsObjSense` constant.
1775
+ *
1776
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1777
+ */
1778
+ HighsInt Highs_getObjectiveSense(const void* highs, HighsInt* sense);
1779
+
1780
+ /**
1781
+ * Get the objective offset.
1782
+ *
1783
+ * @param highs A pointer to the Highs instance.
1784
+ * @param offset The location in which the current objective offset should be
1785
+ * placed.
1786
+ *
1787
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1788
+ */
1789
+ HighsInt Highs_getObjectiveOffset(const void* highs, double* offset);
1790
+
1791
+ /**
1792
+ * Get data associated with multiple adjacent columns from the model.
1793
+ *
1794
+ * To query the constraint coefficients, this function should be called twice.
1795
+ *
1796
+ * First, call this function with `matrix_start`, `matrix_index`, and
1797
+ * `matrix_value` as `NULL`. This call will populate `num_nz` with the number of
1798
+ * nonzero elements in the corresponding section of the constraint matrix.
1799
+ *
1800
+ * Second, allocate new `matrix_index` and `matrix_value` arrays of length
1801
+ * `num_nz` and call this function again to populate the new arrays with their
1802
+ * contents.
1803
+ *
1804
+ * @param highs A pointer to the Highs instance.
1805
+ * @param from_col The first column for which to query data for.
1806
+ * @param to_col The last column (inclusive) for which to query data for.
1807
+ * @param num_col A HighsInt populated with the number of columns got from
1808
+ * the model (this should equal `to_col - from_col + 1`).
1809
+ * @param costs An array of size [to_col - from_col + 1] for the column
1810
+ * cost coefficients.
1811
+ * @param lower An array of size [to_col - from_col + 1] for the column
1812
+ * lower bounds.
1813
+ * @param upper An array of size [to_col - from_col + 1] for the column
1814
+ * upper bounds.
1815
+ * @param num_nz A HighsInt to be populated with the number of non-zero
1816
+ * elements in the constraint matrix.
1817
+ * @param matrix_start An array of size [to_col - from_col + 1] with the start
1818
+ * indices of each column in `matrix_index` and
1819
+ * `matrix_value`.
1820
+ * @param matrix_index An array of size [num_nz] with the row indices of each
1821
+ * element in the constraint matrix.
1822
+ * @param matrix_value An array of size [num_nz] with the non-zero elements of
1823
+ * the constraint matrix.
1824
+ *
1825
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1826
+ */
1827
+ HighsInt Highs_getColsByRange(const void* highs, const HighsInt from_col,
1828
+ const HighsInt to_col, HighsInt* num_col,
1829
+ double* costs, double* lower, double* upper,
1830
+ HighsInt* num_nz, HighsInt* matrix_start,
1831
+ HighsInt* matrix_index, double* matrix_value);
1832
+
1833
+ /**
1834
+ * Get data associated with multiple columns given by an array.
1835
+ *
1836
+ * This function is identical to `Highs_getColsByRange`, except for how the
1837
+ * columns are specified.
1838
+ *
1839
+ * @param num_set_indices The number of indices in `set`.
1840
+ * @param set An array of size [num_set_entries] with the column
1841
+ * indices to get.
1842
+ *
1843
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1844
+ */
1845
+ HighsInt Highs_getColsBySet(const void* highs, const HighsInt num_set_entries,
1846
+ const HighsInt* set, HighsInt* num_col,
1847
+ double* costs, double* lower, double* upper,
1848
+ HighsInt* num_nz, HighsInt* matrix_start,
1849
+ HighsInt* matrix_index, double* matrix_value);
1850
+
1851
+ /**
1852
+ * Get data associated with multiple columns given by a mask.
1853
+ *
1854
+ * This function is identical to `Highs_getColsByRange`, except for how the
1855
+ * columns are specified.
1856
+ *
1857
+ * @param mask An array of length [num_col] containing a `1` to get the column
1858
+ * and `0` otherwise.
1859
+ *
1860
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1861
+ */
1862
+ HighsInt Highs_getColsByMask(const void* highs, const HighsInt* mask,
1863
+ HighsInt* num_col, double* costs, double* lower,
1864
+ double* upper, HighsInt* num_nz,
1865
+ HighsInt* matrix_start, HighsInt* matrix_index,
1866
+ double* matrix_value);
1867
+
1868
+ /**
1869
+ * Get data associated with multiple adjacent rows from the model.
1870
+ *
1871
+ * To query the constraint coefficients, this function should be called twice.
1872
+ *
1873
+ * First, call this function with `matrix_start`, `matrix_index`, and
1874
+ * `matrix_value` as `NULL`. This call will populate `num_nz` with the number of
1875
+ * nonzero elements in the corresponding section of the constraint matrix.
1876
+ *
1877
+ * Second, allocate new `matrix_index` and `matrix_value` arrays of length
1878
+ * `num_nz` and call this function again to populate the new arrays with their
1879
+ * contents.
1880
+ *
1881
+ * @param highs A pointer to the Highs instance.
1882
+ * @param from_row The first row for which to query data for.
1883
+ * @param to_row The last row (inclusive) for which to query data for.
1884
+ * @param num_row A HighsInt to be populated with the number of rows got
1885
+ * from the model.
1886
+ * @param lower An array of size [to_row - from_row + 1] for the row
1887
+ * lower bounds.
1888
+ * @param upper An array of size [to_row - from_row + 1] for the row
1889
+ * upper bounds.
1890
+ * @param num_nz A HighsInt to be populated with the number of non-zero
1891
+ * elements in the constraint matrix.
1892
+ * @param matrix_start An array of size [to_row - from_row + 1] with the start
1893
+ * indices of each row in `matrix_index` and
1894
+ * `matrix_value`.
1895
+ * @param matrix_index An array of size [num_nz] with the column indices of
1896
+ * each element in the constraint matrix.
1897
+ * @param matrix_value An array of size [num_nz] with the non-zero elements of
1898
+ * the constraint matrix.
1899
+ *
1900
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1901
+ */
1902
+ HighsInt Highs_getRowsByRange(const void* highs, const HighsInt from_row,
1903
+ const HighsInt to_row, HighsInt* num_row,
1904
+ double* lower, double* upper, HighsInt* num_nz,
1905
+ HighsInt* matrix_start, HighsInt* matrix_index,
1906
+ double* matrix_value);
1907
+
1908
+ /**
1909
+ * Get data associated with multiple rows given by an array.
1910
+ *
1911
+ * This function is identical to `Highs_getRowsByRange`, except for how the
1912
+ * rows are specified.
1913
+ *
1914
+ * @param num_set_indices The number of indices in `set`.
1915
+ * @param set An array of size [num_set_entries] containing the
1916
+ * row indices to get.
1917
+ *
1918
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1919
+ */
1920
+ HighsInt Highs_getRowsBySet(const void* highs, const HighsInt num_set_entries,
1921
+ const HighsInt* set, HighsInt* num_row,
1922
+ double* lower, double* upper, HighsInt* num_nz,
1923
+ HighsInt* matrix_start, HighsInt* matrix_index,
1924
+ double* matrix_value);
1925
+
1926
+ /**
1927
+ * Get data associated with multiple rows given by a mask.
1928
+ *
1929
+ * This function is identical to `Highs_getRowsByRange`, except for how the
1930
+ * rows are specified.
1931
+ *
1932
+ * @param mask An array of length [num_row] containing a `1` to get the row and
1933
+ * `0` otherwise.
1934
+ *
1935
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1936
+ */
1937
+ HighsInt Highs_getRowsByMask(const void* highs, const HighsInt* mask,
1938
+ HighsInt* num_row, double* lower, double* upper,
1939
+ HighsInt* num_nz, HighsInt* matrix_start,
1940
+ HighsInt* matrix_index, double* matrix_value);
1941
+ /**
1942
+ * Get the name of a row.
1943
+ *
1944
+ * @param row The index of the row to query.
1945
+ * @param name A pointer in which to store the name of the row. This must have
1946
+ * length `kHighsMaximumStringLength`.
1947
+ *
1948
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1949
+ */
1950
+ HighsInt Highs_getRowName(const void* highs, const HighsInt row, char* name);
1951
+
1952
+ /**
1953
+ * Get the index of a row from its name.
1954
+ *
1955
+ * If multiple rows have the same name, or if no row exists with `name`, this
1956
+ * function returns `kHighsStatusError`.
1957
+ *
1958
+ * @param name A pointer of the name of the row to query.
1959
+ * @param row A pointer in which to store the index of the row
1960
+ *
1961
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1962
+ */
1963
+ HighsInt Highs_getRowByName(const void* highs, const char* name, HighsInt* row);
1964
+
1965
+ /**
1966
+ * Get the name of a column.
1967
+ *
1968
+ * @param col The index of the column to query.
1969
+ * @param name A pointer in which to store the name of the column. This must
1970
+ * have length `kHighsMaximumStringLength`.
1971
+ *
1972
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1973
+ */
1974
+ HighsInt Highs_getColName(const void* highs, const HighsInt col, char* name);
1975
+
1976
+ /**
1977
+ * Get the index of a column from its name.
1978
+ *
1979
+ * If multiple columns have the same name, or if no column exists with `name`,
1980
+ * this function returns `kHighsStatusError`.
1981
+ *
1982
+ * @param name A pointer of the name of the column to query.
1983
+ * @param col A pointer in which to store the index of the column
1984
+ *
1985
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1986
+ */
1987
+ HighsInt Highs_getColByName(const void* highs, const char* name, HighsInt* col);
1988
+
1989
+ /**
1990
+ * Get the integrality of a column.
1991
+ *
1992
+ * @param col The index of the column to query.
1993
+ * @param integrality A HighsInt in which the integrality of the column should
1994
+ * be placed. The integer is one of the `kHighsVarTypeXXX`
1995
+ * constants.
1996
+ *
1997
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
1998
+ */
1999
+ HighsInt Highs_getColIntegrality(const void* highs, const HighsInt col,
2000
+ HighsInt* integrality);
2001
+
2002
+ /**
2003
+ * Delete multiple adjacent columns.
2004
+ *
2005
+ * @param highs A pointer to the Highs instance.
2006
+ * @param from_col The index of the first column to delete.
2007
+ * @param to_col The index of the last column to delete.
2008
+ *
2009
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2010
+ */
2011
+ HighsInt Highs_deleteColsByRange(void* highs, const HighsInt from_col,
2012
+ const HighsInt to_col);
2013
+
2014
+ /**
2015
+ * Delete multiple columns given by an array of indices.
2016
+ *
2017
+ * @param highs A pointer to the Highs instance.
2018
+ * @param num_set_entries The number of columns to delete.
2019
+ * @param set An array of size [num_set_entries] with the indices
2020
+ * of the columns to delete.
2021
+ *
2022
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2023
+ */
2024
+ HighsInt Highs_deleteColsBySet(void* highs, const HighsInt num_set_entries,
2025
+ const HighsInt* set);
2026
+
2027
+ /**
2028
+ * Delete multiple columns given by a mask.
2029
+ *
2030
+ * @param highs A pointer to the Highs instance.
2031
+ * @param mask An array of length [num_col] with 1 if the column
2032
+ * should be deleted and 0 otherwise.
2033
+ *
2034
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2035
+ */
2036
+ HighsInt Highs_deleteColsByMask(void* highs, HighsInt* mask);
2037
+
2038
+ /**
2039
+ * Delete multiple adjacent rows.
2040
+ *
2041
+ * @param highs A pointer to the Highs instance.
2042
+ * @param from_row The index of the first row to delete.
2043
+ * @param to_row The index of the last row to delete.
2044
+ *
2045
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2046
+ */
2047
+ HighsInt Highs_deleteRowsByRange(void* highs, const HighsInt from_row,
2048
+ const HighsInt to_row);
2049
+
2050
+ /**
2051
+ * Delete multiple rows given by an array of indices.
2052
+ *
2053
+ * @param highs A pointer to the Highs instance.
2054
+ * @param num_set_entries The number of rows to delete.
2055
+ * @param set An array of size [num_set_entries] with the indices
2056
+ * of the rows to delete.
2057
+ *
2058
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2059
+ */
2060
+ HighsInt Highs_deleteRowsBySet(void* highs, const HighsInt num_set_entries,
2061
+ const HighsInt* set);
2062
+
2063
+ /**
2064
+ * Delete multiple rows given by a mask.
2065
+ *
2066
+ * @param highs A pointer to the Highs instance.
2067
+ * @param mask An array of length [num_row] with `1` if the row should be
2068
+ * deleted and `0` otherwise. The new index of any column not
2069
+ * deleted is stored in place of the value `0`.
2070
+ *
2071
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2072
+ */
2073
+ HighsInt Highs_deleteRowsByMask(void* highs, HighsInt* mask);
2074
+
2075
+ /**
2076
+ * Scale a column by a constant.
2077
+ *
2078
+ * Scaling a column modifies the elements in the constraint matrix, the variable
2079
+ * bounds, and the objective coefficient.
2080
+ *
2081
+ * @param highs A pointer to the Highs instance.
2082
+ * @param col The index of the column to scale.
2083
+ * @param scaleval The value by which to scale the column. If `scaleval < 0`,
2084
+ * the variable bounds flipped.
2085
+ *
2086
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2087
+ */
2088
+ HighsInt Highs_scaleCol(void* highs, const HighsInt col, const double scaleval);
2089
+
2090
+ /**
2091
+ * Scale a row by a constant.
2092
+ *
2093
+ * @param highs A pointer to the Highs instance.
2094
+ * @param row The index of the row to scale.
2095
+ * @param scaleval The value by which to scale the row. If `scaleval < 0`, the
2096
+ * row bounds are flipped.
2097
+ *
2098
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2099
+ */
2100
+ HighsInt Highs_scaleRow(void* highs, const HighsInt row, const double scaleval);
2101
+
2102
+ /**
2103
+ * Return the value of infinity used by HiGHS.
2104
+ *
2105
+ * @param highs A pointer to the Highs instance.
2106
+ *
2107
+ * @returns The value of infinity used by HiGHS.
2108
+ */
2109
+ double Highs_getInfinity(const void* highs);
2110
+
2111
+ /**
2112
+ * Return the size of integers used by HiGHS.
2113
+ *
2114
+ * @param highs A pointer to the Highs instance.
2115
+ *
2116
+ * @returns The size of integers used by HiGHS.
2117
+ */
2118
+ HighsInt Highs_getSizeofHighsInt(const void* highs);
2119
+
2120
+ /**
2121
+ * Return the number of columns in the model.
2122
+ *
2123
+ * @param highs A pointer to the Highs instance.
2124
+ *
2125
+ * @returns The number of columns in the model.
2126
+ */
2127
+ HighsInt Highs_getNumCol(const void* highs);
2128
+
2129
+ /**
2130
+ * Return the number of rows in the model.
2131
+ *
2132
+ * @param highs A pointer to the Highs instance.
2133
+ *
2134
+ * @returns The number of rows in the model.
2135
+ */
2136
+ HighsInt Highs_getNumRow(const void* highs);
2137
+
2138
+ /**
2139
+ * Return the number of nonzeros in the constraint matrix of the model.
2140
+ *
2141
+ * @param highs A pointer to the Highs instance.
2142
+ *
2143
+ * @returns The number of nonzeros in the constraint matrix of the model.
2144
+ */
2145
+ HighsInt Highs_getNumNz(const void* highs);
2146
+
2147
+ /**
2148
+ * Return the number of nonzeroes in the Hessian matrix of the model.
2149
+ *
2150
+ * @param highs A pointer to the Highs instance.
2151
+ *
2152
+ * @returns The number of nonzeroes in the Hessian matrix of the model.
2153
+ */
2154
+ HighsInt Highs_getHessianNumNz(const void* highs);
2155
+
2156
+ /**
2157
+ * Return the number of columns in the presolved model.
2158
+ *
2159
+ * @param highs A pointer to the Highs instance.
2160
+ *
2161
+ * @returns The number of columns in the presolved model.
2162
+ */
2163
+ HighsInt Highs_getPresolvedNumCol(const void* highs);
2164
+
2165
+ /**
2166
+ * Return the number of rows in the presolved model.
2167
+ *
2168
+ * @param highs A pointer to the Highs instance.
2169
+ *
2170
+ * @returns The number of rows in the presolved model.
2171
+ */
2172
+ HighsInt Highs_getPresolvedNumRow(const void* highs);
2173
+
2174
+ /**
2175
+ * Return the number of nonzeros in the constraint matrix of the presolved
2176
+ * model.
2177
+ *
2178
+ * @param highs A pointer to the Highs instance.
2179
+ *
2180
+ * @returns The number of nonzeros in the constraint matrix of the presolved
2181
+ * model.
2182
+ */
2183
+ HighsInt Highs_getPresolvedNumNz(const void* highs);
2184
+
2185
+ /**
2186
+ * Get the data from a HiGHS model.
2187
+ *
2188
+ * The input arguments have the same meaning (in a different order) to those
2189
+ * used in `Highs_passModel`.
2190
+ *
2191
+ * Note that all arrays must be pre-allocated to the correct size before calling
2192
+ * `Highs_getModel`. Use the following query methods to check the appropriate
2193
+ * size:
2194
+ * - `Highs_getNumCol`
2195
+ * - `Highs_getNumRow`
2196
+ * - `Highs_getNumNz`
2197
+ * - `Highs_getHessianNumNz`
2198
+ *
2199
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2200
+ */
2201
+ HighsInt Highs_getModel(const void* highs, const HighsInt a_format,
2202
+ const HighsInt q_format, HighsInt* num_col,
2203
+ HighsInt* num_row, HighsInt* num_nz,
2204
+ HighsInt* hessian_num_nz, HighsInt* sense,
2205
+ double* offset, double* col_cost, double* col_lower,
2206
+ double* col_upper, double* row_lower, double* row_upper,
2207
+ HighsInt* a_start, HighsInt* a_index, double* a_value,
2208
+ HighsInt* q_start, HighsInt* q_index, double* q_value,
2209
+ HighsInt* integrality);
2210
+
2211
+ /**
2212
+ * Get the data from a HiGHS LP.
2213
+ *
2214
+ * The input arguments have the same meaning (in a different order) to those
2215
+ * used in `Highs_passModel`.
2216
+ *
2217
+ * Note that all arrays must be pre-allocated to the correct size before calling
2218
+ * `Highs_getModel`. Use the following query methods to check the appropriate
2219
+ * size:
2220
+ * - `Highs_getNumCol`
2221
+ * - `Highs_getNumRow`
2222
+ * - `Highs_getNumNz`
2223
+ *
2224
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2225
+ */
2226
+ HighsInt Highs_getLp(const void* highs, const HighsInt a_format,
2227
+ HighsInt* num_col, HighsInt* num_row, HighsInt* num_nz,
2228
+ HighsInt* sense, double* offset, double* col_cost,
2229
+ double* col_lower, double* col_upper, double* row_lower,
2230
+ double* row_upper, HighsInt* a_start, HighsInt* a_index,
2231
+ double* a_value, HighsInt* integrality);
2232
+
2233
+ /**
2234
+ * Get the data from a HiGHS presolved LP.
2235
+ *
2236
+ * The input arguments have the same meaning (in a different order) to those
2237
+ * used in `Highs_passModel`.
2238
+ *
2239
+ * Note that all arrays must be pre-allocated to the correct size before calling
2240
+ * `Highs_getModel`. Use the following query methods to check the appropriate
2241
+ * size:
2242
+ * - `Highs_getPresolvedNumCol`
2243
+ * - `Highs_getPresolvedNumRow`
2244
+ * - `Highs_getPresolvedNumNz`
2245
+ *
2246
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2247
+ */
2248
+ HighsInt Highs_getPresolvedLp(const void* highs, const HighsInt a_format,
2249
+ HighsInt* num_col, HighsInt* num_row,
2250
+ HighsInt* num_nz, HighsInt* sense, double* offset,
2251
+ double* col_cost, double* col_lower,
2252
+ double* col_upper, double* row_lower,
2253
+ double* row_upper, HighsInt* a_start,
2254
+ HighsInt* a_index, double* a_value,
2255
+ HighsInt* integrality);
2256
+ /**
2257
+ * Get the name of a column of the presolved LP.
2258
+ *
2259
+ * @param col The index of the column to query.
2260
+ * @param name A pointer in which to store the name of the column. This must
2261
+ * have length `kHighsMaximumStringLength`.
2262
+ *
2263
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2264
+ */
2265
+ HighsInt Highs_getPresolvedColName(const void* highs, const HighsInt col,
2266
+ char* name);
2267
+
2268
+ /**
2269
+ * Get the name of a row of the presolved LP.
2270
+ *
2271
+ * @param row The index of the row to query.
2272
+ * @param name A pointer in which to store the name of the row. This must
2273
+ * have length `kHighsMaximumStringLength`.
2274
+ *
2275
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2276
+ */
2277
+ HighsInt Highs_getPresolvedRowName(const void* highs, const HighsInt row,
2278
+ char* name);
2279
+
2280
+ /**
2281
+ * Get the data from a HiGHS IIS LP.
2282
+ *
2283
+ * The input arguments have the same meaning (in a different order) to those
2284
+ * used in `Highs_passModel`.
2285
+ *
2286
+ * Note that all arrays must be pre-allocated to the correct size before calling
2287
+ * `Highs_getModel`. Use the following query methods to check the appropriate
2288
+ * size:
2289
+ * - `Highs_getPresolvedNumCol`
2290
+ * - `Highs_getPresolvedNumRow`
2291
+ * - `Highs_getPresolvedNumNz`
2292
+ *
2293
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2294
+ */
2295
+ HighsInt Highs_getIisLp(const void* highs, const HighsInt a_format,
2296
+ HighsInt* num_col, HighsInt* num_row, HighsInt* num_nz,
2297
+ HighsInt* sense, double* offset, double* col_cost,
2298
+ double* col_lower, double* col_upper, double* row_lower,
2299
+ double* row_upper, HighsInt* a_start, HighsInt* a_index,
2300
+ double* a_value, HighsInt* integrality);
2301
+
2302
+ /**
2303
+ * Get the LP corresponding to a MIP with non-continuous variables
2304
+ * fixed at a MIP solution
2305
+ *
2306
+ * The input arguments have the same meaning (in a different order) to those
2307
+ * used in `Highs_passModel`.
2308
+ *
2309
+ * Note that all arrays must be pre-allocated to the correct size before calling
2310
+ * `Highs_getModel`. Use the following query methods to check the appropriate
2311
+ * size:
2312
+ * - `Highs_getNumCol`
2313
+ * - `Highs_getNumRow`
2314
+ * - `Highs_getNumNz`
2315
+ *
2316
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2317
+ */
2318
+ HighsInt Highs_getFixedLp(const void* highs, const HighsInt a_format,
2319
+ HighsInt* num_col, HighsInt* num_row,
2320
+ HighsInt* num_nz, HighsInt* sense, double* offset,
2321
+ double* col_cost, double* col_lower,
2322
+ double* col_upper, double* row_lower,
2323
+ double* row_upper, HighsInt* a_start,
2324
+ HighsInt* a_index, double* a_value);
2325
+
2326
+ /**
2327
+ * Set a primal (and possibly dual) solution as a starting point, then run
2328
+ * crossover to compute a basic feasible solution.
2329
+ *
2330
+ * @param highs A pointer to the Highs instance.
2331
+ * @param num_col The number of variables.
2332
+ * @param num_row The number of rows.
2333
+ * @param col_value An array of length [num_col] with optimal primal solution
2334
+ * for each column.
2335
+ * @param col_dual An array of length [num_col] with optimal dual solution for
2336
+ * each column. May be `NULL`, in which case no dual solution
2337
+ * is passed.
2338
+ * @param row_dual An array of length [num_row] with optimal dual solution for
2339
+ * each row. . May be `NULL`, in which case no dual solution
2340
+ * is passed.
2341
+ *
2342
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2343
+ */
2344
+ HighsInt Highs_crossover(void* highs, const HighsInt num_col,
2345
+ const HighsInt num_row, const double* col_value,
2346
+ const double* col_dual, const double* row_dual);
2347
+
2348
+ /**
2349
+ * Compute the ranging information for all costs and bounds. For
2350
+ * nonbasic variables the ranging information is relative to the
2351
+ * active bound. For basic variables the ranging information relates
2352
+ * to...
2353
+ *
2354
+ * For any values that are not required, pass NULL.
2355
+ *
2356
+ * @param highs A pointer to the Highs instance.
2357
+ * @param col_cost_up_value The upper range of the cost value
2358
+ * @param col_cost_up_objective The objective at the upper cost range
2359
+ * @param col_cost_up_in_var The variable entering the basis at the upper
2360
+ * cost range
2361
+ * @param col_cost_up_ou_var The variable leaving the basis at the upper
2362
+ * cost range
2363
+ * @param col_cost_dn_value The lower range of the cost value
2364
+ * @param col_cost_dn_objective The objective at the lower cost range
2365
+ * @param col_cost_dn_in_var The variable entering the basis at the lower
2366
+ * cost range
2367
+ * @param col_cost_dn_ou_var The variable leaving the basis at the lower
2368
+ * cost range
2369
+ * @param col_bound_up_value The upper range of the column bound value
2370
+ * @param col_bound_up_objective The objective at the upper column bound range
2371
+ * @param col_bound_up_in_var The variable entering the basis at the upper
2372
+ * column bound range
2373
+ * @param col_bound_up_ou_var The variable leaving the basis at the upper
2374
+ * column bound range
2375
+ * @param col_bound_dn_value The lower range of the column bound value
2376
+ * @param col_bound_dn_objective The objective at the lower column bound range
2377
+ * @param col_bound_dn_in_var The variable entering the basis at the lower
2378
+ * column bound range
2379
+ * @param col_bound_dn_ou_var The variable leaving the basis at the lower
2380
+ * column bound range
2381
+ * @param row_bound_up_value The upper range of the row bound value
2382
+ * @param row_bound_up_objective The objective at the upper row bound range
2383
+ * @param row_bound_up_in_var The variable entering the basis at the upper
2384
+ * row bound range
2385
+ * @param row_bound_up_ou_var The variable leaving the basis at the upper row
2386
+ * bound range
2387
+ * @param row_bound_dn_value The lower range of the row bound value
2388
+ * @param row_bound_dn_objective The objective at the lower row bound range
2389
+ * @param row_bound_dn_in_var The variable entering the basis at the lower
2390
+ * row bound range
2391
+ * @param row_bound_dn_ou_var The variable leaving the basis at the lower row
2392
+ * bound range
2393
+ *
2394
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2395
+ */
2396
+ HighsInt Highs_getRanging(
2397
+ void* highs,
2398
+ //
2399
+ double* col_cost_up_value, double* col_cost_up_objective,
2400
+ HighsInt* col_cost_up_in_var, HighsInt* col_cost_up_ou_var,
2401
+ double* col_cost_dn_value, double* col_cost_dn_objective,
2402
+ HighsInt* col_cost_dn_in_var, HighsInt* col_cost_dn_ou_var,
2403
+ double* col_bound_up_value, double* col_bound_up_objective,
2404
+ HighsInt* col_bound_up_in_var, HighsInt* col_bound_up_ou_var,
2405
+ double* col_bound_dn_value, double* col_bound_dn_objective,
2406
+ HighsInt* col_bound_dn_in_var, HighsInt* col_bound_dn_ou_var,
2407
+ double* row_bound_up_value, double* row_bound_up_objective,
2408
+ HighsInt* row_bound_up_in_var, HighsInt* row_bound_up_ou_var,
2409
+ double* row_bound_dn_value, double* row_bound_dn_objective,
2410
+ HighsInt* row_bound_dn_in_var, HighsInt* row_bound_dn_ou_var);
2411
+
2412
+ /**
2413
+ * Compute the solution corresponding to a (possibly weighted) sum of
2414
+ * (allowable) infeasibilities in an LP/MIP.
2415
+ *
2416
+ * If local penalties are not defined, pass NULL, and the global
2417
+ * penalty will be used. Negative penalty values imply that the bound
2418
+ * or RHS value cannot be violated
2419
+ *
2420
+ * @param highs A pointer to the Highs instance.
2421
+ * @param const double global_lower_penalty The penalty for violating lower
2422
+ * bounds on variables
2423
+ * @param const double global_upper_penalty The penalty for violating upper
2424
+ * bounds on variables
2425
+ * @param const double global_rhs_penalty The penalty for violating constraint
2426
+ * RHS values
2427
+ * @param const double* local_lower_penalty The penalties for violating specific
2428
+ * lower bounds on variables
2429
+ * @param const double* local_upper_penalty The penalties for violating specific
2430
+ * upper bounds on variables
2431
+ * @param const double* local_rhs_penalty The penalties for violating specific
2432
+ * constraint RHS values
2433
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2434
+ */
2435
+
2436
+ HighsInt Highs_feasibilityRelaxation(void* highs,
2437
+ const double global_lower_penalty,
2438
+ const double global_upper_penalty,
2439
+ const double global_rhs_penalty,
2440
+ const double* local_lower_penalty,
2441
+ const double* local_upper_penalty,
2442
+ const double* local_rhs_penalty);
2443
+
2444
+ /**
2445
+ * Attempt to compute an irreducible infeasibility subsystem (IIS) for
2446
+ * an LP, QP, or the relaxation of a MIP. If no IIS is found, then the
2447
+ * number of IIS columns and rows will be zero.
2448
+ *
2449
+ * @param highs A pointer to the Highs instance.
2450
+ * @param const HighsInt iis_num_col Number of columns in the IIS.
2451
+ * @param const HighsInt iis_num_row Number of rows in the IIS.
2452
+ * @param const HighsInt* col_index An array of length [iis_num_col], to be
2453
+ * filled with the indices of original
2454
+ * variables in the IIS.
2455
+ * @param const HighsInt* row_index An array of length [iis_num_col], to be
2456
+ * filled with the indices of original
2457
+ * constraints in the IIS.
2458
+ * @param const HighsInt* col_bound An array of length [iis_num_col], to be
2459
+ * filled with the bound status of variables
2460
+ * in the IIS.
2461
+ * @param const HighsInt* row_bound An array of length [iis_num_col], to be
2462
+ * filled with the bound status of constraints
2463
+ * in the IIS.
2464
+ * @param const HighsInt* col_status An array of length [num_col], to be
2465
+ * filled with the IIS status of all original
2466
+ * variables.
2467
+ * @param const HighsInt* row_status n array of length [num_col], to be
2468
+ * filled with the IIS status of all original
2469
+ * constraints.
2470
+ *
2471
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2472
+ */
2473
+ HighsInt Highs_getIis(void* highs, HighsInt* iis_num_col, HighsInt* iis_num_row,
2474
+ HighsInt* col_index, HighsInt* row_index,
2475
+ HighsInt* col_bound, HighsInt* row_bound,
2476
+ HighsInt* col_status, HighsInt* row_status);
2477
+ /**
2478
+ * Releases all resources held by the global scheduler instance.
2479
+ *
2480
+ * It is not thread-safe to call this function while calling `Highs_run` or one
2481
+ * of the `Highs_XXXcall` methods on any other Highs instance in any thread.
2482
+ *
2483
+ * After this function has terminated, it is guaranteed that eventually all
2484
+ * previously created scheduler threads will terminate and allocated memory will
2485
+ * be released.
2486
+ *
2487
+ * After this function has returned, the option value for the number of threads
2488
+ * may be altered to a new value before the next call to `Highs_run` or one of
2489
+ * the `Highs_XXXcall` methods.
2490
+ *
2491
+ * @param blocking If the `blocking` parameter has a nonzero value, then this
2492
+ * function will not return until all memory is freed, which
2493
+ * might be desirable when debugging heap memory, but it
2494
+ * requires the calling thread to wait for all scheduler
2495
+ * threads to wake-up which is usually not necessary.
2496
+ *
2497
+ * @returns No status is returned since the function call cannot fail. Calling
2498
+ * this function while any Highs instance is in use on any thread is
2499
+ * undefined behavior and may cause crashes, but cannot be detected and hence
2500
+ * is fully in the callers responsibility.
2501
+ */
2502
+ void Highs_resetGlobalScheduler(const HighsInt blocking);
2503
+
2504
+ /**
2505
+ * Get a void* pointer to a callback data item
2506
+ *
2507
+ * @param data_out A pointer to the HighsCallbackDataOut instance.
2508
+ * @param item_name The name of the item.
2509
+ *
2510
+ * @returns A void* pointer to the callback data item, or NULL if item_name not
2511
+ * valid
2512
+ */
2513
+ const void* Highs_getCallbackDataOutItem(const HighsCallbackDataOut* data_out,
2514
+ const char* item_name);
2515
+
2516
+ /**
2517
+ * Set a solution within a callback by passing a subset of the values.
2518
+ *
2519
+ * For any values that are unavailable/unknown, pass kHighsUndefined.
2520
+ *
2521
+ * @param data_in A pointer to the callback input data instance.
2522
+ * @param num_entries Number of variables in the set
2523
+ * @param value An array of length [num_entries <= num_col] with
2524
+ * column solution values.
2525
+ *
2526
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2527
+ */
2528
+ HighsInt Highs_setCallbackSolution(HighsCallbackDataIn* data_in,
2529
+ const HighsInt num_entries,
2530
+ const double* value);
2531
+
2532
+ /**
2533
+ * Set a partial primal solution by passing values for a set of variables,
2534
+ * within a valid callback.
2535
+ *
2536
+ * @param data_in A pointer to the callback input data instance.
2537
+ * @param num_entries Number of variables in the set
2538
+ * @param index Indices of variables in the set
2539
+ * @param value Values of variables in the set
2540
+ *
2541
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2542
+ */
2543
+ HighsInt Highs_setCallbackSparseSolution(HighsCallbackDataIn* data_in,
2544
+ const HighsInt num_entries,
2545
+ const HighsInt* index,
2546
+ const double* value);
2547
+
2548
+ /**
2549
+ * Finds a feasible solution for a given (partial) primal user solution,
2550
+ * within a valid callback.
2551
+ *
2552
+ * On success, the user solution is updated within the callback input data
2553
+ * instance.
2554
+ *
2555
+ * @returns A `kHighsStatus` constant indicating whether the call succeeded.
2556
+ */
2557
+ HighsInt Highs_repairCallbackSolution(HighsCallbackDataIn* data_in);
2558
+
2559
+ // *********************
2560
+ // * Deprecated methods*
2561
+ // *********************
2562
+
2563
+ /**
2564
+ * Return the HiGHS compilation date.
2565
+ *
2566
+ * @returns The HiGHS compilation date.
2567
+ */
2568
+ static const char* Highs_compilationDate(void);
2569
+
2570
+ // These are deprecated because they don't follow the style guide. Constants
2571
+ // must begin with `k`.
2572
+ static const HighsInt HighsStatuskError = -1;
2573
+ static const HighsInt HighsStatuskOk = 0;
2574
+ static const HighsInt HighsStatuskWarning = 1;
2575
+
2576
+ HighsInt Highs_call(const HighsInt num_col, const HighsInt num_row,
2577
+ const HighsInt num_nz, const double* col_cost,
2578
+ const double* col_lower, const double* col_upper,
2579
+ const double* row_lower, const double* row_upper,
2580
+ const HighsInt* a_start, const HighsInt* a_index,
2581
+ const double* a_value, double* col_value, double* col_dual,
2582
+ double* row_value, double* row_dual,
2583
+ HighsInt* col_basis_status, HighsInt* row_basis_status,
2584
+ HighsInt* model_status);
2585
+
2586
+ HighsInt Highs_runQuiet(void* highs);
2587
+
2588
+ HighsInt Highs_setHighsLogfile(void* highs, const void* logfile);
2589
+
2590
+ HighsInt Highs_setHighsOutput(void* highs, const void* outputfile);
2591
+
2592
+ HighsInt Highs_getIterationCount(const void* highs);
2593
+
2594
+ HighsInt Highs_getSimplexIterationCount(const void* highs);
2595
+
2596
+ HighsInt Highs_setHighsBoolOptionValue(void* highs, const char* option,
2597
+ const HighsInt value);
2598
+
2599
+ HighsInt Highs_setHighsIntOptionValue(void* highs, const char* option,
2600
+ const HighsInt value);
2601
+
2602
+ HighsInt Highs_setHighsDoubleOptionValue(void* highs, const char* option,
2603
+ const double value);
2604
+
2605
+ HighsInt Highs_setHighsStringOptionValue(void* highs, const char* option,
2606
+ const char* value);
2607
+
2608
+ HighsInt Highs_setHighsOptionValue(void* highs, const char* option,
2609
+ const char* value);
2610
+
2611
+ HighsInt Highs_getHighsBoolOptionValue(const void* highs, const char* option,
2612
+ HighsInt* value);
2613
+
2614
+ HighsInt Highs_getHighsIntOptionValue(const void* highs, const char* option,
2615
+ HighsInt* value);
2616
+
2617
+ HighsInt Highs_getHighsDoubleOptionValue(const void* highs, const char* option,
2618
+ double* value);
2619
+
2620
+ HighsInt Highs_getHighsStringOptionValue(const void* highs, const char* option,
2621
+ char* value);
2622
+
2623
+ HighsInt Highs_getHighsOptionType(const void* highs, const char* option,
2624
+ HighsInt* type);
2625
+
2626
+ HighsInt Highs_resetHighsOptions(void* highs);
2627
+
2628
+ HighsInt Highs_getHighsIntInfoValue(const void* highs, const char* info,
2629
+ HighsInt* value);
2630
+
2631
+ HighsInt Highs_getHighsDoubleInfoValue(const void* highs, const char* info,
2632
+ double* value);
2633
+
2634
+ HighsInt Highs_getNumCols(const void* highs);
2635
+
2636
+ HighsInt Highs_getNumRows(const void* highs);
2637
+
2638
+ double Highs_getHighsInfinity(const void* highs);
2639
+
2640
+ double Highs_getHighsRunTime(const void* highs);
2641
+
2642
+ HighsInt Highs_setOptionValue(void* highs, const char* option,
2643
+ const char* value);
2644
+
2645
+ HighsInt Highs_getScaledModelStatus(const void* highs);
2646
+
2647
+ #ifdef __cplusplus
2648
+ }
2649
+ #endif
2650
+
2651
+ #endif