casadi 3.6.7__cp38-none-manylinux2014_i686.whl → 3.7.1__cp38-none-manylinux2014_i686.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 (390) 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/casadi-config-version.cmake +1 -1
  7. casadi/cmake/casadi-config.cmake +1 -1
  8. casadi/cmake/casadi-targets-release.cmake +5 -5
  9. casadi/cmake/casadi-targets.cmake +5 -5
  10. casadi/{lib/cmake/tinyxml2/tinyxml2-config-version.cmake → cmake/ghc_filesystem/ghc_filesystem-config-version.cmake} +30 -10
  11. casadi/cmake/ghc_filesystem/ghc_filesystem-config.cmake +30 -0
  12. casadi/cmake/ghc_filesystem/ghc_filesystem-targets.cmake +107 -0
  13. casadi/cmake/highs/highs-targets-release.cmake +2 -2
  14. casadi/cmake/highs/highs-targets.cmake +1 -1
  15. casadi/cmake/libzip/libzip-config-version.cmake +48 -0
  16. casadi/cmake/libzip/libzip-config.cmake +69 -0
  17. casadi/cmake/libzip/libzip-targets-release.cmake +19 -0
  18. casadi/{lib/cmake/tinyxml2/tinyxml2-static-targets.cmake → cmake/libzip/libzip-targets.cmake} +11 -7
  19. casadi/cmake/libzip/modules/FindMbedTLS.cmake +141 -0
  20. casadi/cmake/libzip/modules/FindNettle.cmake +141 -0
  21. casadi/cmake/libzip/modules/Findzstd.cmake +186 -0
  22. casadi/highs +0 -0
  23. casadi/include/casadi/casadi.i +276 -47
  24. casadi/include/casadi/config.h +11 -11
  25. casadi/include/casadi/core/archiver.hpp +58 -0
  26. casadi/include/casadi/core/blazing_spline.hpp +47 -0
  27. casadi/include/casadi/core/calculus.hpp +57 -2
  28. casadi/include/casadi/core/callback.hpp +9 -0
  29. casadi/include/casadi/core/casadi_common.hpp +37 -0
  30. casadi/include/casadi/core/casadi_meta.hpp +15 -0
  31. casadi/include/casadi/core/casadi_misc.hpp +21 -0
  32. casadi/include/casadi/core/code_generator.hpp +115 -19
  33. casadi/include/casadi/core/core.hpp +5 -0
  34. casadi/include/casadi/core/dae_builder.hpp +303 -141
  35. casadi/include/casadi/core/dm.hpp +3 -0
  36. casadi/include/casadi/core/filesystem.hpp +58 -0
  37. casadi/include/casadi/core/fmu.hpp +62 -16
  38. casadi/include/casadi/core/function.hpp +24 -0
  39. casadi/include/casadi/core/generic_matrix.hpp +214 -7
  40. casadi/include/casadi/core/generic_shared.hpp +395 -0
  41. casadi/include/casadi/core/generic_shared_impl.hpp +218 -0
  42. casadi/include/casadi/core/generic_shared_internal.hpp +215 -0
  43. casadi/include/casadi/core/generic_type.hpp +3 -0
  44. casadi/include/casadi/core/global_options.hpp +10 -0
  45. casadi/include/casadi/core/integrator.hpp +41 -7
  46. casadi/include/casadi/core/matrix_decl.hpp +71 -0
  47. casadi/include/casadi/core/mx.hpp +63 -2
  48. casadi/include/casadi/core/nlp_builder.hpp +2 -1
  49. casadi/include/casadi/core/options.hpp +6 -3
  50. casadi/include/casadi/core/optistack.hpp +43 -9
  51. casadi/include/casadi/core/printable.hpp +8 -0
  52. casadi/include/casadi/core/resource.hpp +107 -0
  53. casadi/include/casadi/core/runtime/casadi_blazing_1d_boor_eval.hpp +112 -0
  54. casadi/include/casadi/core/runtime/casadi_blazing_2d_boor_eval.hpp +311 -0
  55. casadi/include/casadi/core/runtime/casadi_blazing_3d_boor_eval.hpp +645 -0
  56. casadi/include/casadi/core/runtime/casadi_blazing_de_boor.hpp +101 -0
  57. casadi/include/casadi/core/runtime/casadi_finite_diff.hpp +1 -1
  58. casadi/include/casadi/core/runtime/casadi_nlp.hpp +8 -2
  59. casadi/include/casadi/core/runtime/casadi_print_canonical.hpp +55 -0
  60. casadi/include/casadi/core/runtime/casadi_print_scalar.hpp +25 -0
  61. casadi/include/casadi/core/runtime/casadi_print_vector.hpp +32 -0
  62. casadi/include/casadi/core/runtime/casadi_printme.hpp +26 -0
  63. casadi/include/casadi/core/serializer.hpp +13 -5
  64. casadi/include/casadi/core/serializing_stream.hpp +9 -2
  65. casadi/include/casadi/core/shared_object.hpp +73 -161
  66. casadi/include/casadi/core/sparsity.hpp +13 -1
  67. casadi/include/casadi/core/sparsity_interface.hpp +19 -1
  68. casadi/include/casadi/core/sx.hpp +41 -0
  69. casadi/include/casadi/core/sx_elem.hpp +25 -0
  70. casadi/include/casadi/core/xml_node.hpp +5 -0
  71. casadi/include/casadi/doc.i +10026 -6513
  72. casadi/include/casadi/doc_merged.i +6744 -4449
  73. casadi/include/casadi/valgrind-casadi.supp +138 -0
  74. casadi/include/casadi/valgrind-python.supp +2470 -0
  75. casadi/include/highs/HConfig.h +6 -4
  76. casadi/include/highs/Highs.h +260 -86
  77. casadi/include/highs/filereaderlp/reader.hpp +10 -10
  78. casadi/include/highs/interfaces/highs_c_api.h +195 -22
  79. casadi/include/highs/io/Filereader.h +4 -6
  80. casadi/include/highs/io/FilereaderEms.h +0 -3
  81. casadi/include/highs/io/FilereaderLp.h +0 -3
  82. casadi/include/highs/io/FilereaderMps.h +0 -3
  83. casadi/include/highs/io/HMPSIO.h +1 -4
  84. casadi/include/highs/io/HMpsFF.h +8 -5
  85. casadi/include/highs/io/HighsIO.h +10 -5
  86. casadi/include/highs/io/LoadOptions.h +0 -3
  87. casadi/include/highs/ipm/IpxSolution.h +0 -3
  88. casadi/include/highs/ipm/IpxWrapper.h +4 -7
  89. casadi/include/highs/ipm/ipx/control.h +1 -0
  90. casadi/include/highs/ipm/ipx/ipx_parameters.h +1 -0
  91. casadi/include/highs/ipm/ipx/lp_solver.h +3 -2
  92. casadi/include/highs/ipm/ipx/model.h +7 -3
  93. casadi/include/highs/lp_data/HConst.h +21 -6
  94. casadi/include/highs/lp_data/HStruct.h +40 -4
  95. casadi/include/highs/lp_data/HighsAnalysis.h +0 -3
  96. casadi/include/highs/lp_data/HighsCallback.h +10 -3
  97. casadi/include/highs/lp_data/HighsCallbackStruct.h +3 -3
  98. casadi/include/highs/lp_data/HighsDebug.h +0 -3
  99. casadi/include/highs/lp_data/HighsIis.h +62 -0
  100. casadi/include/highs/lp_data/HighsInfo.h +50 -43
  101. casadi/include/highs/lp_data/HighsInfoDebug.h +0 -3
  102. casadi/include/highs/lp_data/HighsLp.h +2 -3
  103. casadi/include/highs/lp_data/HighsLpSolverObject.h +0 -3
  104. casadi/include/highs/lp_data/HighsLpUtils.h +38 -6
  105. casadi/include/highs/lp_data/HighsModelUtils.h +21 -18
  106. casadi/include/highs/lp_data/HighsOptions.h +134 -22
  107. casadi/include/highs/lp_data/HighsRanging.h +0 -3
  108. casadi/include/highs/lp_data/HighsSolution.h +10 -3
  109. casadi/include/highs/lp_data/HighsSolutionDebug.h +0 -3
  110. casadi/include/highs/lp_data/HighsSolve.h +0 -3
  111. casadi/include/highs/lp_data/HighsStatus.h +0 -3
  112. casadi/include/highs/mip/HighsCliqueTable.h +3 -3
  113. casadi/include/highs/mip/HighsConflictPool.h +0 -3
  114. casadi/include/highs/mip/HighsCutGeneration.h +13 -3
  115. casadi/include/highs/mip/HighsCutPool.h +0 -3
  116. casadi/include/highs/mip/HighsDebugSol.h +0 -3
  117. casadi/include/highs/mip/HighsDomain.h +16 -4
  118. casadi/include/highs/mip/HighsDomainChange.h +0 -3
  119. casadi/include/highs/mip/HighsDynamicRowMatrix.h +0 -3
  120. casadi/include/highs/mip/HighsGFkSolve.h +3 -6
  121. casadi/include/highs/mip/HighsImplications.h +29 -5
  122. casadi/include/highs/mip/HighsLpAggregator.h +0 -3
  123. casadi/include/highs/mip/HighsLpRelaxation.h +0 -3
  124. casadi/include/highs/mip/HighsMipAnalysis.h +52 -0
  125. casadi/include/highs/mip/HighsMipSolver.h +11 -4
  126. casadi/include/highs/mip/HighsMipSolverData.h +67 -6
  127. casadi/include/highs/mip/HighsModkSeparator.h +1 -4
  128. casadi/include/highs/mip/HighsNodeQueue.h +0 -3
  129. casadi/include/highs/mip/HighsObjectiveFunction.h +0 -3
  130. casadi/include/highs/mip/HighsPathSeparator.h +1 -4
  131. casadi/include/highs/mip/HighsPrimalHeuristics.h +7 -5
  132. casadi/include/highs/mip/HighsPseudocost.h +0 -3
  133. casadi/include/highs/mip/HighsRedcostFixing.h +0 -3
  134. casadi/include/highs/mip/HighsSearch.h +0 -3
  135. casadi/include/highs/mip/HighsSeparation.h +0 -3
  136. casadi/include/highs/mip/HighsSeparator.h +1 -5
  137. casadi/include/highs/mip/HighsTableauSeparator.h +1 -4
  138. casadi/include/highs/mip/HighsTransformedLp.h +0 -3
  139. casadi/include/highs/mip/MipTimer.h +471 -0
  140. casadi/include/highs/parallel/HighsBinarySemaphore.h +1 -1
  141. casadi/include/highs/parallel/HighsCacheAlign.h +1 -1
  142. casadi/include/highs/parallel/HighsCombinable.h +1 -1
  143. casadi/include/highs/parallel/HighsMutex.h +1 -1
  144. casadi/include/highs/parallel/HighsRaceTimer.h +1 -1
  145. casadi/include/highs/parallel/HighsSchedulerConstants.h +1 -1
  146. casadi/include/highs/parallel/HighsSplitDeque.h +1 -1
  147. casadi/include/highs/parallel/HighsTaskExecutor.h +68 -55
  148. casadi/include/highs/pdlp/CupdlpWrapper.h +18 -7
  149. casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +2 -3
  150. casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +16 -6
  151. casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +10 -4
  152. casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +3 -3
  153. casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +6 -6
  154. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  155. casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +11 -11
  156. casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +8 -4
  157. casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +253 -172
  158. casadi/include/highs/presolve/HPresolve.h +50 -10
  159. casadi/include/highs/presolve/HPresolveAnalysis.h +0 -3
  160. casadi/include/highs/presolve/HighsPostsolveStack.h +39 -6
  161. casadi/include/highs/presolve/HighsSymmetry.h +0 -3
  162. casadi/include/highs/presolve/ICrash.h +0 -3
  163. casadi/include/highs/presolve/ICrashUtil.h +1 -4
  164. casadi/include/highs/presolve/ICrashX.h +0 -3
  165. casadi/include/highs/presolve/PresolveComponent.h +0 -3
  166. casadi/include/highs/qpsolver/a_asm.hpp +20 -17
  167. casadi/include/highs/qpsolver/a_quass.hpp +5 -9
  168. casadi/include/highs/qpsolver/basis.hpp +12 -10
  169. casadi/include/highs/qpsolver/crashsolution.hpp +4 -3
  170. casadi/include/highs/qpsolver/dantzigpricing.hpp +3 -2
  171. casadi/include/highs/qpsolver/devexpricing.hpp +3 -1
  172. casadi/include/highs/qpsolver/factor.hpp +6 -5
  173. casadi/include/highs/qpsolver/feasibility_bounded.hpp +31 -29
  174. casadi/include/highs/qpsolver/feasibility_highs.hpp +94 -70
  175. casadi/include/highs/qpsolver/gradient.hpp +1 -1
  176. casadi/include/highs/qpsolver/instance.hpp +1 -1
  177. casadi/include/highs/qpsolver/pricing.hpp +2 -2
  178. casadi/include/highs/qpsolver/qpconst.hpp +2 -2
  179. casadi/include/highs/qpsolver/quass.hpp +2 -2
  180. casadi/include/highs/qpsolver/runtime.hpp +2 -2
  181. casadi/include/highs/qpsolver/settings.hpp +20 -8
  182. casadi/include/highs/qpsolver/steepestedgepricing.hpp +38 -39
  183. casadi/include/highs/simplex/HApp.h +88 -34
  184. casadi/include/highs/simplex/HEkk.h +24 -11
  185. casadi/include/highs/simplex/HEkkDual.h +2 -4
  186. casadi/include/highs/simplex/HEkkDualRHS.h +0 -3
  187. casadi/include/highs/simplex/HEkkDualRow.h +0 -3
  188. casadi/include/highs/simplex/HEkkPrimal.h +1 -5
  189. casadi/include/highs/simplex/HSimplex.h +0 -3
  190. casadi/include/highs/simplex/HSimplexDebug.h +0 -3
  191. casadi/include/highs/simplex/HSimplexNla.h +0 -26
  192. casadi/include/highs/simplex/HSimplexReport.h +0 -3
  193. casadi/include/highs/simplex/HighsSimplexAnalysis.h +5 -8
  194. casadi/include/highs/simplex/SimplexConst.h +10 -11
  195. casadi/include/highs/simplex/SimplexStruct.h +9 -12
  196. casadi/include/highs/simplex/SimplexTimer.h +83 -101
  197. casadi/include/highs/test/DevKkt.h +0 -3
  198. casadi/include/highs/test/KktCh2.h +0 -3
  199. casadi/include/highs/util/FactorTimer.h +39 -64
  200. casadi/include/highs/util/HFactor.h +4 -4
  201. casadi/include/highs/util/HFactorConst.h +0 -3
  202. casadi/include/highs/util/HFactorDebug.h +0 -3
  203. casadi/include/highs/util/HSet.h +0 -3
  204. casadi/include/highs/util/HVector.h +0 -3
  205. casadi/include/highs/util/HVectorBase.h +1 -4
  206. casadi/include/highs/util/HighsCDouble.h +12 -3
  207. casadi/include/highs/util/HighsComponent.h +0 -3
  208. casadi/include/highs/util/HighsDataStack.h +0 -3
  209. casadi/include/highs/util/HighsDisjointSets.h +0 -3
  210. casadi/include/highs/util/HighsHash.h +9 -12
  211. casadi/include/highs/util/HighsHashTree.h +15 -11
  212. casadi/include/highs/util/HighsInt.h +0 -3
  213. casadi/include/highs/util/HighsIntegers.h +0 -3
  214. casadi/include/highs/util/HighsLinearSumBounds.h +0 -3
  215. casadi/include/highs/util/HighsMatrixPic.h +0 -3
  216. casadi/include/highs/util/HighsMatrixSlice.h +3 -6
  217. casadi/include/highs/util/HighsMatrixUtils.h +0 -3
  218. casadi/include/highs/util/HighsMemoryAllocation.h +11 -3
  219. casadi/include/highs/util/HighsRandom.h +3 -6
  220. casadi/include/highs/util/HighsRbTree.h +0 -3
  221. casadi/include/highs/util/HighsSort.h +0 -3
  222. casadi/include/highs/util/HighsSparseMatrix.h +6 -3
  223. casadi/include/highs/util/HighsSparseVectorSum.h +0 -3
  224. casadi/include/highs/util/HighsSplay.h +0 -3
  225. casadi/include/highs/util/HighsTimer.h +94 -56
  226. casadi/include/highs/util/HighsUtils.h +10 -3
  227. casadi/include/highs/util/stringutil.h +14 -12
  228. casadi/include/licenses/ghc-external/LICENSE +19 -0
  229. casadi/include/licenses/libz-external/LICENSE +22 -0
  230. casadi/include/licenses/libz-external/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  231. casadi/include/licenses/libzip-external/LICENSE +31 -0
  232. casadi/libCbcSolver.so +0 -0
  233. casadi/libCbcSolver.so.3 +0 -0
  234. casadi/libCbcSolver.so.3.10.11 +0 -0
  235. casadi/libClpSolver.so +0 -0
  236. casadi/libClpSolver.so.1 +0 -0
  237. casadi/libClpSolver.so.1.14.9 +0 -0
  238. casadi/libbonmin.so +0 -0
  239. casadi/libbonmin.so.4 +0 -0
  240. casadi/libbonmin.so.4.8.9 +0 -0
  241. casadi/libcasadi.so +0 -0
  242. casadi/libcasadi.so.3.7 +0 -0
  243. casadi/libcasadi_archiver_libzip.so +0 -0
  244. casadi/libcasadi_archiver_libzip.so.3.7 +0 -0
  245. casadi/libcasadi_conic_cbc.so +0 -0
  246. casadi/libcasadi_conic_cbc.so.3.7 +0 -0
  247. casadi/libcasadi_conic_clp.so +0 -0
  248. casadi/libcasadi_conic_clp.so.3.7 +0 -0
  249. casadi/libcasadi_conic_daqp.so +0 -0
  250. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  251. casadi/libcasadi_conic_gurobi.so +0 -0
  252. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  253. casadi/libcasadi_conic_highs.so +0 -0
  254. casadi/libcasadi_conic_highs.so.3.7 +0 -0
  255. casadi/libcasadi_conic_ipqp.so +0 -0
  256. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  257. casadi/libcasadi_conic_nlpsol.so +0 -0
  258. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  259. casadi/libcasadi_conic_osqp.so +0 -0
  260. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  261. casadi/libcasadi_conic_proxqp.so +0 -0
  262. casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
  263. casadi/libcasadi_conic_qpoases.so +0 -0
  264. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  265. casadi/libcasadi_conic_qrqp.so +0 -0
  266. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  267. casadi/libcasadi_conic_superscs.so +0 -0
  268. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  269. casadi/libcasadi_filesystem_ghc.so +0 -0
  270. casadi/libcasadi_filesystem_ghc.so.3.7 +0 -0
  271. casadi/libcasadi_importer_shell.so +0 -0
  272. casadi/libcasadi_importer_shell.so.3.7 +0 -0
  273. casadi/libcasadi_integrator_collocation.so +0 -0
  274. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  275. casadi/libcasadi_integrator_cvodes.so +0 -0
  276. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  277. casadi/libcasadi_integrator_idas.so +0 -0
  278. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  279. casadi/libcasadi_integrator_rk.so +0 -0
  280. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  281. casadi/libcasadi_interpolant_bspline.so +0 -0
  282. casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
  283. casadi/libcasadi_interpolant_linear.so +0 -0
  284. casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
  285. casadi/libcasadi_linsol_csparse.so +0 -0
  286. casadi/libcasadi_linsol_csparse.so.3.7 +0 -0
  287. casadi/libcasadi_linsol_csparsecholesky.so +0 -0
  288. casadi/libcasadi_linsol_csparsecholesky.so.3.7 +0 -0
  289. casadi/libcasadi_linsol_lapacklu.so +0 -0
  290. casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
  291. casadi/libcasadi_linsol_lapackqr.so +0 -0
  292. casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
  293. casadi/libcasadi_linsol_ldl.so +0 -0
  294. casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
  295. casadi/libcasadi_linsol_lsqr.so +0 -0
  296. casadi/libcasadi_linsol_lsqr.so.3.7 +0 -0
  297. casadi/libcasadi_linsol_ma27.so +0 -0
  298. casadi/libcasadi_linsol_ma27.so.3.7 +0 -0
  299. casadi/libcasadi_linsol_mumps.so +0 -0
  300. casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
  301. casadi/libcasadi_linsol_qr.so +0 -0
  302. casadi/libcasadi_linsol_qr.so.3.7 +0 -0
  303. casadi/libcasadi_linsol_symbolicqr.so +0 -0
  304. casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
  305. casadi/libcasadi_linsol_tridiag.so +0 -0
  306. casadi/libcasadi_linsol_tridiag.so.3.7 +0 -0
  307. casadi/libcasadi_nlpsol_alpaqa.so +0 -0
  308. casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
  309. casadi/libcasadi_nlpsol_ampl.so +0 -0
  310. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  311. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  312. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  313. casadi/libcasadi_nlpsol_bonmin.so +0 -0
  314. casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
  315. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  316. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  317. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  318. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  319. casadi/libcasadi_nlpsol_knitro.so +0 -0
  320. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  321. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  322. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  323. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  324. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  325. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  326. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  327. casadi/libcasadi_nlpsol_sleqp.so +0 -0
  328. casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
  329. casadi/libcasadi_nlpsol_snopt.so +0 -0
  330. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  331. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  332. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  333. casadi/libcasadi_nlpsol_worhp.so +0 -0
  334. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  335. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  336. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  337. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  338. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  339. casadi/libcasadi_rootfinder_newton.so +0 -0
  340. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  341. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  342. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  343. casadi/libcasadi_sundials_common.so +0 -0
  344. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  345. casadi/libcasadi_xmlfile_tinyxml.so +0 -0
  346. casadi/libcasadi_xmlfile_tinyxml.so.3.7 +0 -0
  347. casadi/libcoinmumps.so +0 -0
  348. casadi/libcoinmumps.so.3 +0 -0
  349. casadi/libcoinmumps.so.3.0.1 +0 -0
  350. casadi/libdaqpstat.a +0 -0
  351. casadi/libhighs.so +0 -0
  352. casadi/libhighs.so.1 +0 -0
  353. casadi/libhighs.so.1.10.0 +0 -0
  354. casadi/libindirect.a +0 -0
  355. casadi/libipopt.so +0 -0
  356. casadi/libipopt.so.3 +0 -0
  357. casadi/libipopt.so.3.14.11 +0 -0
  358. casadi/liblinsys.a +0 -0
  359. casadi/libosqp.a +0 -0
  360. casadi/libqdldl.a +0 -0
  361. casadi/libsipopt.so +0 -0
  362. casadi/libsipopt.so.3 +0 -0
  363. casadi/libsipopt.so.3.14.11 +0 -0
  364. casadi/libsleqp.so +0 -0
  365. casadi/libsleqp.so.1.0.1 +0 -0
  366. casadi/libspral.a +0 -0
  367. casadi/libsuperscs.a +0 -0
  368. casadi/libz.a +0 -0
  369. casadi/libz.so +0 -0
  370. casadi/libz.so.1 +0 -0
  371. casadi/libz.so.1.3.1 +0 -0
  372. casadi/libzip.a +0 -0
  373. casadi/pkgconfig/casadi.pc +1 -1
  374. casadi/pkgconfig/highs.pc +1 -1
  375. casadi/pkgconfig/libzip.pc +14 -0
  376. casadi/tools/__init__.py +3 -1
  377. casadi/tools/graph/graph.py +1 -1
  378. casadi/tools/structure3.py +7 -7
  379. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/METADATA +1 -1
  380. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/RECORD +380 -347
  381. casadi/include/highs/lp_data/HighsRuntimeOptions.h +0 -276
  382. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +0 -28
  383. casadi/include/tinyxml2.h +0 -2380
  384. casadi/lib/cmake/tinyxml2/tinyxml2-config.cmake +0 -57
  385. casadi/lib/cmake/tinyxml2/tinyxml2-static-targets-release.cmake +0 -19
  386. casadi/lib/libtinyxml2.a +0 -0
  387. casadi/lib/pkgconfig/tinyxml2.pc +0 -10
  388. casadi/libhighs.so.1.7.2 +0 -0
  389. casadi/tools/structure.py +0 -1446
  390. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/WHEEL +0 -0
