casadi 3.6.7__cp27-none-win_amd64.whl → 3.7.1__cp27-none-win_amd64.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 (452) hide show
  1. casadi/_casadi.pyd +0 -0
  2. casadi/blasfeo.lib +0 -0
  3. casadi/casadi-cli.exe +0 -0
  4. casadi/casadi.lib +0 -0
  5. casadi/casadi.py +6529 -3037
  6. casadi/cbc.exe +0 -0
  7. casadi/clp.exe +0 -0
  8. casadi/cmake/casadi-config-version.cmake +1 -1
  9. casadi/cmake/casadi-config.cmake +1 -1
  10. casadi/cmake/casadi-targets-release.cmake +5 -5
  11. casadi/cmake/casadi-targets.cmake +5 -5
  12. casadi/{lib/cmake/tinyxml2/tinyxml2-config-version.cmake → cmake/ghc_filesystem/ghc_filesystem-config-version.cmake} +19 -10
  13. casadi/cmake/ghc_filesystem/ghc_filesystem-config.cmake +30 -0
  14. casadi/cmake/ghc_filesystem/ghc_filesystem-targets.cmake +99 -0
  15. casadi/cmake/highs/highs-config.cmake +1 -0
  16. casadi/cmake/highs/highs-targets.cmake +2 -2
  17. casadi/cmake/libzip/libzip-config-version.cmake +48 -0
  18. casadi/cmake/libzip/libzip-config.cmake +69 -0
  19. casadi/cmake/libzip/libzip-targets-release.cmake +19 -0
  20. casadi/{lib/cmake/tinyxml2/tinyxml2-shared-targets.cmake → cmake/libzip/libzip-targets.cmake} +11 -7
  21. casadi/cmake/libzip/modules/FindMbedTLS.cmake +141 -0
  22. casadi/cmake/libzip/modules/FindNettle.cmake +141 -0
  23. casadi/cmake/libzip/modules/Findzstd.cmake +186 -0
  24. casadi/daqp.lib +0 -0
  25. casadi/fatrop.lib +0 -0
  26. casadi/highs.exe +0 -0
  27. casadi/highs.lib +0 -0
  28. casadi/hpipm.lib +0 -0
  29. casadi/include/casadi/casadi.i +276 -47
  30. casadi/include/casadi/config.h +11 -11
  31. casadi/include/casadi/core/archiver.hpp +58 -0
  32. casadi/include/casadi/core/blazing_spline.hpp +47 -0
  33. casadi/include/casadi/core/calculus.hpp +57 -2
  34. casadi/include/casadi/core/callback.hpp +9 -0
  35. casadi/include/casadi/core/casadi_common.hpp +37 -0
  36. casadi/include/casadi/core/casadi_meta.hpp +15 -0
  37. casadi/include/casadi/core/casadi_misc.hpp +21 -0
  38. casadi/include/casadi/core/code_generator.hpp +115 -19
  39. casadi/include/casadi/core/core.hpp +5 -0
  40. casadi/include/casadi/core/dae_builder.hpp +303 -141
  41. casadi/include/casadi/core/dm.hpp +3 -0
  42. casadi/include/casadi/core/filesystem.hpp +58 -0
  43. casadi/include/casadi/core/fmu.hpp +62 -16
  44. casadi/include/casadi/core/function.hpp +24 -0
  45. casadi/include/casadi/core/generic_matrix.hpp +214 -7
  46. casadi/include/casadi/core/generic_shared.hpp +395 -0
  47. casadi/include/casadi/core/generic_shared_impl.hpp +218 -0
  48. casadi/include/casadi/core/generic_shared_internal.hpp +215 -0
  49. casadi/include/casadi/core/generic_type.hpp +3 -0
  50. casadi/include/casadi/core/global_options.hpp +10 -0
  51. casadi/include/casadi/core/integrator.hpp +41 -7
  52. casadi/include/casadi/core/matrix_decl.hpp +71 -0
  53. casadi/include/casadi/core/mx.hpp +63 -2
  54. casadi/include/casadi/core/nlp_builder.hpp +2 -1
  55. casadi/include/casadi/core/options.hpp +6 -3
  56. casadi/include/casadi/core/optistack.hpp +43 -9
  57. casadi/include/casadi/core/printable.hpp +8 -0
  58. casadi/include/casadi/core/resource.hpp +107 -0
  59. casadi/include/casadi/core/runtime/casadi_blazing_1d_boor_eval.hpp +112 -0
  60. casadi/include/casadi/core/runtime/casadi_blazing_2d_boor_eval.hpp +311 -0
  61. casadi/include/casadi/core/runtime/casadi_blazing_3d_boor_eval.hpp +645 -0
  62. casadi/include/casadi/core/runtime/casadi_blazing_de_boor.hpp +101 -0
  63. casadi/include/casadi/core/runtime/casadi_finite_diff.hpp +1 -1
  64. casadi/include/casadi/core/runtime/casadi_nlp.hpp +8 -2
  65. casadi/include/casadi/core/runtime/casadi_print_canonical.hpp +55 -0
  66. casadi/include/casadi/core/runtime/casadi_print_scalar.hpp +25 -0
  67. casadi/include/casadi/core/runtime/casadi_print_vector.hpp +32 -0
  68. casadi/include/casadi/core/runtime/casadi_printme.hpp +26 -0
  69. casadi/include/casadi/core/serializer.hpp +13 -5
  70. casadi/include/casadi/core/serializing_stream.hpp +9 -2
  71. casadi/include/casadi/core/shared_object.hpp +73 -161
  72. casadi/include/casadi/core/sparsity.hpp +13 -1
  73. casadi/include/casadi/core/sparsity_interface.hpp +19 -1
  74. casadi/include/casadi/core/sx.hpp +41 -0
  75. casadi/include/casadi/core/sx_elem.hpp +25 -0
  76. casadi/include/casadi/core/xml_node.hpp +5 -0
  77. casadi/include/casadi/doc.i +10026 -6513
  78. casadi/include/casadi/doc_merged.i +6744 -4449
  79. casadi/include/casadi/valgrind-casadi.supp +138 -0
  80. casadi/include/casadi/valgrind-python.supp +2470 -0
  81. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +4 -1
  82. casadi/include/ghc/filesystem.hpp +6083 -0
  83. casadi/include/ghc/fs_fwd.hpp +38 -0
  84. casadi/include/ghc/fs_impl.hpp +35 -0
  85. casadi/include/ghc/fs_std.hpp +60 -0
  86. casadi/include/ghc/fs_std_fwd.hpp +63 -0
  87. casadi/include/ghc/fs_std_impl.hpp +46 -0
  88. casadi/include/highs/HConfig.h +7 -5
  89. casadi/include/highs/Highs.h +260 -86
  90. casadi/include/highs/filereaderlp/reader.hpp +10 -10
  91. casadi/include/highs/interfaces/highs_c_api.h +195 -22
  92. casadi/include/highs/io/Filereader.h +4 -6
  93. casadi/include/highs/io/FilereaderEms.h +0 -3
  94. casadi/include/highs/io/FilereaderLp.h +0 -3
  95. casadi/include/highs/io/FilereaderMps.h +0 -3
  96. casadi/include/highs/io/HMPSIO.h +1 -4
  97. casadi/include/highs/io/HMpsFF.h +8 -5
  98. casadi/include/highs/io/HighsIO.h +10 -5
  99. casadi/include/highs/io/LoadOptions.h +0 -3
  100. casadi/include/highs/ipm/IpxSolution.h +0 -3
  101. casadi/include/highs/ipm/IpxWrapper.h +4 -7
  102. casadi/include/highs/ipm/ipx/control.h +1 -0
  103. casadi/include/highs/ipm/ipx/ipx_parameters.h +1 -0
  104. casadi/include/highs/ipm/ipx/lp_solver.h +3 -2
  105. casadi/include/highs/ipm/ipx/model.h +7 -3
  106. casadi/include/highs/lp_data/HConst.h +21 -6
  107. casadi/include/highs/lp_data/HStruct.h +40 -4
  108. casadi/include/highs/lp_data/HighsAnalysis.h +0 -3
  109. casadi/include/highs/lp_data/HighsCallback.h +10 -3
  110. casadi/include/highs/lp_data/HighsCallbackStruct.h +3 -3
  111. casadi/include/highs/lp_data/HighsDebug.h +0 -3
  112. casadi/include/highs/lp_data/HighsIis.h +62 -0
  113. casadi/include/highs/lp_data/HighsInfo.h +50 -43
  114. casadi/include/highs/lp_data/HighsInfoDebug.h +0 -3
  115. casadi/include/highs/lp_data/HighsLp.h +2 -3
  116. casadi/include/highs/lp_data/HighsLpSolverObject.h +0 -3
  117. casadi/include/highs/lp_data/HighsLpUtils.h +38 -6
  118. casadi/include/highs/lp_data/HighsModelUtils.h +21 -18
  119. casadi/include/highs/lp_data/HighsOptions.h +134 -22
  120. casadi/include/highs/lp_data/HighsRanging.h +0 -3
  121. casadi/include/highs/lp_data/HighsSolution.h +10 -3
  122. casadi/include/highs/lp_data/HighsSolutionDebug.h +0 -3
  123. casadi/include/highs/lp_data/HighsSolve.h +0 -3
  124. casadi/include/highs/lp_data/HighsStatus.h +0 -3
  125. casadi/include/highs/mip/HighsCliqueTable.h +3 -3
  126. casadi/include/highs/mip/HighsConflictPool.h +0 -3
  127. casadi/include/highs/mip/HighsCutGeneration.h +13 -3
  128. casadi/include/highs/mip/HighsCutPool.h +0 -3
  129. casadi/include/highs/mip/HighsDebugSol.h +0 -3
  130. casadi/include/highs/mip/HighsDomain.h +16 -4
  131. casadi/include/highs/mip/HighsDomainChange.h +0 -3
  132. casadi/include/highs/mip/HighsDynamicRowMatrix.h +0 -3
  133. casadi/include/highs/mip/HighsGFkSolve.h +3 -6
  134. casadi/include/highs/mip/HighsImplications.h +29 -5
  135. casadi/include/highs/mip/HighsLpAggregator.h +0 -3
  136. casadi/include/highs/mip/HighsLpRelaxation.h +0 -3
  137. casadi/include/highs/mip/HighsMipAnalysis.h +52 -0
  138. casadi/include/highs/mip/HighsMipSolver.h +11 -4
  139. casadi/include/highs/mip/HighsMipSolverData.h +67 -6
  140. casadi/include/highs/mip/HighsModkSeparator.h +1 -4
  141. casadi/include/highs/mip/HighsNodeQueue.h +0 -3
  142. casadi/include/highs/mip/HighsObjectiveFunction.h +0 -3
  143. casadi/include/highs/mip/HighsPathSeparator.h +1 -4
  144. casadi/include/highs/mip/HighsPrimalHeuristics.h +7 -5
  145. casadi/include/highs/mip/HighsPseudocost.h +0 -3
  146. casadi/include/highs/mip/HighsRedcostFixing.h +0 -3
  147. casadi/include/highs/mip/HighsSearch.h +0 -3
  148. casadi/include/highs/mip/HighsSeparation.h +0 -3
  149. casadi/include/highs/mip/HighsSeparator.h +1 -5
  150. casadi/include/highs/mip/HighsTableauSeparator.h +1 -4
  151. casadi/include/highs/mip/HighsTransformedLp.h +0 -3
  152. casadi/include/highs/mip/MipTimer.h +471 -0
  153. casadi/include/highs/parallel/HighsBinarySemaphore.h +1 -1
  154. casadi/include/highs/parallel/HighsCacheAlign.h +1 -1
  155. casadi/include/highs/parallel/HighsCombinable.h +1 -1
  156. casadi/include/highs/parallel/HighsMutex.h +1 -1
  157. casadi/include/highs/parallel/HighsRaceTimer.h +1 -1
  158. casadi/include/highs/parallel/HighsSchedulerConstants.h +1 -1
  159. casadi/include/highs/parallel/HighsSplitDeque.h +1 -1
  160. casadi/include/highs/parallel/HighsTaskExecutor.h +68 -55
  161. casadi/include/highs/pdlp/CupdlpWrapper.h +18 -7
  162. casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +2 -3
  163. casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +16 -6
  164. casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +10 -4
  165. casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +3 -3
  166. casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +6 -6
  167. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
  168. casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +11 -11
  169. casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +8 -4
  170. casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +253 -172
  171. casadi/include/highs/presolve/HPresolve.h +50 -10
  172. casadi/include/highs/presolve/HPresolveAnalysis.h +0 -3
  173. casadi/include/highs/presolve/HighsPostsolveStack.h +39 -6
  174. casadi/include/highs/presolve/HighsSymmetry.h +0 -3
  175. casadi/include/highs/presolve/ICrash.h +0 -3
  176. casadi/include/highs/presolve/ICrashUtil.h +1 -4
  177. casadi/include/highs/presolve/ICrashX.h +0 -3
  178. casadi/include/highs/presolve/PresolveComponent.h +0 -3
  179. casadi/include/highs/qpsolver/a_asm.hpp +20 -17
  180. casadi/include/highs/qpsolver/a_quass.hpp +5 -9
  181. casadi/include/highs/qpsolver/basis.hpp +12 -10
  182. casadi/include/highs/qpsolver/crashsolution.hpp +4 -3
  183. casadi/include/highs/qpsolver/dantzigpricing.hpp +3 -2
  184. casadi/include/highs/qpsolver/devexpricing.hpp +3 -1
  185. casadi/include/highs/qpsolver/factor.hpp +6 -5
  186. casadi/include/highs/qpsolver/feasibility_bounded.hpp +31 -29
  187. casadi/include/highs/qpsolver/feasibility_highs.hpp +94 -70
  188. casadi/include/highs/qpsolver/gradient.hpp +1 -1
  189. casadi/include/highs/qpsolver/instance.hpp +1 -1
  190. casadi/include/highs/qpsolver/pricing.hpp +2 -2
  191. casadi/include/highs/qpsolver/qpconst.hpp +2 -2
  192. casadi/include/highs/qpsolver/quass.hpp +2 -2
  193. casadi/include/highs/qpsolver/runtime.hpp +2 -2
  194. casadi/include/highs/qpsolver/settings.hpp +20 -8
  195. casadi/include/highs/qpsolver/steepestedgepricing.hpp +38 -39
  196. casadi/include/highs/simplex/HApp.h +88 -34
  197. casadi/include/highs/simplex/HEkk.h +24 -11
  198. casadi/include/highs/simplex/HEkkDual.h +2 -4
  199. casadi/include/highs/simplex/HEkkDualRHS.h +0 -3
  200. casadi/include/highs/simplex/HEkkDualRow.h +0 -3
  201. casadi/include/highs/simplex/HEkkPrimal.h +1 -5
  202. casadi/include/highs/simplex/HSimplex.h +0 -3
  203. casadi/include/highs/simplex/HSimplexDebug.h +0 -3
  204. casadi/include/highs/simplex/HSimplexNla.h +0 -26
  205. casadi/include/highs/simplex/HSimplexReport.h +0 -3
  206. casadi/include/highs/simplex/HighsSimplexAnalysis.h +5 -8
  207. casadi/include/highs/simplex/SimplexConst.h +10 -11
  208. casadi/include/highs/simplex/SimplexStruct.h +9 -12
  209. casadi/include/highs/simplex/SimplexTimer.h +83 -101
  210. casadi/include/highs/test/DevKkt.h +0 -3
  211. casadi/include/highs/test/KktCh2.h +0 -3
  212. casadi/include/highs/util/FactorTimer.h +39 -64
  213. casadi/include/highs/util/HFactor.h +4 -4
  214. casadi/include/highs/util/HFactorConst.h +0 -3
  215. casadi/include/highs/util/HFactorDebug.h +0 -3
  216. casadi/include/highs/util/HSet.h +0 -3
  217. casadi/include/highs/util/HVector.h +0 -3
  218. casadi/include/highs/util/HVectorBase.h +1 -4
  219. casadi/include/highs/util/HighsCDouble.h +12 -3
  220. casadi/include/highs/util/HighsComponent.h +0 -3
  221. casadi/include/highs/util/HighsDataStack.h +0 -3
  222. casadi/include/highs/util/HighsDisjointSets.h +0 -3
  223. casadi/include/highs/util/HighsHash.h +9 -12
  224. casadi/include/highs/util/HighsHashTree.h +15 -11
  225. casadi/include/highs/util/HighsInt.h +0 -3
  226. casadi/include/highs/util/HighsIntegers.h +0 -3
  227. casadi/include/highs/util/HighsLinearSumBounds.h +0 -3
  228. casadi/include/highs/util/HighsMatrixPic.h +0 -3
  229. casadi/include/highs/util/HighsMatrixSlice.h +3 -6
  230. casadi/include/highs/util/HighsMatrixUtils.h +0 -3
  231. casadi/include/highs/util/HighsMemoryAllocation.h +11 -3
  232. casadi/include/highs/util/HighsRandom.h +3 -6
  233. casadi/include/highs/util/HighsRbTree.h +0 -3
  234. casadi/include/highs/util/HighsSort.h +0 -3
  235. casadi/include/highs/util/HighsSparseMatrix.h +6 -3
  236. casadi/include/highs/util/HighsSparseVectorSum.h +0 -3
  237. casadi/include/highs/util/HighsSplay.h +0 -3
  238. casadi/include/highs/util/HighsTimer.h +94 -56
  239. casadi/include/highs/util/HighsUtils.h +10 -3
  240. casadi/include/highs/util/stringutil.h +14 -12
  241. casadi/include/licenses/ghc-external/LICENSE +19 -0
  242. casadi/include/licenses/libz-external/LICENSE +22 -0
  243. casadi/include/licenses/libz-external/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  244. casadi/include/licenses/libzip-external/LICENSE +31 -0
  245. casadi/include/sleqp/defs.h +2 -2
  246. casadi/include/zconf.h +545 -0
  247. casadi/include/zip.h +528 -0
  248. casadi/include/zipconf.h +48 -0
  249. casadi/include/zlib.h +1938 -0
  250. casadi/ipopt.lib +0 -0
  251. casadi/lapack.lib +0 -0
  252. casadi/libCbc-3.dll +0 -0
  253. casadi/libCbc.dll.a +0 -0
  254. casadi/libCbcSolver-3.dll +0 -0
  255. casadi/libCbcSolver.dll.a +0 -0
  256. casadi/libCgl-1.dll +0 -0
  257. casadi/libCgl.dll.a +0 -0
  258. casadi/libClp-1.dll +0 -0
  259. casadi/libClp.dll.a +0 -0
  260. casadi/libClpSolver-1.dll +0 -0
  261. casadi/libClpSolver.dll.a +0 -0
  262. casadi/libCoinUtils-3.dll +0 -0
  263. casadi/libCoinUtils.dll.a +0 -0
  264. casadi/libOsi-1.dll +0 -0
  265. casadi/libOsi.dll.a +0 -0
  266. casadi/libOsiCbc-3.dll +0 -0
  267. casadi/libOsiCbc.dll.a +0 -0
  268. casadi/libOsiClp-1.dll +0 -0
  269. casadi/libOsiClp.dll.a +0 -0
  270. casadi/libOsiCommonTests-1.dll +0 -0
  271. casadi/libOsiCommonTests.dll.a +0 -0
  272. casadi/libalpaqa.dll +0 -0
  273. casadi/libalpaqa.dll.a +0 -0
  274. casadi/libblasfeo.dll +0 -0
  275. casadi/libblasfeo.dll.a +0 -0
  276. casadi/libbonmin-4.dll +0 -0
  277. casadi/libbonmin.dll.a +0 -0
  278. casadi/libcasadi-tp-openblas.dll +0 -0
  279. casadi/libcasadi-tp-openblas.dll.a +0 -0
  280. casadi/libcasadi.dll +0 -0
  281. casadi/libcasadi.dll.a +0 -0
  282. casadi/libcasadi.lib +0 -0
  283. casadi/libcasadi_archiver_libzip.dll +0 -0
  284. casadi/libcasadi_archiver_libzip.dll.a +0 -0
  285. casadi/libcasadi_conic_cbc.dll +0 -0
  286. casadi/libcasadi_conic_cbc.dll.a +0 -0
  287. casadi/libcasadi_conic_clp.dll +0 -0
  288. casadi/libcasadi_conic_clp.dll.a +0 -0
  289. casadi/libcasadi_conic_cplex.dll +0 -0
  290. casadi/libcasadi_conic_cplex.dll.a +0 -0
  291. casadi/libcasadi_conic_daqp.dll +0 -0
  292. casadi/libcasadi_conic_daqp.dll.a +0 -0
  293. casadi/libcasadi_conic_fatrop.dll +0 -0
  294. casadi/libcasadi_conic_fatrop.dll.a +0 -0
  295. casadi/libcasadi_conic_gurobi.dll +0 -0
  296. casadi/libcasadi_conic_gurobi.dll.a +0 -0
  297. casadi/libcasadi_conic_highs.dll +0 -0
  298. casadi/libcasadi_conic_highs.dll.a +0 -0
  299. casadi/libcasadi_conic_hpipm.dll +0 -0
  300. casadi/libcasadi_conic_hpipm.dll.a +0 -0
  301. casadi/libcasadi_conic_ipqp.dll +0 -0
  302. casadi/libcasadi_conic_ipqp.dll.a +0 -0
  303. casadi/libcasadi_conic_nlpsol.dll +0 -0
  304. casadi/libcasadi_conic_nlpsol.dll.a +0 -0
  305. casadi/libcasadi_conic_osqp.dll +0 -0
  306. casadi/libcasadi_conic_osqp.dll.a +0 -0
  307. casadi/libcasadi_conic_proxqp.dll +0 -0
  308. casadi/libcasadi_conic_proxqp.dll.a +0 -0
  309. casadi/libcasadi_conic_qpoases.dll +0 -0
  310. casadi/libcasadi_conic_qpoases.dll.a +0 -0
  311. casadi/libcasadi_conic_qrqp.dll +0 -0
  312. casadi/libcasadi_conic_qrqp.dll.a +0 -0
  313. casadi/libcasadi_conic_superscs.dll +0 -0
  314. casadi/libcasadi_conic_superscs.dll.a +0 -0
  315. casadi/libcasadi_filesystem_ghc.dll +0 -0
  316. casadi/libcasadi_filesystem_ghc.dll.a +0 -0
  317. casadi/libcasadi_importer_shell.dll +0 -0
  318. casadi/libcasadi_importer_shell.dll.a +0 -0
  319. casadi/libcasadi_integrator_collocation.dll +0 -0
  320. casadi/libcasadi_integrator_collocation.dll.a +0 -0
  321. casadi/libcasadi_integrator_cvodes.dll +0 -0
  322. casadi/libcasadi_integrator_cvodes.dll.a +0 -0
  323. casadi/libcasadi_integrator_idas.dll +0 -0
  324. casadi/libcasadi_integrator_idas.dll.a +0 -0
  325. casadi/libcasadi_integrator_rk.dll +0 -0
  326. casadi/libcasadi_integrator_rk.dll.a +0 -0
  327. casadi/libcasadi_interpolant_bspline.dll +0 -0
  328. casadi/libcasadi_interpolant_bspline.dll.a +0 -0
  329. casadi/libcasadi_interpolant_linear.dll +0 -0
  330. casadi/libcasadi_interpolant_linear.dll.a +0 -0
  331. casadi/libcasadi_linsol_csparse.dll +0 -0
  332. casadi/libcasadi_linsol_csparse.dll.a +0 -0
  333. casadi/libcasadi_linsol_csparsecholesky.dll +0 -0
  334. casadi/libcasadi_linsol_csparsecholesky.dll.a +0 -0
  335. casadi/libcasadi_linsol_lapacklu.dll +0 -0
  336. casadi/libcasadi_linsol_lapacklu.dll.a +0 -0
  337. casadi/libcasadi_linsol_lapackqr.dll +0 -0
  338. casadi/libcasadi_linsol_lapackqr.dll.a +0 -0
  339. casadi/libcasadi_linsol_ldl.dll +0 -0
  340. casadi/libcasadi_linsol_ldl.dll.a +0 -0
  341. casadi/libcasadi_linsol_lsqr.dll +0 -0
  342. casadi/libcasadi_linsol_lsqr.dll.a +0 -0
  343. casadi/libcasadi_linsol_ma27.dll +0 -0
  344. casadi/libcasadi_linsol_ma27.dll.a +0 -0
  345. casadi/libcasadi_linsol_mumps.dll +0 -0
  346. casadi/libcasadi_linsol_mumps.dll.a +0 -0
  347. casadi/libcasadi_linsol_qr.dll +0 -0
  348. casadi/libcasadi_linsol_qr.dll.a +0 -0
  349. casadi/libcasadi_linsol_symbolicqr.dll +0 -0
  350. casadi/libcasadi_linsol_symbolicqr.dll.a +0 -0
  351. casadi/libcasadi_linsol_tridiag.dll +0 -0
  352. casadi/libcasadi_linsol_tridiag.dll.a +0 -0
  353. casadi/libcasadi_nlpsol_alpaqa.dll +0 -0
  354. casadi/libcasadi_nlpsol_alpaqa.dll.a +0 -0
  355. casadi/libcasadi_nlpsol_ampl.dll +0 -0
  356. casadi/libcasadi_nlpsol_ampl.dll.a +0 -0
  357. casadi/libcasadi_nlpsol_blocksqp.dll +0 -0
  358. casadi/libcasadi_nlpsol_blocksqp.dll.a +0 -0
  359. casadi/libcasadi_nlpsol_bonmin.dll +0 -0
  360. casadi/libcasadi_nlpsol_bonmin.dll.a +0 -0
  361. casadi/libcasadi_nlpsol_fatrop.dll +0 -0
  362. casadi/libcasadi_nlpsol_fatrop.dll.a +0 -0
  363. casadi/libcasadi_nlpsol_feasiblesqpmethod.dll +0 -0
  364. casadi/libcasadi_nlpsol_feasiblesqpmethod.dll.a +0 -0
  365. casadi/libcasadi_nlpsol_ipopt.dll +0 -0
  366. casadi/libcasadi_nlpsol_ipopt.dll.a +0 -0
  367. casadi/libcasadi_nlpsol_knitro.dll +0 -0
  368. casadi/libcasadi_nlpsol_knitro.dll.a +0 -0
  369. casadi/libcasadi_nlpsol_madnlp.dll +0 -0
  370. casadi/libcasadi_nlpsol_madnlp.dll.a +0 -0
  371. casadi/libcasadi_nlpsol_qrsqp.dll +0 -0
  372. casadi/libcasadi_nlpsol_qrsqp.dll.a +0 -0
  373. casadi/libcasadi_nlpsol_scpgen.dll +0 -0
  374. casadi/libcasadi_nlpsol_scpgen.dll.a +0 -0
  375. casadi/libcasadi_nlpsol_sleqp.dll +0 -0
  376. casadi/libcasadi_nlpsol_sleqp.dll.a +0 -0
  377. casadi/libcasadi_nlpsol_snopt.dll +0 -0
  378. casadi/libcasadi_nlpsol_snopt.dll.a +0 -0
  379. casadi/libcasadi_nlpsol_sqpmethod.dll +0 -0
  380. casadi/libcasadi_nlpsol_sqpmethod.dll.a +0 -0
  381. casadi/libcasadi_nlpsol_worhp.dll +0 -0
  382. casadi/libcasadi_nlpsol_worhp.dll.a +0 -0
  383. casadi/libcasadi_rootfinder_fast_newton.dll +0 -0
  384. casadi/libcasadi_rootfinder_fast_newton.dll.a +0 -0
  385. casadi/libcasadi_rootfinder_kinsol.dll +0 -0
  386. casadi/libcasadi_rootfinder_kinsol.dll.a +0 -0
  387. casadi/libcasadi_rootfinder_newton.dll +0 -0
  388. casadi/libcasadi_rootfinder_newton.dll.a +0 -0
  389. casadi/libcasadi_rootfinder_nlpsol.dll +0 -0
  390. casadi/libcasadi_rootfinder_nlpsol.dll.a +0 -0
  391. casadi/libcasadi_sundials_common.dll +0 -0
  392. casadi/libcasadi_sundials_common.dll.a +0 -0
  393. casadi/libcasadi_xmlfile_tinyxml.dll +0 -0
  394. casadi/libcasadi_xmlfile_tinyxml.dll.a +0 -0
  395. casadi/libcoinmetis-2.dll +0 -0
  396. casadi/libcoinmetis.dll.a +0 -0
  397. casadi/libcoinmumps-3.dll +0 -0
  398. casadi/libcoinmumps.dll.a +0 -0
  399. casadi/libcplex_adaptor.dll +0 -0
  400. casadi/libdaqp.dll +0 -0
  401. casadi/libdaqp.dll.a +0 -0
  402. casadi/libdl.dll +0 -0
  403. casadi/libdl.dll.a +0 -0
  404. casadi/libfatrop.dll +0 -0
  405. casadi/libfatrop.dll.a +0 -0
  406. casadi/libgurobi_adaptor.dll +0 -0
  407. casadi/libhighs.dll +0 -0
  408. casadi/libhighs.dll.a +0 -0
  409. casadi/libhpipm.dll +0 -0
  410. casadi/libhpipm.dll.a +0 -0
  411. casadi/libipopt-3.dll +0 -0
  412. casadi/libipopt.dll.a +0 -0
  413. casadi/libmatlab_ipc.dll +0 -0
  414. casadi/libmatlab_ipc.dll.a +0 -0
  415. casadi/libosqp.dll +0 -0
  416. casadi/libosqp.dll.a +0 -0
  417. casadi/libqdldl.dll +0 -0
  418. casadi/libqdldl.dll.a +0 -0
  419. casadi/libsipopt-3.dll +0 -0
  420. casadi/libsipopt.dll.a +0 -0
  421. casadi/libsleqp.dll +0 -0
  422. casadi/libsleqp.dll.a +0 -0
  423. casadi/libtrlib.dll +0 -0
  424. casadi/libtrlib.dll.a +0 -0
  425. casadi/libzip.a +0 -0
  426. casadi/libzlib.dll +0 -0
  427. casadi/libzlib.dll.a +0 -0
  428. casadi/libzlibstatic.a +0 -0
  429. casadi/matlab_ipc.lib +0 -0
  430. casadi/osqp.lib +0 -0
  431. casadi/pkgconfig/casadi.pc +1 -1
  432. casadi/pkgconfig/highs.pc +1 -1
  433. casadi/pkgconfig/libzip.pc +14 -0
  434. casadi/sleqp.lib +0 -0
  435. casadi/spral_ssids.exe +0 -0
  436. casadi/std-e414687e404555e5.dll +0 -0
  437. casadi/tools/__init__.py +3 -1
  438. casadi/tools/graph/graph.py +1 -1
  439. casadi/tools/structure.py +7 -7
  440. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/METADATA +1 -1
  441. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/RECORD +442 -400
  442. casadi/bin/libtinyxml2.dll +0 -0
  443. casadi/include/highs/lp_data/HighsRuntimeOptions.h +0 -276
  444. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +0 -28
  445. casadi/include/tinyxml2.h +0 -2380
  446. casadi/lib/cmake/tinyxml2/tinyxml2-config.cmake +0 -57
  447. casadi/lib/cmake/tinyxml2/tinyxml2-shared-targets-release.cmake +0 -19
  448. casadi/lib/libtinyxml2.dll.a +0 -0
  449. casadi/lib/pkgconfig/tinyxml2.pc +0 -10
  450. casadi/libtinyxml2.dll +0 -0
  451. casadi/tools/structure3.py +0 -1441
  452. {casadi-3.6.7.dist-info → casadi-3.7.1.dist-info}/WHEEL +0 -0
