casadi 3.6.7__cp37-none-manylinux2014_aarch64.whl → 3.7.1__cp37-none-manylinux2014_aarch64.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 (221) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi-cli +0 -0
  3. casadi/casadi.py +6531 -3039
  4. casadi/cmake/casadi-config-version.cmake +1 -1
  5. casadi/cmake/casadi-config.cmake +1 -1
  6. casadi/cmake/casadi-targets-release.cmake +5 -5
  7. casadi/cmake/casadi-targets.cmake +5 -5
  8. casadi/{lib/cmake/tinyxml2/tinyxml2-config-version.cmake → cmake/ghc_filesystem/ghc_filesystem-config-version.cmake} +30 -10
  9. casadi/cmake/ghc_filesystem/ghc_filesystem-config.cmake +30 -0
  10. casadi/cmake/ghc_filesystem/ghc_filesystem-targets.cmake +107 -0
  11. casadi/cmake/libzip/libzip-config-version.cmake +43 -0
  12. casadi/cmake/libzip/libzip-config.cmake +69 -0
  13. casadi/cmake/libzip/libzip-targets-release.cmake +19 -0
  14. casadi/{lib/cmake/tinyxml2/tinyxml2-static-targets.cmake → cmake/libzip/libzip-targets.cmake} +11 -7
  15. casadi/cmake/libzip/modules/FindMbedTLS.cmake +141 -0
  16. casadi/cmake/libzip/modules/FindNettle.cmake +141 -0
  17. casadi/cmake/libzip/modules/Findzstd.cmake +186 -0
  18. casadi/include/casadi/casadi.i +276 -47
  19. casadi/include/casadi/config.h +11 -11
  20. casadi/include/casadi/core/archiver.hpp +58 -0
  21. casadi/include/casadi/core/blazing_spline.hpp +47 -0
  22. casadi/include/casadi/core/calculus.hpp +57 -2
  23. casadi/include/casadi/core/callback.hpp +9 -0
  24. casadi/include/casadi/core/casadi_common.hpp +37 -0
  25. casadi/include/casadi/core/casadi_meta.hpp +15 -0
  26. casadi/include/casadi/core/casadi_misc.hpp +21 -0
  27. casadi/include/casadi/core/code_generator.hpp +115 -19
  28. casadi/include/casadi/core/core.hpp +5 -0
  29. casadi/include/casadi/core/dae_builder.hpp +303 -141
  30. casadi/include/casadi/core/dm.hpp +3 -0
  31. casadi/include/casadi/core/filesystem.hpp +58 -0
  32. casadi/include/casadi/core/fmu.hpp +62 -16
  33. casadi/include/casadi/core/function.hpp +24 -0
  34. casadi/include/casadi/core/generic_matrix.hpp +214 -7
  35. casadi/include/casadi/core/generic_shared.hpp +395 -0
  36. casadi/include/casadi/core/generic_shared_impl.hpp +218 -0
  37. casadi/include/casadi/core/generic_shared_internal.hpp +215 -0
  38. casadi/include/casadi/core/generic_type.hpp +3 -0
  39. casadi/include/casadi/core/global_options.hpp +10 -0
  40. casadi/include/casadi/core/integrator.hpp +41 -7
  41. casadi/include/casadi/core/matrix_decl.hpp +71 -0
  42. casadi/include/casadi/core/mx.hpp +63 -2
  43. casadi/include/casadi/core/nlp_builder.hpp +2 -1
  44. casadi/include/casadi/core/options.hpp +6 -3
  45. casadi/include/casadi/core/optistack.hpp +43 -9
  46. casadi/include/casadi/core/printable.hpp +8 -0
  47. casadi/include/casadi/core/resource.hpp +107 -0
  48. casadi/include/casadi/core/runtime/casadi_blazing_1d_boor_eval.hpp +112 -0
  49. casadi/include/casadi/core/runtime/casadi_blazing_2d_boor_eval.hpp +311 -0
  50. casadi/include/casadi/core/runtime/casadi_blazing_3d_boor_eval.hpp +645 -0
  51. casadi/include/casadi/core/runtime/casadi_blazing_de_boor.hpp +101 -0
  52. casadi/include/casadi/core/runtime/casadi_finite_diff.hpp +1 -1
  53. casadi/include/casadi/core/runtime/casadi_nlp.hpp +8 -2
  54. casadi/include/casadi/core/runtime/casadi_print_canonical.hpp +55 -0
  55. casadi/include/casadi/core/runtime/casadi_print_scalar.hpp +25 -0
  56. casadi/include/casadi/core/runtime/casadi_print_vector.hpp +32 -0
  57. casadi/include/casadi/core/runtime/casadi_printme.hpp +26 -0
  58. casadi/include/casadi/core/serializer.hpp +13 -5
  59. casadi/include/casadi/core/serializing_stream.hpp +9 -2
  60. casadi/include/casadi/core/shared_object.hpp +73 -161
  61. casadi/include/casadi/core/sparsity.hpp +13 -1
  62. casadi/include/casadi/core/sparsity_interface.hpp +19 -1
  63. casadi/include/casadi/core/sx.hpp +41 -0
  64. casadi/include/casadi/core/sx_elem.hpp +25 -0
  65. casadi/include/casadi/core/xml_node.hpp +5 -0
  66. casadi/include/casadi/doc.i +10026 -6513
  67. casadi/include/casadi/doc_merged.i +6744 -4449
  68. casadi/include/casadi/valgrind-casadi.supp +138 -0
  69. casadi/include/casadi/valgrind-python.supp +2470 -0
  70. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +4 -1
  71. casadi/include/ghc/filesystem.hpp +6083 -0
  72. casadi/include/ghc/fs_fwd.hpp +38 -0
  73. casadi/include/ghc/fs_impl.hpp +35 -0
  74. casadi/include/ghc/fs_std.hpp +60 -0
  75. casadi/include/ghc/fs_std_fwd.hpp +63 -0
  76. casadi/include/ghc/fs_std_impl.hpp +46 -0
  77. casadi/include/licenses/ghc-external/LICENSE +19 -0
  78. casadi/include/licenses/libz-external/LICENSE +22 -0
  79. casadi/include/licenses/libz-external/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  80. casadi/include/licenses/libzip-external/LICENSE +31 -0
  81. casadi/include/zconf.h +545 -0
  82. casadi/include/zip.h +528 -0
  83. casadi/include/zipconf.h +48 -0
  84. casadi/include/zlib.h +1938 -0
  85. casadi/libcasadi-tp-openblas.so +0 -0
  86. casadi/libcasadi-tp-openblas.so.0 +0 -0
  87. casadi/libcasadi-tp-openblas.so.0.3 +0 -0
  88. casadi/libcasadi.so +0 -0
  89. casadi/libcasadi.so.3.7 +0 -0
  90. casadi/libcasadi_archiver_libzip.so +0 -0
  91. casadi/libcasadi_archiver_libzip.so.3.7 +0 -0
  92. casadi/libcasadi_conic_cplex.so +0 -0
  93. casadi/libcasadi_conic_cplex.so.3.7 +0 -0
  94. casadi/libcasadi_conic_daqp.so +0 -0
  95. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  96. casadi/libcasadi_conic_fatrop.so +0 -0
  97. casadi/libcasadi_conic_fatrop.so.3.7 +0 -0
  98. casadi/libcasadi_conic_gurobi.so +0 -0
  99. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  100. casadi/libcasadi_conic_hpipm.so +0 -0
  101. casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
  102. casadi/libcasadi_conic_ipqp.so +0 -0
  103. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  104. casadi/libcasadi_conic_nlpsol.so +0 -0
  105. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  106. casadi/libcasadi_conic_osqp.so +0 -0
  107. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  108. casadi/libcasadi_conic_proxqp.so +0 -0
  109. casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
  110. casadi/libcasadi_conic_qpoases.so +0 -0
  111. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  112. casadi/libcasadi_conic_qrqp.so +0 -0
  113. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  114. casadi/libcasadi_conic_superscs.so +0 -0
  115. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  116. casadi/libcasadi_filesystem_ghc.so +0 -0
  117. casadi/libcasadi_filesystem_ghc.so.3.7 +0 -0
  118. casadi/libcasadi_importer_shell.so +0 -0
  119. casadi/libcasadi_importer_shell.so.3.7 +0 -0
  120. casadi/libcasadi_integrator_collocation.so +0 -0
  121. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  122. casadi/libcasadi_integrator_cvodes.so +0 -0
  123. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  124. casadi/libcasadi_integrator_idas.so +0 -0
  125. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  126. casadi/libcasadi_integrator_rk.so +0 -0
  127. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  128. casadi/libcasadi_interpolant_bspline.so +0 -0
  129. casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
  130. casadi/libcasadi_interpolant_linear.so +0 -0
  131. casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
  132. casadi/libcasadi_linsol_csparse.so +0 -0
  133. casadi/libcasadi_linsol_csparse.so.3.7 +0 -0
  134. casadi/libcasadi_linsol_csparsecholesky.so +0 -0
  135. casadi/libcasadi_linsol_csparsecholesky.so.3.7 +0 -0
  136. casadi/libcasadi_linsol_lapacklu.so +0 -0
  137. casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
  138. casadi/libcasadi_linsol_lapackqr.so +0 -0
  139. casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
  140. casadi/libcasadi_linsol_ldl.so +0 -0
  141. casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
  142. casadi/libcasadi_linsol_lsqr.so +0 -0
  143. casadi/libcasadi_linsol_lsqr.so.3.7 +0 -0
  144. casadi/libcasadi_linsol_ma27.so +0 -0
  145. casadi/libcasadi_linsol_ma27.so.3.7 +0 -0
  146. casadi/libcasadi_linsol_mumps.so +0 -0
  147. casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
  148. casadi/libcasadi_linsol_qr.so +0 -0
  149. casadi/libcasadi_linsol_qr.so.3.7 +0 -0
  150. casadi/libcasadi_linsol_symbolicqr.so +0 -0
  151. casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
  152. casadi/libcasadi_linsol_tridiag.so +0 -0
  153. casadi/libcasadi_linsol_tridiag.so.3.7 +0 -0
  154. casadi/libcasadi_nlpsol_alpaqa.so +0 -0
  155. casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
  156. casadi/libcasadi_nlpsol_ampl.so +0 -0
  157. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  158. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  159. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  160. casadi/libcasadi_nlpsol_fatrop.so +0 -0
  161. casadi/libcasadi_nlpsol_fatrop.so.3.7 +0 -0
  162. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  163. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  164. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  165. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  166. casadi/libcasadi_nlpsol_knitro.so +0 -0
  167. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  168. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  169. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  170. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  171. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  172. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  173. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  174. casadi/libcasadi_nlpsol_snopt.so +0 -0
  175. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  176. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  177. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  178. casadi/libcasadi_nlpsol_worhp.so +0 -0
  179. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  180. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  181. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  182. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  183. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  184. casadi/libcasadi_rootfinder_newton.so +0 -0
  185. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  186. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  187. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  188. casadi/libcasadi_sundials_common.so +0 -0
  189. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  190. casadi/libcasadi_xmlfile_tinyxml.so +0 -0
  191. casadi/libcasadi_xmlfile_tinyxml.so.3.7 +0 -0
  192. casadi/libcoinmumps.so +0 -0
  193. casadi/libcoinmumps.so.3 +0 -0
  194. casadi/libcoinmumps.so.3.0.1 +0 -0
  195. casadi/libfatrop.so +0 -0
  196. casadi/libgfortran-9121747c.so.5.0.0 +0 -0
  197. casadi/libipopt.so +0 -0
  198. casadi/libipopt.so.3 +0 -0
  199. casadi/libipopt.so.3.14.11 +0 -0
  200. casadi/libsipopt.so +0 -0
  201. casadi/libsipopt.so.3 +0 -0
  202. casadi/libsipopt.so.3.14.11 +0 -0
  203. casadi/libz.a +0 -0
  204. casadi/libz.so +0 -0
  205. casadi/libz.so.1 +0 -0
  206. casadi/libz.so.1.3.1 +0 -0
  207. casadi/libzip.a +0 -0
  208. casadi/pkgconfig/casadi.pc +1 -1
  209. casadi/pkgconfig/libzip.pc +14 -0
  210. casadi/tools/__init__.py +3 -1
  211. casadi/tools/graph/graph.py +1 -1
  212. casadi/tools/structure3.py +7 -7
  213. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/METADATA +1 -1
  214. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/RECORD +215 -173
  215. casadi/include/tinyxml2.h +0 -2380
  216. casadi/lib/cmake/tinyxml2/tinyxml2-config.cmake +0 -57
  217. casadi/lib/cmake/tinyxml2/tinyxml2-static-targets-release.cmake +0 -19
  218. casadi/lib/libtinyxml2.a +0 -0
  219. casadi/lib/pkgconfig/tinyxml2.pc +0 -10
  220. casadi/tools/structure.py +0 -1446
  221. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/WHEEL +0 -0