@@ -110,6 +110,8 @@ public:
110
110
 
111
111
  \identifier{18} */
112
112
  MX variable(casadi_int n=1, casadi_int m=1, const std::string& attribute="full");
113
+ MX variable(const Sparsity& sp, const std::string& attribute="full");
114
+ MX variable(const MX& symbol, const std::string& attribute="full");
113
115
 
114
116
  /** \brief Create a parameter (symbol); fixed during optimization
115
117
  *
@@ -123,6 +125,8 @@ public:
123
125
 
124
126
  \identifier{19} */
125
127
  MX parameter(casadi_int n=1, casadi_int m=1, const std::string& attribute="full");
128
+ MX parameter(const Sparsity& sp, const std::string& attribute="full");
129
+ MX parameter(const MX& symbol, const std::string& attribute="full");
126
130
 
127
131
  /** \brief Set objective
128
132
  *
@@ -130,7 +134,7 @@ public:
130
134
  * When method is called multiple times, the last call takes effect
131
135
 
132
136
  \identifier{1a} */
133
- void minimize(const MX& f);
137
+ void minimize(const MX& f, double linear_scale=1);
134
138
 
135
139
  /// @{
136
140
  /** \brief Add constraints
@@ -158,8 +162,10 @@ public:
158
162
  * - opti.debug.show_infeasibilities() may be used to inspect which constraints are violated
159
163
  *
160
164
  \identifier{1b} */