@@ -87,15 +87,23 @@ class CASADI_EXPORT DaeBuilder
87
87
 
88
88
  /** @name Variables and equations */
89
89
  ///@{
90
+ /** \brief Expression for independent variable (usually time)
91
+
92
+ \identifier{2by} */
93
+ const MX& time() const;
94
+
90
95
  /** \brief Independent variable (usually time)
91
96
 
92
- \identifier{5e} */
93
- const MX& t() const;
97
+ \identifier{2bz} */
98
+ std::vector<std::string> t_new() const {return all("t");}
94
99
 
95
100
  /** \brief Differential states
96
101
 
97
102
  \identifier{5f} */
98
- std::vector<std::string> x() const;
103
+ std::vector<std::string> x() const {return all("x");}
104
+
105
+ /// Outputs */
106
+ std::vector<std::string> y() const;
99
107
 
100
108
  /** \brief Ordinary differential equations (ODE)
101
109
 
@@ -105,7 +113,7 @@ class CASADI_EXPORT DaeBuilder
105
113
  /** \brief Algebraic variables
106
114
 
107
115
  \identifier{5h} */
108
- std::vector<std::string> z() const;
116
+ std::vector<std::string> z() const {return all("z");}
109
117
 
110
118
  /** \brief Algebraic equations
111
119
 
@@ -115,37 +123,52 @@ class CASADI_EXPORT DaeBuilder
115
123
  /** \brief Quadrature states
116
124
 
117
125
  \identifier{5j} */
