casadi 3.6.5__cp39-none-manylinux2014_x86_64.whl → 3.6.7__cp39-none-manylinux2014_x86_64.whl

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 (429) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi.py +739 -308
  3. casadi/cbc +0 -0
  4. casadi/clp +0 -0
  5. casadi/cmake/casadi-config-version.cmake +1 -1
  6. casadi/cmake/highs/highs-config.cmake +6 -13
  7. casadi/cmake/highs/highs-targets-release.cmake +13 -13
  8. casadi/cmake/highs/highs-targets.cmake +13 -10
  9. casadi/highs +0 -0
  10. casadi/include/casadi/casadi.i +3 -0
  11. casadi/include/casadi/casadi_c.h +2 -0
  12. casadi/include/casadi/config.h +8 -8
  13. casadi/include/casadi/core/casadi_common.hpp +1 -0
  14. casadi/include/casadi/core/casadi_misc.hpp +52 -0
  15. casadi/include/casadi/core/casadi_types.hpp +3 -2
  16. casadi/include/casadi/core/code_generator.hpp +30 -1
  17. casadi/include/casadi/core/global_options.hpp +2 -0
  18. casadi/include/casadi/core/mx.hpp +18 -3
  19. casadi/include/casadi/core/optistack.hpp +23 -0
  20. casadi/include/casadi/core/runtime/casadi_nlp.hpp +19 -4
  21. casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
  22. casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
  23. casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
  24. casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
  25. casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
  26. casadi/include/casadi/core/serializing_stream.hpp +2 -2
  27. casadi/include/casadi/core/sparsity.hpp +7 -0
  28. casadi/include/casadi/doc.i +1513 -1016
  29. casadi/include/casadi/doc_merged.i +965 -719
  30. casadi/include/casadi/mem.h +1 -0
  31. casadi/include/daqp/api.h +46 -0
  32. casadi/include/daqp/auxiliary.h +29 -0
  33. casadi/include/daqp/bnb.h +32 -0
  34. casadi/include/daqp/codegen.h +18 -0
  35. casadi/include/daqp/constants.h +92 -0
  36. casadi/include/daqp/daqp.h +22 -0
  37. casadi/include/daqp/daqp_prox.h +18 -0
  38. casadi/include/daqp/factorization.h +18 -0
  39. casadi/include/daqp/types.h +161 -0
  40. casadi/include/daqp/utils.h +44 -0
  41. casadi/include/fatrop/auxiliary/Common.hpp +34 -0
  42. casadi/include/fatrop/auxiliary/DynamicLib.hpp +34 -0
  43. casadi/include/fatrop/auxiliary/FatropOptions.hpp +68 -0
  44. casadi/include/fatrop/auxiliary/FatropVector.hpp +143 -0
  45. casadi/include/fatrop/auxiliary/LinearAlgebra.hpp +88 -0
  46. casadi/include/fatrop/auxiliary/VectorUtils.hpp +54 -0
  47. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +493 -0
  48. casadi/include/fatrop/fatrop.hpp +39 -0
  49. casadi/include/fatrop/function_evaluation/CasadiCodegen.hpp +104 -0
  50. casadi/include/fatrop/function_evaluation/FunctionEvaluation.hpp +60 -0
  51. casadi/include/fatrop/json/json.h +946 -0
  52. casadi/include/fatrop/ocp/CasadiCApiUserdataWrap.hpp +87 -0
  53. casadi/include/fatrop/ocp/DuInfEvaluator.hpp +38 -0
  54. casadi/include/fatrop/ocp/FatropOCP.hpp +161 -0
  55. casadi/include/fatrop/ocp/FatropOCPBuilder.hpp +52 -0
  56. casadi/include/fatrop/ocp/FatropOCPResto.hpp +299 -0
  57. casadi/include/fatrop/ocp/OCP.hpp +82 -0
  58. casadi/include/fatrop/ocp/OCPAbstract.hpp +254 -0
  59. casadi/include/fatrop/ocp/OCPAdapter.hpp +197 -0
  60. casadi/include/fatrop/ocp/OCPCInterface.h +289 -0
  61. casadi/include/fatrop/ocp/OCPDims.hpp +60 -0
  62. casadi/include/fatrop/ocp/OCPInitializer.hpp +41 -0
  63. casadi/include/fatrop/ocp/OCPKKT.hpp +69 -0
  64. casadi/include/fatrop/ocp/OCPLSRiccati.hpp +198 -0
  65. casadi/include/fatrop/ocp/OCPLSScaler.hpp +66 -0
  66. casadi/include/fatrop/ocp/OCPLinearSolver.hpp +75 -0
  67. casadi/include/fatrop/ocp/OCPNoScaling.hpp +42 -0
  68. casadi/include/fatrop/ocp/OCPScalingMethod.hpp +42 -0
  69. casadi/include/fatrop/ocp/StageOCP.hpp +592 -0
  70. casadi/include/fatrop/ocp/StageOCPApplication.hpp +242 -0
  71. casadi/include/fatrop/ocp/StageOCPExpressions.hpp +182 -0
  72. casadi/include/fatrop/ocp/UStageEvalAbstract.hpp +168 -0
  73. casadi/include/fatrop/ocp/UStageOCPImpl.hpp +152 -0
  74. casadi/include/fatrop/quasi_newton/bfgs.hpp +159 -0
  75. casadi/include/fatrop/solver/AlgBuilder.hpp +76 -0
  76. casadi/include/fatrop/solver/AlgStrategy.hpp +33 -0
  77. casadi/include/fatrop/solver/FatropAlg.hpp +121 -0
  78. casadi/include/fatrop/solver/FatropData.hpp +188 -0
  79. casadi/include/fatrop/solver/FatropOptions.hpp +95 -0
  80. casadi/include/fatrop/solver/FatropPrinter.hpp +65 -0
  81. casadi/include/fatrop/solver/FatropStats.hpp +63 -0
  82. casadi/include/fatrop/solver/Filter.hpp +54 -0
  83. casadi/include/fatrop/solver/IterationData.hpp +56 -0
  84. casadi/include/fatrop/solver/LineSearch.hpp +86 -0
  85. casadi/include/fatrop/solver/NLPL1.hpp +263 -0
  86. casadi/include/fatrop/templates/NLPAlg.hpp +104 -0
  87. casadi/include/highs/HConfig.h +6 -5
  88. casadi/include/highs/Highs.h +93 -23
  89. casadi/include/highs/filereaderlp/def.hpp +19 -0
  90. casadi/include/highs/interfaces/highs_c_api.h +200 -24
  91. casadi/include/highs/io/Filereader.h +1 -1
  92. casadi/include/highs/io/FilereaderEms.h +1 -1
  93. casadi/include/highs/io/FilereaderLp.h +1 -1
  94. casadi/include/highs/io/FilereaderMps.h +1 -1
  95. casadi/include/highs/io/HMPSIO.h +1 -1
  96. casadi/include/highs/io/HMpsFF.h +5 -3
  97. casadi/include/highs/io/HighsIO.h +18 -8
  98. casadi/include/highs/io/LoadOptions.h +1 -1
  99. casadi/include/highs/ipm/IpxSolution.h +35 -0
  100. casadi/include/highs/ipm/IpxWrapper.h +1 -1
  101. casadi/include/highs/ipm/basiclu/basiclu.h +161 -0
  102. casadi/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  103. casadi/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  104. casadi/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  105. casadi/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  106. casadi/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  107. casadi/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  108. casadi/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  109. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  110. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  111. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  112. casadi/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  113. casadi/include/highs/ipm/basiclu/basiclu_object.h +30 -0
  114. casadi/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  115. casadi/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  116. casadi/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  117. casadi/include/highs/ipm/basiclu/basiclu_update.h +125 -0
  118. casadi/include/highs/ipm/basiclu/lu_def.h +39 -0
  119. casadi/include/highs/ipm/basiclu/lu_file.h +21 -0
  120. casadi/include/highs/ipm/basiclu/lu_internal.h +220 -0
  121. casadi/include/highs/ipm/basiclu/lu_list.h +168 -0
  122. casadi/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
  123. casadi/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  124. casadi/include/highs/ipm/ipx/basis.h +351 -0
  125. casadi/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
  126. casadi/include/highs/ipm/ipx/control.h +163 -0
  127. casadi/include/highs/ipm/ipx/crossover.h +157 -0
  128. casadi/include/highs/ipm/ipx/diagonal_precond.h +45 -0
  129. casadi/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
  130. casadi/include/highs/ipm/ipx/guess_basis.h +21 -0
  131. casadi/include/highs/ipm/ipx/indexed_vector.h +113 -0
  132. casadi/include/highs/ipm/ipx/info.h +27 -0
  133. casadi/include/highs/ipm/ipx/ipm.h +94 -0
  134. casadi/include/highs/ipm/ipx/ipx_c.h +47 -0
  135. casadi/include/highs/ipm/ipx/ipx_config.h +9 -0
  136. casadi/include/highs/ipm/ipx/ipx_info.h +111 -0
  137. casadi/include/highs/ipm/ipx/ipx_internal.h +88 -0
  138. casadi/include/highs/ipm/ipx/ipx_parameters.h +75 -0
  139. casadi/include/highs/ipm/ipx/ipx_status.h +57 -0
  140. casadi/include/highs/ipm/ipx/iterate.h +328 -0
  141. casadi/include/highs/ipm/ipx/kkt_solver.h +70 -0
  142. casadi/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  143. casadi/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  144. casadi/include/highs/ipm/ipx/linear_operator.h +26 -0
  145. casadi/include/highs/ipm/ipx/lp_solver.h +201 -0
  146. casadi/include/highs/ipm/ipx/lu_factorization.h +79 -0
  147. casadi/include/highs/ipm/ipx/lu_update.h +129 -0
  148. casadi/include/highs/ipm/ipx/maxvolume.h +54 -0
  149. casadi/include/highs/ipm/ipx/model.h +409 -0
  150. casadi/include/highs/ipm/ipx/multistream.h +52 -0
  151. casadi/include/highs/ipm/ipx/normal_matrix.h +44 -0
  152. casadi/include/highs/ipm/ipx/power_method.h +44 -0
  153. casadi/include/highs/ipm/ipx/sparse_matrix.h +195 -0
  154. casadi/include/highs/ipm/ipx/sparse_utils.h +58 -0
  155. casadi/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  156. casadi/include/highs/ipm/ipx/starting_basis.h +39 -0
  157. casadi/include/highs/ipm/ipx/symbolic_invert.h +29 -0
  158. casadi/include/highs/ipm/ipx/timer.h +24 -0
  159. casadi/include/highs/ipm/ipx/utils.h +39 -0
  160. casadi/include/highs/lp_data/HConst.h +20 -10
  161. casadi/include/highs/lp_data/HStruct.h +23 -1
  162. casadi/include/highs/lp_data/HighsAnalysis.h +1 -1
  163. casadi/include/highs/lp_data/HighsCallback.h +10 -3
  164. casadi/include/highs/lp_data/HighsCallbackStruct.h +31 -5
  165. casadi/include/highs/lp_data/HighsDebug.h +1 -1
  166. casadi/include/highs/lp_data/HighsInfo.h +20 -2
  167. casadi/include/highs/lp_data/HighsInfoDebug.h +1 -1
  168. casadi/include/highs/lp_data/HighsLp.h +17 -1
  169. casadi/include/highs/lp_data/HighsLpSolverObject.h +1 -1
  170. casadi/include/highs/lp_data/HighsLpUtils.h +19 -19
  171. casadi/include/highs/lp_data/HighsModelUtils.h +1 -1
  172. casadi/include/highs/lp_data/HighsOptions.h +237 -10
  173. casadi/include/highs/lp_data/HighsRanging.h +1 -1
  174. casadi/include/highs/lp_data/HighsRuntimeOptions.h +2 -2
  175. casadi/include/highs/lp_data/HighsSolution.h +2 -2
  176. casadi/include/highs/lp_data/HighsSolutionDebug.h +1 -1
  177. casadi/include/highs/lp_data/HighsSolve.h +3 -1
  178. casadi/include/highs/lp_data/HighsStatus.h +1 -1
  179. casadi/include/highs/mip/HighsCliqueTable.h +4 -4
  180. casadi/include/highs/mip/HighsConflictPool.h +1 -1
  181. casadi/include/highs/mip/HighsCutGeneration.h +1 -1
  182. casadi/include/highs/mip/HighsCutPool.h +2 -2
  183. casadi/include/highs/mip/HighsDebugSol.h +22 -29
  184. casadi/include/highs/mip/HighsDomain.h +10 -2
  185. casadi/include/highs/mip/HighsDomainChange.h +1 -1
  186. casadi/include/highs/mip/HighsDynamicRowMatrix.h +5 -3
  187. casadi/include/highs/mip/HighsGFkSolve.h +3 -3
  188. casadi/include/highs/mip/HighsImplications.h +3 -3
  189. casadi/include/highs/mip/HighsLpAggregator.h +1 -1
  190. casadi/include/highs/mip/HighsLpRelaxation.h +6 -1
  191. casadi/include/highs/mip/HighsMipSolver.h +4 -2
  192. casadi/include/highs/mip/HighsMipSolverData.h +47 -4
  193. casadi/include/highs/mip/HighsModkSeparator.h +2 -2
  194. casadi/include/highs/mip/HighsNodeQueue.h +5 -3
  195. casadi/include/highs/mip/HighsObjectiveFunction.h +1 -1
  196. casadi/include/highs/mip/HighsPathSeparator.h +2 -2
  197. casadi/include/highs/mip/HighsPrimalHeuristics.h +1 -1
  198. casadi/include/highs/mip/HighsPseudocost.h +35 -23
  199. casadi/include/highs/mip/HighsRedcostFixing.h +1 -1
  200. casadi/include/highs/mip/HighsSearch.h +2 -1
  201. casadi/include/highs/mip/HighsSeparation.h +1 -1
  202. casadi/include/highs/mip/HighsSeparator.h +1 -1
  203. casadi/include/highs/mip/HighsTableauSeparator.h +1 -1
  204. casadi/include/highs/mip/HighsTransformedLp.h +1 -1
  205. casadi/include/highs/model/HighsHessian.h +5 -0
  206. casadi/include/highs/model/HighsHessianUtils.h +2 -0
  207. casadi/include/highs/model/HighsModel.h +10 -1
  208. casadi/include/highs/parallel/HighsMutex.h +2 -1
  209. casadi/include/highs/parallel/HighsParallel.h +7 -2
  210. casadi/include/highs/parallel/HighsTask.h +1 -2
  211. casadi/include/highs/pdlp/CupdlpWrapper.h +93 -0
  212. casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +41 -0
  213. casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +423 -0
  214. casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +183 -0
  215. casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  216. casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  217. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +28 -0
  218. casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +98 -0
  219. casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +33 -0
  220. casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +1726 -0
  221. casadi/include/highs/pdqsort/pdqsort.h +532 -0
  222. casadi/include/highs/presolve/HPresolve.h +27 -14
  223. casadi/include/highs/presolve/HPresolveAnalysis.h +1 -1
  224. casadi/include/highs/presolve/HighsPostsolveStack.h +92 -68
  225. casadi/include/highs/presolve/HighsSymmetry.h +6 -5
  226. casadi/include/highs/presolve/ICrash.h +8 -2
  227. casadi/include/highs/presolve/ICrashUtil.h +1 -1
  228. casadi/include/highs/presolve/ICrashX.h +1 -1
  229. casadi/include/highs/presolve/PresolveComponent.h +1 -1
  230. casadi/include/highs/qpsolver/a_asm.hpp +23 -12
  231. casadi/include/highs/qpsolver/a_quass.hpp +8 -1
  232. casadi/include/highs/qpsolver/basis.hpp +150 -0
  233. casadi/include/highs/qpsolver/crashsolution.hpp +12 -0
  234. casadi/include/highs/qpsolver/dantzigpricing.hpp +72 -0
  235. casadi/include/highs/qpsolver/devexpricing.hpp +99 -0
  236. casadi/include/highs/qpsolver/eventhandler.hpp +23 -0
  237. casadi/include/highs/qpsolver/factor.hpp +400 -0
  238. casadi/include/highs/qpsolver/feasibility_bounded.hpp +105 -0
  239. casadi/include/highs/qpsolver/feasibility_highs.hpp +270 -0
  240. casadi/include/highs/qpsolver/gradient.hpp +39 -0
  241. casadi/include/highs/qpsolver/instance.hpp +63 -0
  242. casadi/include/highs/qpsolver/matrix.hpp +335 -0
  243. casadi/include/highs/qpsolver/pricing.hpp +15 -0
  244. casadi/include/highs/qpsolver/qpconst.hpp +27 -0
  245. casadi/include/highs/qpsolver/{vector.hpp → qpvector.hpp} +25 -25
  246. casadi/include/highs/qpsolver/quass.hpp +1 -1
  247. casadi/include/highs/qpsolver/ratiotest.hpp +19 -0
  248. casadi/include/highs/qpsolver/runtime.hpp +38 -0
  249. casadi/include/highs/qpsolver/settings.hpp +57 -0
  250. casadi/include/highs/qpsolver/snippets.hpp +29 -0
  251. casadi/include/highs/qpsolver/statistics.hpp +23 -0
  252. casadi/include/highs/qpsolver/steepestedgepricing.hpp +167 -0
  253. casadi/include/highs/simplex/HApp.h +1 -1
  254. casadi/include/highs/simplex/HEkk.h +52 -18
  255. casadi/include/highs/simplex/HEkkDual.h +1 -1
  256. casadi/include/highs/simplex/HEkkDualRHS.h +6 -7
  257. casadi/include/highs/simplex/HEkkDualRow.h +2 -2
  258. casadi/include/highs/simplex/HEkkPrimal.h +6 -1
  259. casadi/include/highs/simplex/HSimplex.h +1 -3
  260. casadi/include/highs/simplex/HSimplexDebug.h +1 -1
  261. casadi/include/highs/simplex/HSimplexNla.h +1 -1
  262. casadi/include/highs/simplex/HSimplexReport.h +1 -1
  263. casadi/include/highs/simplex/HighsSimplexAnalysis.h +228 -100
  264. casadi/include/highs/simplex/SimplexConst.h +1 -1
  265. casadi/include/highs/simplex/SimplexStruct.h +2 -2
  266. casadi/include/highs/simplex/SimplexTimer.h +1 -1
  267. casadi/include/highs/test/DevKkt.h +1 -1
  268. casadi/include/highs/test/KktCh2.h +1 -1
  269. casadi/include/highs/util/FactorTimer.h +1 -1
  270. casadi/include/highs/util/HFactor.h +35 -6
  271. casadi/include/highs/util/HFactorConst.h +1 -1
  272. casadi/include/highs/util/HFactorDebug.h +1 -1
  273. casadi/include/highs/util/HSet.h +1 -1
  274. casadi/include/highs/util/HVector.h +1 -1
  275. casadi/include/highs/util/HVectorBase.h +1 -1
  276. casadi/include/highs/util/HighsCDouble.h +3 -3
  277. casadi/include/highs/util/HighsComponent.h +1 -1
  278. casadi/include/highs/util/HighsDataStack.h +4 -4
  279. casadi/include/highs/util/HighsDisjointSets.h +1 -1
  280. casadi/include/highs/util/HighsHash.h +28 -21
  281. casadi/include/highs/util/HighsHashTree.h +63 -63
  282. casadi/include/highs/util/HighsInt.h +1 -1
  283. casadi/include/highs/util/HighsIntegers.h +8 -9
  284. casadi/include/highs/util/HighsLinearSumBounds.h +1 -1
  285. casadi/include/highs/util/HighsMatrixPic.h +1 -1
  286. casadi/include/highs/util/HighsMatrixSlice.h +9 -6
  287. casadi/include/highs/util/HighsMatrixUtils.h +1 -1
  288. casadi/include/highs/util/HighsMemoryAllocation.h +55 -0
  289. casadi/include/highs/util/HighsRandom.h +27 -15
  290. casadi/include/highs/util/HighsRbTree.h +2 -2
  291. casadi/include/highs/util/HighsSort.h +7 -7
  292. casadi/include/highs/util/HighsSparseMatrix.h +5 -2
  293. casadi/include/highs/util/HighsSparseVectorSum.h +2 -2
  294. casadi/include/highs/util/HighsSplay.h +1 -1
  295. casadi/include/highs/util/HighsTimer.h +18 -9
  296. casadi/include/highs/util/HighsUtils.h +15 -8
  297. casadi/include/highs/util/stringutil.h +9 -4
  298. casadi/include/highs/zstr/strict_fstream.hpp +237 -0
  299. casadi/include/highs/zstr/zstr.hpp +472 -0
  300. casadi/include/highs_export.h +42 -0
  301. casadi/include/licenses/daqp-external/LICENSE +21 -0
  302. casadi/include/licenses/fatrop-external/LICENSE.txt +165 -0
  303. casadi/include/licenses/fatrop-external/external/blasfeo/LICENSE.txt +26 -0
  304. casadi/include/licenses/fatrop-external/external/pybind11/LICENSE +29 -0
  305. casadi/include/licenses/highs-external/{LICENSE → LICENSE.txt} +1 -1
  306. casadi/include/osqp/constants.h +2 -3
  307. casadi/include/osqp/version.h +9 -0
  308. casadi/include/sleqp/defs.h +2 -2
  309. casadi/lib64/libtinyxml2.a +0 -0
  310. casadi/libCbcSolver.so +0 -0
  311. casadi/libCbcSolver.so.3 +0 -0
  312. casadi/libCbcSolver.so.3.10.11 +0 -0
  313. casadi/libClpSolver.so +0 -0
  314. casadi/libClpSolver.so.1 +0 -0
  315. casadi/libClpSolver.so.1.14.9 +0 -0
  316. casadi/libbonmin.so +0 -0
  317. casadi/libbonmin.so.4 +0 -0
  318. casadi/libbonmin.so.4.8.9 +0 -0
  319. casadi/libcasadi.so +0 -0
  320. casadi/libcasadi.so.3.7 +0 -0
  321. casadi/libcasadi_conic_cbc.so +0 -0
  322. casadi/libcasadi_conic_cbc.so.3.7 +0 -0
  323. casadi/libcasadi_conic_clp.so +0 -0
  324. casadi/libcasadi_conic_clp.so.3.7 +0 -0
  325. casadi/libcasadi_conic_cplex.so +0 -0
  326. casadi/libcasadi_conic_cplex.so.3.7 +0 -0
  327. casadi/libcasadi_conic_daqp.so +0 -0
  328. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  329. casadi/libcasadi_conic_fatrop.so +0 -0
  330. casadi/libcasadi_conic_fatrop.so.3.7 +0 -0
  331. casadi/libcasadi_conic_gurobi.so +0 -0
  332. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  333. casadi/libcasadi_conic_highs.so +0 -0
  334. casadi/libcasadi_conic_highs.so.3.7 +0 -0
  335. casadi/libcasadi_conic_hpipm.so +0 -0
  336. casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
  337. casadi/libcasadi_conic_ipqp.so +0 -0
  338. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  339. casadi/libcasadi_conic_nlpsol.so +0 -0
  340. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  341. casadi/libcasadi_conic_osqp.so +0 -0
  342. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  343. casadi/libcasadi_conic_proxqp.so +0 -0
  344. casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
  345. casadi/libcasadi_conic_qpoases.so +0 -0
  346. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  347. casadi/libcasadi_conic_qrqp.so +0 -0
  348. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  349. casadi/libcasadi_conic_superscs.so +0 -0
  350. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  351. casadi/libcasadi_integrator_collocation.so +0 -0
  352. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  353. casadi/libcasadi_integrator_cvodes.so +0 -0
  354. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  355. casadi/libcasadi_integrator_idas.so +0 -0
  356. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  357. casadi/libcasadi_integrator_rk.so +0 -0
  358. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  359. casadi/libcasadi_nlpsol_alpaqa.so +0 -0
  360. casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
  361. casadi/libcasadi_nlpsol_ampl.so +0 -0
  362. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  363. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  364. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  365. casadi/libcasadi_nlpsol_bonmin.so +0 -0
  366. casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
  367. casadi/libcasadi_nlpsol_fatrop.so +0 -0
  368. casadi/libcasadi_nlpsol_fatrop.so.3.7 +0 -0
  369. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  370. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  371. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  372. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  373. casadi/libcasadi_nlpsol_knitro.so +0 -0
  374. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  375. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  376. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  377. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  378. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  379. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  380. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  381. casadi/libcasadi_nlpsol_sleqp.so +0 -0
  382. casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
  383. casadi/libcasadi_nlpsol_snopt.so +0 -0
  384. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  385. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  386. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  387. casadi/libcasadi_nlpsol_worhp.so +0 -0
  388. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  389. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  390. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  391. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  392. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  393. casadi/libcasadi_rootfinder_newton.so +0 -0
  394. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  395. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  396. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  397. casadi/libcasadi_sundials_common.so +0 -0
  398. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  399. casadi/libcoinmetis.la +1 -1
  400. casadi/libcoinmetis.so +0 -0
  401. casadi/libcoinmetis.so.2 +0 -0
  402. casadi/libcoinmetis.so.2.0.0 +0 -0
  403. casadi/libdaqp.so +0 -0
  404. casadi/libdaqpstat.a +0 -0
  405. casadi/libfatrop.so +0 -0
  406. casadi/libhighs.so +0 -0
  407. casadi/libhighs.so.1 +0 -0
  408. casadi/libhighs.so.1.7.2 +0 -0
  409. casadi/libindirect.a +0 -0
  410. casadi/liblinsys.a +0 -0
  411. casadi/libmatlab_ipc.so +0 -0
  412. casadi/libosqp.a +0 -0
  413. casadi/libosqp.so +0 -0
  414. casadi/libqdldl.a +0 -0
  415. casadi/libsleqp.so +0 -0
  416. casadi/libsleqp.so.1.0.1 +0 -0
  417. casadi/libspral.a +0 -0
  418. casadi/libsuperscs.a +0 -0
  419. casadi/pkgconfig/casadi.pc +1 -1
  420. casadi/pkgconfig/highs.pc +1 -1
  421. casadi/tools/__init__.py +4 -0
  422. casadi/tools/bounds.py +3 -3
  423. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/METADATA +2 -2
  424. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/RECORD +425 -255
  425. casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
  426. casadi/libFortranHighs.so +0 -0
  427. casadi/libhighs.so.1.6 +0 -0
  428. casadi/libhighs.so.1.6.0 +0 -0
  429. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -32,7 +32,7 @@ class HighsCDouble {
32
32
  // Proceedings of. 2005.
33
33
 
34
34
  /// performs an exact transformation such that x + y = a + b
35
- /// and x = double(a + b). The operation uses 6 flops (addition/substraction).
35
+ /// and x = double(a + b). The operation uses 6 flops (addition/subtraction).
36
36
  static void two_sum(double& x, double& y, double a, double b) {
37
37
  x = a + b;
38
38
  double z = x - a;
@@ -50,7 +50,7 @@ class HighsCDouble {
50
50
 
51
51
  /// performs an exact transformation such that x + y = a * b
52
52
  /// and x = double(a * b). The operation uses 10 flops for
53
- /// addition/substraction and 7 flops for multiplication.
53
+ /// addition/subtraction and 7 flops for multiplication.
54
54
  static void two_product(double& x, double& y, double a, double b) {
55
55
  x = a * b;
56
56
  double a1, a2, b1, b2;
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -29,7 +29,7 @@
29
29
 
30
30
  class HighsDataStack {
31
31
  std::vector<char> data;
32
- HighsInt position;
32
+ std::size_t position;
33
33
 
34
34
  public:
35
35
  void resetPosition() { position = data.size(); }
@@ -78,9 +78,9 @@ class HighsDataStack {
78
78
  }
79
79
  }
80
80
 
81
- void setPosition(HighsInt position_) { this->position = position_; }
81
+ void setPosition(size_t position_) { this->position = position_; }
82
82
 
83
- HighsInt getCurrentDataSize() const { return data.size(); }
83
+ size_t getCurrentDataSize() const { return data.size(); }
84
84
  };
85
85
 
86
86
  #endif
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -130,7 +130,7 @@ struct HighsHashHelpers {
130
130
 
131
131
  static int popcnt(uint64_t x) {
132
132
  #ifdef _WIN64
133
- return __popcnt64(x);
133
+ return static_cast<int>(__popcnt64(x));
134
134
  #else
135
135
  return __popcnt(x & 0xffffffffu) + __popcnt(x >> 32);
136
136
  #endif
@@ -253,7 +253,7 @@ struct HighsHashHelpers {
253
253
  u64 result = u64(a) * u64(b);
254
254
  result = (result >> 31) + (result & M31());
255
255
  if (result >= M31()) result -= M31();
256
- return result;
256
+ return static_cast<u32>(result);
257
257
  }
258
258
 
259
259
  static u32 modexp_M31(u32 a, u64 e) {
@@ -277,7 +277,8 @@ struct HighsHashHelpers {
277
277
 
278
278
  template <HighsInt k>
279
279
  static u64 pair_hash(u32 a, u32 b) {
280
- return (a + c[2 * k]) * (b + c[2 * k + 1]);
280
+ return (static_cast<u64>(a) + c[2 * k]) *
281
+ (static_cast<u64>(b) + c[2 * k + 1]);
281
282
  }
282
283
 
283
284
  static void sparse_combine(u64& hash, HighsInt index, u64 value) {
@@ -383,18 +384,20 @@ struct HighsHashHelpers {
383
384
  // which we evaluate at the random vector of 16.
384
385
 
385
386
  // make sure input value is never zero and at most 31bits are used
386
- value = (pair_hash<0>(value, value >> 32) >> 33) | 1;
387
+ value = (pair_hash<0>(static_cast<u32>(value), value >> 32) >> 33) | 1;
387
388
 
388
389
  // make sure that the constant has at most 31 bits, as otherwise the modulo
389
390
  // algorithm for multiplication mod M31 might not work properly due to
390
391
  // overflow
391
- u32 a = c[index & 63] & M31();
392
+ u32 a = static_cast<u32>(c[index & 63] & M31());
392
393
  HighsInt degree = (index >> 6) + 1;
393
394
 
394
- hash += multiply_modM31(value, modexp_M31(a, degree));
395
- hash = (hash >> 31) + (hash & M31());
396
- if (hash >= M31()) hash -= M31();
397
- assert(hash < M31());
395
+ u64 result = hash;
396
+ result += multiply_modM31(static_cast<u32>(value), modexp_M31(a, degree));
397
+ result = (result >> 31) + (result & M31());
398
+ if (result >= M31()) result -= M31();
399
+ assert(result < M31());
400
+ hash = static_cast<u32>(result);
398
401
  }
399
402
 
400
403
  static void sparse_inverse_combine32(u32& hash, HighsInt index, u64 value) {
@@ -407,16 +410,19 @@ struct HighsHashHelpers {
407
410
  // procedure.
408
411
 
409
412
  // make sure input value is never zero and at most 31bits are used
410
- value = (pair_hash<0>(value, value >> 32) >> 33) | 1;
413
+ value = (pair_hash<0>(static_cast<u32>(value), value >> 32) >> 33) | 1;
411
414
 
412
- u32 a = c[index & 63] & M31();
415
+ u32 a = static_cast<u32>(c[index & 63] & M31());
413
416
  HighsInt degree = (index >> 6) + 1;
414
417
  // add the additive inverse (M31() - hashvalue) instead of the hash value
415
418
  // itself
416
- hash += M31() - multiply_modM31(value, modexp_M31(a, degree));
417
- hash = (hash >> 31) + (hash & M31());
418
- if (hash >= M31()) hash -= M31();
419
- assert(hash < M31());
419
+ u64 result = hash;
420
+ result +=
421
+ M31() - multiply_modM31(static_cast<u32>(value), modexp_M31(a, degree));
422
+ result = (result >> 31) + (result & M31());
423
+ if (result >= M31()) result -= M31();
424
+ assert(result < M31());
425
+ hash = static_cast<u32>(result);
420
426
  }
421
427
 
422
428
  static constexpr u64 fibonacci_muliplier() { return u64{0x9e3779b97f4a7c15}; }
@@ -746,7 +752,8 @@ struct HighsHashHelpers {
746
752
  // now be different values which exhibit the same pattern as the 0.5 case,
747
753
  // but they do not have a small denominator like 1/2 in their rational
748
754
  // representation but are power of two multiples of the golden ratio and
749
- // therefore irrational, which we do not expect in non-artifical input data.
755
+ // therefore irrational, which we do not expect in non-artificial input
756
+ // data.
750
757
  int exponent;
751
758
  double hashbits = std::frexp(val * golden_ratio_reciprocal(), &exponent);
752
759
 
@@ -813,7 +820,7 @@ struct HighsHashTableEntry {
813
820
  // and the value as default
814
821
  // the enable if statement makes sure this overload is never selected
815
822
  // when the type of the single argument is HighsHashTableEntry<K,V> so that
816
- // the default move and copy constructures are preferred when they match
823
+ // the default move and copy constructors are preferred when they match
817
824
  // and this is only used to initialize the key type from a single argument.
818
825
  template <
819
826
  typename K_,
@@ -868,7 +875,7 @@ struct HighsHashTableEntry<T, void> {
868
875
  // Add a constructor to accept an arbitrary argument pack for initialize the
869
876
  // underlying value of type T. The enable if statement makes sure this
870
877
  // overload is never selected when the type of the single argument is
871
- // HighsHashTableEntry<T,void> so that the default move and copy constructures
878
+ // HighsHashTableEntry<T,void> so that the default move and copy constructors
872
879
  // are preferred when they match and this is only used to initialize the value
873
880
  // of type from a set of arguments which are properly forwarded.
874
881
  // The std::tuple usage in enable_if is a work-around to make the statement
@@ -981,8 +988,8 @@ class HighsHashTable {
981
988
 
982
989
  HighsHashTable() { makeEmptyTable(128); }
983
990
  HighsHashTable(u64 minCapacity) {
984
- u64 initCapacity = u64{1} << (u64)std::ceil(
985
- std::log2(std::max(128.0, 8 * minCapacity / 7.0)));
991
+ u64 initCapacity = u64{1} << (u64)std::ceil(std::log2(std::max(
992
+ 128.0, 8 * static_cast<double>(minCapacity) / 7)));
986
993
  makeEmptyTable(initCapacity);
987
994
  }
988
995
 
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -143,39 +143,22 @@ class HighsHashTree {
143
143
  --pos;
144
144
  while (hashes[pos] > hash) ++pos;
145
145
 
146
- while (pos != size && hashes[pos] == hash) {
147
- if (entry.key() == entries[pos].key())
148
- return std::make_pair(&entries[pos].value(), false);
146
+ if (find_key(entry.key(), hash, pos))
147
+ return std::make_pair(&entries[pos].value(), false);
149
148
 
150
- ++pos;
151
- }
152
-
153
- if (pos < size) {
154
- std::move_backward(&entries[pos], &entries[size], &entries[size + 1]);
155
- memmove(&hashes[pos + 1], &hashes[pos],
156
- sizeof(hashes[0]) * (size - pos));
157
- }
158
-
159
- entries[pos] = std::move(entry);
160
- hashes[pos] = hash;
161
- ++size;
162
- hashes[size] = 0;
163
149
  } else {
164
150
  occupation.set(hashChunk);
165
151
 
166
- if (pos < size) {
152
+ if (pos < size)
167
153
  while (hashes[pos] > hash) ++pos;
168
- std::move_backward(&entries[pos], &entries[size], &entries[size + 1]);
169
- memmove(&hashes[pos + 1], &hashes[pos],
170
- sizeof(hashes[0]) * (size - pos));
171
- }
172
-
173
- entries[pos] = std::move(entry);
174
- hashes[pos] = hash;
175
- ++size;
176
- hashes[size] = 0;
177
154
  }
178
155
 
156
+ if (pos < size) move_backward(pos, size);
157
+ entries[pos] = std::move(entry);
158
+ hashes[pos] = hash;
159
+ ++size;
160
+ hashes[size] = 0;
161
+
179
162
  return std::make_pair(&entries[pos].value(), true);
180
163
  }
181
164
 
@@ -187,10 +170,7 @@ class HighsHashTree {
187
170
  int pos = occupation.num_set_until(hashChunk) - 1;
188
171
  while (hashes[pos] > hash) ++pos;
189
172
 
190
- while (pos != size && hashes[pos] == hash) {
191
- if (key == entries[pos].key()) return &entries[pos].value();
192
- ++pos;
193
- }
173
+ if (find_key(key, hash, pos)) return &entries[pos].value();
194
174
 
195
175
  return nullptr;
196
176
  }
@@ -206,26 +186,20 @@ class HighsHashTree {
206
186
  int pos = startPos;
207
187
  while (hashes[pos] > hash) ++pos;
208
188
 
209
- while (pos != size && hashes[pos] == hash) {
210
- if (key == entries[pos].key()) {
211
- --size;
212
- if (pos < size) {
213
- std::move(&entries[pos + 1], &entries[size + 1], &entries[pos]);
214
- memmove(&hashes[pos], &hashes[pos + 1],
215
- sizeof(hashes[0]) * (size - pos));
216
- if (get_first_chunk16(hashes[startPos]) != hashChunk)
217
- occupation.flip(hashChunk);
218
- } else if (startPos == pos)
219
- occupation.flip(hashChunk);
220
-
221
- hashes[size] = 0;
222
- return true;
223
- }
189
+ if (!find_key(key, hash, pos)) return false;
224
190
 
225
- ++pos;
226
- }
191
+ --size;
192
+ if (pos < size) {
193
+ std::move(&entries[pos + 1], &entries[size + 1], &entries[pos]);
194
+ memmove(&hashes[pos], &hashes[pos + 1],
195
+ sizeof(hashes[0]) * (size - pos));
196
+ if (get_first_chunk16(hashes[startPos]) != hashChunk)
197
+ occupation.flip(hashChunk);
198
+ } else if (startPos == pos)
199
+ occupation.flip(hashChunk);
227
200
 
228
- return false;
201
+ hashes[size] = 0;
202
+ return true;
229
203
  }
230
204
 
231
205
  void rehash(int hashPos) {
@@ -268,17 +242,31 @@ class HighsHashTree {
268
242
  // make space at that position, otherwise nothing needs to be done but
269
243
  // incrementing i increasing the sorted range by 1.
270
244
  if (pos < i) {
271
- uint16_t hash = hashes[i];
245
+ uint64_t hash = hashes[i];
272
246
  auto entry = std::move(entries[i]);
273
- std::move_backward(&entries[pos], &entries[i], &entries[i + 1]);
274
- memmove(&hashes[pos + 1], &hashes[pos],
275
- sizeof(hashes[0]) * (size - pos));
247
+ move_backward(pos, i);
276
248
  hashes[pos] = hash;
277
249
  entries[pos] = std::move(entry);
278
250
  }
279
251
  ++i;
280
252
  }
281
253
  }
254
+
255
+ void move_backward(const int& first, const int& last) {
256
+ // move elements backwards
257
+ std::move_backward(&entries[first], &entries[last], &entries[last + 1]);
258
+ memmove(&hashes[first + 1], &hashes[first],
259
+ sizeof(hashes[0]) * (last - first));
260
+ }
261
+
262
+ bool find_key(const K& key, const uint16_t& hash, int& pos) const {
263
+ // find key
264
+ while (pos != size && hashes[pos] == hash) {
265
+ if (key == entries[pos].key()) return true;
266
+ ++pos;
267
+ }
268
+ return false;
269
+ }
282
270
  };
283
271
 
284
272
  struct ListNode {
@@ -509,13 +497,15 @@ class HighsHashTree {
509
497
  int pos = HighsHashHelpers::log2i(matchMask);
510
498
  matchMask ^= (uint64_t{1} << pos);
511
499
 
512
- int i = leaf1->occupation.num_set_until(pos) + offset1;
500
+ int i =
501
+ leaf1->occupation.num_set_until(static_cast<uint8_t>(pos)) + offset1;
513
502
  while (get_first_chunk16(leaf1->hashes[i]) != pos) {
514
503
  ++i;
515
504
  ++offset1;
516
505
  }
517
506
 
518
- int j = leaf2->occupation.num_set_until(pos) + offset2;
507
+ int j =
508
+ leaf2->occupation.num_set_until(static_cast<uint8_t>(pos)) + offset2;
519
509
  while (get_first_chunk16(leaf2->hashes[j]) != pos) {
520
510
  ++j;
521
511
  ++offset2;
@@ -568,13 +558,15 @@ class HighsHashTree {
568
558
  int pos = HighsHashHelpers::log2i(matchMask);
569
559
  matchMask ^= (uint64_t{1} << pos);
570
560
 
571
- int i = leaf->occupation.num_set_until(pos) + offset;
561
+ int i = leaf->occupation.num_set_until(static_cast<uint8_t>(pos)) +
562
+ offset;
572
563
  while (get_first_chunk16(leaf->hashes[i]) != pos) {
573
564
  ++i;
574
565
  ++offset;
575
566
  }
576
567
 
577
- int j = branch->occupation.num_set_until(pos) - 1;
568
+ int j =
569
+ branch->occupation.num_set_until(static_cast<uint8_t>(pos)) - 1;
578
570
 
579
571
  do {
580
572
  if (find_recurse(branch->child[j],
@@ -654,7 +646,11 @@ class HighsHashTree {
654
646
  newNode = newLeafSize4;
655
647
  for (int i = 0; i <= newNumChild; ++i)
656
648
  mergeIntoLeaf(newLeafSize4, hashPos, branch->child[i]);
649
+ break;
657
650
  }
651
+ default:
652
+ // Unexpected result from 'entries_to_size_class'
653
+ assert(false);
658
654
  }
659
655
 
660
656
  destroyBranchingNode(branch);
@@ -815,11 +811,11 @@ class HighsHashTree {
815
811
  // maxsize in one bucket = number of items - (num buckets-1)
816
812
  // since each bucket has at least 1 item the largest one can only
817
813
  // have all remaining ones After adding the item: If it does not
818
- // collid
814
+ // collide
819
815
  int maxEntriesPerLeaf = 2 + leaf->size - branchSize;
820
816
 
821
817
  if (maxEntriesPerLeaf <= InnerLeaf<1>::capacity()) {
822
- // all items can go into the smalles leaf size
818
+ // all items can go into the smallest leaf size
823
819
  for (int i = 0; i < branchSize; ++i)
824
820
  branch->child[i] = new InnerLeaf<1>;
825
821
 
@@ -840,8 +836,7 @@ class HighsHashTree {
840
836
  hash, hashPos + 1, entry);
841
837
  } else {
842
838
  // there are many collisions, determine the exact sizes first
843
- uint8_t sizes[InnerLeaf<4>::capacity() + 1];
844
- memset(sizes, 0, branchSize);
839
+ uint8_t sizes[InnerLeaf<4>::capacity() + 1] = {};
845
840
  sizes[occupation.num_set_until(hashChunk) - 1] += 1;
846
841
  for (int i = 0; i < leaf->size; ++i) {
847
842
  int pos =
@@ -864,6 +859,9 @@ class HighsHashTree {
864
859
  case 4:
865
860
  branch->child[i] = new InnerLeaf<4>;
866
861
  break;
862
+ default:
863
+ // Unexpected result from 'entries_to_size_class'
864
+ assert(false);
867
865
  }
868
866
  }
869
867
 
@@ -1139,8 +1137,10 @@ class HighsHashTree {
1139
1137
 
1140
1138
  assert(((matchMask >> pos) & 1) == 0);
1141
1139
 
1142
- int location1 = branch1->occupation.num_set_until(pos) - 1;
1143
- int location2 = branch2->occupation.num_set_until(pos) - 1;
1140
+ int location1 =
1141
+ branch1->occupation.num_set_until(static_cast<uint8_t>(pos)) - 1;
1142
+ int location2 =
1143
+ branch2->occupation.num_set_until(static_cast<uint8_t>(pos)) - 1;
1144
1144
 
1145
1145
  const HighsHashTableEntry<K, V>* match =
1146
1146
  find_common_recurse(branch1->child[location1],
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -29,8 +29,7 @@ class HighsIntegers {
29
29
  }
30
30
 
31
31
  static double mod(double a, double m) {
32
- int64_t r = std::fmod(a, m);
33
- return r + (a < 0) * m;
32
+ return std::trunc(std::fmod(a, m)) + (a < 0) * m;
34
33
  }
35
34
 
36
35
  static int64_t nearestInteger(double x) {
@@ -38,7 +37,7 @@ class HighsIntegers {
38
37
  }
39
38
 
40
39
  static bool isIntegral(double x, double eps) {
41
- double y = std::fabs(x - (int64_t)x);
40
+ double y = std::fabs(x - std::trunc(x));
42
41
  return std::min(y, 1.0 - y) <= eps;
43
42
  }
44
43
 
@@ -118,8 +117,8 @@ class HighsIntegers {
118
117
  m[1] += m[0] * ai;
119
118
  m[3] += m[2] * ai;
120
119
 
121
- double x0 = m[0] / (double)m[2];
122
- double x1 = m[1] / (double)m[3];
120
+ double x0 = static_cast<double>(m[0]) / static_cast<double>(m[2]);
121
+ double x1 = static_cast<double>(m[1]) / static_cast<double>(m[3]);
123
122
  x = std::abs(x);
124
123
  double err0 = std::abs(x - x0);
125
124
  double err1 = std::abs(x - x1);
@@ -147,7 +146,7 @@ class HighsIntegers {
147
146
  expshift = std::max(-expshift, 0) + 3;
148
147
 
149
148
  // guard against making the largest value too big which may cause overflows
150
- // with intermdediate gcd values
149
+ // with intermediate gcd values
151
150
  int expMaxVal;
152
151
  std::frexp(maxval, &expMaxVal);
153
152
  expMaxVal = std::min(expMaxVal, 32);
@@ -195,7 +194,7 @@ class HighsIntegers {
195
194
  currgcd = gcd(currgcd, (int64_t) double(downval));
196
195
 
197
196
  // if the denominator is large, divide by the current gcd to prevent
198
- // unecessary overflows
197
+ // unnecessary overflows
199
198
  if (denom > std::numeric_limits<unsigned int>::max()) {
200
199
  denom /= currgcd;
201
200
  if (startdenom != 1) startdenom /= gcd(currgcd, startdenom);
@@ -204,7 +203,7 @@ class HighsIntegers {
204
203
  }
205
204
  }
206
205
 
207
- return denom / (double)currgcd;
206
+ return static_cast<double>(denom) / static_cast<double>(currgcd);
208
207
  }
209
208
 
210
209
  static double integralScale(const std::vector<double>& vals, double deltadown,
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */
@@ -196,10 +196,11 @@ class HighsMatrixSlice<HighsTripletListSlice> {
196
196
  using pointer = const HighsSliceNonzero*;
197
197
  using reference = const HighsSliceNonzero&;
198
198
 
199
- iterator(HighsInt node) : currentNode(node) {}
199
+ iterator(HighsInt node) : pos_(), nodeNext(nullptr), currentNode(node) {}
200
200
  iterator(const HighsInt* nodeIndex, const double* nodeValue,
201
201
  const HighsInt* nodeNext, HighsInt node)
202
- : pos_(nodeIndex + node, nodeValue + node),
202
+ : pos_(node == -1 ? nullptr : nodeIndex + node,
203
+ node == -1 ? nullptr : nodeValue + node),
203
204
  nodeNext(nodeNext),
204
205
  currentNode(node) {}
205
206
  iterator() = default;
@@ -275,7 +276,8 @@ class HighsMatrixSlice<HighsTripletTreeSlicePreOrder> {
275
276
  using pointer = const HighsSliceNonzero*;
276
277
  using reference = const HighsSliceNonzero&;
277
278
 
278
- iterator(HighsInt node) : currentNode(node) {}
279
+ iterator(HighsInt node)
280
+ : pos_(), nodeLeft(nullptr), nodeRight(nullptr), currentNode(node) {}
279
281
  iterator(const HighsInt* nodeIndex, const double* nodeValue,
280
282
  const HighsInt* nodeLeft, const HighsInt* nodeRight, HighsInt node)
281
283
  : pos_(nodeIndex + node, nodeValue + node),
@@ -373,7 +375,8 @@ class HighsMatrixSlice<HighsTripletTreeSliceInOrder> {
373
375
  using pointer = const HighsSliceNonzero*;
374
376
  using reference = const HighsSliceNonzero&;
375
377
 
376
- iterator(HighsInt node) : currentNode(node) {}
378
+ iterator(HighsInt node)
379
+ : pos_(), nodeLeft(nullptr), nodeRight(nullptr), currentNode(node) {}
377
380
  iterator(const HighsInt* nodeIndex, const double* nodeValue,
378
381
  const HighsInt* nodeLeft, const HighsInt* nodeRight, HighsInt node)
379
382
  : pos_(nodeIndex, nodeValue),
@@ -476,7 +479,7 @@ class HighsMatrixSlice<HighsTripletPositionSlice> {
476
479
  using pointer = const HighsSliceNonzero*;
477
480
  using reference = const HighsSliceNonzero&;
478
481
 
479
- iterator(const HighsInt* node) : node(node) {}
482
+ iterator(const HighsInt* node) : pos_(), node(node), currentNode(0) {}
480
483
  iterator(const HighsInt* nodeIndex, const double* nodeValue,
481
484
  const HighsInt* node)
482
485
  : pos_(nodeIndex, nodeValue), node(node), currentNode(0) {}
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
5
+ /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
6
  /* Leona Gottwald and Michael Feldmeier */
7
7
  /* */
8
8
  /* Available as open-source under the MIT License */