casadi 3.6.7__cp311-none-manylinux2014_x86_64.whl → 3.7.1__cp311-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 (419) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi-cli +0 -0
  3. casadi/casadi.py +6531 -3039
  4. casadi/cbc +0 -0
  5. casadi/clp +0 -0
  6. casadi/cmake/alpaqa/alpaqaTargets-release.cmake +4 -4
  7. casadi/cmake/casadi-config-version.cmake +1 -1
  8. casadi/cmake/casadi-config.cmake +1 -1
  9. casadi/cmake/casadi-targets-release.cmake +5 -5
  10. casadi/cmake/casadi-targets.cmake +5 -5
  11. casadi/cmake/highs/highs-targets-release.cmake +2 -2
  12. casadi/cmake/highs/highs-targets.cmake +1 -1
  13. casadi/cmake/libzip/libzip-config-version.cmake +48 -0
  14. casadi/cmake/libzip/libzip-config.cmake +69 -0
  15. casadi/cmake/libzip/libzip-targets-release.cmake +19 -0
  16. casadi/cmake/{trlib/trlib-config.cmake → libzip/libzip-targets.cmake} +7 -7
  17. casadi/cmake/libzip/modules/FindMbedTLS.cmake +141 -0
  18. casadi/cmake/libzip/modules/FindNettle.cmake +141 -0
  19. casadi/cmake/libzip/modules/Findzstd.cmake +186 -0
  20. casadi/cmake/sleqp/sleqp-targets-release.cmake +2 -2
  21. casadi/highs +0 -0
  22. casadi/include/casadi/casadi.i +276 -47
  23. casadi/include/casadi/config.h +11 -11
  24. casadi/include/casadi/core/archiver.hpp +58 -0
  25. casadi/include/casadi/core/blazing_spline.hpp +47 -0
  26. casadi/include/casadi/core/calculus.hpp +57 -2
  27. casadi/include/casadi/core/callback.hpp +9 -0
  28. casadi/include/casadi/core/casadi_common.hpp +37 -0
  29. casadi/include/casadi/core/casadi_meta.hpp +15 -0
  30. casadi/include/casadi/core/casadi_misc.hpp +21 -0
  31. casadi/include/casadi/core/code_generator.hpp +115 -19
  32. casadi/include/casadi/core/core.hpp +5 -0
  33. casadi/include/casadi/core/dae_builder.hpp +303 -141
  34. casadi/include/casadi/core/dm.hpp +3 -0
  35. casadi/include/casadi/core/filesystem.hpp +58 -0
  36. casadi/include/casadi/core/fmu.hpp +62 -16
  37. casadi/include/casadi/core/function.hpp +24 -0
  38. casadi/include/casadi/core/generic_matrix.hpp +214 -7
  39. casadi/include/casadi/core/generic_shared.hpp +395 -0
  40. casadi/include/casadi/core/generic_shared_impl.hpp +218 -0
  41. casadi/include/casadi/core/generic_shared_internal.hpp +215 -0
  42. casadi/include/casadi/core/generic_type.hpp +3 -0
  43. casadi/include/casadi/core/global_options.hpp +10 -0
  44. casadi/include/casadi/core/integrator.hpp +41 -7
  45. casadi/include/casadi/core/matrix_decl.hpp +71 -0
  46. casadi/include/casadi/core/mx.hpp +63 -2
  47. casadi/include/casadi/core/nlp_builder.hpp +2 -1
  48. casadi/include/casadi/core/options.hpp +6 -3
  49. casadi/include/casadi/core/optistack.hpp +43 -9
  50. casadi/include/casadi/core/printable.hpp +8 -0
  51. casadi/include/casadi/core/resource.hpp +107 -0
  52. casadi/include/casadi/core/runtime/casadi_blazing_1d_boor_eval.hpp +112 -0
  53. casadi/include/casadi/core/runtime/casadi_blazing_2d_boor_eval.hpp +311 -0
  54. casadi/include/casadi/core/runtime/casadi_blazing_3d_boor_eval.hpp +645 -0
  55. casadi/include/casadi/core/runtime/casadi_blazing_de_boor.hpp +101 -0
  56. casadi/include/casadi/core/runtime/casadi_finite_diff.hpp +1 -1
  57. casadi/include/casadi/core/runtime/casadi_nlp.hpp +8 -2
  58. casadi/include/casadi/core/runtime/casadi_print_canonical.hpp +55 -0
  59. casadi/include/casadi/core/runtime/casadi_print_scalar.hpp +25 -0
  60. casadi/include/casadi/core/runtime/casadi_print_vector.hpp +32 -0
  61. casadi/include/casadi/core/runtime/casadi_printme.hpp +26 -0
  62. casadi/include/casadi/core/serializer.hpp +13 -5
  63. casadi/include/casadi/core/serializing_stream.hpp +9 -2
  64. casadi/include/casadi/core/shared_object.hpp +73 -161
  65. casadi/include/casadi/core/sparsity.hpp +13 -1
  66. casadi/include/casadi/core/sparsity_interface.hpp +19 -1
  67. casadi/include/casadi/core/sx.hpp +41 -0
  68. casadi/include/casadi/core/sx_elem.hpp +25 -0
  69. casadi/include/casadi/core/xml_node.hpp +5 -0
  70. casadi/include/casadi/doc.i +10026 -6513
  71. casadi/include/casadi/doc_merged.i +6744 -4449
  72. casadi/include/casadi/valgrind-casadi.supp +138 -0
  73. casadi/include/casadi/valgrind-python.supp +2470 -0
  74. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +4 -1
  75. casadi/include/ghc/filesystem.hpp +6083 -0
  76. casadi/include/ghc/fs_fwd.hpp +38 -0
  77. casadi/include/ghc/fs_impl.hpp +35 -0
  78. casadi/include/ghc/fs_std.hpp +60 -0
  79. casadi/include/ghc/fs_std_fwd.hpp +63 -0
  80. casadi/include/ghc/fs_std_impl.hpp +46 -0
  81. casadi/include/highs/HConfig.h +6 -4
  82. casadi/include/highs/Highs.h +260 -86
  83. casadi/include/highs/filereaderlp/reader.hpp +10 -10
  84. casadi/include/highs/interfaces/highs_c_api.h +195 -22
  85. casadi/include/highs/io/Filereader.h +4 -6
  86. casadi/include/highs/io/FilereaderEms.h +0 -3
  87. casadi/include/highs/io/FilereaderLp.h +0 -3
  88. casadi/include/highs/io/FilereaderMps.h +0 -3
  89. casadi/include/highs/io/HMPSIO.h +1 -4
  90. casadi/include/highs/io/HMpsFF.h +8 -5
  91. casadi/include/highs/io/HighsIO.h +10 -5
  92. casadi/include/highs/io/LoadOptions.h +0 -3
  93. casadi/include/highs/ipm/IpxSolution.h +0 -3
  94. casadi/include/highs/ipm/IpxWrapper.h +4 -7
  95. casadi/include/highs/ipm/ipx/control.h +1 -0
  96. casadi/include/highs/ipm/ipx/ipx_parameters.h +1 -0
  97. casadi/include/highs/ipm/ipx/lp_solver.h +3 -2
  98. casadi/include/highs/ipm/ipx/model.h +7 -3
  99. casadi/include/highs/lp_data/HConst.h +21 -6
  100. casadi/include/highs/lp_data/HStruct.h +40 -4
  101. casadi/include/highs/lp_data/HighsAnalysis.h +0 -3
  102. casadi/include/highs/lp_data/HighsCallback.h +10 -3
  103. casadi/include/highs/lp_data/HighsCallbackStruct.h +3 -3
  104. casadi/include/highs/lp_data/HighsDebug.h +0 -3
  105. casadi/include/highs/lp_data/HighsIis.h +62 -0
  106. casadi/include/highs/lp_data/HighsInfo.h +50 -43
  107. casadi/include/highs/lp_data/HighsInfoDebug.h +0 -3
  108. casadi/include/highs/lp_data/HighsLp.h +2 -3
  109. casadi/include/highs/lp_data/HighsLpSolverObject.h +0 -3
  110. casadi/include/highs/lp_data/HighsLpUtils.h +38 -6
  111. casadi/include/highs/lp_data/HighsModelUtils.h +21 -18
  112. casadi/include/highs/lp_data/HighsOptions.h +134 -22
  113. casadi/include/highs/lp_data/HighsRanging.h +0 -3
  114. casadi/include/highs/lp_data/HighsSolution.h +10 -3
  115. casadi/include/highs/lp_data/HighsSolutionDebug.h +0 -3
  116. casadi/include/highs/lp_data/HighsSolve.h +0 -3
  117. casadi/include/highs/lp_data/HighsStatus.h +0 -3
  118. casadi/include/highs/mip/HighsCliqueTable.h +3 -3
  119. casadi/include/highs/mip/HighsConflictPool.h +0 -3
  120. casadi/include/highs/mip/HighsCutGeneration.h +13 -3
  121. casadi/include/highs/mip/HighsCutPool.h +0 -3
  122. casadi/include/highs/mip/HighsDebugSol.h +0 -3
  123. casadi/include/highs/mip/HighsDomain.h +16 -4
  124. casadi/include/highs/mip/HighsDomainChange.h +0 -3
  125. casadi/include/highs/mip/HighsDynamicRowMatrix.h +0 -3
  126. casadi/include/highs/mip/HighsGFkSolve.h +3 -6
  127. casadi/include/highs/mip/HighsImplications.h +29 -5
  128. casadi/include/highs/mip/HighsLpAggregator.h +0 -3
  129. casadi/include/highs/mip/HighsLpRelaxation.h +0 -3
  130. casadi/include/highs/mip/HighsMipAnalysis.h +52 -0
  131. casadi/include/highs/mip/HighsMipSolver.h +11 -4
  132. casadi/include/highs/mip/HighsMipSolverData.h +67 -6
  133. casadi/include/highs/mip/HighsModkSeparator.h +1 -4
  134. casadi/include/highs/mip/HighsNodeQueue.h +0 -3
  135. casadi/include/highs/mip/HighsObjectiveFunction.h +0 -3
  136. casadi/include/highs/mip/HighsPathSeparator.h +1 -4
  137. casadi/include/highs/mip/HighsPrimalHeuristics.h +7 -5
  138. casadi/include/highs/mip/HighsPseudocost.h +0 -3
  139. casadi/include/highs/mip/HighsRedcostFixing.h +0 -3
  140. casadi/include/highs/mip/HighsSearch.h +0 -3
  141. casadi/include/highs/mip/HighsSeparation.h +0 -3
  142. casadi/include/highs/mip/HighsSeparator.h +1 -5
  143. casadi/include/highs/mip/HighsTableauSeparator.h +1 -4
  144. casadi/include/highs/mip/HighsTransformedLp.h +0 -3
  145. casadi/include/highs/mip/MipTimer.h +471 -0
  146. casadi/include/highs/parallel/HighsBinarySemaphore.h +1 -1
  147. casadi/include/highs/parallel/HighsCacheAlign.h +1 -1
  148. casadi/include/highs/parallel/HighsCombinable.h +1 -1
  149. casadi/include/highs/parallel/HighsMutex.h +1 -1
  150. casadi/include/highs/parallel/HighsRaceTimer.h +1 -1
  151. casadi/include/highs/parallel/HighsSchedulerConstants.h +1 -1
  152. casadi/include/highs/parallel/HighsSplitDeque.h +1 -1
  153. casadi/include/highs/parallel/HighsTaskExecutor.h +68 -55
  154. casadi/include/highs/pdlp/CupdlpWrapper.h +18 -7
  155. casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +2 -3
  156. casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +16 -6
  157. casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +10 -4
  158. casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +3 -3
  159. casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +6 -6
  160. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  161. casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +11 -11
  162. casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +8 -4
  163. casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +253 -172
  164. casadi/include/highs/presolve/HPresolve.h +50 -10
  165. casadi/include/highs/presolve/HPresolveAnalysis.h +0 -3
  166. casadi/include/highs/presolve/HighsPostsolveStack.h +39 -6
  167. casadi/include/highs/presolve/HighsSymmetry.h +0 -3
  168. casadi/include/highs/presolve/ICrash.h +0 -3
  169. casadi/include/highs/presolve/ICrashUtil.h +1 -4
  170. casadi/include/highs/presolve/ICrashX.h +0 -3
  171. casadi/include/highs/presolve/PresolveComponent.h +0 -3
  172. casadi/include/highs/qpsolver/a_asm.hpp +20 -17
  173. casadi/include/highs/qpsolver/a_quass.hpp +5 -9
  174. casadi/include/highs/qpsolver/basis.hpp +12 -10
  175. casadi/include/highs/qpsolver/crashsolution.hpp +4 -3
  176. casadi/include/highs/qpsolver/dantzigpricing.hpp +3 -2
  177. casadi/include/highs/qpsolver/devexpricing.hpp +3 -1
  178. casadi/include/highs/qpsolver/factor.hpp +6 -5
  179. casadi/include/highs/qpsolver/feasibility_bounded.hpp +31 -29
  180. casadi/include/highs/qpsolver/feasibility_highs.hpp +94 -70
  181. casadi/include/highs/qpsolver/gradient.hpp +1 -1
  182. casadi/include/highs/qpsolver/instance.hpp +1 -1
  183. casadi/include/highs/qpsolver/pricing.hpp +2 -2
  184. casadi/include/highs/qpsolver/qpconst.hpp +2 -2
  185. casadi/include/highs/qpsolver/quass.hpp +2 -2
  186. casadi/include/highs/qpsolver/runtime.hpp +2 -2
  187. casadi/include/highs/qpsolver/settings.hpp +20 -8
  188. casadi/include/highs/qpsolver/steepestedgepricing.hpp +38 -39
  189. casadi/include/highs/simplex/HApp.h +88 -34
  190. casadi/include/highs/simplex/HEkk.h +24 -11
  191. casadi/include/highs/simplex/HEkkDual.h +2 -4
  192. casadi/include/highs/simplex/HEkkDualRHS.h +0 -3
  193. casadi/include/highs/simplex/HEkkDualRow.h +0 -3
  194. casadi/include/highs/simplex/HEkkPrimal.h +1 -5
  195. casadi/include/highs/simplex/HSimplex.h +0 -3
  196. casadi/include/highs/simplex/HSimplexDebug.h +0 -3
  197. casadi/include/highs/simplex/HSimplexNla.h +0 -26
  198. casadi/include/highs/simplex/HSimplexReport.h +0 -3
  199. casadi/include/highs/simplex/HighsSimplexAnalysis.h +5 -8
  200. casadi/include/highs/simplex/SimplexConst.h +10 -11
  201. casadi/include/highs/simplex/SimplexStruct.h +9 -12
  202. casadi/include/highs/simplex/SimplexTimer.h +83 -101
  203. casadi/include/highs/test/DevKkt.h +0 -3
  204. casadi/include/highs/test/KktCh2.h +0 -3
  205. casadi/include/highs/util/FactorTimer.h +39 -64
  206. casadi/include/highs/util/HFactor.h +4 -4
  207. casadi/include/highs/util/HFactorConst.h +0 -3
  208. casadi/include/highs/util/HFactorDebug.h +0 -3
  209. casadi/include/highs/util/HSet.h +0 -3
  210. casadi/include/highs/util/HVector.h +0 -3
  211. casadi/include/highs/util/HVectorBase.h +1 -4
  212. casadi/include/highs/util/HighsCDouble.h +12 -3
  213. casadi/include/highs/util/HighsComponent.h +0 -3
  214. casadi/include/highs/util/HighsDataStack.h +0 -3
  215. casadi/include/highs/util/HighsDisjointSets.h +0 -3
  216. casadi/include/highs/util/HighsHash.h +9 -12
  217. casadi/include/highs/util/HighsHashTree.h +15 -11
  218. casadi/include/highs/util/HighsInt.h +0 -3
  219. casadi/include/highs/util/HighsIntegers.h +0 -3
  220. casadi/include/highs/util/HighsLinearSumBounds.h +0 -3
  221. casadi/include/highs/util/HighsMatrixPic.h +0 -3
  222. casadi/include/highs/util/HighsMatrixSlice.h +3 -6
  223. casadi/include/highs/util/HighsMatrixUtils.h +0 -3
  224. casadi/include/highs/util/HighsMemoryAllocation.h +11 -3
  225. casadi/include/highs/util/HighsRandom.h +3 -6
  226. casadi/include/highs/util/HighsRbTree.h +0 -3
  227. casadi/include/highs/util/HighsSort.h +0 -3
  228. casadi/include/highs/util/HighsSparseMatrix.h +6 -3
  229. casadi/include/highs/util/HighsSparseVectorSum.h +0 -3
  230. casadi/include/highs/util/HighsSplay.h +0 -3
  231. casadi/include/highs/util/HighsTimer.h +94 -56
  232. casadi/include/highs/util/HighsUtils.h +10 -3
  233. casadi/include/highs/util/stringutil.h +14 -12
  234. casadi/include/licenses/ghc-external/LICENSE +19 -0
  235. casadi/include/licenses/libz-external/LICENSE +22 -0
  236. casadi/include/licenses/libz-external/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  237. casadi/include/licenses/libzip-external/LICENSE +31 -0
  238. casadi/include/sleqp/defs.h +2 -2
  239. casadi/include/zconf.h +545 -0
  240. casadi/include/zip.h +528 -0
  241. casadi/include/zipconf.h +48 -0
  242. casadi/include/zlib.h +1938 -0
  243. casadi/libCbcSolver.so +0 -0
  244. casadi/libCbcSolver.so.3 +0 -0
  245. casadi/libCbcSolver.so.3.10.11 +0 -0
  246. casadi/libClpSolver.so +0 -0
  247. casadi/libClpSolver.so.1 +0 -0
  248. casadi/libClpSolver.so.1.14.9 +0 -0
  249. casadi/libbonmin.so +0 -0
  250. casadi/libbonmin.so.4 +0 -0
  251. casadi/libbonmin.so.4.8.9 +0 -0
  252. casadi/libcasadi.so +0 -0
  253. casadi/libcasadi.so.3.7 +0 -0
  254. casadi/libcasadi_archiver_libzip.so +0 -0
  255. casadi/libcasadi_archiver_libzip.so.3.7 +0 -0
  256. casadi/libcasadi_conic_cbc.so +0 -0
  257. casadi/libcasadi_conic_cbc.so.3.7 +0 -0
  258. casadi/libcasadi_conic_clp.so +0 -0
  259. casadi/libcasadi_conic_clp.so.3.7 +0 -0
  260. casadi/libcasadi_conic_cplex.so +0 -0
  261. casadi/libcasadi_conic_cplex.so.3.7 +0 -0
  262. casadi/libcasadi_conic_daqp.so +0 -0
  263. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  264. casadi/libcasadi_conic_fatrop.so +0 -0
  265. casadi/libcasadi_conic_fatrop.so.3.7 +0 -0
  266. casadi/libcasadi_conic_gurobi.so +0 -0
  267. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  268. casadi/libcasadi_conic_highs.so +0 -0
  269. casadi/libcasadi_conic_highs.so.3.7 +0 -0
  270. casadi/libcasadi_conic_hpipm.so +0 -0
  271. casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
  272. casadi/libcasadi_conic_ipqp.so +0 -0
  273. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  274. casadi/libcasadi_conic_nlpsol.so +0 -0
  275. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  276. casadi/libcasadi_conic_osqp.so +0 -0
  277. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  278. casadi/libcasadi_conic_proxqp.so +0 -0
  279. casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
  280. casadi/libcasadi_conic_qpoases.so +0 -0
  281. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  282. casadi/libcasadi_conic_qrqp.so +0 -0
  283. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  284. casadi/libcasadi_conic_superscs.so +0 -0
  285. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  286. casadi/libcasadi_filesystem_ghc.so +0 -0
  287. casadi/libcasadi_filesystem_ghc.so.3.7 +0 -0
  288. casadi/libcasadi_importer_shell.so +0 -0
  289. casadi/libcasadi_importer_shell.so.3.7 +0 -0
  290. casadi/libcasadi_integrator_collocation.so +0 -0
  291. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  292. casadi/libcasadi_integrator_cvodes.so +0 -0
  293. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  294. casadi/libcasadi_integrator_idas.so +0 -0
  295. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  296. casadi/libcasadi_integrator_rk.so +0 -0
  297. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  298. casadi/libcasadi_interpolant_bspline.so +0 -0
  299. casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
  300. casadi/libcasadi_interpolant_linear.so +0 -0
  301. casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
  302. casadi/libcasadi_linsol_csparse.so +0 -0
  303. casadi/libcasadi_linsol_csparse.so.3.7 +0 -0
  304. casadi/libcasadi_linsol_csparsecholesky.so +0 -0
  305. casadi/libcasadi_linsol_csparsecholesky.so.3.7 +0 -0
  306. casadi/libcasadi_linsol_lapacklu.so +0 -0
  307. casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
  308. casadi/libcasadi_linsol_lapackqr.so +0 -0
  309. casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
  310. casadi/libcasadi_linsol_ldl.so +0 -0
  311. casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
  312. casadi/libcasadi_linsol_lsqr.so +0 -0
  313. casadi/libcasadi_linsol_lsqr.so.3.7 +0 -0
  314. casadi/libcasadi_linsol_ma27.so +0 -0
  315. casadi/libcasadi_linsol_ma27.so.3.7 +0 -0
  316. casadi/libcasadi_linsol_mumps.so +0 -0
  317. casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
  318. casadi/libcasadi_linsol_qr.so +0 -0
  319. casadi/libcasadi_linsol_qr.so.3.7 +0 -0
  320. casadi/libcasadi_linsol_symbolicqr.so +0 -0
  321. casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
  322. casadi/libcasadi_linsol_tridiag.so +0 -0
  323. casadi/libcasadi_linsol_tridiag.so.3.7 +0 -0
  324. casadi/libcasadi_nlpsol_alpaqa.so +0 -0
  325. casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
  326. casadi/libcasadi_nlpsol_ampl.so +0 -0
  327. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  328. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  329. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  330. casadi/libcasadi_nlpsol_bonmin.so +0 -0
  331. casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
  332. casadi/libcasadi_nlpsol_fatrop.so +0 -0
  333. casadi/libcasadi_nlpsol_fatrop.so.3.7 +0 -0
  334. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  335. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  336. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  337. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  338. casadi/libcasadi_nlpsol_knitro.so +0 -0
  339. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  340. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  341. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  342. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  343. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  344. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  345. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  346. casadi/libcasadi_nlpsol_sleqp.so +0 -0
  347. casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
  348. casadi/libcasadi_nlpsol_snopt.so +0 -0
  349. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  350. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  351. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  352. casadi/libcasadi_nlpsol_worhp.so +0 -0
  353. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  354. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  355. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  356. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  357. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  358. casadi/libcasadi_rootfinder_newton.so +0 -0
  359. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  360. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  361. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  362. casadi/libcasadi_sundials_common.so +0 -0
  363. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  364. casadi/libcasadi_xmlfile_tinyxml.so +0 -0
  365. casadi/libcasadi_xmlfile_tinyxml.so.3.7 +0 -0
  366. casadi/libcoinmumps.so +0 -0
  367. casadi/libcoinmumps.so.3 +0 -0
  368. casadi/libcoinmumps.so.3.0.1 +0 -0
  369. casadi/libdaqpstat.a +0 -0
  370. casadi/libfatrop.so +0 -0
  371. casadi/libhighs.so +0 -0
  372. casadi/libhighs.so.1 +0 -0
  373. casadi/libhighs.so.1.10.0 +0 -0
  374. casadi/libindirect.a +0 -0
  375. casadi/libipopt.so +0 -0
  376. casadi/libipopt.so.3 +0 -0
  377. casadi/libipopt.so.3.14.11 +0 -0
  378. casadi/liblinsys.a +0 -0
  379. casadi/libosqp.a +0 -0
  380. casadi/libqdldl.a +0 -0
  381. casadi/libsipopt.so +0 -0
  382. casadi/libsipopt.so.3 +0 -0
  383. casadi/libsipopt.so.3.14.11 +0 -0
  384. casadi/libsleqp.so +0 -0
  385. casadi/libsleqp.so.1.0.1 +0 -0
  386. casadi/libspral.a +0 -0
  387. casadi/libsuperscs.a +0 -0
  388. casadi/libz.a +0 -0
  389. casadi/libz.so +0 -0
  390. casadi/libz.so.1 +0 -0
  391. casadi/libz.so.1.3.1 +0 -0
  392. casadi/libzip.a +0 -0
  393. casadi/pkgconfig/casadi.pc +1 -1
  394. casadi/pkgconfig/highs.pc +1 -1
  395. casadi/pkgconfig/libzip.pc +14 -0
  396. casadi/tools/__init__.py +3 -1
  397. casadi/tools/graph/graph.py +1 -1
  398. casadi/tools/structure3.py +7 -7
  399. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/METADATA +1 -1
  400. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/RECORD +400 -368
  401. casadi/cmake/proxsuite/find-external/Simde/FindSimde.cmake +0 -39
  402. casadi/cmake/proxsuite/proxsuiteConfig.cmake +0 -177
  403. casadi/cmake/proxsuite/proxsuiteConfigVersion.cmake +0 -70
  404. casadi/cmake/proxsuite/proxsuiteTargets.cmake +0 -115
  405. casadi/cmake/trlib/trlib-config-release.cmake +0 -19
  406. casadi/cmake/trlib/trlib-config-version.cmake +0 -88
  407. casadi/include/highs/lp_data/HighsRuntimeOptions.h +0 -276
  408. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +0 -28
  409. casadi/include/tinyxml2.h +0 -2380
  410. casadi/lib64/cmake/tinyxml2/tinyxml2-config-version.cmake +0 -70
  411. casadi/lib64/cmake/tinyxml2/tinyxml2-config.cmake +0 -57
  412. casadi/lib64/cmake/tinyxml2/tinyxml2-static-targets-release.cmake +0 -19
  413. casadi/lib64/cmake/tinyxml2/tinyxml2-static-targets.cmake +0 -103
  414. casadi/lib64/libtinyxml2.a +0 -0
  415. casadi/lib64/pkgconfig/tinyxml2.pc +0 -10
  416. casadi/libhighs.so.1.7.2 +0 -0
  417. casadi/pkgconfig/proxsuite.pc +0 -22
  418. casadi/tools/structure.py +0 -1446
  419. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/WHEEL +0 -0
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -113,17 +110,20 @@ class HighsHashTree {
113
110
  // to do a linear scan and key comparisons at all
114
111
  Occupation occupation;
115
112
  int size;
116
- uint64_t hashes[capacity() + 1];
117
- Entry entries[capacity()];
113
+ std::array<uint64_t, capacity() + 1> hashes;
114
+ std::array<Entry, capacity()> entries;
118
115
 
119
116
  InnerLeaf() : occupation(0), size(0) { hashes[0] = 0; }
120
117
 
121
118
  template <int kOtherSize>
122
119
  InnerLeaf(InnerLeaf<kOtherSize>&& other) {
123
120
  assert(other.size <= capacity());
124
- memcpy((void*)this, (void*)&other,
125
- (char*)&other.hashes[other.size + 1] - (char*)&other);
126
- std::move(&other.entries[0], &other.entries[size], &entries[0]);
121
+ occupation = other.occupation;
122
+ size = other.size;
123
+ std::copy(other.hashes.cbegin(),
124
+ std::next(other.hashes.cbegin(), size + 1), hashes.begin());
125
+ std::move(other.entries.begin(), std::next(other.entries.begin(), size),
126
+ entries.begin());
127
127
  }
128
128
 
129
129
  int get_num_entries() const { return size; }
@@ -190,7 +190,9 @@ class HighsHashTree {
190
190
 
191
191
  --size;
192
192
  if (pos < size) {
193
- std::move(&entries[pos + 1], &entries[size + 1], &entries[pos]);
193
+ std::move(std::next(entries.begin(), pos + 1),
194
+ std::next(entries.begin(), size + 1),
195
+ std::next(entries.begin(), pos));
194
196
  memmove(&hashes[pos], &hashes[pos + 1],
195
197
  sizeof(hashes[0]) * (size - pos));
196
198
  if (get_first_chunk16(hashes[startPos]) != hashChunk)
@@ -254,7 +256,9 @@ class HighsHashTree {
254
256
 
255
257
  void move_backward(const int& first, const int& last) {
256
258
  // move elements backwards
257
- std::move_backward(&entries[first], &entries[last], &entries[last + 1]);
259
+ std::move_backward(std::next(entries.begin(), first),
260
+ std::next(entries.begin(), last),
261
+ std::next(entries.begin(), last + 1));
258
262
  memmove(&hashes[first + 1], &hashes[first],
259
263
  sizeof(hashes[0]) * (last - first));
260
264
  }
@@ -836,7 +840,7 @@ class HighsHashTree {
836
840
  hash, hashPos + 1, entry);
837
841
  } else {
838
842
  // there are many collisions, determine the exact sizes first
839
- uint8_t sizes[InnerLeaf<4>::capacity() + 1] = {};
843
+ std::array<uint8_t, InnerLeaf<4>::capacity() + 1> sizes = {};
840
844
  sizes[occupation.num_set_until(hashChunk) - 1] += 1;
841
845
  for (int i = 0; i < leaf->size; ++i) {
842
846
  int pos =
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -13,15 +10,15 @@
13
10
  * underlying matrix storage formats
14
11
  */
15
12
 
13
+ #ifndef UTIL_HIGHS_MATRIX_SLICE_H_
14
+ #define UTIL_HIGHS_MATRIX_SLICE_H_
15
+
16
16
  #include <cstddef>
17
17
  #include <iterator>
18
18
  #include <vector>
19
19
 
20
20
  #include "util/HighsInt.h"
21
21
 
22
- #ifndef UTIL_HIGHS_MATRIX_SLICE_H_
23
- #define UTIL_HIGHS_MATRIX_SLICE_H_
24
-
25
22
  template <typename StorageFormat>
26
23
  class HighsMatrixSlice;
27
24
 
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -41,6 +38,17 @@ bool okReserve(std::vector<T>& use_vector, HighsInt dimension) {
41
38
  return true;
42
39
  }
43
40
 
41
+ template <typename T, typename T2>
42
+ bool okReserve(std::unordered_map<T, T2>& use_map, HighsInt dimension) {
43
+ try {
44
+ use_map.reserve(dimension);
45
+ } catch (const std::bad_alloc& e) {
46
+ printf("HighsMemoryAllocation::okReserve fails with %s\n", e.what());
47
+ return false;
48
+ }
49
+ return true;
50
+ }
51
+
44
52
  template <typename T>
45
53
  bool okAssign(std::vector<T>& use_vector, HighsInt dimension, T value = T{}) {
46
54
  try {
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -169,7 +166,7 @@ class HighsRandom {
169
166
  // or the 64bit version
170
167
  if (sup <= 1) return 0;
171
168
  int nbits = HighsHashHelpers::log2i(HighsUInt(sup - 1)) + 1;
172
- return drawUniform(HighsUInt(sup), nbits);
169
+ return static_cast<HighsInt>(drawUniform(HighsUInt(sup), nbits));
173
170
  }
174
171
 
175
172
  /**
@@ -192,7 +189,7 @@ class HighsRandom {
192
189
  static_cast<uint32_t>(state), state >> 32) >>
193
190
  (64 - 26));
194
191
  // compute (1+output) / (2^52+1) which is strictly between 0 and 1
195
- return (1 + output) * 2.2204460492503125e-16;
192
+ return static_cast<double>(1 + output) * 2.2204460492503125e-16;
196
193
  }
197
194
 
198
195
  /**
@@ -209,7 +206,7 @@ class HighsRandom {
209
206
  32);
210
207
  // compute output / (2^53-1) in double precision which is in the closed
211
208
  // interval [0,1]
212
- return output * 1.1102230246251566e-16;
209
+ return static_cast<double>(output) * 1.1102230246251566e-16;
213
210
  }
214
211
 
215
212
  /**
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -66,6 +63,9 @@ class HighsSparseMatrix {
66
63
  void deleteRows(const HighsIndexCollection& index_collection);
67
64
  HighsStatus assessDimensions(const HighsLogOptions& log_options,
68
65
  const std::string matrix_name);
66
+ HighsStatus assessStart(const HighsLogOptions& log_options);
67
+ HighsStatus assessIndexBounds(const HighsLogOptions& log_options);
68
+
69
69
  HighsStatus assess(const HighsLogOptions& log_options,
70
70
  const std::string matrix_name,
71
71
  const double small_matrix_value,
@@ -94,6 +94,9 @@ class HighsSparseMatrix {
94
94
  void productTranspose(vector<double>& result, const vector<double>& x) const;
95
95
  void productQuad(vector<double>& result, const vector<double>& x,
96
96
  const HighsInt debug_report = kDebugReportOff) const;
97
+ void productTransposeQuad(
98
+ vector<double>& result_value, const vector<double>& x,
99
+ const HighsInt debug_report = kDebugReportOff) const;
97
100
  void productTransposeQuad(
98
101
  vector<double>& result_value, vector<HighsInt>& result_index,
99
102
  const HVector& x, const HighsInt debug_report = kDebugReportOff) const;
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,6 +21,10 @@
24
21
 
25
22
  #include "util/HighsInt.h"
26
23
 
24
+ const HighsInt check_clock = -46;
25
+ const HighsInt ipm_clock = 9;
26
+ const bool kNoClockCalls = false;
27
+
27
28
  /**
28
29
  * @brief Clock record structure
29
30
  */
@@ -33,7 +34,6 @@ struct HighsClockRecord {
33
34
  double start;
34
35
  double time;
35
36
  std::string name;
36
- std::string ch3_name;
37
37
  };
38
38
  */
39
39
  /**
@@ -43,28 +43,25 @@ class HighsTimer {
43
43
  public:
44
44
  HighsTimer() {
45
45
  num_clock = 0;
46
- HighsInt i_clock = clock_def("Run HiGHS", "RnH");
46
+ HighsInt i_clock = clock_def("Run HiGHS");
47
47
  assert(i_clock == 0);
48
- run_highs_clock = i_clock;
49
48
 
50
- presolve_clock = clock_def("Presolve", "Pre");
51
- solve_clock = clock_def("Solve", "Slv");
52
- postsolve_clock = clock_def("Postsolve", "Pst");
49
+ presolve_clock = clock_def("Presolve");
50
+ solve_clock = clock_def("Solve");
51
+ postsolve_clock = clock_def("Postsolve");
53
52
  }
54
53
 
55
54
  /**
56
55
  * @brief Define a clock
57
56
  */
58
57
  HighsInt clock_def(
59
- const char* name, //!< Full-length name (<=16 characters) for the clock
60
- const char* ch3_name = "N/A" //!< 3-character name for the clock
61
- ) {
58
+ const char* name) //!< Full-length name (<=16 characters) for the clock
59
+ {
62
60
  HighsInt i_clock = num_clock;
63
61
  clock_num_call.push_back(0);
64
62
  clock_start.push_back(initial_clock_start);
65
63
  clock_time.push_back(0);
66
64
  clock_names.push_back(name);
67
- clock_ch3_names.push_back(ch3_name);
68
65
  num_clock++;
69
66
  return i_clock;
70
67
  }
@@ -79,7 +76,6 @@ class HighsTimer {
79
76
  x_clock.start = 0;
80
77
  x_clock.time = 0;
81
78
  x_clock.name = "";
82
- x_clock.ch3_name = "";
83
79
  }
84
80
  */
85
81
 
@@ -104,13 +100,11 @@ class HighsTimer {
104
100
  this->clock_num_call.clear();
105
101
  this->clock_start.clear();
106
102
  this->clock_names.clear();
107
- this->clock_ch3_names.clear();
108
- HighsInt i_clock = clock_def("Run HiGHS", "RnH");
103
+ HighsInt i_clock = clock_def("Run HiGHS");
109
104
  assert(i_clock == 0);
110
- this->run_highs_clock = i_clock;
111
- this->presolve_clock = clock_def("Presolve", "Pre");
112
- this->solve_clock = clock_def("Solve", "Slv");
113
- this->postsolve_clock = clock_def("Postsolve", "Pst");
105
+ this->presolve_clock = clock_def("Presolve");
106
+ this->solve_clock = clock_def("Solve");
107
+ this->postsolve_clock = clock_def("Postsolve");
114
108
  }
115
109
 
116
110
  /**
@@ -124,47 +118,86 @@ class HighsTimer {
124
118
  }
125
119
  }
126
120
 
121
+ /**
122
+ * @brief write all clocks
123
+ */
124
+ void writeAllClocks() {
125
+ for (HighsInt i = 0; i < num_clock; i++)
126
+ if (clock_num_call[i])
127
+ printf("Time %7.5f for %9d calls of clock %3d: %s\n", clock_time[i],
128
+ int(clock_num_call[i]), int(i), clock_names[i].c_str());
129
+ }
130
+
127
131
  /**
128
132
  * @brief Start a clock
129
133
  */
130
- void start(HighsInt i_clock //!< Index of the clock to be started
134
+ void start(const HighsInt i_clock = 0 //!< Index of the clock to be started
131
135
  ) {
132
136
  assert(i_clock >= 0);
133
137
  assert(i_clock < num_clock);
134
138
  // Check that the clock's been stopped. It should be set to
135
139
  // getWallTime() >= 0 (or initialised to initial_clock_start > 0)
136
- assert(clock_start[i_clock] > 0);
140
+ const bool clock_stopped = clock_start[i_clock] > 0;
141
+ if (i_clock != ipm_clock) {
142
+ // Sometimes the analytic centre clock isn't stopped - because
143
+ // it runs on a separate thread. Although it would be good to
144
+ // understand this better, for now don't assert that this clock
145
+ // has stopped
146
+ if (!clock_stopped) {
147
+ printf("Clock %d - %s - still running\n", int(i_clock),
148
+ clock_names[i_clock].c_str());
149
+ }
150
+ assert(clock_stopped);
151
+ }
137
152
  // Set the start to be the negation of the WallTick to check that
138
153
  // the clock's been started when it's next stopped
154
+ if (i_clock == check_clock) {
155
+ printf("HighsTimer: starting clock %d: %s\n", int(check_clock),
156
+ this->clock_names[check_clock].c_str());
157
+ }
139
158
  clock_start[i_clock] = -getWallTime();
140
159
  }
141
160
 
142
161
  /**
143
162
  * @brief Stop a clock
144
163
  */
145
- void stop(HighsInt i_clock //!< Index of the clock to be stopped
164
+ void stop(const HighsInt i_clock = 0 //!< Index of the clock to be stopped
146
165
  ) {
147
166
  assert(i_clock >= 0);
148
167
  assert(i_clock < num_clock);
149
168
  // Check that the clock's been started. It should be set to
150
169
  // -getWallTime() <= 0
151
- assert(clock_start[i_clock] < 0);
170
+ const bool clock_stopped = clock_start[i_clock] > 0;
171
+ if (clock_stopped) {
172
+ printf("Clock %d - %s - not running\n", int(i_clock),
173
+ clock_names[i_clock].c_str());
174
+ }
175
+ assert(!clock_stopped);
152
176
  double wall_time = getWallTime();
153
177
  double callClockTimes = wall_time + clock_start[i_clock];
154
178
  clock_time[i_clock] += callClockTimes;
155
179
  clock_num_call[i_clock]++;
156
180
  // Set the start to be the WallTick to check that the clock's been
157
181
  // stopped when it's next started
182
+ if (i_clock == check_clock) {
183
+ printf("HighsTimer: stopping clock %d: %s\n", int(check_clock),
184
+ this->clock_names[check_clock].c_str());
185
+ }
158
186
  clock_start[i_clock] = wall_time;
159
187
  }
160
188
 
161
189
  /**
162
190
  * @brief Read the time of a clock
163
191
  */
164
- double read(HighsInt i_clock //!< Index of the clock to be read
165
- ) {
192
+ double read(const HighsInt i_clock = 0 //!< Index of the clock to be read
193
+ ) const {
166
194
  assert(i_clock >= 0);
167
195
  assert(i_clock < num_clock);
196
+ if (i_clock == check_clock) {
197
+ std::string clock_name = this->clock_names[check_clock];
198
+ printf("HighsTimer: reading clock %d: %s\n", int(check_clock),
199
+ clock_name.c_str());
200
+ }
168
201
  double read_time;
169
202
  if (clock_start[i_clock] < 0) {
170
203
  // The clock's been started, so find the current time
@@ -180,32 +213,28 @@ class HighsTimer {
180
213
  /**
181
214
  * @brief Return whether a clock is running
182
215
  */
183
- bool running(HighsInt i_clock //!< Index of the clock to be read
216
+ bool running(const HighsInt i_clock = 0 //!< Index of the clock to be read
184
217
  ) {
185
218
  assert(i_clock >= 0);
186
219
  assert(i_clock < num_clock);
220
+ if (i_clock == check_clock) {
221
+ printf("HighsTimer: querying clock %d: %s - with start record %g\n",
222
+ int(check_clock), this->clock_names[check_clock].c_str(),
223
+ clock_start[i_clock]);
224
+ }
187
225
  return clock_start[i_clock] < 0;
188
226
  }
189
227
 
190
228
  /**
191
- * @brief Start the RunHighs clock
229
+ * @brief Return number of calls to a clock
192
230
  */
193
- void startRunHighsClock() { start(run_highs_clock); }
194
-
195
- /**
196
- * @brief Stop the RunHighs clock
197
- */
198
- void stopRunHighsClock() { stop(run_highs_clock); }
199
-
200
- /**
201
- * @brief Read the RunHighs clock
202
- */
203
- double readRunHighsClock() { return read(run_highs_clock); }
204
-
205
- /**
206
- * @brief Test whether the RunHighs clock is running
207
- */
208
- bool runningRunHighsClock() { return running(run_highs_clock); }
231
+ HighsInt numCall(
232
+ const HighsInt i_clock = 0 //!< Index of the clock to be read
233
+ ) {
234
+ assert(i_clock >= 0);
235
+ assert(i_clock < num_clock);
236
+ return clock_num_call[i_clock];
237
+ }
209
238
 
210
239
  /**
211
240
  * @brief Report timing information for the clock indices in the list
@@ -230,7 +259,7 @@ class HighsTimer {
230
259
  //!< before an individual clock is reported
231
260
  ) {
232
261
  size_t num_clock_list_entries = clock_list.size();
233
- double current_run_highs_time = readRunHighsClock();
262
+ double current_run_highs_time = read();
234
263
  bool non_null_report = false;
235
264
 
236
265
  // Check validity of the clock list and check no clocks are still
@@ -244,7 +273,12 @@ class HighsTimer {
244
273
  assert(iClock < num_clock);
245
274
  // Check that the clock's not still running. It should be set to
246
275
  // getWallTime() >= 0 (or initialised to initial_clock_start > 0)
247
- assert(clock_start[iClock] > 0);
276
+ const bool clock_stopped = clock_start[iClock] > 0;
277
+ if (!clock_stopped) {
278
+ printf("Clock %d - %s - still running\n", int(iClock),
279
+ clock_names[iClock].c_str());
280
+ }
281
+ assert(clock_stopped);
248
282
  sum_calls += clock_num_call[iClock];
249
283
  sum_clock_times += clock_time[iClock];
250
284
  }
@@ -265,7 +299,7 @@ class HighsTimer {
265
299
  non_null_report = true;
266
300
 
267
301
  // Report one line per clock, the time, number of calls and time per call
268
- printf("%s-time Operation : Time ( Total",
302
+ printf("\n%s-time Operation : Time ( Total",
269
303
  grep_stamp);
270
304
  if (ideal_sum_time > 0) printf("; Ideal");
271
305
  printf("; Local): Calls Time/Call\n");
@@ -278,7 +312,11 @@ class HighsTimer {
278
312
  double time_per_call = 0;
279
313
  if (clock_num_call[iClock] > 0) {
280
314
  time_per_call = time / clock_num_call[iClock];
281
- if (percent_sum_clock_times[i] >= tolerance_percent_report) {
315
+ const bool report_time =
316
+ tolerance_percent_report > 0
317
+ ? percent_sum_clock_times[i] >= tolerance_percent_report
318
+ : clock_num_call[iClock] > 0;
319
+ if (report_time) {
282
320
  printf("%s-time %-32s: %11.4e (%5.1f%%", grep_stamp,
283
321
  clock_names[iClock].c_str(), time, percent_run_highs);
284
322
  if (ideal_sum_time > 0) {
@@ -309,11 +347,14 @@ class HighsTimer {
309
347
  /**
310
348
  * @brief Return the current wall-clock time
311
349
  */
312
- double getWallTime() {
350
+ double getWallTime() const {
313
351
  using namespace std::chrono;
314
- return duration_cast<duration<double> >(
315
- wall_clock::now().time_since_epoch())
316
- .count();
352
+ const double wall_time = kNoClockCalls
353
+ ? 0
354
+ : duration_cast<duration<double> >(
355
+ wall_clock::now().time_since_epoch())
356
+ .count();
357
+ return wall_time;
317
358
  }
318
359
 
319
360
  virtual ~HighsTimer() = default;
@@ -331,10 +372,7 @@ class HighsTimer {
331
372
  std::vector<double> clock_start;
332
373
  std::vector<double> clock_time;
333
374
  std::vector<std::string> clock_names;
334
- std::vector<std::string> clock_ch3_names;
335
- // The index of the RunHighsClock - should always be 0
336
- HighsInt run_highs_clock;
337
- // Fundamental Highs clocks
375
+ // Fundamental clocks
338
376
  HighsInt presolve_clock;
339
377
  HighsInt solve_clock;
340
378
  HighsInt postsolve_clock;
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -207,4 +204,14 @@ void highsAssert(const bool assert_condition, const std::string message = "");
207
204
  // If pause_condition is true, then keyboard input is required. Allows
208
205
  // breakpoints in VScode where optimization might prevent them.
209
206
  bool highsPause(const bool pause_condition, const std::string message = "");
207
+
208
+ // Utility for computing fractional part
209
+ template <typename T>
210
+ inline T fractionality(T input, T* intval = nullptr) {
211
+ using std::abs;
212
+ using std::round;
213
+ T val = round(input);
214
+ if (intval != nullptr) *intval = val;
215
+ return abs(input - val);
216
+ }
210
217
  #endif // UTIL_HIGHSUTILS_H_
@@ -2,9 +2,6 @@
2
2
  /* */
3
3
  /* This file is part of the HiGHS linear optimization suite */
4
4
  /* */
5
- /* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
6
- /* Leona Gottwald and Michael Feldmeier */
7
- /* */
8
5
  /* Available as open-source under the MIT License */
9
6
  /* */
10
7
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,15 +23,20 @@ void strTrim(char* str);
26
23
  // std::string& str_tolower(std::string s);
27
24
 
28
25
  void tolower(std::string& str);
29
-
30
- const std::string non_chars = "\t\n\v\f\r ";
31
- std::string& ltrim(std::string& str, const std::string& chars = non_chars);
32
- std::string& rtrim(std::string& str, const std::string& chars = non_chars);
33
- std::string& trim(std::string& str, const std::string& chars = non_chars);
34
-
35
- bool is_empty(std::string& str, const std::string& chars = non_chars);
36
- bool is_empty(char c, const std::string& chars = non_chars);
37
- bool is_end(std::string& str, size_t end, const std::string& chars = non_chars);
26
+ void toupper(std::string& str);
27
+
28
+ const std::string default_non_chars = "\t\n\v\f\r ";
29
+ std::string& ltrim(std::string& str,
30
+ const std::string& chars = default_non_chars);
31
+ std::string& rtrim(std::string& str,
32
+ const std::string& chars = default_non_chars);
33
+ std::string& trim(std::string& str,
34
+ const std::string& chars = default_non_chars);
35
+
36
+ bool is_empty(std::string& str, const std::string& chars = default_non_chars);
37
+ bool is_empty(char c, const std::string& chars = default_non_chars);
38
+ bool is_end(std::string& str, size_t end,
39
+ const std::string& chars = default_non_chars);
38
40
 
39
41
  // todo: replace with pair of references rather than string ret value to avoid
40
42
  // copy and also using function below. or do it properly with iterators.