118
- std::vector<std::string> q() const;
126
+ std::vector<std::string> q() const {return all("q");}
119
127
 
120
128
  /** \brief Quadrature equations
121
129
 
122
130
  \identifier{5k} */
123
131
  std::vector<MX> quad() const;
124
132
 
125
- /** \brief Output variables
133
+ /** \brief Zero-crossing functions
126
134
 
127
- \identifier{5l} */
128
- std::vector<std::string> y() const;
135
+ \identifier{2b0} */
136
+ std::vector<MX> zero() const;
129
137
 
130
138
  /** \brief Definitions of output variables
131
139
 
132
140
  \identifier{5m} */
133
141
  std::vector<MX> ydef() const;
134
142
 
143
+ /** \brief Set all output variables
144
+
145
+ \identifier{2db} */
146
+ void set_y(const std::vector<std::string>& name);
147
+
148
+ /** \brief Get all rate variables
149
+
150
+ \identifier{2dc} */
151
+ std::vector<std::string> rate() const;
152
+
153
+ /** \brief Set rate variables
154
+
155
+ \identifier{2dd} */
156
+ void set_rate(const std::vector<std::string>& name);
157
+
135
158
  /** \brief Free controls
136
159
 
137
160
  \identifier{5n} */
138
- std::vector<std::string> u() const;
161
+ std::vector<std::string> u() const {return all("u");}
139
162
 