@@ -55,15 +55,37 @@
55
55
  // Define printing routine
56
56
 
57
57
  #ifdef SWIGPYTHON
58
+
59
+ #ifdef CASADI_WITH_PYTHON_GIL_RELEASE
60
+ %{
61
+ // This .cxx was swig-compiled with WITH_PYTHON_GIL_RELEASE option
62
+ #define CASADI_WITH_PYTHON_GIL_RELEASE
63
+ %}
64
+ #else //CASADI_WITH_PYTHON_GIL_RELEASE
65
+ %{
66
+ // This .cxx was swig-compiled without WITH_PYTHON_GIL_RELEASE option
67
+ #undef CASADI_WITH_PYTHON_GIL_RELEASE
68
+ %}
69
+ #endif //CASADI_WITH_PYTHON_GIL_RELEASE
70
+
71
+ %ignore CASADI_SWIG_FLAGS;
72
+ %include "swig_config.h"
73
+
58
74
  %{
59
75
  namespace casadi {
76
+
60
77
  // Redirect printout
61
78
  static void pythonlogger(const char* s, std::streamsize num, bool error) {
79
+ #ifndef CASADI_WITH_PYTHON_GIL_RELEASE
62
80
  if (!casadi::InterruptHandler::is_main_thread()) {
63
81
  casadi::Logger::writeDefault(s, num, error);
64
82
  return;
65
83
  }
84
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
66
85
  int n = num;
86
+ #ifdef CASADI_WITH_PYTHON_GIL_RELEASE
87
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK;
88
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
67
89
  while (n>0) {
68
90
  if (error) {
69
91
  PySys_WriteStderr("%.*s", std::min(n, 1000), s);
@@ -73,11 +95,18 @@
73
95
  n -= 1000;
74
96
  s += 1000;
75
97
  }
98
+ #ifdef CASADI_WITH_PYTHON_GIL_RELEASE
99
+ SWIG_PYTHON_THREAD_END_BLOCK;
100
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
76
101
  }
77
102
 
78
103
  static bool pythoncheckinterrupted() {
79
104
  if (!casadi::InterruptHandler::is_main_thread()) return false;
105
+ #ifdef CASADI_WITH_PYTHON_GIL_RELEASE
106
+ SWIG_PYTHON_THREAD_BEGIN_BLOCK;
107
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
80
108
  return PyErr_CheckSignals();
109
+ // SWIG_PYTHON_THREAD_END_BLOCK is not needed, destructor will release GIL
81
110
  }
82
111
 
83
112
  std::string python_string_to_std_string(PyObject *str_py) {
@@ -95,10 +124,15 @@
95
124
 
96
125
  void handle_director_exception() {
97
126
  std::string msg = "Exception in SWIG director ";
127
+ // Note: CASADI_WITH_PYTHON_GIL_RELEASE case has SWIG_PYTHON_THREAD_BEGIN_BLOCK in the caller
128
+ #ifndef CASADI_WITH_PYTHON_GIL_RELEASE
98
129
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
130
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
99
131
  if (PyErr_ExceptionMatches(PyExc_KeyboardInterrupt)) {
100
132
  PyErr_Clear();
133
+ #ifndef CASADI_WITH_PYTHON_GIL_RELEASE
101
134
  SWIG_PYTHON_THREAD_END_BLOCK;
135
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
102
136
  throw casadi::KeyboardInterruptException();
103
137
  }
104
138
  PyObject *ptype, *pvalue, *ptraceback;
@@ -108,7 +142,9 @@
108
142
  Py_DECREF(msg_py);
109
143
  PyErr_Restore(ptype, pvalue, ptraceback);
110
144
  PyErr_Print();
145
+ #ifndef CASADI_WITH_PYTHON_GIL_RELEASE
111
146
  SWIG_PYTHON_THREAD_END_BLOCK;
147
+ #endif // CASADI_WITH_PYTHON_GIL_RELEASE
112
148
  casadi_error(msg.c_str());
113
149
  }
114
150
  }
@@ -1532,7 +1568,15 @@ namespace std {
1532
1568
  if (mxGetM(p)==0) return true;
1533
1569
  size_t len=mxGetN(p);
1534
1570
  std::vector<char> s(len+1);
1535
- if (mxGetString(p, &s[0], (len+1)*sizeof(char))) return false;
1571
+ if (mxGetString(p, &s[0], (len+1)*sizeof(char))) {
1572
+ casadi_warning("mxGetString returned NULL");
1573
+ return false;
1574
+ }
1575
+ // Matlab silent failure; see #4034
1576
+ if (s[0]=='\0' && len>0) {
1577
+ casadi_warning("mxGetString failure, see https://github.com/casadi/casadi/issues/4034");
1578
+ return false;
1579
+ }
1536
1580
  **m = std::string(&s[0], len);
1537
1581
  }
1538
1582
  return true;
@@ -2464,7 +2508,7 @@ PyOS_setsig(SIGINT, SigIntHandler);
2464
2508
 
2465
2509
  %pythoncode%{
2466
2510
  try:
2467
- from numpy import pi, inf
2511
+ from numpy import pi, inf, sum
2468
2512
  except:
2469
2513
  pass
2470
2514
 
@@ -2728,6 +2772,13 @@ class NZproxy:
2728
2772
  inputs.reverse()
2729
2773
  if not(hasattr(self,name)) or ('mul' in name):
2730
2774
  name = '__' + name + '__'
2775
+ if method=="reduce" and name=="add":
2776
+ assert len(inputs)==1
2777
+ axis = kwargs["axis"]
2778
+ if axis is None:
2779
+ return inputs[0].sum()
2780
+ else:
2781
+ return inputs[0].sum(axis)
2731
2782
  try:
2732
2783
  assert method=="__call__"
2733
2784
  fun=getattr(self, name)
@@ -2906,6 +2957,11 @@ namespace casadi{
2906
2957
  }
2907
2958
  } // namespace casadi
2908
2959
 
2960
+ %include <casadi/core/generic_shared.hpp>
2961
+
2962
+ %template(GenSharedObject) casadi::GenericShared<casadi::SharedObject, casadi::SharedObjectInternal>;
2963
+ %template(GenWeakRef) casadi::GenericWeakRef<casadi::SharedObject, casadi::SharedObjectInternal>;
2964
+
2909
2965
  %include <casadi/core/shared_object.hpp>
2910
2966
  %include <casadi/core/casadi_misc.hpp>
2911
2967
  %include <casadi/core/casadi_common.hpp>
@@ -2926,6 +2982,52 @@ namespace casadi{
2926
2982
  return {"serialization": self.serialize()}
2927
2983
  %}
2928
2984
  }
2985
+ %extend Matrix<SXElem> {
2986
+ %pythoncode %{
2987
+ def __setstate__(self, state):
2988
+ ctx = _current_unpickle_context()
2989
+ if not ctx:
2990
+ raise Exception("Cannot unpickle SX objects without a casadi context. " +
2991
+ "Use something like:\n"+
2992
+ "with ca.global_unpickle_context(): \n"+
2993
+ " f_ref = pickle.load(open(filename,'rb'))")
2994
+ ctx.decode(state)
2995
+ self.__init__(ctx.unpack())
2996
+
2997
+ def __getstate__(self):
2998
+ ctx = _current_pickle_context()
2999
+ if not ctx:
3000
+ raise Exception("Cannot pickle SX objects without a casadi context. " +
3001
+ "Use something like:\n"+
3002
+ "with ca.global_pickle_context(): \n"+
3003
+ " pickle.dump(f,open(filename,'wb'))")
3004
+ ctx.pack(self)
3005
+ return ctx.encode()
3006
+ %}
3007
+ }
3008
+ %extend MX {
3009
+ %pythoncode %{
3010
+ def __setstate__(self, state):
3011
+ ctx = _current_unpickle_context()
3012
+ if not ctx:
3013
+ raise Exception("Cannot unpickle MX objects without a casadi context. " +
3014
+ "Use something like:\n"+
3015
+ "with ca.global_unpickle_context(): \n"+
3016
+ " f_ref = pickle.load(open(filename,'rb'))")
3017
+ ctx.decode(state)
3018
+ self.__init__(ctx.unpack())
3019
+
3020
+ def __getstate__(self):
3021
+ ctx = _current_pickle_context()
3022
+ if not ctx:
3023
+ raise Exception("Cannot pickle MX objects without a casadi context. " +
3024
+ "Use something like:\n"+
3025
+ "with ca.global_pickle_context(): \n"+
3026
+ " pickle.dump(f,open(filename,'wb'))")
3027
+ ctx.pack(self)
3028
+ return ctx.encode()
3029
+ %}
3030
+ }
2929
3031
 
2930
3032
  } // namespace casadi
2931
3033
  #endif // SWIGPYTHON
@@ -3092,14 +3194,40 @@ SPARSITY_INTERFACE_FUN(DECL, (FLAG | IS_SX), Matrix<SXElem>)
3092
3194
  %define SPARSITY_INTERFACE_FUN(DECL, FLAG, M)
3093
3195
  SPARSITY_INTERFACE_FUN_BASE(DECL, FLAG, M)
3094
3196
  #if FLAG & IS_MEMBER
3095
- DECL casadi_int casadi_length(const M &v) {
3096
- return std::max(v.size1(), v.size2());
3097
- }
3197
+ DECL casadi_int casadi_length(const M &v) {
3198
+ return std::max(v.size1(), v.size2());
3199
+ }
3200
+ DECL M casadi_sum(const M& x, casadi_int dim) {
3201
+ if (dim==1) return sum1(x);
3202
+ if (dim==2) return sum2(x);
3203
+ casadi_error(
3204
+ "Expected sum(A,1), sum(A,2), sum(A,\"all\") got " + casadi::str(dim) + " instead.");
3205
+ }
3206
+ DECL M casadi_sum(const M& x, const std::string& dim) {
3207
+ casadi_assert(dim=="all",
3208
+ "Expected sum(...,'all'), got '" + dim + "' instead.");
3209
+ return sum(x);
3210
+ }
3211
+ DECL M casadi_sum(const M& x) {
3212
+ if (x.is_vector()) return sum(x);
3213
+ return sum1(x);
3214
+ }
3098
3215
  #endif
3099
3216
  %enddef
3100
3217
  #else
3101
3218
  %define SPARSITY_INTERFACE_FUN(DECL, FLAG, M)
3102
3219
  SPARSITY_INTERFACE_FUN_BASE(DECL, FLAG, M)
3220
+ #if FLAG & IS_MEMBER
3221
+ DECL M casadi_sum(const M& x, casadi_int dim) {
3222
+ if (dim==0) return sum1(x);
3223
+ if (dim==1) return sum2(x);
3224
+ casadi_error(
3225
+ "Expected sum(A,0), sum(A,1), sum(A,\"all\") got " + casadi::str(dim) + " instead.");
3226
+ }
3227
+ DECL M casadi_sum(const M& x) {
3228
+ return sum(x);
3229
+ }
3230
+ #endif
3103
3231
  %enddef
3104
3232
  #endif
3105
3233
 
@@ -3257,6 +3385,18 @@ DECL bool casadi_depends_on(const M& f, const M& arg) {
3257
3385
  return depends_on(f, arg);
3258
3386
  }
3259
3387
 
3388
+ DECL bool casadi_contains(const std::vector<M>& v, const M& n) {
3389
+ return contains(v, n);
3390
+ }
3391
+
3392
+ DECL bool casadi_contains_all(const std::vector<M>& v, const std::vector<M>& n) {
3393
+ return contains_all(v, n);
3394
+ }
3395
+
3396
+ DECL bool casadi_contains_any(const std::vector<M>& v, const std::vector<M>& n) {
3397
+ return contains_any(v, n);
3398
+ }
3399
+
3260
3400
  DECL M casadi_solve(const M& A, const M& b) {
3261
3401
  return solve(A, b);
3262
3402
  }
@@ -3288,7 +3428,7 @@ DECL M casadi_jacobian(const M &ex, const M &arg, const Dict& opts=Dict()) {
3288
3428
  return jacobian(ex, arg, opts);
3289
3429
  }
3290
3430
 
3291
- DECL M casadi_jtimes(const M& ex, const M& arg, const M& v, bool tr=false) {
3431
+ DECL M casadi_jtimes(const M& ex, const M& arg, const M& v, bool tr=false, const Dict& opts=Dict()) {
3292
3432
  return jtimes(ex, arg, v, tr);
3293
3433
  }
3294
3434
 
@@ -3313,12 +3453,12 @@ DECL bool casadi_is_quadratic(const M& expr, const M& var) {
3313
3453
  return is_quadratic(expr, var);
3314
3454
  }
3315
3455
 
3316
- DECL M casadi_gradient(const M &ex, const M &arg) {
3317
- return gradient(ex, arg);
3456
+ DECL M casadi_gradient(const M &ex, const M &arg, const Dict& opts=Dict()) {
3457
+ return gradient(ex, arg, opts);
3318
3458
  }
3319
3459
 
3320
- DECL M casadi_tangent(const M &ex, const M &arg) {
3321
- return tangent(ex, arg);
3460
+ DECL M casadi_tangent(const M &ex, const M &arg, const Dict& opts=Dict()) {
3461
+ return tangent(ex, arg, opts);
3322
3462
  }
3323
3463
 
3324
3464
  DECL M casadi_hessian(const M& ex, const M& arg, M& OUTPUT1, const casadi::Dict& opts = casadi::Dict()) {
@@ -3365,6 +3505,19 @@ DECL M casadi_mmax(const M& x) { return mmax(x); }
3365
3505
  DECL casadi::DM casadi_evalf(const M& x) {
3366
3506
  return evalf(x);
3367
3507
  }
3508
+ DECL void casadi_separate_linear(const M &expr,
3509
+ const M &sym_lin, const M &sym_const,
3510
+ M& OUTPUT1, M& OUTPUT2, M& OUTPUT3) {
3511
+ separate_linear(expr, sym_lin, sym_const, OUTPUT1, OUTPUT2, OUTPUT3);
3512
+ }
3513
+ DECL void casadi_separate_linear(const M &expr,
3514
+ const std::vector<M> &sym_lin, const std::vector<M> &sym_const,
3515
+ M& OUTPUT1, M& OUTPUT2, M& OUTPUT3) {
3516
+ separate_linear(expr, sym_lin, sym_const, OUTPUT1, OUTPUT2, OUTPUT3);
3517
+ }
3518
+ #endif // FLAG & IS_MEMBER
3519
+
3520
+ #if FLAG & IS_GLOBAL
3368
3521
  DECL std::vector<M> casadi_cse(const std::vector<M>& e) {
3369
3522
  return cse(e);
3370
3523
  }
@@ -3372,9 +3525,23 @@ DECL M casadi_cse(const M& e) {
3372
3525
  return cse(e);
3373
3526
  }
3374
3527
 
3375
- #endif // FLAG & IS_MEMBER
3528
+ DECL void casadi_extract_parametric(const M &expr, const M& par,
3529
+ M& OUTPUT1, std::vector<M>& OUTPUT2, std::vector<M>& OUTPUT3, const Dict& opts=Dict()) {
3530
+ extract_parametric(expr, par, OUTPUT1, OUTPUT2, OUTPUT3, opts);
3531
+ }
3532
+ DECL void casadi_extract_parametric(const M &expr, const std::vector<M>& par,
3533
+ M& OUTPUT1, std::vector<M>& OUTPUT2, std::vector<M>& OUTPUT3, const Dict& opts=Dict()) {
3534
+ extract_parametric(expr, par, OUTPUT1, OUTPUT2, OUTPUT3, opts);
3535
+ }
3536
+ DECL void casadi_extract_parametric(const std::vector<M> &expr, const M& par,
3537
+ std::vector<M>& OUTPUT1, std::vector<M>& OUTPUT2, std::vector<M>& OUTPUT3, const Dict& opts=Dict()) {
3538
+ extract_parametric(expr, par, OUTPUT1, OUTPUT2, OUTPUT3, opts);
3539
+ }
3540
+ DECL void casadi_extract_parametric(const std::vector<M> &expr, const std::vector<M>& par,
3541
+ std::vector<M>& OUTPUT1, std::vector<M>& OUTPUT2, std::vector<M>& OUTPUT3, const Dict& opts=Dict()) {
3542
+ extract_parametric(expr, par, OUTPUT1, OUTPUT2, OUTPUT3, opts);
3543
+ }
3376
3544
 
3377
- #if FLAG & IS_GLOBAL
3378
3545
  DECL std::vector<std::vector< M > >
3379
3546
  casadi_forward(const std::vector< M > &ex, const std::vector< M > &arg,
3380
3547
  const std::vector<std::vector< M > > &v,
@@ -3734,6 +3901,11 @@ namespace casadi{
3734
3901
 
3735
3902
  }
3736
3903
 
3904
+ #ifdef SWIGPYTHON
3905
+ %feature("nothread") casadi::Matrix<double>::full;
3906
+ %feature("nothread") casadi::Matrix<double>::sparse;
3907
+ #endif
3908
+
3737
3909
  // Extend DM with SWIG unique features
3738
3910
  namespace casadi{
3739
3911
  %extend Matrix<double> {
@@ -4130,29 +4302,6 @@ namespace casadi{
4130
4302
  self = builtin('subsasgn',self,s,v);
4131
4303
  end
4132
4304
  end
4133
- function out = sum(self,varargin)
4134
- narginchk(1,3);
4135
- if nargin==1
4136
- if is_vector(self)
4137
- if is_column(self)
4138
- out = sum1(self);
4139
- else
4140
- out = sum2(self);
4141
- end
4142
- else
4143
- out = sum1(self);
4144
- end
4145
- else
4146
- i = varargin{1};
4147
- if i==1
4148
- out = sum1(self);
4149
- elseif i==2
4150
- out = sum2(self);
4151
- else
4152
- error('sum argument (if present) must be 1 or 2');
4153
- end
4154
- end
4155
- end
4156
4305
  function out = norm(self,varargin)
4157
4306
  narginchk(1,2);
4158
4307
  % 2-norm by default
@@ -4259,6 +4408,7 @@ namespace casadi{
4259
4408
  %include <casadi/core/dple.hpp>
4260
4409
  %include <casadi/core/expm.hpp>
4261
4410
  %include <casadi/core/interpolant.hpp>
4411
+ %include <casadi/core/blazing_spline.hpp>
4262
4412
 
4263
4413
  %feature("copyctor", "0") casadi::CodeGenerator;
4264
4414
  %include <casadi/core/code_generator.hpp>
@@ -4282,6 +4432,7 @@ namespace casadi {
4282
4432
  %extend MX {
4283
4433
  MX_ALL(static inline, IS_MEMBER)
4284
4434
  const MX brace(const casadi::MX& rr) const { casadi::MX m; $self->get_nz(m, true, rr); return m;}
4435
+ void brace_asgn(const MX& m, const casadi::MX& rr) { $self->set_nz(m, true, rr); }
4285
4436
  const MX paren(const casadi::MX& rr) const {
4286
4437
  casadi::MX m;
4287
4438
  $self->get(m, true, rr);
@@ -4302,6 +4453,22 @@ namespace casadi {
4302
4453
  $self->get(m, true, rr, cc);
4303
4454
  return m;
4304
4455
  }
4456
+ /*
4457
+ Not yet implemeted in core
4458
+ set(const MX& m, bool ind1, const MX&, const MX&); does not seem to exist
4459
+ void paren_asgn(const MX& m, char rr, const casadi::MX& cc) {
4460
+ $self->set(m, true, casadi::char2Slice(rr), cc);
4461
+ }
4462
+ void paren_asgn(const MX& m, const casadi::MX& rr, char cc) {
4463
+ $self->set(m, true, rr, casadi::char2Slice(cc));
4464
+ }
4465
+ void paren_asgn(const MX& m, const casadi::MX& rr, const casadi::MX& cc) {
4466
+ $self->set(m, true, rr, cc);
4467
+ }*/
4468
+ // Needed for brace syntax to access nonzeros
4469
+ casadi_int numel(const MX &k) const {
4470
+ return 1;
4471
+ }
4305
4472
  }
4306
4473
  } // namespace casadi
4307
4474
  %feature("nonstatic", "");
@@ -4434,13 +4601,23 @@ namespace casadi {
4434
4601
  %include <casadi/core/importer.hpp>
4435
4602
  %include <casadi/core/callback.hpp>
4436
4603
  %include <casadi/core/global_options.hpp>
4604
+
4437
4605
  %include <casadi/core/casadi_meta.hpp>
4606
+ #ifdef SWIGPYTHON
4607
+ %extend casadi::CasadiMeta {
4608
+ static const char* swig_flags() { return CASADI_SWIG_FLAGS; }
4609
+ };
4610
+ #endif // SWIGPYTHON
4611
+
4438
4612
  %include <casadi/core/integration_tools.hpp>
4439
4613
  %include <casadi/core/nlp_tools.hpp>
4440
4614
  %include <casadi/core/tools.hpp>
4441
4615
  %include <casadi/core/nlp_builder.hpp>
4442
4616
  %include <casadi/core/dae_builder.hpp>
4443
4617
  %include <casadi/core/xml_file.hpp>
4618
+ %include <casadi/core/archiver.hpp>
4619
+ %include <casadi/core/filesystem.hpp>
4620
+ %include <casadi/core/options.hpp>
4444
4621
 
4445
4622
  %feature("copyctor", "0") casadi::SerializerBase;
4446
4623
  %feature("copyctor", "0") casadi::DeserializerBase;
@@ -4473,6 +4650,39 @@ namespace casadi {
4473
4650
  return f()
4474
4651
  %}
4475
4652
  }
4653
+ %pythoncode %{
4654
+
4655
+ try:
4656
+ import threading
4657
+ _thread_local = threading.local()
4658
+ except:
4659
+ threading_available = True
4660
+ _thread_local = globals()
4661
+
4662
+ def _current_pickle_context():
4663
+ return getattr(_thread_local, "casadi_pickle_ctx", None)
4664
+
4665
+ def _current_unpickle_context():
4666
+ return getattr(_thread_local, "casadi_unpickle_ctx", None)
4667
+
4668
+ class global_pickle_context:
4669
+ def __enter__(self):
4670
+ self.ctx = StringSerializer()
4671
+ _thread_local.casadi_pickle_ctx = self.ctx
4672
+ return self.ctx
4673
+
4674
+ def __exit__(self, *args):
4675
+ _thread_local.casadi_pickle_ctx = None
4676
+
4677
+ class global_unpickle_context:
4678
+ def __enter__(self):
4679
+ self.ctx = StringDeserializer("")
4680
+ _thread_local.casadi_unpickle_ctx = self.ctx
4681
+ return self.ctx
4682
+
4683
+ def __exit__(self, *args):
4684
+ _thread_local.casadi_unpickle_ctx = None
4685
+ %}
4476
4686
  #endif // SWIGPYTHON
4477
4687
  #ifdef SWIGMATLAB
4478
4688
  %extend casadi::DeserializerBase {
@@ -4537,6 +4747,10 @@ make_property_opti(ubg)
4537
4747
  make_property_opti(nx)
4538
4748
  make_property_opti(np)
4539
4749
  make_property_opti(ng)
4750
+ make_property_opti(x_linear_scale)
4751
+ make_property_opti(x_linear_scale_offset)
4752
+ make_property_opti(g_linear_scale)
4753
+ make_property_opti(f_linear_scale)
4540
4754
 
4541
4755
  make_property(casadi::Opti, casadi_solver);
4542
4756
  %define opti_metadata_modifiers(class)
@@ -4552,7 +4766,7 @@ make_property(casadi::Opti, casadi_solver);
4552
4766
  frame = sys._getframe(1)
4553
4767
  except:
4554
4768
  frame = {}
4555
- meta = {} if frame is None else {"stacktrace": {"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name}}
4769
+ meta = {} if frame is None else {"stacktrace": [{"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name}]}
4556
4770
  ret = self._parameter(*args)
4557
4771
  if len(meta)>0:
4558
4772
  self.update_user_dict(ret, meta)
@@ -4565,7 +4779,7 @@ make_property(casadi::Opti, casadi_solver);
4565
4779
  frame = sys._getframe(1)
4566
4780
  except:
4567
4781
  frame = {}
4568
- meta = {} if frame is None else {"stacktrace": {"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name}}
4782
+ meta = {} if frame is None else {"stacktrace": [{"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name}]}
4569
4783
  ret = self._variable(*args)
4570
4784
  if len(meta)>0:
4571
4785
  self.update_user_dict(ret, meta)
@@ -4576,14 +4790,27 @@ make_property(casadi::Opti, casadi_solver);
4576
4790
  return self._subject_to()
4577
4791
  import sys
4578
4792
  import os
4579
- try:
4580
- frame = sys._getframe(1)
4581
- except:
4582
- frame = {}
4583
- meta = {} if frame is None else {"stacktrace": {"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name}}
4793
+ stacktrace = []
4794
+ for i in range(1,10000):
4795
+ try:
4796
+ frame = sys._getframe(i)
4797
+ stacktrace.append({"file":os.path.abspath(frame.f_code.co_filename),"line":frame.f_lineno,"name":frame.f_code.co_name})
4798
+ except Exception as e:
4799
+ break
4800
+ args = list(args)
4801
+ if len(args)==3 and isinstance(args[2],dict):
4802
+ args[2] = dict(args[2])
4803
+ if "stacktrace" not in args[2]:
4804
+ args[2]["stacktrace"] = stacktrace
4805
+ elif len(args)==2 and isinstance(args[1],dict):
4806
+ args[1] = dict(args[1])
4807
+ if "stacktrace" not in args[1]:
4808
+ args[1]["stacktrace"] = stacktrace
4809
+ elif len(args)==1:
4810
+ args = [args[0], {"stacktrace": stacktrace}]
4811
+ elif len(args)==2:
4812
+ args = [args[0], args[1], {"stacktrace": stacktrace}]
4584
4813
  ret = self._subject_to(*args)
4585
- if len(meta)>0:
4586
- self.update_user_dict(args[0], meta)
4587
4814
  return ret
4588
4815
  %}
4589
4816
  }
@@ -4604,7 +4831,7 @@ opti_metadata_modifiers(casadi::Opti);
4604
4831
  function out = variable(self, varargin)
4605
4832
  st = dbstack('-completenames',1);
4606
4833
  if length(st)>0
4607
- meta = struct('stacktrace', st(1));
4834
+ meta = struct('stacktrace', {num2cell(st)});
4608
4835
  else
4609
4836
  meta = struct;
4610
4837
  end
@@ -4614,7 +4841,7 @@ opti_metadata_modifiers(casadi::Opti);
4614
4841
  function out = parameter(self, varargin)
4615
4842
  st = dbstack('-completenames',1);
4616
4843
  if length(st)>0
4617
- meta = struct('stacktrace', st(1));
4844
+ meta = struct('stacktrace', {num2cell(st)});
4618
4845
  else
4619
4846
  meta = struct;
4620
4847
  end
@@ -4628,7 +4855,7 @@ opti_metadata_modifiers(casadi::Opti);
4628
4855
  end
4629
4856
  st = dbstack('-completenames',1);
4630
4857
  if length(st)>0
4631
- meta = struct('stacktrace', st(1));
4858
+ meta = struct('stacktrace', {num2cell(st)});
4632
4859
  else
4633
4860
  meta = struct;
4634
4861
  end
@@ -4685,6 +4912,8 @@ opti_metadata_modifiers(casadi::Opti)
4685
4912
  }
4686
4913
  #endif
4687
4914
 
4915
+ %include <casadi/core/resource.hpp>
4916
+
4688
4917
  // Cleanup for dependent modules
4689
4918
  %exception {
4690
4919
  $action
@@ -25,20 +25,20 @@
25
25
  #define CASADI_CONFIG_H // NOLINT(build/header_guard)
26
26
 
27
27
  #define CASADI_MAJOR_VERSION 3
28
- #define CASADI_MINOR_VERSION 6
29
- #define CASADI_PATCH_VERSION 7
28
+ #define CASADI_MINOR_VERSION 7
29
+ #define CASADI_PATCH_VERSION 1
30
30
  #define CASADI_IS_RELEASE 1
31
- #define CASADI_VERSION_STRING "3.6.7"
32
- #define CASADI_GIT_REVISION "a2d71bf95dbd3fa5f6725504bcba67dd52869d91" // NOLINT(whitespace/line_length)
33
- #define CASADI_GIT_DESCRIBE "3.6.3-327.a2d71bf95" // NOLINT(whitespace/line_length)
34
- #define CASADI_FEATURE_LIST "\n * dynamic-loading, Support for import of FMI 2.0 binaries\n * sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.\n * csparse-interface, Interface to the sparse direct linear solver CSparse.\n * superscs-interface, Interface to QP solver SUPERSCS.\n * osqp-interface, Interface to QP solver OSQP.\n * tinyxml-interface, Interface to the XML parser TinyXML.\n * qpoases-interface, Interface to the active-set QP solver qpOASES.\n * blocksqp-interface, Interface to the NLP solver blockSQP.\n * cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * madnlp-mockup-build, Use mockup MadNLP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * alpaqa-sourcebuild, Build Alpaqa (BUILD_ALPAQA_VERSION=develop) from downloaded source (BUILD_ALPAQA_GIT_REPO=https://github.com/jgillis/alpaqa).\n * daqp-sourcebuild, Build DAQP (BUILD_DAQP_VERSION=master) from downloaded source (BUILD_DAQP_GIT_REPO=https://github.com/jgillis/daqp.git).\n * proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).\n * osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.3) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).\n * superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).\n * ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).\n * mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).\n * metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=6997f64) from downloaded source.\n * fatrop-sourcebuild, Build FATROP (BUILD_FATROP_VERSION=3c09fcd) from downloaded source (BUILD_FATROP_GIT_REPO=https://github.com/meco-group/fatrop.git).\n * hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).\n * blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).\n * lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS\n * eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).\n * simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).\n * cplex-interface, Interface to the QP solver CPLEX.\n * gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI\n * knitro-interface, Interface to the NLP solver KNITRO.\n * madnlp-interface, Interface to the NLP solver MadNLP.\n * snopt-interface, Interface to the NLP solver KNITRO.\n * worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).\n * lapack-interface, Interface to LAPACK.\n * mumps-interface, Interface to MUMPS.\n * ipopt-interface, Interface to the NLP solver Ipopt.\n * daqp-interface, Interface to the MILP / QP solver HiGHS.\n * alpaqa-interface, Interface to the NLP solver Alpaqa.\n * proxqp-interface, Interface to QP solver PROXQP.\n * ampl-interface, Interface to the AMPL solver library.\n" // NOLINT(whitespace/line_length)
31
+ #define CASADI_VERSION_STRING "3.7.1"
32
+ #define CASADI_GIT_REVISION "9763952a9aa742c5be3b53dc1a1d033a57235328" // NOLINT(whitespace/line_length)
33
+ #define CASADI_GIT_DESCRIBE "3.6.3-1087.9763952a9" // NOLINT(whitespace/line_length)
34
+ #define CASADI_FEATURE_LIST "\n * dynamic-loading, Support for import of FMI 3.0 binaries\n * sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.\n * csparse-interface, Interface to the sparse direct linear solver CSparse.\n * superscs-interface, Interface to QP solver SUPERSCS.\n * osqp-interface, Interface to QP solver OSQP.\n * tinyxml-interface, Interface to the XML parser TinyXML.\n * qpoases-interface, Interface to the active-set QP solver qpOASES.\n * blocksqp-interface, Interface to the NLP solver blockSQP.\n * cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * madnlp-mockup-build, Use mockup MadNLP (BUILD_MOCKUPS_VERSION=master) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).\n * alpaqa-sourcebuild, Build Alpaqa (BUILD_ALPAQA_VERSION=develop) from downloaded source (BUILD_ALPAQA_GIT_REPO=https://github.com/jgillis/alpaqa).\n * daqp-sourcebuild, Build DAQP (BUILD_DAQP_VERSION=master) from downloaded source (BUILD_DAQP_GIT_REPO=https://github.com/jgillis/daqp.git).\n * proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).\n * osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.3) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).\n * superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).\n * ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).\n * mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).\n * metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=6997f64) from downloaded source.\n * fatrop-sourcebuild, Build FATROP (BUILD_FATROP_VERSION=v0.0.4.post1) from downloaded source (BUILD_FATROP_GIT_REPO=https://github.com/meco-group/fatrop.git).\n * hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).\n * blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=14d6e66f0662182a8dd02ddc7ec4738738c6344d) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/jgillis/blasfeo.git).\n * lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS\n * eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).\n * simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source.\n * libzip-sourcebuild, Build LIBZIP (BUILD_LIBZIP_VERSION=v1.11.3) from downloaded source (BUILD_LIBZIP_GIT_REPO=https://github.com/nih-at/libzip).\n * zlib-sourcebuild, Build ZLIB (BUILD_ZLIB_VERSION=v1.3.1) from downloaded source (BUILD_ZLIB_GIT_REPO=https://github.com/madler/zlib).\n * cplex-interface, Interface to the QP solver CPLEX.\n * gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI\n * knitro-interface, Interface to the NLP solver KNITRO.\n * madnlp-interface, Interface to the NLP solver MadNLP.\n * snopt-interface, Interface to the NLP solver KNITRO.\n * worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).\n * lapack-interface, Interface to LAPACK.\n * mumps-interface, Interface to MUMPS.\n * ipopt-interface, Interface to the NLP solver Ipopt.\n * daqp-interface, Interface to the MILP / QP solver DAQP.\n * alpaqa-interface, Interface to the NLP solver Alpaqa.\n * proxqp-interface, Interface to QP solver PROXQP.\n * ampl-interface, Interface to the AMPL solver library.\n * zlib-interface, Interface to the zlib.\n * libzip-interface, Interface to the libzip.\n * ghc-filesystem-interface, Interface to the ghc.\n" // NOLINT(whitespace/line_length)
35
35
  #define CASADI_BUILD_TYPE "Release" // NOLINT(whitespace/line_length)
36
36
  #define CASADI_COMPILER_ID "GNU" // NOLINT(whitespace/line_length)
37
- #define CASADI_COMPILER "/usr/xcc/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++" // NOLINT(whitespace/line_length)
38
- #define CASADI_COMPILER_FLAGS "-I /usr/xcc/aarch64-unknown-linux-gnu/include/ -std=c++11 -pthread -fPIC -Wl,--unresolved-symbols=ignore-all -DUSE_CXX11 -DHAVE_MKSTEMPS -DCASADI_WITH_THREAD -DWITH_DEEPBIND -DCASADI_MAJOR_VERSION=3 -DCASADI_MINOR_VERSION=6 -DCASADI_PATCH_VERSION=7 -DCASADI_IS_RELEASE=1 -DCASADI_VERSION=31 -D_USE_MATH_DEFINES -D_SCL_SECURE_NO_WARNINGS -DWITH_DL -DWITH_DEPRECATED_FEATURES -DCASADI_DEFAULT_COMPILER_PLUGIN=shell" // NOLINT(whitespace/line_length)
39
- #define CASADI_MODULES "casadi;casadi_linsol_lapacklu;casadi_linsol_lapackqr;casadi_sundials_common;casadi_integrator_cvodes;casadi_integrator_idas;casadi_rootfinder_kinsol;casadi_nlpsol_ipopt;casadi_nlpsol_madnlp;casadi_conic_qpoases;casadi_nlpsol_knitro;casadi_conic_cplex;casadi_linsol_csparse;casadi_linsol_csparsecholesky;casadi_conic_daqp;casadi_linsol_ma27;casadi_linsol_mumps;casadi_conic_gurobi;casadi_nlpsol_worhp;casadi_nlpsol_snopt;casadi_xmlfile_tinyxml;casadi_nlpsol_blocksqp;casadi_conic_hpipm;casadi_conic_fatrop;casadi_nlpsol_fatrop;casadi_conic_superscs;casadi_nlpsol_ampl;casadi_conic_proxqp;casadi_conic_osqp;casadi_nlpsol_alpaqa;casadi_conic_nlpsol;casadi_conic_qrqp;casadi_conic_ipqp;casadi_nlpsol_qrsqp;casadi_importer_shell;casadi_integrator_rk;casadi_integrator_collocation;casadi_interpolant_linear;casadi_interpolant_bspline;casadi_linsol_symbolicqr;casadi_linsol_qr;casadi_linsol_ldl;casadi_linsol_tridiag;casadi_linsol_lsqr;casadi_nlpsol_sqpmethod;casadi_nlpsol_feasiblesqpmethod;casadi_nlpsol_scpgen;casadi_rootfinder_newton;casadi_rootfinder_fast_newton;casadi_rootfinder_nlpsol" // NOLINT(whitespace/line_length)
40
- #define CASADI_PLUGINS "Linsol::lapacklu;Linsol::lapackqr;Integrator::cvodes;Integrator::idas;Rootfinder::kinsol;Nlpsol::ipopt;Nlpsol::madnlp;Conic::qpoases;Nlpsol::knitro;Conic::cplex;Linsol::csparse;Linsol::csparsecholesky;Conic::daqp;Linsol::ma27;Linsol::mumps;Conic::gurobi;Nlpsol::worhp;Nlpsol::snopt;XmlFile::tinyxml;Nlpsol::blocksqp;Conic::hpipm;Conic::fatrop;Nlpsol::fatrop;Conic::superscs;Nlpsol::ampl;Conic::proxqp;Conic::osqp;Nlpsol::alpaqa;Conic::nlpsol;Conic::qrqp;Conic::ipqp;Nlpsol::qrsqp;Importer::shell;Integrator::rk;Integrator::collocation;Interpolant::linear;Interpolant::bspline;Linsol::symbolicqr;Linsol::qr;Linsol::ldl;Linsol::tridiag;Linsol::lsqr;Nlpsol::sqpmethod;Nlpsol::feasiblesqpmethod;Nlpsol::scpgen;Rootfinder::newton;Rootfinder::fast_newton;Rootfinder::nlpsol" // NOLINT(whitespace/line_length)
41
- #define CASADI_INSTALL_PREFIX "/usr/local" // NOLINT(whitespace/line_length)
37
+ #define CASADI_COMPILER "aarch64-unknown-linux-gnu-g++" // NOLINT(whitespace/line_length)
38
+ #define CASADI_COMPILER_FLAGS "-I /usr/xcc/aarch64-unknown-linux-gnu/include/ -std=c++11 -pthread -fPIC -Wl,--unresolved-symbols=ignore-all -DUSE_CXX11 -DHAVE_MKSTEMPS -DWITH_DEEPBIND -DCASADI_MAJOR_VERSION=3 -DCASADI_MINOR_VERSION=7 -DCASADI_PATCH_VERSION=1 -DCASADI_IS_RELEASE=1 -DCASADI_VERSION=31 -D_USE_MATH_DEFINES -D_SCL_SECURE_NO_WARNINGS -DWITH_DL -DWITH_DEPRECATED_FEATURES -DCASADI_DEFAULT_COMPILER_PLUGIN=shell -DCASADI_SNPRINTF=snprintf -DCASADI_WITH_THREADSAFE_SYMBOLICS -DCASADI_WITH_THREAD" // NOLINT(whitespace/line_length)
39
+ #define CASADI_MODULES "casadi;casadi_linsol_lapacklu;casadi_linsol_lapackqr;casadi_sundials_common;casadi_integrator_cvodes;casadi_integrator_idas;casadi_rootfinder_kinsol;casadi_nlpsol_ipopt;casadi_nlpsol_madnlp;casadi_conic_qpoases;casadi_nlpsol_knitro;casadi_conic_cplex;casadi_linsol_csparse;casadi_linsol_csparsecholesky;casadi_conic_daqp;casadi_linsol_ma27;casadi_linsol_mumps;casadi_conic_gurobi;casadi_nlpsol_worhp;casadi_nlpsol_snopt;casadi_xmlfile_tinyxml;casadi_nlpsol_blocksqp;casadi_conic_hpipm;casadi_conic_fatrop;casadi_nlpsol_fatrop;casadi_conic_superscs;casadi_nlpsol_ampl;casadi_conic_proxqp;casadi_conic_osqp;casadi_nlpsol_alpaqa;casadi_archiver_libzip;casadi_filesystem_ghc;casadi_conic_nlpsol;casadi_conic_qrqp;casadi_conic_ipqp;casadi_nlpsol_qrsqp;casadi_importer_shell;casadi_integrator_rk;casadi_integrator_collocation;casadi_interpolant_linear;casadi_interpolant_bspline;casadi_linsol_symbolicqr;casadi_linsol_qr;casadi_linsol_ldl;casadi_linsol_tridiag;casadi_linsol_lsqr;casadi_nlpsol_sqpmethod;casadi_nlpsol_feasiblesqpmethod;casadi_nlpsol_scpgen;casadi_rootfinder_newton;casadi_rootfinder_fast_newton;casadi_rootfinder_nlpsol" // NOLINT(whitespace/line_length)
40
+ #define CASADI_PLUGINS "Linsol::lapacklu;Linsol::lapackqr;Integrator::cvodes;Integrator::idas;Rootfinder::kinsol;Nlpsol::ipopt;Nlpsol::madnlp;Conic::qpoases;Nlpsol::knitro;Conic::cplex;Linsol::csparse;Linsol::csparsecholesky;Conic::daqp;Linsol::ma27;Linsol::mumps;Conic::gurobi;Nlpsol::worhp;Nlpsol::snopt;XmlFile::tinyxml;Nlpsol::blocksqp;Conic::hpipm;Conic::fatrop;Nlpsol::fatrop;Conic::superscs;Nlpsol::ampl;Conic::proxqp;Conic::osqp;Nlpsol::alpaqa;Archiver::libzip;Filesystem::ghc;Conic::nlpsol;Conic::qrqp;Conic::ipqp;Nlpsol::qrsqp;Importer::shell;Integrator::rk;Integrator::collocation;Interpolant::linear;Interpolant::bspline;Linsol::symbolicqr;Linsol::qr;Linsol::ldl;Linsol::tridiag;Linsol::lsqr;Nlpsol::sqpmethod;Nlpsol::feasiblesqpmethod;Nlpsol::scpgen;Rootfinder::newton;Rootfinder::fast_newton;Rootfinder::nlpsol" // NOLINT(whitespace/line_length)
41
+ #define CASADI_INSTALL_PREFIX "" // NOLINT(whitespace/line_length)
42
42
  #define CASADI_SHARED_LIBRARY_PREFIX "lib" // NOLINT(whitespace/line_length)
43
43
  #define CASADI_SHARED_LIBRARY_SUFFIX ".so" // NOLINT(whitespace/line_length)
44
44
  #define CASADI_OBJECT_FILE_SUFFIX ".o" // NOLINT(whitespace/line_length)
@@ -0,0 +1,58 @@
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_ARCHIVER_HPP
27
+ #define CASADI_ARCHIVER_HPP
28
+
29
+ #include <casadi/core/casadi_export.h>
30
+ #include <string>
31
+
32
+ namespace casadi {
33
+
34
+ /** \defgroup main_archiver Title
35
+ \par
36
+
37
+
38
+ \generalsection{Archiver}
39
+ \pluginssection{Archiver}
40
+
41
+ \author Joris Gillis
42
+ \date 2025
43
+
44
+ \identifier{2da} */
45
+
46
+ /// Check if a particular plugin is available
47
+ CASADI_EXPORT bool has_archiver(const std::string& name);
48
+
49
+ /// Explicitly load a plugin dynamically
50
+ CASADI_EXPORT void load_archiver(const std::string& name);
51
+
52
+ /// Get the documentation string for a plugin
53
+ CASADI_EXPORT std::string doc_archiver(const std::string& name);
54
+
55
+ } // namespace casadi
56
+
57
+
58
+ #endif // CASADI_ARCHIVER_HPP