161
- void subject_to(const MX& g);
162
- void subject_to(const std::vector<MX>& g);
165
+ void subject_to(const MX& g, const Dict& options=Dict());
166
+ void subject_to(const std::vector<MX>& g, const Dict& options=Dict());
167
+ void subject_to(const MX& g, const DM& linear_scale, const Dict& options=Dict());
168
+ void subject_to(const std::vector<MX>& g, const DM& linear_scale, const Dict& options=Dict());
163
169
  /// @}
164
170
 
165
171
  /// Clear constraints
@@ -214,8 +220,21 @@ public:
214
220
  \identifier{27t} */
215
221
  void set_domain(const MX& x, const std::string& domain);
216
222
 
217
- /// @}
223
+ /** \brief Set scale of a decision variable
224
+ *
225
+ * (x-offset)/scale will be used in the optimization problem
226
+ *
227
+ * \param[in] x decision variable
228
+ * \param[in] scale scaling value (default: 1)
229
+ * \param[in] offset scaling value (default: 0)
230
+ *
231
+ * \verbatim
232
+ * opti.set_linear_scale(x, 20)
233
+ * opti.set_linear_scale(x, 20, 273.15)
234
+ * \endverbatim
218
235
 
236
+ \identifier{2bs} */
237
+ void set_linear_scale(const MX& x, const DM& scale, const DM& offset=0);
219
238
 