140
163
  /** \brief Parameters
141
164
 
142
165
  \identifier{5o} */
143
- std::vector<std::string> p() const;
166
+ std::vector<std::string> p() const {return all("p");}
144
167
 
145
168
  /** \brief Named constants
146
169
 
147
170
  \identifier{5p} */
148
- std::vector<std::string> c() const;
171
+ std::vector<std::string> c() const {return all("c");}
149
172
 
150
173
  /** \brief Definitions of named constants
151
174
 
@@ -155,7 +178,7 @@ class CASADI_EXPORT DaeBuilder
155
178
  /** \brief Dependent parameters
156
179
 
157
180
  \identifier{5r} */
158
- std::vector<std::string> d() const;
181
+ std::vector<std::string> d() const {return all("d");}
159
182
 
160
183
  /** \brief Definitions of dependent parameters
161
184
 
@@ -167,7 +190,7 @@ class CASADI_EXPORT DaeBuilder
167
190
  /** \brief Dependent variables
168
191
 
169
192
  \identifier{5t} */
170
- std::vector<std::string> w() const;
193
+ std::vector<std::string> w() const {return all("w");}
171
194
 
172
195
  /** \brief Dependent variables and corresponding definitions
173
196
 
@@ -176,36 +199,15 @@ class CASADI_EXPORT DaeBuilder
176
199
  \identifier{5u} */
177
200
  std::vector<MX> wdef() const;
178
201
 
179
- /** \brief Auxiliary variables: Used e.g. to define functions
180
-
181
- \identifier{5v} */
182
- const std::vector<MX>& aux() const;
183
-
184
202
  /** \brief Initial conditions, left-hand-side
185
203
 
186
- \identifier{5w} */
187
- const std::vector<MX>& init_lhs() const;
204
+ \identifier{2b1} */
205
+ std::vector<MX> init_lhs() const;
188
206
 
189
207
  /** \brief Initial conditions, right-hand-side
190
208
 
191
- \identifier{5x} */
192
- const std::vector<MX>& init_rhs() const;
193
-
194
- /** \brief When statement: triggering condition
195
-
196
- \identifier{5y} */
197
- const std::vector<MX>& when_cond() const;
198
-
199
- /** \brief When statement: left-hand-side
200
-
201
- \identifier{5z} */
202
- const std::vector<MX>& when_lhs() const;
203
-
204
- /** \brief When statement: right-hand-side
205
-
206
- \identifier{60} */
207
- const std::vector<MX>& when_rhs() const;
208
- ///@}
209
+ \identifier{2b2} */
210
+ std::vector<MX> init_rhs() const;
209
211
 
210
212
  /** \brief Model structure: outputs
211
213
 
@@ -230,6 +232,11 @@ class CASADI_EXPORT DaeBuilder
230
232
  \identifier{64} */
231
233
  bool has_t() const;
232
234
 