220
239
  /// Crunch the numbers; solve the problem
221
240
  OptiSol solve();
@@ -269,6 +288,11 @@ public:
269
288
  std::vector<MX> value_variables() const;
270
289
  std::vector<MX> value_parameters() const;
271
290
 
291
+ /** \brief Scale a helper function constructed via opti.x, opti.g, ...
292
+
293
+ \identifier{2ci} */
294
+ Function scale_helper(const Function& h) const;
295
+
272
296
  /** \brief get the dual variable
273
297
  *
274
298
  * m must be a constraint expression.
@@ -319,6 +343,11 @@ public:
319
343
  MX lbg() const;
320
344
  MX ubg() const;
321
345
 
346
+ DM x_linear_scale() const;
347
+ DM x_linear_scale_offset() const;
348
+ DM g_linear_scale() const;
349
+ double f_linear_scale() const;
350
+
322
351
  /** \brief Get all (scalarised) dual variables as a symbolic column vector
323
352
  *
324
353
  * Useful for obtaining the Lagrange Hessian:
@@ -480,7 +509,7 @@ public:
480
509
  casadi_int stop;
481
510
  };
482
511
  struct MetaCon : IndexAbstraction {
483
- MetaCon() : n(1), flipped(false) {}
512
+ MetaCon() : n(1), flipped(false), linear_scale(1) {}
484
513
  MX original; // original expression
485
514
  MX canon; // Canonical expression
486
515
  ConstraintType type;
@@ -491,6 +520,7 @@ public:
491
520
  MX dual_canon;
492
521
  MX dual;
493
522
  Dict extra;
523
+ DM linear_scale;
494
524
  };
495
525
  struct MetaVar : IndexAbstraction {
496
526
  std::string attribute;
@@ -571,11 +601,15 @@ public:
571
601
  MX x_lookup(casadi_index i) const;
572
602
  MX g_lookup(casadi_index i) const;
573
603
 
574
- std::string x_describe(casadi_index i) const;
575
- std::string g_describe(casadi_index i) const;
576
- std::string describe(const MX& x, casadi_index indent=0) const;
604
+ casadi_index g_index_reduce_g(casadi_index i) const;
605
+ casadi_index g_index_reduce_x(casadi_index i) const;
606
+ casadi_index g_index_unreduce_g(casadi_index i) const;
607
+
608
+ std::string x_describe(casadi_index i, const Dict& opts=Dict()) const;
609
+ std::string g_describe(casadi_index i, const Dict& opts=Dict()) const;
610
+ std::string describe(const MX& x, casadi_index indent=0, const Dict& opts=Dict()) const;
577
611
 
578
- void show_infeasibilities(double tol=0) const;
612
+ void show_infeasibilities(double tol=0, const Dict& opts=Dict()) const;
579
613
 
580
614
  void solve_prepare();
581
615
  DMDict solve_actual(const DMDict& args);
@@ -26,7 +26,15 @@
26
26
  #ifndef CASADI_PRINTABLE_HPP
27
27
  #define CASADI_PRINTABLE_HPP
28
28
 
29
+ #if __GNUC__
30
+ #pragma GCC diagnostic push
31
+ #pragma GCC diagnostic ignored "-Wnonnull"
32
+ #endif
29
33
  #include <iostream>
34
+ #if __GNUC__
35
+ #pragma GCC diagnostic pop
36
+ #endif
37
+
30
38
  #include <sstream>
31
39
  #include <streambuf>
32
40
  #include <string>
@@ -0,0 +1,107 @@
1
+ /*
2
+ * This file is part of CasADi.
3
+ *
4
+ * CasADi -- A symbolic framework for dynamic optimization.
5
+ * Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl,
6
+ * KU Leuven. All rights reserved.
7
+ * Copyright (C) 2011-2014 Greg Horn
8
+ *
9
+ * CasADi is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU Lesser General Public
11
+ * License as published by the Free Software Foundation; either
12
+ * version 3 of the License, or (at your option) any later version.
13
+ *
14
+ * CasADi is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+ * Lesser General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Lesser General Public
20
+ * License along with CasADi; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
+ *
23
+ */
24
+
25
+
26
+ #ifndef CASADI_RESOURCE_HPP
27
+ #define CASADI_RESOURCE_HPP
28
+
29
+ #include "shared_object.hpp"
30
+ #include "printable.hpp"
31
+ #include "generic_type.hpp"
32
+
33
+ namespace casadi {
34
+ // Forward declaration
35
+ class ResourceInternal;
36
+ class SerializingStream;
37
+ class DeserializingStream;
38
+
39
+ /** \brief RAII class for reading from a zip file
40
+
41
+ \identifier{2cn} */
42
+ class CASADI_EXPORT Resource
43
+ : public SharedObject,
44
+ public SWIG_IF_ELSE(PrintableCommon, Printable<Resource>) {
45
+ public:
46
+ /** \brief Initialize with a path
47
+ *
48
+ * If the path is a directory or empty, the path is passed through to the consumer.
49
+ * Otherwise, the zip file is extracted to a temporary directory.
50
+ *
51
+ * Upon destruction, the temporary directory is removed.
52
+
53
+ \identifier{2co} */
54
+ Resource(const std::string& path);
55
+ /// Default constructor
56
+ explicit Resource();
57
+
58
+ /// Readable name of the public class
59
+ static std::string type_name() {return "Resource";}
60
+
61
+ /// Check if a particular cast is allowed
62
+ static bool test_cast(const SharedObjectInternal* ptr);
63
+
64
+ #ifndef SWIG
65
+ /** \brief Create from node
66
+
67
+ \identifier{2cp} */
68
+ static Resource create(ResourceInternal *node);
69
+
70
+ ResourceInternal* get() const;
71
+
72
+ /// Access a member function or object
73
+ const ResourceInternal* operator->() const;
74
+
75
+ /// Access a member function or object
76
+ ResourceInternal* operator->();
77
+
78
+ /// Reference to internal structure
79
+ const ResourceInternal& operator*() const;
80
+ #endif
81
+
82
+ /// Get path for a consumer
83
+ const std::string& path() const;
84
+
85
+ /** \brief Serialize an object
86
+
87
+ \identifier{2cq} */
88
+ void serialize(SerializingStream &s) const;
89
+
90
+ /** \brief Change option after object creation for debugging
91
+
92
+ * This is only possible for a selected number of options that do not change the numerical
93
+ * results of the comput
94
+
95
+ \identifier{2d4} */
96
+ void change_option(const std::string& option_name,
97
+ const GenericType& option_value);
98
+
99
+ /** \brief Deserialize with type disambiguation
100
+
101
+ \identifier{2cr} */
102
+ static Resource deserialize(DeserializingStream& s);
103
+ };
104
+
105
+ } // namespace casadi
106
+
107
+ #endif // CASADI_RESOURCE_HPP
@@ -0,0 +1,112 @@
1
+ //
2
+ // MIT No Attribution
3
+ //
4
+ // Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
5
+ //
6
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this
7
+ // software and associated documentation files (the "Software"), to deal in the Software
8
+ // without restriction, including without limitation the rights to use, copy, modify,
9
+ // merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10
+ // permit persons to whom the Software is furnished to do so.
11
+ //
12
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13
+ // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
14
+ // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
15
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
16
+ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
17
+ // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
+ //
19
+
20
+ // SYMBOL "blazing_1d_boor_eval"
21
+ template<typename T1>
22
+ void casadi_blazing_1d_boor_eval(T1* f, T1* J, T1* H, const T1* all_knots, const casadi_int* offset, const T1* c, const T1* dc, const T1* ddc, const T1* all_x, const casadi_int* lookup_mode, casadi_int* iw, T1* w) { // NOLINT(whitespace/line_length)
23
+ casadi_int n_dims = 1;
24
+ casadi_int m = 1;
25
+ casadi_int n_iter, i, pivot;
26
+ casadi_int *boor_offset, *starts, *index, *coeff_offset;
27
+ T1 *cumprod;
28
+ boor_offset = iw; iw+=n_dims+1;
29
+ starts = iw; iw+=n_dims;
30
+ index = iw; iw+=n_dims;
31
+ coeff_offset = iw;
32
+ cumprod = w; w+= n_dims+1;
33
+ boor_offset[0] = 0;
34
+ cumprod[n_dims] = 1;
35
+ coeff_offset[n_dims] = 0;
36
+
37
+ casadi_int stride1 = offset[1]-offset[0]-4;
38
+
39
+ simde__m256d zero = simde_mm256_set1_pd(0.0);
40
+
41
+ simde__m256d boor_start_0000 = zero;
42
+ simde__m256d boor_start_1111 = simde_mm256_set1_pd(1.0);
43
+ simde__m256d boor_start_0001 = simde_mm256_set_pd(1.0, 0.0, 0.0, 0.0);
44
+ simde__m256d boor_start_0010 = simde_mm256_set_pd(0.0, 1.0, 0.0, 0.0);
45
+
46
+ simde__m256d boor0_d3;
47
+ simde__m256d boor0_d2;
48
+ simde__m256d boor0_d1;
49
+ simde__m256d boor0_d0;
50
+
51
+ const T1* knots;
52
+ T1 x;
53
+ casadi_int degree, n_knots, n_b, L, start;
54
+ degree = 3;
55
+ knots = all_knots + offset[0];
56
+ n_knots = offset[0+1]-offset[0];
57
+ n_b = n_knots-degree-1;
58
+ x = all_x[0];
59
+ L = casadi_low(x, knots+degree, n_knots-2*degree, lookup_mode[0]);
60
+ start = L;
61
+ if (start>n_b-degree-1) start = n_b-degree-1;
62
+ starts[0] = start;
63
+ boor0_d3 = boor_start_0000;
64
+ if (x>=knots[0] && x<=knots[n_knots-1]) {
65
+ if (x==knots[1]) {
66
+ boor0_d3 = boor_start_1111;
67
+ } else if (x==knots[n_knots-1]) {
68
+ boor0_d3 = boor_start_0001;
69
+ } else if (knots[L+degree]==x) {
70
+ boor0_d3 = boor_start_0010;
71
+ } else {
72
+ boor0_d3 = boor_start_0001;
73
+ }
74
+ }
75
+ casadi_blazing_de_boor(x, knots+start, &boor0_d0, &boor0_d1, &boor0_d2, &boor0_d3);
76
+
77
+ double boor0_d0v[4];
78
+ simde_mm256_storeu_pd(boor0_d0v, boor0_d0);
79
+
80
+ const T1* C = c+starts[0];
81
+ if (f) {
82
+ f[0] = 0;
83
+ for (casadi_int i=0;i<4;++i) {
84
+ f[0] += boor0_d0v[i]*C[i];
85
+ }
86
+ }
87
+
88
+ // First derivative
89
+ if (dc && J) {
90
+ C = dc+starts[0];
91
+
92
+ double boor0_d1v[4];
93
+ simde_mm256_storeu_pd(boor0_d1v, boor0_d1);
94
+
95
+ J[0] = 0;
96
+ for (casadi_int i=0;i<3;++i) {
97
+ J[0] += boor0_d1v[i+1]*C[i];
98
+ }
99
+ }
100
+
101
+ if (ddc && H) {
102
+ C = ddc+starts[0];
103
+
104
+ double boor0_d2v[4];
105
+ simde_mm256_storeu_pd(boor0_d2v, boor0_d2);
106
+
107
+ H[0] = 0;
108
+ for (casadi_int i=0;i<2;++i) {
109
+ H[0] += boor0_d2v[i+2]*C[i];
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,311 @@
1
+ //
2
+ // MIT No Attribution
3
+ //
4
+ // Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
5
+ //
6
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this
7
+ // software and associated documentation files (the "Software"), to deal in the Software
8
+ // without restriction, including without limitation the rights to use, copy, modify,
9
+ // merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10
+ // permit persons to whom the Software is furnished to do so.
11
+ //
12
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13
+ // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
14
+ // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
15
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
16
+ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
17
+ // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
+ //
19
+
20
+ // SYMBOL "blazing_2d_boor_eval"
21
+ template<typename T1>
22
+ void casadi_blazing_2d_boor_eval(T1* f, T1* J, T1* H, const T1* all_knots, const casadi_int* offset, const T1* c, const T1* dc, const T1* ddc, const T1* all_x, const casadi_int* lookup_mode, casadi_int* iw, T1* w) { // NOLINT(whitespace/line_length)
23
+ casadi_int n_dims = 2;
24
+ casadi_int m = 1;
25
+ casadi_int n_iter, i, pivot;
26
+ casadi_int *boor_offset, *starts, *index, *coeff_offset;
27
+ T1 *cumprod;
28
+ boor_offset = iw; iw+=n_dims+1;
29
+ starts = iw; iw+=n_dims;
30
+ index = iw; iw+=n_dims;
31
+ coeff_offset = iw;
32
+ cumprod = w; w+= n_dims+1;
33
+ boor_offset[0] = 0;
34
+ cumprod[n_dims] = 1;
35
+ coeff_offset[n_dims] = 0;
36
+
37
+ casadi_int stride1 = offset[1]-offset[0]-4;
38
+
39
+ simde__m256d zero = simde_mm256_set1_pd(0.0);
40
+
41
+ simde__m256d boor_start_0000 = zero;
42
+ simde__m256d boor_start_1111 = simde_mm256_set1_pd(1.0);
43
+ simde__m256d boor_start_0001 = simde_mm256_set_pd(1.0, 0.0, 0.0, 0.0);
44
+ simde__m256d boor_start_0010 = simde_mm256_set_pd(0.0, 1.0, 0.0, 0.0);
45
+
46
+ simde__m256d boor0_d3;
47
+ simde__m256d boor0_d2;
48
+ simde__m256d boor0_d1;
49
+ simde__m256d boor0_d0;
50
+
51
+ simde__m256d boor1_d3;
52
+ simde__m256d boor1_d2;
53
+ simde__m256d boor1_d1;
54
+ simde__m256d boor1_d0;
55
+
56
+ const T1* knots;
57
+ T1 x;
58
+ casadi_int degree, n_knots, n_b, L, start;
59
+ degree = 3;
60
+ knots = all_knots + offset[0];
61
+ n_knots = offset[0+1]-offset[0];
62
+ n_b = n_knots-degree-1;
63
+ x = all_x[0];
64
+ L = casadi_low(x, knots+degree, n_knots-2*degree, lookup_mode[0]);
65
+ start = L;
66
+ if (start>n_b-degree-1) start = n_b-degree-1;
67
+ starts[0] = start;
68
+ boor0_d3 = boor_start_0000;
69
+ if (x>=knots[0] && x<=knots[n_knots-1]) {
70
+ if (x==knots[1]) {
71
+ boor0_d3 = boor_start_1111;
72
+ } else if (x==knots[n_knots-1]) {
73
+ boor0_d3 = boor_start_0001;
74
+ } else if (knots[L+degree]==x) {
75
+ boor0_d3 = boor_start_0010;
76
+ } else {
77
+ boor0_d3 = boor_start_0001;
78
+ }
79
+ }
80
+ casadi_blazing_de_boor(x, knots+start, &boor0_d0, &boor0_d1, &boor0_d2, &boor0_d3);
81
+
82
+ knots = all_knots + offset[1];
83
+ n_knots = offset[1+1]-offset[1];
84
+ n_b = n_knots-degree-1;
85
+ x = all_x[1];
86
+ L = casadi_low(x, knots+degree, n_knots-2*degree, lookup_mode[1]);
87
+ start = L;
88
+ if (start>n_b-degree-1) start = n_b-degree-1;
89
+ starts[1] = start;
90
+ boor1_d3 = boor_start_0000;
91
+ if (x>=knots[0] && x<=knots[n_knots-1]) {
92
+ if (x==knots[1]) {
93
+ boor1_d3 = boor_start_1111;
94
+ } else if (x==knots[n_knots-1]) {
95
+ boor1_d3 = boor_start_0001;
96
+ } else if (knots[L+degree]==x) {
97
+ boor1_d3 = boor_start_0010;
98
+ } else {
99
+ boor1_d3 = boor_start_0001;
100
+ }
101
+ }
102
+ casadi_blazing_de_boor(x, knots+start, &boor1_d0, &boor1_d1, &boor1_d2, &boor1_d3);
103
+
104
+ simde__m256d C[4];
105
+
106
+ for (int j=0;j<4;++j) {
107
+ C[j] = simde_mm256_loadu_pd(c+(starts[1]+j)*stride1+starts[0]);
108
+ }
109
+
110
+ simde__m256d a, b0, b1, b2, b3, c0, c1, c2, c3, r;
111
+ simde__m256d ab[4];
112
+ simde__m128d r0, r1;
113
+
114
+ a = boor0_d0;
115
+ b0 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(0, 0, 0, 0));
116
+ b1 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(1, 1, 1, 1));
117
+ b2 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(2, 2, 2, 2));
118
+ b3 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(3, 3, 3, 3));
119
+
120
+ // Need to compute sum_ab C_ab A_a B_b
121
+
122
+ // Step 1: Outer product a b: A_a B_b
123
+ ab[0] = simde_mm256_mul_pd(a, b0);
124
+ ab[1] = simde_mm256_mul_pd(a, b1);
125
+ ab[2] = simde_mm256_mul_pd(a, b2);
126
+ ab[3] = simde_mm256_mul_pd(a, b3);
127
+
128
+ // Sum over b axis: sum_b C_ab * (A_a B_b)_b
129
+ // r <- r + ab[i]*C[i]
130
+ r = simde_mm256_set1_pd(0);
131
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
132
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
133
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
134
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
135
+
136
+ if (f) {
137
+ // Sum all cab entries
138
+ r0 = simde_mm256_castpd256_pd128(r);
139
+ r1 = simde_mm256_extractf128_pd(r, 1);
140
+ r0 = simde_mm_add_pd(r0, r1);
141
+ f[0] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
142
+ }
143
+
144
+ // First derivative
145
+ if (dc && J) {
146
+ stride1 = offset[1]-offset[0]-4-1;
147
+ for (int j=0;j<4;++j) {
148
+ C[j] = simde_mm256_loadu_pd(dc+(starts[1]+j)*stride1+starts[0]-1);
149
+ }
150
+ dc += stride1*(offset[2]-offset[1]-4);
151
+
152
+ a = boor0_d1;
153
+ ab[0] = simde_mm256_mul_pd(a, b0);
154
+ ab[1] = simde_mm256_mul_pd(a, b1);
155
+ ab[2] = simde_mm256_mul_pd(a, b2);
156
+ ab[3] = simde_mm256_mul_pd(a, b3);
157
+
158
+ // Sum over b axis: sum_b C_abc * (A_a B_b)_b
159
+ // cab <- cab + ab[i]*C[i]
160
+ r = simde_mm256_set1_pd(0);
161
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
162
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
163
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
164
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
165
+
166
+ // Sum all r entries
167
+ r0 = simde_mm256_castpd256_pd128(r);
168
+ r1 = simde_mm256_extractf128_pd(r, 1);
169
+ r0 = simde_mm_add_pd(r0, r1);
170
+ J[0] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
171
+
172
+
173
+ stride1 = offset[1]-offset[0]-4;
174
+ for (int j=0;j<4;++j) {
175
+ if (j==0) {
176
+ C[j] = zero;
177
+ } else {
178
+ C[j] = simde_mm256_loadu_pd(dc+(starts[1]+j-1)*stride1+starts[0]);
179
+ }
180
+ }
181
+
182
+ a = boor0_d0;
183
+
184
+ b0 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(0, 0, 0, 0));
185
+ b1 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(1, 1, 1, 1));
186
+ b2 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(2, 2, 2, 2));
187
+ b3 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(3, 3, 3, 3));
188
+
189
+ ab[0] = simde_mm256_mul_pd(a, b0);
190
+ ab[1] = simde_mm256_mul_pd(a, b1);
191
+ ab[2] = simde_mm256_mul_pd(a, b2);
192
+ ab[3] = simde_mm256_mul_pd(a, b3);
193
+
194
+ // Sum over b axis: sum_b C_abc * (A_a B_b)_b
195
+ // cab <- cab + ab[i]*C[i]
196
+ r = simde_mm256_set1_pd(0);
197
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
198
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
199
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
200
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
201
+
202
+ // Sum all r entries
203
+ r0 = simde_mm256_castpd256_pd128(r);
204
+ r1 = simde_mm256_extractf128_pd(r, 1);
205
+ r0 = simde_mm_add_pd(r0, r1);
206
+ J[1] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
207
+ }
208
+
209
+ if (ddc && H) {
210
+ stride1 = offset[1]-offset[0]-4-2;
211
+ for (int j=0;j<4;++j) {
212
+ C[j] = simde_mm256_loadu_pd(ddc+(starts[1]+j)*stride1+starts[0]-2);
213
+ }
214
+ ddc += stride1*(offset[2]-offset[1]-4);
215
+
216
+ a = boor0_d2;
217
+ b0 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(0, 0, 0, 0));
218
+ b1 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(1, 1, 1, 1));
219
+ b2 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(2, 2, 2, 2));
220
+ b3 = simde_mm256_permute4x64_pd(boor1_d0, SIMDE_MM_SHUFFLE(3, 3, 3, 3));
221
+
222
+ ab[0] = simde_mm256_mul_pd(a, b0);
223
+ ab[1] = simde_mm256_mul_pd(a, b1);
224
+ ab[2] = simde_mm256_mul_pd(a, b2);
225
+ ab[3] = simde_mm256_mul_pd(a, b3);
226
+ // Sum over b axis: sum_b C_abc * (A_a B_b)_b
227
+ // cab <- cab + ab[i]*C[i]
228
+ r = simde_mm256_set1_pd(0);
229
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
230
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
231
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
232
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
233
+
234
+ // Sum all r entries
235
+ r0 = simde_mm256_castpd256_pd128(r);
236
+ r1 = simde_mm256_extractf128_pd(r, 1);
237
+ r0 = simde_mm_add_pd(r0, r1);
238
+ H[0] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
239
+
240
+ stride1 = offset[1]-offset[0]-4;
241
+ for (int j=0;j<4;++j) {
242
+ if (j<=1) {
243
+ C[j] = zero;
244
+ } else {
245
+ C[j] = simde_mm256_loadu_pd(ddc+(starts[1]+j-2)*stride1+starts[0]);
246
+ }
247
+ }
248
+ ddc += stride1*(offset[2]-offset[1]-4-2);
249
+
250
+ a = boor0_d0;
251
+ b0 = simde_mm256_permute4x64_pd(boor1_d2, SIMDE_MM_SHUFFLE(0, 0, 0, 0));
252
+ b1 = simde_mm256_permute4x64_pd(boor1_d2, SIMDE_MM_SHUFFLE(1, 1, 1, 1));
253
+ b2 = simde_mm256_permute4x64_pd(boor1_d2, SIMDE_MM_SHUFFLE(2, 2, 2, 2));
254
+ b3 = simde_mm256_permute4x64_pd(boor1_d2, SIMDE_MM_SHUFFLE(3, 3, 3, 3));
255
+
256
+ ab[0] = simde_mm256_mul_pd(a, b0);
257
+ ab[1] = simde_mm256_mul_pd(a, b1);
258
+ ab[2] = simde_mm256_mul_pd(a, b2);
259
+ ab[3] = simde_mm256_mul_pd(a, b3);
260
+ // Sum over b axis: sum_b C_abc * (A_a B_b)_b
261
+ // cab <- cab + ab[i]*C[i]
262
+ r = simde_mm256_set1_pd(0);
263
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
264
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
265
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
266
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
267
+
268
+ // Sum all r entries
269
+ r0 = simde_mm256_castpd256_pd128(r);
270
+ r1 = simde_mm256_extractf128_pd(r, 1);
271
+ r0 = simde_mm_add_pd(r0, r1);
272
+ H[3] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
273
+
274
+ stride1 = offset[1]-offset[0]-5;
275
+ for (int j=0;j<4;++j) {
276
+ if (j==0) {
277
+ C[j] = zero;
278
+ } else {
279
+ C[j] = simde_mm256_loadu_pd(ddc+(starts[1]+j-1)*stride1+starts[0]-1);
280
+ }
281
+ }
282
+ ddc += stride1*(offset[3]-offset[2]-5);
283
+
284
+ a = boor0_d1;
285
+
286
+ b0 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(0, 0, 0, 0));
287
+ b1 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(1, 1, 1, 1));
288
+ b2 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(2, 2, 2, 2));
289
+ b3 = simde_mm256_permute4x64_pd(boor1_d1, SIMDE_MM_SHUFFLE(3, 3, 3, 3));
290
+
291
+ ab[0] = simde_mm256_mul_pd(a, b0);
292
+ ab[1] = simde_mm256_mul_pd(a, b1);
293
+ ab[2] = simde_mm256_mul_pd(a, b2);
294
+ ab[3] = simde_mm256_mul_pd(a, b3);
295
+ // Sum over b axis: sum_b C_abc * (A_a B_b)_b
296
+ // cab <- cab + ab[i]*C[i]
297
+ r = simde_mm256_set1_pd(0);
298
+ r = simde_mm256_fmadd_pd(ab[0], C[0], r);
299
+ r = simde_mm256_fmadd_pd(ab[1], C[1], r);
300
+ r = simde_mm256_fmadd_pd(ab[2], C[2], r);
301
+ r = simde_mm256_fmadd_pd(ab[3], C[3], r);
302
+
303
+ // Sum all r entries
304
+ r0 = simde_mm256_castpd256_pd128(r);
305
+ r1 = simde_mm256_extractf128_pd(r, 1);
306
+ r0 = simde_mm_add_pd(r0, r1);
307
+ H[1] = H[2] = simde_mm_cvtsd_f64(simde_mm_add_sd(r0, simde_mm_unpackhi_pd(r0, r0)));
308
+
309
+ }
310
+
311
+ }