235
+ /** \brief Is there a rate output?
236
+
237
+ \identifier{2dg} */
238
+ bool has_rate() const;
239
+
233
240
  /** \brief Differential states
234
241
 
235
242
  \identifier{65} */
@@ -245,6 +252,11 @@ class CASADI_EXPORT DaeBuilder
245
252
  \identifier{67} */
246
253
  casadi_int nq() const;
247
254
 
255
+ /** \brief Zero-crossing functions
256
+
257
+ \identifier{2cb} */
258
+ casadi_int nzero() const;
259
+
248
260
  /** \brief Output variables
249
261
 
250
262
  \identifier{68} */
@@ -280,62 +292,123 @@ class CASADI_EXPORT DaeBuilder
280
292
  * Formulate a dynamic system model
281
293
  */
282
294
  ///@{
283
- /// Add an independent variable (time)
295
+
296
+ /// Add a new model variable
297
+ MX add(const std::string& name,
298
+ const std::string& causality,
299
+ const std::string& variability,
300
+ const Dict& opts=Dict());
301
+
302
+ /// Add a new model variable, default variability
303
+ MX add(const std::string& name,
304
+ const std::string& causality,
305
+ const Dict& opts=Dict());
306
+
307
+ /// Add a new model variable, default variability and causality
308
+ MX add(const std::string& name,
309
+ const Dict& opts=Dict());
310
+
311
+ /// Add a new model variable, symbolic expression already available
312
+ void add(const std::string& name,
313
+ const std::string& causality,
314
+ const std::string& variability,
315
+ const MX& expr,
316
+ const Dict& opts=Dict());
317
+
318
+ #ifdef WITH_DEPRECATED_FEATURES
319
+ /// [DEPRECATED] Renamed "time"
320
+ const MX& t() const { return time();}
321
+
322
+ /// [DEPRECATED] Replaced by add
284
323
  MX add_t(const std::string& name="t");
285
324
 
286
- /// Add a new parameter
325
+ /// [DEPRECATED] Replaced by add
287
326
  MX add_p(const std::string& name=std::string());
288
327
 
289
- /// Add a new control
328
+ /// [DEPRECATED] Replaced by add
290
329
  MX add_u(const std::string& name=std::string());
291
330
 
292
- /// Add a new differential state
331
+ /// [DEPRECATED] Replaced by add
293
332
  MX add_x(const std::string& name=std::string());
294
333
 
295
- /// Add a new algebraic variable
334
+ /// [DEPRECATED] Replaced by add
296
335
  MX add_z(const std::string& name=std::string());
297
336
 
298
- /// Add a new quadrature state
337
+ /// [DEPRECATED] Replaced by add
299
338
  MX add_q(const std::string& name=std::string());
300
339
 
301
- /// Add a new constant
340
+ /// [DEPRECATED] Replaced by add and eq
302
341
  MX add_c(const std::string& name, const MX& new_cdef);
303
342
 
304
- /// Add a new dependent parameter
343
+ /// [DEPRECATED] Replaced by add and eq
305
344
  MX add_d(const std::string& name, const MX& new_ddef);
306
345
 
307
- /// Add a new dependent variable
346
+ /// [DEPRECATED] Replaced by add and eq
308
347
  MX add_w(const std::string& name, const MX& new_wdef);
309
348
 
310
- /// Add a new output
349
+ /// [DEPRECATED] Replaced by add and eq
311
350
  MX add_y(const std::string& name, const MX& new_ydef);
312
351
 
313
- /// Specify the ordinary differential equation for a state
314
- void set_ode(const std::string& name, const MX& ode_rhs);
352
+ /// [DEPRECATED] Replaced by eq
353
+ void set_beq(const std::string& name, const MX& val);
315
354
 
316
- /// Specificy the residual equation for an algebraic variable
317
- void set_alg(const std::string& name, const MX& alg_rhs);
355
+ #endif // WITH_DEPRECATED_FEATURES
318
356
 
319
- /// Add an auxiliary variable
320
- MX add_aux(const std::string& name=std::string(), casadi_int n=1);
357
+ /// Add a simple equation
358
+ void eq(const MX& lhs, const MX& rhs, const Dict& opts=Dict());
321
359
 
322
- /// Add an initial equation
323
- void add_init(const MX& lhs, const MX& rhs);
360
+ /// Add when equations
361
+ void when(const MX& cond, const std::vector<std::string>& eqs, const Dict& opts=Dict());
324
362
 
325
- /// Add a when statement
326
- void add_when(const MX& cond, const MX& lhs, const MX& rhs);
363
+ /// Assignment inside a when-equation or if-else equation
364
+ std::string assign(const std::string& name, const MX& val);
365
+
366
+ /// Reinitialize a state inside when-equations
367
+ std::string reinit(const std::string& name, const MX& val);
368
+
369
+ /// Specify the initial equation for a variable
370
+ void set_init(const std::string& name, const MX& init_rhs);
371
+
372
+ #ifdef WITH_DEPRECATED_FEATURES
373
+ /// [DEPRECATED] Replaced by eq
374
+ void set_ode(const std::string& name, const MX& ode_rhs) {
375
+ eq(var(name), ode_rhs);
376
+ }
377
+
378
+ /// [DEPRECATED] Replaced by eq
379
+ void set_alg(const std::string& name, const MX& alg_rhs) {
380
+ (void)name;
381
+ eq(0, alg_rhs);
382
+ }
383
+
384
+ /// [DEPRECATED] Replaced by set_init
385
+ void add_init(const MX& lhs, const MX& rhs) {
386
+ set_init(lhs.name(), rhs);
387
+ }
388
+
389
+ /// [DEPRECATED] Replaced by nzero()
390
+ casadi_int ne() const {return nzero();}
391
+
392
+ /// [DEPRECATED] Use all("zero") */
393
+ std::vector<std::string> e() const {return all("zero");}
394
+
395
+ #endif // WITH_DEPRECATED_FEATURES
327
396
 
328
397
  /// Check if dimensions match
329
398
  void sanity_check() const;
330
399
  ///@}
331
400
 
332
- /// Clear all variables of a type
401
+ /// Reorder variables in a category
402
+ void reorder(const std::string& cat, const std::vector<std::string>& v);
403
+
404
+ #ifdef WITH_DEPRECATED_FEATURES
405
+ /// [DEPRECATED] Use set_variability, set_causality or set_category to change variable category
333
406
  void clear_all(const std::string& v);
334
407
 
335
- /// Set all variables of a type
408
+ /// [DEPRECATED] Use set_variability, set_causality, set_category and/or reorder
336
409
  void set_all(const std::string& v, const std::vector<std::string>& name);
337
410
 
338
- /** @name Register an existing variable */
411
+ /** @name [DEPRECATED] Register an existing variable */
339
412
  ///@{
340
413
  void register_t(const std::string& name);
341
414
  void register_p(const std::string& name);
@@ -347,48 +420,44 @@ class CASADI_EXPORT DaeBuilder
347
420
  void register_d(const std::string& name);
348
421
  void register_w(const std::string& name);
349
422
  void register_y(const std::string& name);
423
+ void register_e(const std::string& name);
350
424
  ///@}
351
425
 
352
- #ifdef WITH_DEPRECATED_FEATURES
353
- /** @name [DEPRECATED] Specify all variables of a type: Call set_all instead */
354
- ///@{
355
- void set_u(const std::vector<std::string>& name) { set_all("u", name);}
356
- void set_x(const std::vector<std::string>& name) { set_all("x", name);}
357
- void set_z(const std::vector<std::string>& name,
358
- const std::vector<std::string>& alg = std::vector<std::string>());
359
- void set_q(const std::vector<std::string>& name) { set_all("q", name);}
360
- void set_y(const std::vector<std::string>& name) { set_all("y", name);}
361
- ///@}
362
- #endif // WITH_DEPRECATED_FEATURES
363
-
364
- /** @name Manipulation
365
- * Reformulate the dynamic optimization problem.
366
- */
367
- ///@{
368
-
369
- #ifdef WITH_DEPRECATED_FEATURES
370
- /// [DEPRECATED] Clear input variable: Replaced by clear_all
371
- void clear_in(const std::string& v) { clear_all(v);}
372
- #endif // WITH_DEPRECATED_FEATURES
426
+ /// [DEPRECATED] Use eliminate("d")
427
+ void eliminate_d();
373
428
 
374
- /// Eliminate all dependent variables
429
+ /// [DEPRECATED] Use eliminate("w")
375
430
  void eliminate_w();
376
431
 
377
- /// Lift problem formulation by extracting shared subexpressions
378
- void lift(bool lift_shared = true, bool lift_calls = true);
379
-
380
- /// Eliminate quadrature states and turn them into ODE states
432
+ /// [DEPRECATED] Use eliminate("q")
381
433
  void eliminate_quad();
382
434
 
383
- /// Sort dependent parameters
435
+ /// [DEPRECATED] Use sort("d")
384
436
  void sort_d();
385
437
 
386
- /// Sort dependent variables
438
+ /// [DEPRECATED] Use sort("w")
387
439
  void sort_w();
388
440
 
389
- /// Sort algebraic variables
441
+ /// [DEPRECATED] Use reorder("z", new_order)
390
442
  void sort_z(const std::vector<std::string>& z_order);
391
443
 
444
+ #endif // WITH_DEPRECATED_FEATURES
445
+
446
+ /** @name Manipulation
447
+ * Reformulate the dynamic optimization problem.
448
+ */
449
+ ///@{
450
+
451
+
452
+ /// Eliminate all dependent parameters
453
+ void eliminate(const std::string& cat);
454
+
455
+ /// Sort dependent parameters
456
+ void sort(const std::string& cat);
457
+
458
+ /// Lift problem formulation by extracting shared subexpressions
459
+ void lift(bool lift_shared = true, bool lift_calls = true);
460
+
392
461
  /// Prune unused controls
393
462
  void prune(bool prune_p = true, bool prune_u = true);
394
463
 
@@ -433,7 +502,10 @@ class CASADI_EXPORT DaeBuilder
433
502
  void parse_fmi(const std::string& filename) {load_fmi_description(filename); }
434
503
 
435
504
  /// Does the FMU provide support for analytic derivatives
436
- bool provides_directional_derivative() const;
505
+ bool provides_directional_derivatives() const;
506
+
507
+ /// Does the FMU provide support for analytic derivatives (FMI 2 naming)
508
+ bool provides_directional_derivative() const {return provides_directional_derivatives();}
437
509
 
438
510
  /// Import problem description from FMI or XML
439
511
  void load_fmi_description(const std::string& filename);
@@ -463,34 +535,60 @@ class CASADI_EXPORT DaeBuilder
463
535
  const Dict& opts=Dict()) const;
464
536
  ///@}
465
537
 
466
- /** \brief Load a function from an FMU DLL, standard IO conforming with simulator
538
+ /** \brief Create a function with standard integrator DAE signature
467
539
 
468
540
  \param name Name assigned to the resulting function object
469
541
  \param opts Optional settings
470
542
 
471
- \identifier{6f} */
472
- Function create(const std::string& name, const Dict& opts=Dict()) const;
543
+ \identifier{2c0} */
544
+ Function create(const std::string& fname, const Dict& opts=Dict()) const;
545
+
546
+ /** \brief Create a function with standard integrator DAE signature, default naming
547
+
548
+ \identifier{2c1} */
549
+ Function create() const {return create(name() + "_dae");}
473
550
 
474
551
  /// Construct a function for evaluating dependent parameters
475
552
  Function dependent_fun(const std::string& fname,
476
553
  const std::vector<std::string>& s_in,
477
554
  const std::vector<std::string>& s_out) const;
478
555
 
556
+ /// Construct a function describing transition at a specific events
557
+ Function transition(const std::string& fname, casadi_int index) const;
558
+
559
+ /// Construct a function describing transition at any events
560
+ Function transition(const std::string& fname) const;
561
+
562
+ /// Construct an event transition function, default naming
563
+ Function transition() const {return transition(name() + "_transition");}
564
+
479
565
  ///@{
480
566
  /// Get variable expression by name
481
567
  MX var(const std::string& name) const;
482
568
  MX operator()(const std::string& name) const {return var(name);}
483
569
  ///@}
484
570
 
485
- /// Get the time derivative of an expression
571
+ /// Get the time derivative of model variables
486
572
  std::vector<std::string> der(const std::vector<std::string>& name) const;
487
573
 
488
574
  ///@{
489
- /// Get/set the binding equation for a variable
490
- MX beq(const std::string& name) const;
491
- void set_beq(const std::string& name, const MX& val);
575
+ /// Differentiate an expression with respect to time
576
+ MX der(const MX& v) const;
577
+ MX der(const MX& v);
492
578
  ///@}
493
579
 
580
+ /// Get the pre-variables of model variables
581
+ std::vector<std::string> pre(const std::vector<std::string>& name) const;
582
+
583
+ /// Get the pre-expression given variable expression
584
+ MX pre(const MX& v) const;
585
+
586
+ /// Does a variable have a binding equation?
587
+ bool has_beq(const std::string& name) const;
588
+
589
+ /// Get the binding equation for a variable
590
+ MX beq(const std::string& name) const;
591
+
494
592
  ///@{
495
593
  /// Get/set value reference
496
594
  casadi_int value_reference(const std::string& name) const;
@@ -509,17 +607,53 @@ class CASADI_EXPORT DaeBuilder
509
607
  void set_type(const std::string& name, const std::string& val);
510
608
  ///@}
511
609
 
512
- ///@{
513
- /// Get/set the causality
610
+ /// Get the causality
514
611
  std::string causality(const std::string& name) const;
612
+
613
+ /** \brief Set the causality, if permitted
614
+
615
+ The following changes are permitted:
616
+ * For controls 'u' (variability 'continuous', causality 'input'), free parameters 'p'
617
+ (variability 'tunable', causality 'parameter') and fixed parameters 'c' (variability
618
+ 'fixed', causality 'parameter'), causality can only be changed indirectly, by updating
619
+ the variability
620
+ * Add or remove an output 'y' by setting the causality to 'output' or 'local',
621
+ respectively
622
+
623
+ No other changes are permitted.
624
+
625
+ \identifier{2c2} */
515
626
  void set_causality(const std::string& name, const std::string& val);
516
- ///@}
517
627
 
518
- ///@{
519
- /// Get/set the variability
628
+ /// Get the variability
520
629
  std::string variability(const std::string& name) const;
630
+
631
+ /** \brief Set the variability, if permitted
632
+
633
+ For controls 'u' (variability 'continuous', causality 'input'), free parameters 'p'
634
+ (variability 'tunable', causality 'parameter') and fixed parameters 'c'
635
+ (variability 'fixed', causality 'parameter'), update variability in
636
+ order to change the category. Causality is updated accordingly.
637
+
638
+ Other changes are not permitted
639
+
640
+ \identifier{2c3} */
521
641
  void set_variability(const std::string& name, const std::string& val);
522
- ///@}
642
+
643
+ /// Get the variable category
644
+ std::string category(const std::string& name) const;
645
+
646
+ /** \brief Set the variable category, if permitted
647
+
648
+ The following changes are permitted:
649
+ * Controls 'u' can be changed to/from tunable parameters 'p' or fixed parameters 'c'
650
+ * Differential states that do not appear in the right-hand-sides can be changed between
651
+ regular states 'x' and quadrature states 'q'
652
+
653
+ Other changes are not permitted. Causality and variability is updated accordingly.
654
+
655
+ \identifier{2c4} */
656
+ void set_category(const std::string& name, const std::string& val);
523
657
 
524
658
  ///@{
525
659
  /// Get/set the initial property
@@ -545,12 +679,39 @@ class CASADI_EXPORT DaeBuilder
545
679
  /// Get the dimensions of a variable
546
680
  std::vector<casadi_int> dimension(const std::string& name) const;
547
681
 
682
+ /// Get the start time
683
+ double start_time() const;
684
+
685
+ /// Set the start time
686
+ void set_start_time(double val);
687
+
688
+ /// Get the stop time
689
+ double stop_time() const;
690
+
691
+ /// Set the stop time
692
+ void set_stop_time(double val);
693
+
694
+ /// Get the tolerance
695
+ double tolerance() const;
696
+
697
+ /// Set the tolerance
698
+ void set_tolerance(double val);
699
+
700
+ /// Get the step size
701
+ double step_size() const;
702
+
703
+ /// Set the step size
704
+ void set_step_size(double val);
705
+
548
706
  // The following routines are not needed in MATLAB and would cause ambiguity
549
707
  // Note that a multirow strings can be interpreted as a vector of strings
550
708
  #if !(defined(SWIG) && defined(SWIGMATLAB))
551
- /// Get the time derivative of an expression, single variable
709
+ /// Get the time derivative of model variables, single variable
552
710
  std::string der(const std::string& name) const;
553
711
 
712
+ /// Get the pre-variables of model variables
713
+ std::string pre(const std::string& name) const;
714
+
554
715
  /// Get an attribute, single variable
555
716
  double attribute(const std::string& a, const std::string& name) const;
556
717
 
@@ -576,11 +737,14 @@ class CASADI_EXPORT DaeBuilder
576
737
  void set_nominal(const std::string& name, double val);
577
738
 
578
739
  /// Get the start attribute, single variable
579
- double start(const std::string& name) const;
740
+ std::vector<double> start(const std::string& name) const;
580
741
 
581
742
  /// Set the start attribute, single variable
582
743
  void set_start(const std::string& name, double val);
583
744
 
745
+ /// Set the start attribute, vector argument
746
+ void set_start(const std::string& name, const std::vector<double>& val);
747
+
584
748
  // Clear all set values
585
749
  void reset();
586
750
 
@@ -635,29 +799,40 @@ class CASADI_EXPORT DaeBuilder
635
799
  /// Evaluate the values for a set of variables at the initial time
636
800
  std::vector<GenericType> get(const std::vector<std::string>& name) const;
637
801
 
638
- /// Add a new variable: returns corresponding symbolic expression
802
+ /// Check if a particular variable exists
803
+ bool has(const std::string& name) const;
804
+
805
+ /// Get a list of all variables
806
+ std::vector<std::string> all() const;
807
+
808
+ /// Get a list of all variables of a particular category
809
+ std::vector<std::string> all(const std::string& cat) const;
810
+
811
+ #ifdef WITH_DEPRECATED_FEATURES
812
+ /// [DEPRECATED] Use add
639
813
  MX add_variable(const std::string& name, casadi_int n=1);
640
814
 
641
- /// Add a new variable: returns corresponding symbolic expression
815
+ /// [DEPRECATED] Use add
642
816
  MX add_variable(const std::string& name, const Sparsity& sp);
643
817
 
644
818
  /// Add a new variable from symbolic expressions
645
819
  void add_variable(const MX& new_v);
646
820
 
647
- /// Add a new variable: returns corresponding symbolic expression
821
+ /// [DEPRECATED] Use add
648
822
  size_t add_variable_new(const std::string& name, casadi_int n=1);
649
823
 
650
- /// Add a new variable: returns corresponding symbolic expression
824
+ /// [DEPRECATED] Use add
651
825
  size_t add_variable_new(const std::string& name, const Sparsity& sp);
652
826
 
653
- /// Add a new variable from symbolic expressions
827
+ /// [DEPRECATED] Use add
654
828
  size_t add_variable_new(const MX& new_v);
655
829
 
656
- /// Check if a particular variable exists
657
- bool has_variable(const std::string& name) const;
830
+ /// [DEPRECATED] Ranamed "has"
831
+ bool has_variable(const std::string& name) const {return has(name);}
658
832
 
659
833
  /// Get a list of all variables
660
- std::vector<std::string> all_variables() const;
834
+ std::vector<std::string> all_variables() const {return all();}
835
+ #endif // WITH_DEPRECATED_FEATURES
661
836
 
662
837
  /// Get the (cached) oracle, SX or MX
663
838
  Function oracle(bool sx = false, bool elim_w = false, bool lifted_calls = false) const;
@@ -669,21 +844,30 @@ class CASADI_EXPORT DaeBuilder
669
844
  const std::vector<std::string>& inames) const;
670
845
 
671
846
  #ifndef SWIG
672
- /// Create a new variable
847
+ #ifdef WITH_DEPRECATED_FEATURES
848
+ /// [DEPRECATED] Use add
673
849
  Variable& new_variable(const std::string& name, casadi_int numel = 1);
674
850
 
675
851
  ///@{
676
- /// Access a variable by name
852
+ /// [DEPRECATED] Access to internal class and corresponding indexing removed
677
853
  Variable& variable(const std::string& name);
678
854
  const Variable& variable(const std::string& name) const;
855
+ Variable& variable(size_t ind);
856
+ const Variable& variable(size_t ind) const;
857
+ size_t find(const std::string& name) const;
858
+ std::vector<size_t> find(const std::vector<std::string>& name) const;
859
+ const std::string& name(size_t ind) const;
860
+ std::vector<std::string> name(const std::vector<size_t>& ind) const;
679
861
  ///@}
680
862
 
681
863
  ///@{
682
- /// Access a variable by index
683
- Variable& variable(size_t ind);
684
- const Variable& variable(size_t ind) const;
864
+ /// [DEPRECATED] Use string name, not internal index to access variables
865
+ const MX& var(size_t ind) const;
866
+ std::vector<MX> var(const std::vector<size_t>& ind) const;
685
867
  ///@}
686
868
 
869
+ #endif // WITH_DEPRECATED_FEATURES
870
+
687
871
  /// Access a member function or object
688
872
  const DaeBuilderInternal* operator->() const;
689
873
 
@@ -693,28 +877,6 @@ class CASADI_EXPORT DaeBuilder
693
877
  /// Check if a particular cast is allowed
694
878
  static bool test_cast(const SharedObjectInternal* ptr);
695
879
 
696
- /// Get single variable expression by index
697
- const MX& var(size_t ind) const;
698
-
699
- /// Get variable expressions by index
700
- std::vector<MX> var(const std::vector<size_t>& ind) const;
701
-
702
- /// Get index of variable
703
- size_t find(const std::string& name) const;
704
-
705
- /// Get indices of variable
706
- std::vector<size_t> find(const std::vector<std::string>& name) const;
707
-
708
- /** \brief Get variable name by index
709
-
710
- \identifier{6h} */
711
- const std::string& name(size_t ind) const;
712
-
713
- /** \brief Get variable names by indices
714
-
715
- \identifier{6i} */
716
- std::vector<std::string> name(const std::vector<size_t>& ind) const;
717
-
718
880
  #endif // SWIG
719
881
  };
720
882