casadi 3.6.5__cp39-none-macosx_11_0_arm64.whl → 3.6.6__cp39-none-macosx_11_0_arm64.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 (642) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi-cli +0 -0
  3. casadi/casadi.py +663 -257
  4. casadi/cbc +0 -0
  5. casadi/clp +0 -0
  6. casadi/cmake/casadi-config-version.cmake +1 -1
  7. casadi/cmake/casadi-targets.cmake +10 -6
  8. casadi/cmake/highs/highs-config.cmake +6 -13
  9. casadi/cmake/highs/highs-targets-release.cmake +13 -13
  10. casadi/cmake/highs/highs-targets.cmake +25 -22
  11. casadi/cmake/osqp/osqp-targets.cmake +10 -6
  12. casadi/cmake/proxsuite/proxsuiteConfigVersion.cmake +0 -5
  13. casadi/cmake/proxsuite/proxsuiteTargets.cmake +12 -12
  14. casadi/cmake/qdldl/qdldl-targets.cmake +10 -6
  15. casadi/cmake/sleqp/sleqp-config-version.cmake +0 -5
  16. casadi/cmake/sleqp/sleqp-targets.cmake +10 -6
  17. casadi/cmake/trlib/trlib-config-release.cmake +1 -1
  18. casadi/cmake/trlib/trlib-config-version.cmake +0 -5
  19. casadi/cmake/trlib/trlib-config.cmake +12 -12
  20. casadi/highs +0 -0
  21. casadi/include/casadi/casadi.i +3 -0
  22. casadi/include/casadi/casadi_c.h +2 -0
  23. casadi/include/casadi/config.h +9 -9
  24. casadi/include/casadi/core/casadi_common.hpp +1 -0
  25. casadi/include/casadi/core/casadi_export.h +1 -0
  26. casadi/include/casadi/core/casadi_misc.hpp +13 -0
  27. casadi/include/casadi/core/casadi_types.hpp +3 -2
  28. casadi/include/casadi/core/code_generator.hpp +30 -1
  29. casadi/include/casadi/core/global_options.hpp +2 -0
  30. casadi/include/casadi/core/mx.hpp +13 -3
  31. casadi/include/casadi/core/optistack.hpp +23 -0
  32. casadi/include/casadi/core/runtime/casadi_nlp.hpp +2 -0
  33. casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
  34. casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
  35. casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
  36. casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
  37. casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
  38. casadi/include/casadi/core/serializing_stream.hpp +2 -2
  39. casadi/include/casadi/core/sparsity.hpp +7 -0
  40. casadi/include/casadi/doc.i +1397 -955
  41. casadi/include/casadi/doc_merged.i +867 -675
  42. casadi/include/casadi/mem.h +1 -0
  43. casadi/include/daqp/api.h +46 -0
  44. casadi/include/daqp/auxiliary.h +29 -0
  45. casadi/include/daqp/bnb.h +32 -0
  46. casadi/include/daqp/codegen.h +18 -0
  47. casadi/include/daqp/constants.h +92 -0
  48. casadi/include/daqp/daqp.h +22 -0
  49. casadi/include/daqp/daqp_prox.h +18 -0
  50. casadi/include/daqp/factorization.h +18 -0
  51. casadi/include/daqp/types.h +161 -0
  52. casadi/include/daqp/utils.h +44 -0
  53. casadi/include/fatrop/auxiliary/Common.hpp +33 -0
  54. casadi/include/fatrop/auxiliary/DynamicLib.hpp +34 -0
  55. casadi/include/fatrop/auxiliary/FatropOptions.hpp +68 -0
  56. casadi/include/fatrop/auxiliary/FatropVector.hpp +143 -0
  57. casadi/include/fatrop/auxiliary/LinearAlgebra.hpp +88 -0
  58. casadi/include/fatrop/auxiliary/VectorUtils.hpp +54 -0
  59. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +492 -0
  60. casadi/include/fatrop/function_evaluation/CasadiCodegen.hpp +104 -0
  61. casadi/include/fatrop/function_evaluation/FunctionEvaluation.hpp +60 -0
  62. casadi/include/fatrop/json/json.h +946 -0
  63. casadi/include/fatrop/ocp/CasadiCApiUserdataWrap.hpp +87 -0
  64. casadi/include/fatrop/ocp/DuInfEvaluator.hpp +38 -0
  65. casadi/include/fatrop/ocp/FatropOCP.hpp +161 -0
  66. casadi/include/fatrop/ocp/FatropOCPBuilder.hpp +52 -0
  67. casadi/include/fatrop/ocp/OCP.hpp +82 -0
  68. casadi/include/fatrop/ocp/OCPAbstract.hpp +254 -0
  69. casadi/include/fatrop/ocp/OCPAdapter.hpp +197 -0
  70. casadi/include/fatrop/ocp/OCPCInterface.h +289 -0
  71. casadi/include/fatrop/ocp/OCPDims.hpp +60 -0
  72. casadi/include/fatrop/ocp/OCPInitializer.hpp +41 -0
  73. casadi/include/fatrop/ocp/OCPKKT.hpp +69 -0
  74. casadi/include/fatrop/ocp/OCPLSRiccati.hpp +191 -0
  75. casadi/include/fatrop/ocp/OCPLSScaler.hpp +66 -0
  76. casadi/include/fatrop/ocp/OCPLinearSolver.hpp +75 -0
  77. casadi/include/fatrop/ocp/OCPNoScaling.hpp +42 -0
  78. casadi/include/fatrop/ocp/OCPScalingMethod.hpp +42 -0
  79. casadi/include/fatrop/ocp/StageOCP.hpp +592 -0
  80. casadi/include/fatrop/ocp/StageOCPApplication.hpp +242 -0
  81. casadi/include/fatrop/ocp/StageOCPExpressions.hpp +182 -0
  82. casadi/include/fatrop/ocp/UStageEvalAbstract.hpp +168 -0
  83. casadi/include/fatrop/ocp/UStageOCPImpl.hpp +152 -0
  84. casadi/include/fatrop/quasi_newton/bfgs.hpp +159 -0
  85. casadi/include/fatrop/solver/AlgBuilder.hpp +66 -0
  86. casadi/include/fatrop/solver/AlgStrategy.hpp +33 -0
  87. casadi/include/fatrop/solver/FatropAlg.hpp +108 -0
  88. casadi/include/fatrop/solver/FatropData.hpp +188 -0
  89. casadi/include/fatrop/solver/FatropOptions.hpp +94 -0
  90. casadi/include/fatrop/solver/FatropPrinter.hpp +65 -0
  91. casadi/include/fatrop/solver/FatropStats.hpp +63 -0
  92. casadi/include/fatrop/solver/Filter.hpp +54 -0
  93. casadi/include/fatrop/solver/IterationData.hpp +55 -0
  94. casadi/include/fatrop/solver/LineSearch.hpp +86 -0
  95. casadi/include/fatrop/solver/NLPL1.hpp +263 -0
  96. casadi/include/fatrop/templates/NLPAlg.hpp +102 -0
  97. casadi/include/highs/HConfig.h +8 -7
  98. casadi/include/highs/Highs.h +93 -23
  99. casadi/include/highs/filereaderlp/def.hpp +19 -0
  100. casadi/include/highs/interfaces/highs_c_api.h +200 -24
  101. casadi/include/highs/io/Filereader.h +1 -1
  102. casadi/include/highs/io/FilereaderEms.h +1 -1
  103. casadi/include/highs/io/FilereaderLp.h +1 -1
  104. casadi/include/highs/io/FilereaderMps.h +1 -1
  105. casadi/include/highs/io/HMPSIO.h +1 -1
  106. casadi/include/highs/io/HMpsFF.h +5 -3
  107. casadi/include/highs/io/HighsIO.h +18 -8
  108. casadi/include/highs/io/LoadOptions.h +1 -1
  109. casadi/include/highs/ipm/IpxSolution.h +35 -0
  110. casadi/include/highs/ipm/IpxWrapper.h +1 -1
  111. casadi/include/highs/ipm/basiclu/basiclu.h +161 -0
  112. casadi/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
  113. casadi/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
  114. casadi/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
  115. casadi/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
  116. casadi/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
  117. casadi/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
  118. casadi/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
  119. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
  120. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
  121. casadi/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
  122. casadi/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
  123. casadi/include/highs/ipm/basiclu/basiclu_object.h +30 -0
  124. casadi/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
  125. casadi/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
  126. casadi/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
  127. casadi/include/highs/ipm/basiclu/basiclu_update.h +125 -0
  128. casadi/include/highs/ipm/basiclu/lu_def.h +39 -0
  129. casadi/include/highs/ipm/basiclu/lu_file.h +21 -0
  130. casadi/include/highs/ipm/basiclu/lu_internal.h +220 -0
  131. casadi/include/highs/ipm/basiclu/lu_list.h +168 -0
  132. casadi/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
  133. casadi/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
  134. casadi/include/highs/ipm/ipx/basis.h +351 -0
  135. casadi/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
  136. casadi/include/highs/ipm/ipx/control.h +163 -0
  137. casadi/include/highs/ipm/ipx/crossover.h +157 -0
  138. casadi/include/highs/ipm/ipx/diagonal_precond.h +45 -0
  139. casadi/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
  140. casadi/include/highs/ipm/ipx/guess_basis.h +21 -0
  141. casadi/include/highs/ipm/ipx/indexed_vector.h +113 -0
  142. casadi/include/highs/ipm/ipx/info.h +27 -0
  143. casadi/include/highs/ipm/ipx/ipm.h +94 -0
  144. casadi/include/highs/ipm/ipx/ipx_c.h +47 -0
  145. casadi/include/highs/ipm/ipx/ipx_config.h +9 -0
  146. casadi/include/highs/ipm/ipx/ipx_info.h +111 -0
  147. casadi/include/highs/ipm/ipx/ipx_internal.h +88 -0
  148. casadi/include/highs/ipm/ipx/ipx_parameters.h +75 -0
  149. casadi/include/highs/ipm/ipx/ipx_status.h +57 -0
  150. casadi/include/highs/ipm/ipx/iterate.h +328 -0
  151. casadi/include/highs/ipm/ipx/kkt_solver.h +70 -0
  152. casadi/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
  153. casadi/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
  154. casadi/include/highs/ipm/ipx/linear_operator.h +26 -0
  155. casadi/include/highs/ipm/ipx/lp_solver.h +201 -0
  156. casadi/include/highs/ipm/ipx/lu_factorization.h +79 -0
  157. casadi/include/highs/ipm/ipx/lu_update.h +129 -0
  158. casadi/include/highs/ipm/ipx/maxvolume.h +54 -0
  159. casadi/include/highs/ipm/ipx/model.h +409 -0
  160. casadi/include/highs/ipm/ipx/multistream.h +52 -0
  161. casadi/include/highs/ipm/ipx/normal_matrix.h +44 -0
  162. casadi/include/highs/ipm/ipx/power_method.h +44 -0
  163. casadi/include/highs/ipm/ipx/sparse_matrix.h +195 -0
  164. casadi/include/highs/ipm/ipx/sparse_utils.h +58 -0
  165. casadi/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
  166. casadi/include/highs/ipm/ipx/starting_basis.h +39 -0
  167. casadi/include/highs/ipm/ipx/symbolic_invert.h +29 -0
  168. casadi/include/highs/ipm/ipx/timer.h +24 -0
  169. casadi/include/highs/ipm/ipx/utils.h +39 -0
  170. casadi/include/highs/lp_data/HConst.h +20 -10
  171. casadi/include/highs/lp_data/HStruct.h +23 -1
  172. casadi/include/highs/lp_data/HighsAnalysis.h +1 -1
  173. casadi/include/highs/lp_data/HighsCallback.h +10 -3
  174. casadi/include/highs/lp_data/HighsCallbackStruct.h +31 -5
  175. casadi/include/highs/lp_data/HighsDebug.h +1 -1
  176. casadi/include/highs/lp_data/HighsInfo.h +20 -2
  177. casadi/include/highs/lp_data/HighsInfoDebug.h +1 -1
  178. casadi/include/highs/lp_data/HighsLp.h +17 -1
  179. casadi/include/highs/lp_data/HighsLpSolverObject.h +1 -1
  180. casadi/include/highs/lp_data/HighsLpUtils.h +19 -19
  181. casadi/include/highs/lp_data/HighsModelUtils.h +1 -1
  182. casadi/include/highs/lp_data/HighsOptions.h +237 -10
  183. casadi/include/highs/lp_data/HighsRanging.h +1 -1
  184. casadi/include/highs/lp_data/HighsRuntimeOptions.h +2 -2
  185. casadi/include/highs/lp_data/HighsSolution.h +2 -2
  186. casadi/include/highs/lp_data/HighsSolutionDebug.h +1 -1
  187. casadi/include/highs/lp_data/HighsSolve.h +3 -1
  188. casadi/include/highs/lp_data/HighsStatus.h +1 -1
  189. casadi/include/highs/mip/HighsCliqueTable.h +4 -4
  190. casadi/include/highs/mip/HighsConflictPool.h +1 -1
  191. casadi/include/highs/mip/HighsCutGeneration.h +1 -1
  192. casadi/include/highs/mip/HighsCutPool.h +2 -2
  193. casadi/include/highs/mip/HighsDebugSol.h +22 -29
  194. casadi/include/highs/mip/HighsDomain.h +10 -2
  195. casadi/include/highs/mip/HighsDomainChange.h +1 -1
  196. casadi/include/highs/mip/HighsDynamicRowMatrix.h +5 -3
  197. casadi/include/highs/mip/HighsGFkSolve.h +3 -3
  198. casadi/include/highs/mip/HighsImplications.h +3 -3
  199. casadi/include/highs/mip/HighsLpAggregator.h +1 -1
  200. casadi/include/highs/mip/HighsLpRelaxation.h +6 -1
  201. casadi/include/highs/mip/HighsMipSolver.h +4 -2
  202. casadi/include/highs/mip/HighsMipSolverData.h +47 -4
  203. casadi/include/highs/mip/HighsModkSeparator.h +2 -2
  204. casadi/include/highs/mip/HighsNodeQueue.h +5 -3
  205. casadi/include/highs/mip/HighsObjectiveFunction.h +1 -1
  206. casadi/include/highs/mip/HighsPathSeparator.h +2 -2
  207. casadi/include/highs/mip/HighsPrimalHeuristics.h +1 -1
  208. casadi/include/highs/mip/HighsPseudocost.h +35 -23
  209. casadi/include/highs/mip/HighsRedcostFixing.h +1 -1
  210. casadi/include/highs/mip/HighsSearch.h +2 -1
  211. casadi/include/highs/mip/HighsSeparation.h +1 -1
  212. casadi/include/highs/mip/HighsSeparator.h +1 -1
  213. casadi/include/highs/mip/HighsTableauSeparator.h +1 -1
  214. casadi/include/highs/mip/HighsTransformedLp.h +1 -1
  215. casadi/include/highs/model/HighsHessian.h +5 -0
  216. casadi/include/highs/model/HighsHessianUtils.h +2 -0
  217. casadi/include/highs/model/HighsModel.h +10 -1
  218. casadi/include/highs/parallel/HighsMutex.h +2 -1
  219. casadi/include/highs/parallel/HighsParallel.h +7 -2
  220. casadi/include/highs/parallel/HighsTask.h +1 -2
  221. casadi/include/highs/pdlp/CupdlpWrapper.h +93 -0
  222. casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +41 -0
  223. casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +423 -0
  224. casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +183 -0
  225. casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
  226. casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
  227. casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +28 -0
  228. casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +98 -0
  229. casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +33 -0
  230. casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +1726 -0
  231. casadi/include/highs/pdqsort/pdqsort.h +532 -0
  232. casadi/include/highs/presolve/HPresolve.h +27 -14
  233. casadi/include/highs/presolve/HPresolveAnalysis.h +1 -1
  234. casadi/include/highs/presolve/HighsPostsolveStack.h +92 -68
  235. casadi/include/highs/presolve/HighsSymmetry.h +6 -5
  236. casadi/include/highs/presolve/ICrash.h +8 -2
  237. casadi/include/highs/presolve/ICrashUtil.h +1 -1
  238. casadi/include/highs/presolve/ICrashX.h +1 -1
  239. casadi/include/highs/presolve/PresolveComponent.h +1 -1
  240. casadi/include/highs/qpsolver/a_asm.hpp +23 -12
  241. casadi/include/highs/qpsolver/a_quass.hpp +8 -1
  242. casadi/include/highs/qpsolver/basis.hpp +150 -0
  243. casadi/include/highs/qpsolver/crashsolution.hpp +12 -0
  244. casadi/include/highs/qpsolver/dantzigpricing.hpp +72 -0
  245. casadi/include/highs/qpsolver/devexpricing.hpp +99 -0
  246. casadi/include/highs/qpsolver/eventhandler.hpp +23 -0
  247. casadi/include/highs/qpsolver/factor.hpp +400 -0
  248. casadi/include/highs/qpsolver/feasibility_bounded.hpp +105 -0
  249. casadi/include/highs/qpsolver/feasibility_highs.hpp +270 -0
  250. casadi/include/highs/qpsolver/gradient.hpp +39 -0
  251. casadi/include/highs/qpsolver/instance.hpp +63 -0
  252. casadi/include/highs/qpsolver/matrix.hpp +335 -0
  253. casadi/include/highs/qpsolver/pricing.hpp +15 -0
  254. casadi/include/highs/qpsolver/qpconst.hpp +27 -0
  255. casadi/include/highs/qpsolver/{vector.hpp → qpvector.hpp} +25 -25
  256. casadi/include/highs/qpsolver/quass.hpp +1 -1
  257. casadi/include/highs/qpsolver/ratiotest.hpp +19 -0
  258. casadi/include/highs/qpsolver/runtime.hpp +38 -0
  259. casadi/include/highs/qpsolver/settings.hpp +57 -0
  260. casadi/include/highs/qpsolver/snippets.hpp +29 -0
  261. casadi/include/highs/qpsolver/statistics.hpp +23 -0
  262. casadi/include/highs/qpsolver/steepestedgepricing.hpp +167 -0
  263. casadi/include/highs/simplex/HApp.h +1 -1
  264. casadi/include/highs/simplex/HEkk.h +52 -18
  265. casadi/include/highs/simplex/HEkkDual.h +1 -1
  266. casadi/include/highs/simplex/HEkkDualRHS.h +6 -7
  267. casadi/include/highs/simplex/HEkkDualRow.h +2 -2
  268. casadi/include/highs/simplex/HEkkPrimal.h +6 -1
  269. casadi/include/highs/simplex/HSimplex.h +1 -3
  270. casadi/include/highs/simplex/HSimplexDebug.h +1 -1
  271. casadi/include/highs/simplex/HSimplexNla.h +1 -1
  272. casadi/include/highs/simplex/HSimplexReport.h +1 -1
  273. casadi/include/highs/simplex/HighsSimplexAnalysis.h +228 -100
  274. casadi/include/highs/simplex/SimplexConst.h +1 -1
  275. casadi/include/highs/simplex/SimplexStruct.h +2 -2
  276. casadi/include/highs/simplex/SimplexTimer.h +1 -1
  277. casadi/include/highs/test/DevKkt.h +1 -1
  278. casadi/include/highs/test/KktCh2.h +1 -1
  279. casadi/include/highs/util/FactorTimer.h +1 -1
  280. casadi/include/highs/util/HFactor.h +35 -6
  281. casadi/include/highs/util/HFactorConst.h +1 -1
  282. casadi/include/highs/util/HFactorDebug.h +1 -1
  283. casadi/include/highs/util/HSet.h +1 -1
  284. casadi/include/highs/util/HVector.h +1 -1
  285. casadi/include/highs/util/HVectorBase.h +1 -1
  286. casadi/include/highs/util/HighsCDouble.h +3 -3
  287. casadi/include/highs/util/HighsComponent.h +1 -1
  288. casadi/include/highs/util/HighsDataStack.h +4 -4
  289. casadi/include/highs/util/HighsDisjointSets.h +1 -1
  290. casadi/include/highs/util/HighsHash.h +28 -21
  291. casadi/include/highs/util/HighsHashTree.h +63 -63
  292. casadi/include/highs/util/HighsInt.h +1 -1
  293. casadi/include/highs/util/HighsIntegers.h +8 -9
  294. casadi/include/highs/util/HighsLinearSumBounds.h +1 -1
  295. casadi/include/highs/util/HighsMatrixPic.h +1 -1
  296. casadi/include/highs/util/HighsMatrixSlice.h +9 -6
  297. casadi/include/highs/util/HighsMatrixUtils.h +1 -1
  298. casadi/include/highs/util/HighsMemoryAllocation.h +55 -0
  299. casadi/include/highs/util/HighsRandom.h +27 -15
  300. casadi/include/highs/util/HighsRbTree.h +2 -2
  301. casadi/include/highs/util/HighsSort.h +7 -7
  302. casadi/include/highs/util/HighsSparseMatrix.h +5 -2
  303. casadi/include/highs/util/HighsSparseVectorSum.h +2 -2
  304. casadi/include/highs/util/HighsSplay.h +1 -1
  305. casadi/include/highs/util/HighsTimer.h +18 -9
  306. casadi/include/highs/util/HighsUtils.h +15 -8
  307. casadi/include/highs/util/stringutil.h +9 -4
  308. casadi/include/highs/zstr/strict_fstream.hpp +237 -0
  309. casadi/include/highs/zstr/zstr.hpp +472 -0
  310. casadi/include/highs_export.h +43 -0
  311. casadi/include/licenses/daqp-external/LICENSE +21 -0
  312. casadi/include/licenses/{alpaqa-external/LICENSE → fatrop-external/LICENSE.txt} +2 -2
  313. casadi/include/licenses/fatrop-external/external/blasfeo/LICENSE.txt +26 -0
  314. casadi/include/licenses/fatrop-external/external/pybind11/LICENSE +29 -0
  315. casadi/include/licenses/fatrop-external/misc/license_header.txt +17 -0
  316. casadi/include/licenses/highs-external/{LICENSE → LICENSE.txt} +1 -1
  317. casadi/include/osqp/constants.h +2 -3
  318. casadi/include/osqp/version.h +9 -0
  319. casadi/include/sleqp/defs.h +4 -4
  320. casadi/include/sleqp/export.h +1 -0
  321. casadi/lib/cmake/tinyxml2/tinyxml2-config-version.cmake +0 -5
  322. casadi/lib/cmake/tinyxml2/tinyxml2-static-targets.cmake +10 -6
  323. casadi/lib/libtinyxml2.a +0 -0
  324. casadi/lib/pkgconfig/tinyxml2.pc +1 -1
  325. casadi/libCbc.3.10.11.dylib +0 -0
  326. casadi/libCbc.3.dylib +0 -0
  327. casadi/libCbc.dylib +0 -0
  328. casadi/libCbc.la +2 -2
  329. casadi/libCbcSolver.3.10.11.dylib +0 -0
  330. casadi/libCbcSolver.3.dylib +0 -0
  331. casadi/libCbcSolver.dylib +0 -0
  332. casadi/libCbcSolver.la +2 -2
  333. casadi/libCgl.1.10.8.dylib +0 -0
  334. casadi/libCgl.1.dylib +0 -0
  335. casadi/libCgl.dylib +0 -0
  336. casadi/libCgl.la +2 -2
  337. casadi/libClp.1.14.9.dylib +0 -0
  338. casadi/libClp.1.dylib +0 -0
  339. casadi/libClp.dylib +0 -0
  340. casadi/libClp.la +2 -2
  341. casadi/libClpSolver.1.14.9.dylib +0 -0
  342. casadi/libClpSolver.1.dylib +0 -0
  343. casadi/libClpSolver.dylib +0 -0
  344. casadi/libClpSolver.la +2 -2
  345. casadi/libCoinUtils.3.11.10.dylib +0 -0
  346. casadi/libCoinUtils.3.dylib +0 -0
  347. casadi/libCoinUtils.dylib +0 -0
  348. casadi/libCoinUtils.la +1 -1
  349. casadi/libOsi.1.13.9.dylib +0 -0
  350. casadi/libOsi.1.dylib +0 -0
  351. casadi/libOsi.dylib +0 -0
  352. casadi/libOsi.la +2 -2
  353. casadi/libOsiCbc.3.10.11.dylib +0 -0
  354. casadi/libOsiCbc.3.dylib +0 -0
  355. casadi/libOsiCbc.dylib +0 -0
  356. casadi/libOsiCbc.la +2 -2
  357. casadi/libOsiClp.1.14.9.dylib +0 -0
  358. casadi/libOsiClp.1.dylib +0 -0
  359. casadi/libOsiClp.dylib +0 -0
  360. casadi/libOsiClp.la +2 -2
  361. casadi/libOsiCommonTests.1.13.9.dylib +0 -0
  362. casadi/libOsiCommonTests.1.dylib +0 -0
  363. casadi/libOsiCommonTests.dylib +0 -0
  364. casadi/libOsiCommonTests.la +2 -2
  365. casadi/libblasfeo.dylib +0 -0
  366. casadi/libbonmin.4.8.9.dylib +0 -0
  367. casadi/libbonmin.4.dylib +0 -0
  368. casadi/libbonmin.dylib +0 -0
  369. casadi/libbonmin.la +2 -2
  370. casadi/libcasadi.3.7.dylib +0 -0
  371. casadi/libcasadi.dylib +0 -0
  372. casadi/libcasadi_conic_cbc.3.7.dylib +0 -0
  373. casadi/libcasadi_conic_cbc.dylib +0 -0
  374. casadi/libcasadi_conic_clp.3.7.dylib +0 -0
  375. casadi/libcasadi_conic_clp.dylib +0 -0
  376. casadi/libcasadi_conic_cplex.3.7.dylib +0 -0
  377. casadi/libcasadi_conic_cplex.dylib +0 -0
  378. casadi/libcasadi_conic_daqp.3.7.dylib +0 -0
  379. casadi/libcasadi_conic_daqp.dylib +0 -0
  380. casadi/libcasadi_conic_fatrop.3.7.dylib +0 -0
  381. casadi/libcasadi_conic_fatrop.dylib +0 -0
  382. casadi/libcasadi_conic_gurobi.3.7.dylib +0 -0
  383. casadi/libcasadi_conic_gurobi.dylib +0 -0
  384. casadi/libcasadi_conic_highs.3.7.dylib +0 -0
  385. casadi/libcasadi_conic_highs.dylib +0 -0
  386. casadi/libcasadi_conic_ipqp.3.7.dylib +0 -0
  387. casadi/libcasadi_conic_ipqp.dylib +0 -0
  388. casadi/libcasadi_conic_nlpsol.3.7.dylib +0 -0
  389. casadi/libcasadi_conic_nlpsol.dylib +0 -0
  390. casadi/libcasadi_conic_osqp.3.7.dylib +0 -0
  391. casadi/libcasadi_conic_osqp.dylib +0 -0
  392. casadi/libcasadi_conic_proxqp.3.7.dylib +0 -0
  393. casadi/libcasadi_conic_proxqp.dylib +0 -0
  394. casadi/libcasadi_conic_qpoases.3.7.dylib +0 -0
  395. casadi/libcasadi_conic_qpoases.dylib +0 -0
  396. casadi/libcasadi_conic_qrqp.3.7.dylib +0 -0
  397. casadi/libcasadi_conic_qrqp.dylib +0 -0
  398. casadi/libcasadi_conic_superscs.3.7.dylib +0 -0
  399. casadi/libcasadi_conic_superscs.dylib +0 -0
  400. casadi/libcasadi_importer_shell.3.7.dylib +0 -0
  401. casadi/libcasadi_importer_shell.dylib +0 -0
  402. casadi/libcasadi_integrator_collocation.3.7.dylib +0 -0
  403. casadi/libcasadi_integrator_collocation.dylib +0 -0
  404. casadi/libcasadi_integrator_cvodes.3.7.dylib +0 -0
  405. casadi/libcasadi_integrator_cvodes.dylib +0 -0
  406. casadi/libcasadi_integrator_idas.3.7.dylib +0 -0
  407. casadi/libcasadi_integrator_idas.dylib +0 -0
  408. casadi/libcasadi_integrator_rk.3.7.dylib +0 -0
  409. casadi/libcasadi_integrator_rk.dylib +0 -0
  410. casadi/libcasadi_interpolant_bspline.3.7.dylib +0 -0
  411. casadi/libcasadi_interpolant_bspline.dylib +0 -0
  412. casadi/libcasadi_interpolant_linear.3.7.dylib +0 -0
  413. casadi/libcasadi_interpolant_linear.dylib +0 -0
  414. casadi/libcasadi_linsol_csparse.3.7.dylib +0 -0
  415. casadi/libcasadi_linsol_csparse.dylib +0 -0
  416. casadi/libcasadi_linsol_csparsecholesky.3.7.dylib +0 -0
  417. casadi/libcasadi_linsol_csparsecholesky.dylib +0 -0
  418. casadi/libcasadi_linsol_lapacklu.3.7.dylib +0 -0
  419. casadi/libcasadi_linsol_lapacklu.dylib +0 -0
  420. casadi/libcasadi_linsol_lapackqr.3.7.dylib +0 -0
  421. casadi/libcasadi_linsol_lapackqr.dylib +0 -0
  422. casadi/libcasadi_linsol_ldl.3.7.dylib +0 -0
  423. casadi/libcasadi_linsol_ldl.dylib +0 -0
  424. casadi/libcasadi_linsol_lsqr.3.7.dylib +0 -0
  425. casadi/libcasadi_linsol_lsqr.dylib +0 -0
  426. casadi/libcasadi_linsol_ma27.3.7.dylib +0 -0
  427. casadi/libcasadi_linsol_ma27.dylib +0 -0
  428. casadi/libcasadi_linsol_mumps.3.7.dylib +0 -0
  429. casadi/libcasadi_linsol_mumps.dylib +0 -0
  430. casadi/libcasadi_linsol_qr.3.7.dylib +0 -0
  431. casadi/libcasadi_linsol_qr.dylib +0 -0
  432. casadi/libcasadi_linsol_symbolicqr.3.7.dylib +0 -0
  433. casadi/libcasadi_linsol_symbolicqr.dylib +0 -0
  434. casadi/libcasadi_linsol_tridiag.3.7.dylib +0 -0
  435. casadi/libcasadi_linsol_tridiag.dylib +0 -0
  436. casadi/libcasadi_nlpsol_ampl.3.7.dylib +0 -0
  437. casadi/libcasadi_nlpsol_ampl.dylib +0 -0
  438. casadi/libcasadi_nlpsol_blocksqp.3.7.dylib +0 -0
  439. casadi/libcasadi_nlpsol_blocksqp.dylib +0 -0
  440. casadi/libcasadi_nlpsol_bonmin.3.7.dylib +0 -0
  441. casadi/libcasadi_nlpsol_bonmin.dylib +0 -0
  442. casadi/libcasadi_nlpsol_fatrop.3.7.dylib +0 -0
  443. casadi/libcasadi_nlpsol_fatrop.dylib +0 -0
  444. casadi/libcasadi_nlpsol_feasiblesqpmethod.3.7.dylib +0 -0
  445. casadi/libcasadi_nlpsol_feasiblesqpmethod.dylib +0 -0
  446. casadi/libcasadi_nlpsol_ipopt.3.7.dylib +0 -0
  447. casadi/libcasadi_nlpsol_ipopt.dylib +0 -0
  448. casadi/libcasadi_nlpsol_knitro.3.7.dylib +0 -0
  449. casadi/libcasadi_nlpsol_knitro.dylib +0 -0
  450. casadi/libcasadi_nlpsol_madnlp.3.7.dylib +0 -0
  451. casadi/libcasadi_nlpsol_madnlp.dylib +0 -0
  452. casadi/libcasadi_nlpsol_qrsqp.3.7.dylib +0 -0
  453. casadi/libcasadi_nlpsol_qrsqp.dylib +0 -0
  454. casadi/libcasadi_nlpsol_scpgen.3.7.dylib +0 -0
  455. casadi/libcasadi_nlpsol_scpgen.dylib +0 -0
  456. casadi/libcasadi_nlpsol_sleqp.3.7.dylib +0 -0
  457. casadi/libcasadi_nlpsol_sleqp.dylib +0 -0
  458. casadi/libcasadi_nlpsol_snopt.3.7.dylib +0 -0
  459. casadi/libcasadi_nlpsol_snopt.dylib +0 -0
  460. casadi/libcasadi_nlpsol_sqpmethod.3.7.dylib +0 -0
  461. casadi/libcasadi_nlpsol_sqpmethod.dylib +0 -0
  462. casadi/libcasadi_rootfinder_fast_newton.3.7.dylib +0 -0
  463. casadi/libcasadi_rootfinder_fast_newton.dylib +0 -0
  464. casadi/libcasadi_rootfinder_kinsol.3.7.dylib +0 -0
  465. casadi/libcasadi_rootfinder_kinsol.dylib +0 -0
  466. casadi/libcasadi_rootfinder_newton.3.7.dylib +0 -0
  467. casadi/libcasadi_rootfinder_newton.dylib +0 -0
  468. casadi/libcasadi_rootfinder_nlpsol.3.7.dylib +0 -0
  469. casadi/libcasadi_rootfinder_nlpsol.dylib +0 -0
  470. casadi/libcasadi_sundials_common.3.7.dylib +0 -0
  471. casadi/libcasadi_sundials_common.dylib +0 -0
  472. casadi/libcasadi_xmlfile_tinyxml.3.7.dylib +0 -0
  473. casadi/libcasadi_xmlfile_tinyxml.dylib +0 -0
  474. casadi/libcoinmetis.2.dylib +0 -0
  475. casadi/libcoinmetis.dylib +0 -0
  476. casadi/libcoinmetis.la +2 -2
  477. casadi/libcoinmumps.3.dylib +0 -0
  478. casadi/libcoinmumps.dylib +0 -0
  479. casadi/libcoinmumps.la +2 -2
  480. casadi/libcplex_adaptor.dylib +0 -0
  481. casadi/{libamd.3.0.3.dylib → libdaqp.dylib} +0 -0
  482. casadi/libdaqpstat.a +0 -0
  483. casadi/libfatrop.dylib +0 -0
  484. casadi/libgurobi_adaptor.dylib +0 -0
  485. casadi/libhighs.1.7.dylib +0 -0
  486. casadi/libhighs.1.dylib +0 -0
  487. casadi/libhighs.dylib +0 -0
  488. casadi/libindirect.a +0 -0
  489. casadi/libipopt.3.dylib +0 -0
  490. casadi/libipopt.dylib +0 -0
  491. casadi/libipopt.la +2 -2
  492. casadi/liblinsys.a +0 -0
  493. casadi/{libsuitesparseconfig.7.0.1.dylib → libmatlab_ipc.dylib} +0 -0
  494. casadi/libosqp.a +0 -0
  495. casadi/libosqp.dylib +0 -0
  496. casadi/libqdldl.a +0 -0
  497. casadi/libqdldl.dylib +0 -0
  498. casadi/libsipopt.3.dylib +0 -0
  499. casadi/libsipopt.dylib +0 -0
  500. casadi/libsipopt.la +2 -2
  501. casadi/libsleqp.1.0.1.dylib +0 -0
  502. casadi/libsleqp.dylib +0 -0
  503. casadi/libsuperscs.a +0 -0
  504. casadi/libtrlib.0.4.dylib +0 -0
  505. casadi/libtrlib.dylib +0 -0
  506. casadi/pkgconfig/bonmin.pc +1 -1
  507. casadi/pkgconfig/casadi.pc +5 -5
  508. casadi/pkgconfig/cbc.pc +1 -1
  509. casadi/pkgconfig/cgl.pc +1 -1
  510. casadi/pkgconfig/clp.pc +1 -1
  511. casadi/pkgconfig/coinmetis.pc +1 -1
  512. casadi/pkgconfig/coinmumps.pc +2 -2
  513. casadi/pkgconfig/coinutils.pc +2 -2
  514. casadi/pkgconfig/highs.pc +4 -4
  515. casadi/pkgconfig/ipopt.pc +2 -2
  516. casadi/pkgconfig/osi-cbc.pc +1 -1
  517. casadi/pkgconfig/osi-clp.pc +1 -1
  518. casadi/pkgconfig/osi-unittests.pc +1 -1
  519. casadi/pkgconfig/osi.pc +1 -1
  520. casadi/pkgconfig/sleqp.pc +1 -1
  521. casadi/tools/__init__.py +4 -0
  522. casadi/tools/bounds.py +3 -3
  523. {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/METADATA +2 -2
  524. {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/RECORD +525 -472
  525. casadi/cmake/alpaqa/alpaqaConfig.cmake +0 -24
  526. casadi/cmake/alpaqa/alpaqaConfigVersion.cmake +0 -70
  527. casadi/cmake/alpaqa/alpaqaTargets-release.cmake +0 -19
  528. casadi/cmake/alpaqa/alpaqaTargets.cmake +0 -116
  529. casadi/include/alpaqa/accelerators/anderson.hpp +0 -133
  530. casadi/include/alpaqa/accelerators/internal/anderson-helpers.hpp +0 -92
  531. casadi/include/alpaqa/accelerators/internal/limited-memory-qr.hpp +0 -295
  532. casadi/include/alpaqa/accelerators/lbfgs.hpp +0 -244
  533. casadi/include/alpaqa/accelerators/steihaugcg.hpp +0 -143
  534. casadi/include/alpaqa/alpaqa.hpp +0 -3
  535. casadi/include/alpaqa/casadi/CasADiControlProblem.hpp +0 -185
  536. casadi/include/alpaqa/casadi/CasADiFunctionWrapper.hpp +0 -104
  537. casadi/include/alpaqa/casadi/CasADiProblem.hpp +0 -102
  538. casadi/include/alpaqa/casadi-loader-export.hpp +0 -15
  539. casadi/include/alpaqa/casadi-ocp-loader-export.hpp +0 -15
  540. casadi/include/alpaqa/config/config.hpp +0 -165
  541. casadi/include/alpaqa/dl/dl-problem.h +0 -476
  542. casadi/include/alpaqa/dl/dl-problem.hpp +0 -301
  543. casadi/include/alpaqa/export.h +0 -42
  544. casadi/include/alpaqa/export.hpp +0 -30
  545. casadi/include/alpaqa/implementation/accelerators/lbfgs.tpp +0 -240
  546. casadi/include/alpaqa/implementation/casadi/CasADiControlProblem.tpp +0 -594
  547. casadi/include/alpaqa/implementation/casadi/CasADiLoader-util.hpp +0 -50
  548. casadi/include/alpaqa/implementation/casadi/CasADiProblem.tpp +0 -425
  549. casadi/include/alpaqa/implementation/inner/directions/panoc/structured-lbfgs.tpp +0 -164
  550. casadi/include/alpaqa/implementation/inner/panoc-helpers.tpp +0 -389
  551. casadi/include/alpaqa/implementation/inner/panoc-ocp.tpp +0 -798
  552. casadi/include/alpaqa/implementation/inner/panoc.tpp +0 -448
  553. casadi/include/alpaqa/implementation/inner/pantr.tpp +0 -474
  554. casadi/include/alpaqa/implementation/inner/zerofpr.tpp +0 -482
  555. casadi/include/alpaqa/implementation/outer/alm.tpp +0 -228
  556. casadi/include/alpaqa/implementation/outer/internal/alm-helpers.tpp +0 -80
  557. casadi/include/alpaqa/implementation/params/params.tpp +0 -158
  558. casadi/include/alpaqa/implementation/problem/ocproblem.tpp +0 -56
  559. casadi/include/alpaqa/implementation/problem/type-erased-problem.tpp +0 -211
  560. casadi/include/alpaqa/implementation/util/io/csv.tpp +0 -120
  561. casadi/include/alpaqa/implementation/util/print.tpp +0 -151
  562. casadi/include/alpaqa/inner/directions/panoc/anderson.hpp +0 -98
  563. casadi/include/alpaqa/inner/directions/panoc/lbfgs.hpp +0 -94
  564. casadi/include/alpaqa/inner/directions/panoc/structured-lbfgs.hpp +0 -146
  565. casadi/include/alpaqa/inner/directions/panoc/structured-newton.hpp +0 -264
  566. casadi/include/alpaqa/inner/directions/panoc-direction-update.hpp +0 -96
  567. casadi/include/alpaqa/inner/directions/panoc-ocp/lqr.hpp +0 -181
  568. casadi/include/alpaqa/inner/directions/panoc-ocp/ocp-vars.hpp +0 -492
  569. casadi/include/alpaqa/inner/directions/pantr/newton-tr.hpp +0 -192
  570. casadi/include/alpaqa/inner/directions/pantr/pantr-direction.hpp +0 -99
  571. casadi/include/alpaqa/inner/inner-solve-options.hpp +0 -30
  572. casadi/include/alpaqa/inner/internal/lipschitz.hpp +0 -27
  573. casadi/include/alpaqa/inner/internal/panoc-helpers.hpp +0 -10
  574. casadi/include/alpaqa/inner/internal/panoc-stop-crit.hpp +0 -124
  575. casadi/include/alpaqa/inner/internal/solverstatus.hpp +0 -42
  576. casadi/include/alpaqa/inner/panoc-ocp.hpp +0 -302
  577. casadi/include/alpaqa/inner/panoc.hpp +0 -274
  578. casadi/include/alpaqa/inner/pantr.hpp +0 -284
  579. casadi/include/alpaqa/inner/zerofpr.hpp +0 -274
  580. casadi/include/alpaqa/ipopt/ipopt-adapter.hpp +0 -81
  581. casadi/include/alpaqa/ipopt/ipopt-enums.hpp +0 -35
  582. casadi/include/alpaqa/lbfgsb/lbfgsb-adapter.hpp +0 -111
  583. casadi/include/alpaqa/newton-tr-pantr-alm.hpp +0 -27
  584. casadi/include/alpaqa/outer/alm.hpp +0 -190
  585. casadi/include/alpaqa/outer/internal/alm-helpers.hpp +0 -10
  586. casadi/include/alpaqa/panoc-alm.hpp +0 -27
  587. casadi/include/alpaqa/panoc-anderson-alm.hpp +0 -27
  588. casadi/include/alpaqa/params/params.hpp +0 -60
  589. casadi/include/alpaqa/problem/box-constr-problem.hpp +0 -220
  590. casadi/include/alpaqa/problem/box.hpp +0 -82
  591. casadi/include/alpaqa/problem/functional-problem.hpp +0 -73
  592. casadi/include/alpaqa/problem/kkt-error.hpp +0 -43
  593. casadi/include/alpaqa/problem/ocproblem-counters.hpp +0 -116
  594. casadi/include/alpaqa/problem/ocproblem.hpp +0 -662
  595. casadi/include/alpaqa/problem/problem-counters.hpp +0 -116
  596. casadi/include/alpaqa/problem/problem-with-counters.hpp +0 -141
  597. casadi/include/alpaqa/problem/type-erased-problem.hpp +0 -874
  598. casadi/include/alpaqa/problem/unconstr-problem.hpp +0 -37
  599. casadi/include/alpaqa/structured-panoc-alm.hpp +0 -27
  600. casadi/include/alpaqa/structured-zerofpr-alm.hpp +0 -27
  601. casadi/include/alpaqa/util/alloc-check.hpp +0 -23
  602. casadi/include/alpaqa/util/atomic-stop-signal.hpp +0 -24
  603. casadi/include/alpaqa/util/check-dim.hpp +0 -64
  604. casadi/include/alpaqa/util/copyable_unique_ptr.hpp +0 -32
  605. casadi/include/alpaqa/util/demangled-typename.hpp +0 -9
  606. casadi/include/alpaqa/util/enumerate.hpp +0 -70
  607. casadi/include/alpaqa/util/float.hpp +0 -25
  608. casadi/include/alpaqa/util/index-set.hpp +0 -97
  609. casadi/include/alpaqa/util/io/csv.hpp +0 -43
  610. casadi/include/alpaqa/util/iter-adapter.hpp +0 -68
  611. casadi/include/alpaqa/util/max-history.hpp +0 -47
  612. casadi/include/alpaqa/util/noop-delete.hpp +0 -15
  613. casadi/include/alpaqa/util/not-implemented.hpp +0 -12
  614. casadi/include/alpaqa/util/print.hpp +0 -78
  615. casadi/include/alpaqa/util/quadmath/quadmath-print.hpp +0 -20
  616. casadi/include/alpaqa/util/quadmath/quadmath.hpp +0 -137
  617. casadi/include/alpaqa/util/required-method.hpp +0 -29
  618. casadi/include/alpaqa/util/ringbuffer.hpp +0 -212
  619. casadi/include/alpaqa/util/set-intersection.hpp +0 -129
  620. casadi/include/alpaqa/util/sparse-ops.hpp +0 -164
  621. casadi/include/alpaqa/util/timed.hpp +0 -22
  622. casadi/include/alpaqa/util/type-erasure.hpp +0 -568
  623. casadi/include/alpaqa/util/type-traits.hpp +0 -58
  624. casadi/include/alpaqa/zerofpr-alm.hpp +0 -27
  625. casadi/include/alpaqa/zerofpr-anderson-alm.hpp +0 -27
  626. casadi/include/alpaqa-version.h +0 -8
  627. casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
  628. casadi/include/licenses/alpaqa-external/src/thirdparty/lbfgsb/Lbfgsb.3.0/License.txt +0 -71
  629. casadi/libFortranHighs.dylib +0 -0
  630. casadi/libalpaqa.1.0.0.dylib +0 -0
  631. casadi/libalpaqa.dylib +0 -0
  632. casadi/libcamd.3.0.3.dylib +0 -0
  633. casadi/libcasadi_nlpsol_alpaqa.3.7.dylib +0 -0
  634. casadi/libcasadi_nlpsol_alpaqa.dylib +0 -0
  635. casadi/libccolamd.3.0.3.dylib +0 -0
  636. casadi/libcholmod.4.0.3.dylib +0 -0
  637. casadi/libcholmod_cuda.4.0.3.dylib +0 -0
  638. casadi/libcolamd.3.0.3.dylib +0 -0
  639. casadi/libhighs.1.6.0.dylib +0 -0
  640. casadi/libhighs.1.6.dylib +0 -0
  641. casadi/libumfpack.6.1.0.dylib +0 -0
  642. {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/WHEEL +0 -0
@@ -1,211 +0,0 @@
1
- #pragma once
2
-
3
- #include <alpaqa/problem/type-erased-problem.hpp>
4
-
5
- namespace alpaqa {
6
-
7
- template <Config Conf>
8
- auto ProblemVTable<Conf>::calc_ŷ_dᵀŷ(const void *self, rvec g_ŷ, crvec y, crvec Σ,
9
- const ProblemVTable &vtable) -> real_t {
10
- if (Σ.size() == 1) {
11
- // ζ = g(x) + Σ⁻¹y
12
- g_ŷ += (1 / Σ(0)) * y;
13
- // d = ζ - Π(ζ, D)
14
- vtable.eval_proj_diff_g(self, g_ŷ, g_ŷ);
15
- // dᵀŷ, ŷ = Σ d
16
- real_t dᵀŷ = Σ(0) * g_ŷ.dot(g_ŷ);
17
- g_ŷ *= Σ(0);
18
- return dᵀŷ;
19
- } else {
20
- // ζ = g(x) + Σ⁻¹y
21
- g_ŷ += Σ.asDiagonal().inverse() * y;
22
- // d = ζ - Π(ζ, D)
23
- vtable.eval_proj_diff_g(self, g_ŷ, g_ŷ);
24
- // dᵀŷ, ŷ = Σ d
25
- real_t dᵀŷ = 0;
26
- for (index_t i = 0; i < y.size(); ++i) {
27
- dᵀŷ += g_ŷ(i) * Σ(i) * g_ŷ(i); // TODO: vectorize
28
- g_ŷ(i) = Σ(i) * g_ŷ(i);
29
- }
30
- return dᵀŷ;
31
- }
32
- }
33
-
34
- template <Config Conf>
35
- auto ProblemVTable<Conf>::default_eval_inactive_indices_res_lna(const void *, real_t, crvec, crvec,
36
- rindexvec, const ProblemVTable &)
37
- -> index_t {
38
- throw not_implemented_error("eval_inactive_indices_res_lna");
39
- }
40
-
41
- template <Config Conf>
42
- void ProblemVTable<Conf>::default_eval_jac_g(const void *, crvec, rindexvec, rindexvec, rvec,
43
- const ProblemVTable &vtable) {
44
- if (vtable.m != 0)
45
- throw not_implemented_error("eval_jac_g");
46
- }
47
-
48
- template <Config Conf>
49
- auto ProblemVTable<Conf>::default_get_jac_g_num_nonzeros(const void *, const ProblemVTable &)
50
- -> length_t {
51
- return -1;
52
- }
53
-
54
- template <Config Conf>
55
- void ProblemVTable<Conf>::default_eval_grad_gi(const void *, crvec, index_t, rvec,
56
- const ProblemVTable &) {
57
- throw not_implemented_error("eval_grad_gi");
58
- }
59
-
60
- template <Config Conf>
61
- void ProblemVTable<Conf>::default_eval_hess_L_prod(const void *, crvec, crvec, real_t, crvec, rvec,
62
- const ProblemVTable &) {
63
- throw not_implemented_error("eval_hess_L_prod");
64
- }
65
-
66
- template <Config Conf>
67
- void ProblemVTable<Conf>::default_eval_hess_L(const void *, crvec, crvec, real_t, rindexvec,
68
- rindexvec, rvec, const ProblemVTable &) {
69
- throw not_implemented_error("eval_hess_L");
70
- }
71
-
72
- template <Config Conf>
73
- auto ProblemVTable<Conf>::default_get_hess_L_num_nonzeros(const void *, const ProblemVTable &)
74
- -> length_t {
75
- return -1;
76
- }
77
-
78
- template <Config Conf>
79
- void ProblemVTable<Conf>::default_eval_hess_ψ_prod(const void *self, crvec x, crvec y, crvec,
80
- real_t scale, crvec v, rvec Hv,
81
- const ProblemVTable &vtable) {
82
- if (y.size() == 0 && vtable.eval_hess_L_prod != ProblemVTable<Conf>::default_eval_hess_L_prod)
83
- return vtable.eval_hess_L_prod(self, x, y, scale, v, Hv, vtable);
84
- throw not_implemented_error("eval_hess_ψ_prod");
85
- }
86
-
87
- template <Config Conf>
88
- void ProblemVTable<Conf>::default_eval_hess_ψ(const void *self, crvec x, crvec y, crvec,
89
- real_t scale, rindexvec inner_idx,
90
- rindexvec outer_ptr, rvec H_values,
91
- const ProblemVTable &vtable) {
92
- if (y.size() == 0 && vtable.eval_hess_L != default_eval_hess_L)
93
- return vtable.eval_hess_L(self, x, y, scale, inner_idx, outer_ptr, H_values, vtable);
94
- throw not_implemented_error("eval_hess_ψ");
95
- }
96
-
97
- template <Config Conf>
98
- auto ProblemVTable<Conf>::default_get_hess_ψ_num_nonzeros(const void *, const ProblemVTable &)
99
- -> length_t {
100
- return 0;
101
- }
102
-
103
- /** @implementation{ProblemVTable<Conf>::default_eval_f_grad_f} */
104
- template <Config Conf>
105
- /* [ProblemVTable<Conf>::default_eval_f_grad_f] */
106
- auto ProblemVTable<Conf>::default_eval_f_grad_f(const void *self, crvec x, rvec grad_fx,
107
- const ProblemVTable &vtable) -> real_t {
108
- vtable.eval_grad_f(self, x, grad_fx);
109
- return vtable.eval_f(self, x);
110
- }
111
- /* [ProblemVTable<Conf>::default_eval_f_grad_f] */
112
-
113
- /** @implementation{ProblemVTable<Conf>::default_eval_f_g} */
114
- template <Config Conf>
115
- /* [ProblemVTable<Conf>::default_eval_f_g] */
116
- auto ProblemVTable<Conf>::default_eval_f_g(const void *self, crvec x, rvec g,
117
- const ProblemVTable &vtable) -> real_t {
118
- vtable.eval_g(self, x, g);
119
- return vtable.eval_f(self, x);
120
- }
121
- /* [ProblemVTable<Conf>::default_eval_f_g] */
122
-
123
- /** @implementation{ProblemVTable<Conf>::default_eval_grad_f_grad_g_prod} */
124
- template <Config Conf>
125
- /* [ProblemVTable<Conf>::default_eval_grad_f_grad_g_prod] */
126
- void ProblemVTable<Conf>::default_eval_grad_f_grad_g_prod(const void *self, crvec x, crvec y,
127
- rvec grad_f, rvec grad_gxy,
128
- const ProblemVTable &vtable) {
129
- vtable.eval_grad_f(self, x, grad_f);
130
- vtable.eval_grad_g_prod(self, x, y, grad_gxy);
131
- }
132
- /* [ProblemVTable<Conf>::default_eval_grad_f_grad_g_prod] */
133
-
134
- /** @implementation{ProblemVTable<Conf>::default_eval_grad_L} */
135
- template <Config Conf>
136
- /* [ProblemVTable<Conf>::default_eval_grad_L] */
137
- void ProblemVTable<Conf>::default_eval_grad_L(const void *self, crvec x, crvec y, rvec grad_L,
138
- rvec work_n, const ProblemVTable &vtable) {
139
- if (y.size() == 0) /* [[unlikely]] */
140
- return vtable.eval_grad_f(self, x, grad_L);
141
- vtable.eval_grad_f_grad_g_prod(self, x, y, grad_L, work_n, vtable);
142
- grad_L += work_n;
143
- }
144
- /* [ProblemVTable<Conf>::default_eval_grad_L] */
145
-
146
- /** @implementation{ProblemVTable<Conf>::default_eval_ψ} */
147
- template <Config Conf>
148
- /* [ProblemVTable<Conf>::default_eval_ψ] */
149
- auto ProblemVTable<Conf>::default_eval_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec ŷ,
150
- const ProblemVTable &vtable) -> real_t {
151
- if (y.size() == 0) /* [[unlikely]] */
152
- return vtable.eval_f(self, x);
153
-
154
- auto f = vtable.eval_f_g(self, x, ŷ, vtable);
155
- auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
156
- // ψ(x) = f(x) + ½ dᵀŷ
157
- auto ψ = f + real_t(0.5) * dᵀŷ;
158
- return ψ;
159
- }
160
- /* [ProblemVTable<Conf>::default_eval_ψ] */
161
-
162
- /** @implementation{ProblemVTable<Conf>::default_eval_grad_ψ} */
163
- template <Config Conf>
164
- /* [ProblemVTable<Conf>::default_eval_grad_ψ] */
165
- void ProblemVTable<Conf>::default_eval_grad_ψ(const void *self, crvec x, crvec y, crvec Σ,
166
- rvec grad_ψ, rvec work_n, rvec work_m,
167
- const ProblemVTable &vtable) {
168
- if (y.size() == 0) /* [[unlikely]] */ {
169
- vtable.eval_grad_f(self, x, grad_ψ);
170
- } else {
171
- vtable.eval_g(self, x, work_m);
172
- (void)calc_ŷ_dᵀŷ(self, work_m, y, Σ, vtable);
173
- vtable.eval_grad_L(self, x, work_m, grad_ψ, work_n, vtable);
174
- }
175
- }
176
- /* [ProblemVTable<Conf>::default_eval_grad_ψ] */
177
-
178
- /** @implementation{ProblemVTable<Conf>::default_eval_ψ_grad_ψ} */
179
- template <Config Conf>
180
- /* [ProblemVTable<Conf>::default_eval_ψ_grad_ψ] */
181
- auto ProblemVTable<Conf>::default_eval_ψ_grad_ψ(const void *self, crvec x, crvec y, crvec Σ,
182
- rvec grad_ψ, rvec work_n, rvec work_m,
183
- const ProblemVTable &vtable) -> real_t {
184
- if (y.size() == 0) /* [[unlikely]] */
185
- return vtable.eval_f_grad_f(self, x, grad_ψ, vtable);
186
-
187
- auto &ŷ = work_m;
188
- // ψ(x) = f(x) + ½ dᵀŷ
189
- auto f = vtable.eval_f_g(self, x, ŷ, vtable);
190
- auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
191
- auto ψ = f + real_t(0.5) * dᵀŷ;
192
- // ∇ψ(x) = ∇f(x) + ∇g(x) ŷ
193
- vtable.eval_grad_L(self, x, ŷ, grad_ψ, work_n, vtable);
194
- return ψ;
195
- }
196
- /* [ProblemVTable<Conf>::default_eval_ψ_grad_ψ] */
197
-
198
- template <Config Conf>
199
- auto ProblemVTable<Conf>::default_get_box_C(const void *, const ProblemVTable &) -> const Box & {
200
- throw not_implemented_error("get_box_C");
201
- }
202
-
203
- template <Config Conf>
204
- auto ProblemVTable<Conf>::default_get_box_D(const void *, const ProblemVTable &) -> const Box & {
205
- throw not_implemented_error("get_box_D");
206
- }
207
-
208
- template <Config Conf>
209
- void ProblemVTable<Conf>::default_check(const void *, const ProblemVTable &) {}
210
-
211
- } // namespace alpaqa
@@ -1,120 +0,0 @@
1
- #include <alpaqa/util/io/csv.hpp>
2
-
3
- #include <algorithm>
4
- #include <cassert>
5
- #include <charconv>
6
- #include <ios>
7
- #include <iostream>
8
-
9
- #if !__cpp_lib_to_chars
10
- #include <cerrno>
11
- #include <cstdlib> // strtod
12
- #endif
13
-
14
- namespace alpaqa::csv {
15
-
16
- template <std::floating_point F>
17
- struct CSVReader {
18
- static constexpr std::streamsize bufmaxsize = 64;
19
- std::array<char, bufmaxsize + 1> s;
20
- std::streamsize bufidx = 0;
21
- bool keep_reading = true;
22
- static constexpr char end = '\n';
23
-
24
- [[nodiscard]] F read(std::istream &is, char sep) {
25
- // Get some characters to process
26
- if (keep_reading) {
27
- if (!is.get(s.data() + bufidx, bufmaxsize - bufidx, end))
28
- throw read_error("csv::read_row extraction failed: " +
29
- std::to_string(is.bad()) + " " +
30
- std::to_string(is.fail()) + " " +
31
- std::to_string(is.eof()));
32
- bufidx += is.gcount();
33
- keep_reading = is.peek() != end && !is.eof();
34
- assert(bufidx < bufmaxsize);
35
- }
36
- // Parse a number
37
- F v;
38
- char *bufend = s.data() + bufidx;
39
- const char *ptr = read_single(s.data(), bufend, v);
40
- // Check separator
41
- if (ptr != bufend && *ptr != sep)
42
- throw read_error("csv::read_row unexpected character '" +
43
- std::string{*ptr} + "'");
44
- // Shift the buffer over
45
- if (ptr != bufend) {
46
- std::copy(ptr + 1, static_cast<const char *>(bufend), s.data());
47
- bufidx -= ptr + 1 - s.data();
48
- } else {
49
- bufidx = 0;
50
- }
51
- return v;
52
- }
53
-
54
- #if __cpp_lib_to_chars
55
- static const char *read_single(const char *bufbegin, const char *bufend,
56
- F &v) {
57
- if (bufbegin != bufend && *bufbegin == '+')
58
- ++bufbegin;
59
- const auto [ptr, ec] = std::from_chars(bufbegin, bufend, v);
60
- const auto bufvw = std::string_view(bufbegin, bufend);
61
- if (ec != std::errc{})
62
- throw read_error("csv::read_row conversion failed '" +
63
- std::string(bufvw) +
64
- "': " + std::make_error_code(ec).message());
65
- return ptr;
66
- }
67
- #else
68
- static void strtod_ovl(const char *str, char **str_end, float &v) {
69
- v = std::strtof(str, str_end);
70
- }
71
- static void strtod_ovl(const char *str, char **str_end, double &v) {
72
- v = std::strtod(str, str_end);
73
- }
74
- static void strtod_ovl(const char *str, char **str_end, long double &v) {
75
- v = std::strtold(str, str_end);
76
- }
77
- static const char *read_single(const char *bufbegin, char *bufend, F &v) {
78
- *bufend = '\0';
79
- char *ptr;
80
- errno = 0;
81
- strtod_ovl(bufbegin, &ptr, v);
82
- if (errno || ptr == bufbegin)
83
- throw read_error("csv::read_row conversion failed '" +
84
- std::string(bufbegin) +
85
- "': " + std::to_string(errno));
86
- return ptr;
87
- }
88
- #endif
89
-
90
- void check_end(std::istream &is) const {
91
- if (bufidx > 0 || (is.get() != end && is))
92
- throw read_error("csv::read_row line not fully consumed");
93
- }
94
-
95
- [[nodiscard]] bool done(std::istream &is) const {
96
- bool keep_reading = is.peek() != end && !is.eof();
97
- return bufidx == 0 && !keep_reading;
98
- }
99
- };
100
-
101
- template <std::floating_point F>
102
- void read_row_impl(std::istream &is, Eigen::Ref<Eigen::VectorX<F>> v,
103
- char sep) {
104
- CSVReader<F> reader;
105
- for (auto &vv : v)
106
- vv = reader.read(is, sep);
107
- reader.check_end(is);
108
- }
109
-
110
- template <std::floating_point F>
111
- std::vector<F> read_row_std_vector(std::istream &is, char sep) {
112
- CSVReader<F> reader;
113
- std::vector<F> v;
114
- while (!reader.done(is))
115
- v.push_back(reader.read(is, sep));
116
- reader.check_end(is);
117
- return v;
118
- }
119
-
120
- } // namespace alpaqa::csv
@@ -1,151 +0,0 @@
1
- #pragma once
2
-
3
- #include <alpaqa/util/print.hpp>
4
-
5
- #include <cassert>
6
- #include <charconv>
7
- #include <cmath>
8
- #include <limits>
9
- #include <ostream>
10
- #include <string_view>
11
-
12
- namespace alpaqa {
13
-
14
- inline std::string_view float_to_str_vw_snprintf(auto &&print, auto &buf,
15
- std::floating_point auto value,
16
- int precision,
17
- const char *fmt) {
18
- int n = print(buf.data(), buf.size(), fmt, precision, value);
19
- assert((size_t)n < buf.size());
20
- return {buf.data(), (size_t)n};
21
- }
22
-
23
- #if __cpp_lib_to_chars
24
- template <std::floating_point F>
25
- std::string_view
26
- float_to_str_vw(auto &buf, F value,
27
- int precision = std::numeric_limits<F>::max_digits10) {
28
- auto begin = buf.data();
29
- if (!std::signbit(value))
30
- *begin++ = '+';
31
- auto [end, _] = std::to_chars(begin, buf.data() + buf.size(), value,
32
- std::chars_format::scientific, precision);
33
- return std::string_view{buf.data(), end};
34
- }
35
- #else
36
- #pragma message "Using std::snprintf as a fallback to replace std::to_chars"
37
-
38
- inline std::string_view
39
- float_to_str_vw(auto &buf, double value,
40
- int precision = std::numeric_limits<double>::max_digits10) {
41
- return float_to_str_vw_snprintf(std::snprintf, buf, value, precision,
42
- "%+-#.*e");
43
- }
44
- inline std::string_view
45
- float_to_str_vw(auto &buf, float value,
46
- int precision = std::numeric_limits<float>::max_digits10) {
47
- return float_to_str_vw(buf, static_cast<double>(value), precision);
48
- }
49
- inline std::string_view float_to_str_vw(
50
- auto &buf, long double value,
51
- int precision = std::numeric_limits<long double>::max_digits10) {
52
- return float_to_str_vw_snprintf(std::snprintf, buf, value, precision,
53
- "%+-#.*Le");
54
- }
55
- #endif
56
-
57
- #ifdef ALPAQA_WITH_QUAD_PRECISION
58
- std::string_view
59
- float_to_str_vw(auto &buf, __float128 value,
60
- int precision = std::numeric_limits<__float128>::max_digits10) {
61
- return float_to_str_vw_snprintf(quadmath_snprintf, buf, value, precision,
62
- "%+-#.*Qe");
63
- }
64
- #endif
65
-
66
- template <std::floating_point F>
67
- std::string float_to_str(F value, int precision) {
68
- std::array<char, 64> buf;
69
- return std::string{float_to_str_vw(buf, value, precision)};
70
- }
71
-
72
- template <std::floating_point F>
73
- void print_elem(auto &buf, F value, std::ostream &os) {
74
- os << float_to_str_vw(buf, value);
75
- }
76
-
77
- template <std::floating_point F>
78
- void print_elem(auto &buf, std::complex<F> value, std::ostream &os) {
79
- os << float_to_str_vw(buf, value.real()) << " + "
80
- << float_to_str_vw(buf, value.imag()) << 'j';
81
- }
82
-
83
- template <class T>
84
- std::ostream &print_csv_impl(std::ostream &os, const T &M, std::string_view sep,
85
- std::string_view begin, std::string_view end) {
86
- std::array<char, 64> buf;
87
- if (M.cols() == 1) {
88
- os << begin;
89
- for (decltype(M.rows()) r{}; r < M.rows(); ++r) {
90
- print_elem(buf, M(r, 0), os);
91
- if (r != M.rows() - 1)
92
- os << sep;
93
- }
94
- return os << end;
95
- } else {
96
- for (decltype(M.rows()) r{}; r < M.rows(); ++r) {
97
- os << begin;
98
- for (decltype(M.cols()) c{}; c < M.cols(); ++c) {
99
- print_elem(buf, M(r, c), os);
100
- if (c != M.cols() - 1)
101
- os << sep;
102
- }
103
- os << end;
104
- }
105
- return os;
106
- }
107
- }
108
-
109
- template <class T>
110
- std::ostream &print_matlab_impl(std::ostream &os, const T &M,
111
- std::string_view end) {
112
- if (M.cols() == 1) {
113
- return print_csv_impl<T>(os, M, " ", "[", "]") << end;
114
- } else {
115
- os << '[';
116
- std::array<char, 64> buf;
117
- for (decltype(M.rows()) r{}; r < M.rows(); ++r) {
118
- for (decltype(M.cols()) c{}; c < M.cols(); ++c) {
119
- print_elem(buf, M(r, c), os);
120
- if (c != M.cols() - 1)
121
- os << ' ';
122
- }
123
- if (r != M.rows() - 1)
124
- os << ";\n ";
125
- }
126
- return os << ']' << end;
127
- }
128
- }
129
-
130
- template <class T>
131
- std::ostream &print_python_impl(std::ostream &os, const T &M,
132
- std::string_view end) {
133
- if (M.cols() == 1) {
134
- return print_csv_impl<T>(os, M, ", ", "[", "]") << end;
135
- } else {
136
- os << "[[";
137
- std::array<char, 64> buf;
138
- for (decltype(M.rows()) r{}; r < M.rows(); ++r) {
139
- for (decltype(M.cols()) c{}; c < M.cols(); ++c) {
140
- print_elem(buf, M(r, c), os);
141
- if (c != M.cols() - 1)
142
- os << ", ";
143
- }
144
- if (r != M.rows() - 1)
145
- os << "],\n [";
146
- }
147
- return os << "]]" << end;
148
- }
149
- }
150
-
151
- } // namespace alpaqa
@@ -1,98 +0,0 @@
1
- #pragma once
2
-
3
- #include <alpaqa/accelerators/anderson.hpp>
4
- #include <alpaqa/inner/directions/panoc-direction-update.hpp>
5
- #include <alpaqa/problem/type-erased-problem.hpp>
6
-
7
- namespace alpaqa {
8
-
9
- /// Parameters for the @ref AndersonDirection class.
10
- template <Config Conf>
11
- struct AndersonDirectionParams {
12
- bool rescale_on_step_size_changes = false;
13
- };
14
-
15
- /// @ingroup grp_DirectionProviders
16
- template <Config Conf>
17
- struct AndersonDirection {
18
- USING_ALPAQA_CONFIG(Conf);
19
-
20
- using Problem = TypeErasedProblem<config_t>;
21
- using AndersonAccel = alpaqa::AndersonAccel<config_t>;
22
- using AcceleratorParams = typename AndersonAccel::Params;
23
- using DirectionParams = AndersonDirectionParams<config_t>;
24
-
25
- mutable AndersonAccel anderson;
26
-
27
- struct Params {
28
- AcceleratorParams accelerator = {};
29
- DirectionParams direction = {};
30
- };
31
-
32
- AndersonDirection() = default;
33
- AndersonDirection(const Params &params)
34
- : anderson(params.accelerator), direction_params(params.direction) {}
35
- AndersonDirection(const typename AndersonAccel::Params &params,
36
- const DirectionParams &directionparams = {})
37
- : anderson(params), direction_params(directionparams) {}
38
- AndersonDirection(const AndersonAccel &anderson,
39
- const DirectionParams &directionparams = {})
40
- : anderson(anderson), direction_params(directionparams) {}
41
- AndersonDirection(AndersonAccel &&anderson,
42
- const DirectionParams &directionparams = {})
43
- : anderson(std::move(anderson)), direction_params(directionparams) {}
44
-
45
- /// @see @ref PANOCDirection::initialize
46
- void initialize(const Problem &problem, [[maybe_unused]] crvec y,
47
- [[maybe_unused]] crvec Σ, [[maybe_unused]] real_t γ_0,
48
- [[maybe_unused]] crvec x_0, [[maybe_unused]] crvec x̂_0,
49
- [[maybe_unused]] crvec p_0,
50
- [[maybe_unused]] crvec grad_ψx_0) {
51
- anderson.resize(problem.get_n());
52
- anderson.initialize(x̂_0, p_0);
53
- }
54
-
55
- /// @see @ref PANOCDirection::has_initial_direction
56
- bool has_initial_direction() const { return false; }
57
-
58
- /// @see @ref PANOCDirection::update
59
- bool update([[maybe_unused]] real_t γₖ, [[maybe_unused]] real_t γₙₑₓₜ,
60
- [[maybe_unused]] crvec xₖ, [[maybe_unused]] crvec xₙₑₓₜ,
61
- [[maybe_unused]] crvec pₖ, [[maybe_unused]] crvec pₙₑₓₜ,
62
- [[maybe_unused]] crvec grad_ψxₖ,
63
- [[maybe_unused]] crvec grad_ψxₙₑₓₜ) {
64
- return true;
65
- }
66
-
67
- /// @see @ref PANOCDirection::apply
68
- bool apply([[maybe_unused]] real_t γₖ, [[maybe_unused]] crvec xₖ,
69
- [[maybe_unused]] crvec x̂ₖ, crvec pₖ,
70
- [[maybe_unused]] crvec grad_ψxₖ, rvec qₖ) const {
71
- anderson.compute(x̂ₖ, pₖ, qₖ);
72
- qₖ -= xₖ;
73
- return true;
74
- }
75
-
76
- /// @see @ref PANOCDirection::changed_γ
77
- void changed_γ(real_t γₖ, real_t old_γₖ) {
78
- if (direction_params.rescale_on_step_size_changes)
79
- anderson.scale_R(γₖ / old_γₖ);
80
- else
81
- anderson.reset();
82
- }
83
-
84
- /// @see @ref PANOCDirection::reset
85
- void reset() { anderson.reset(); }
86
-
87
- /// @see @ref PANOCDirection::get_name
88
- std::string get_name() const {
89
- return "AndersonDirection<" + std::string(config_t::get_name()) + '>';
90
- }
91
- auto get_params() const {
92
- return std::tie(anderson.get_params(), direction_params);
93
- }
94
-
95
- DirectionParams direction_params;
96
- };
97
-
98
- } // namespace alpaqa
@@ -1,94 +0,0 @@
1
- #pragma once
2
-
3
- #include <alpaqa/accelerators/lbfgs.hpp>
4
- #include <alpaqa/inner/directions/panoc-direction-update.hpp>
5
- #include <alpaqa/problem/type-erased-problem.hpp>
6
-
7
- namespace alpaqa {
8
-
9
- /// Parameters for the @ref LBFGSDirection class.
10
- template <Config Conf>
11
- struct LBFGSDirectionParams {
12
- bool rescale_on_step_size_changes = false;
13
- };
14
-
15
- /// @ingroup grp_DirectionProviders
16
- template <Config Conf>
17
- struct LBFGSDirection {
18
- USING_ALPAQA_CONFIG(Conf);
19
-
20
- using Problem = TypeErasedProblem<config_t>;
21
- using LBFGS = alpaqa::LBFGS<config_t>;
22
- using AcceleratorParams = typename LBFGS::Params;
23
- using DirectionParams = LBFGSDirectionParams<config_t>;
24
-
25
- LBFGS lbfgs;
26
-
27
- struct Params {
28
- AcceleratorParams accelerator = {};
29
- DirectionParams direction = {};
30
- };
31
-
32
- LBFGSDirection() = default;
33
- LBFGSDirection(const Params &params)
34
- : lbfgs(params.accelerator), direction_params(params.direction) {}
35
- LBFGSDirection(const typename LBFGS::Params &params,
36
- const DirectionParams &directionparams = {})
37
- : lbfgs(params), direction_params(directionparams) {}
38
- LBFGSDirection(const LBFGS &lbfgs,
39
- const DirectionParams &directionparams = {})
40
- : lbfgs(lbfgs), direction_params(directionparams) {}
41
- LBFGSDirection(LBFGS &&lbfgs, const DirectionParams &directionparams = {})
42
- : lbfgs(std::move(lbfgs)), direction_params(directionparams) {}
43
-
44
- /// @see @ref PANOCDirection::initialize
45
- void initialize(const Problem &problem, [[maybe_unused]] crvec y,
46
- [[maybe_unused]] crvec Σ, [[maybe_unused]] real_t γ_0,
47
- [[maybe_unused]] crvec x_0, [[maybe_unused]] crvec x̂_0,
48
- [[maybe_unused]] crvec p_0,
49
- [[maybe_unused]] crvec grad_ψx_0) {
50
- lbfgs.resize(problem.get_n());
51
- }
52
-
53
- /// @see @ref PANOCDirection::has_initial_direction
54
- bool has_initial_direction() const { return false; }
55
-
56
- /// @see @ref PANOCDirection::update
57
- bool update([[maybe_unused]] real_t γₖ, [[maybe_unused]] real_t γₙₑₓₜ,
58
- crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ,
59
- [[maybe_unused]] crvec grad_ψxₖ,
60
- [[maybe_unused]] crvec grad_ψxₙₑₓₜ) {
61
- return lbfgs.update(xₖ, xₙₑₓₜ, pₖ, pₙₑₓₜ, LBFGS::Sign::Negative);
62
- }
63
-
64
- /// @see @ref PANOCDirection::apply
65
- bool apply([[maybe_unused]] real_t γₖ, [[maybe_unused]] crvec xₖ,
66
- [[maybe_unused]] crvec x̂ₖ, crvec pₖ,
67
- [[maybe_unused]] crvec grad_ψxₖ, rvec qₖ) const {
68
- qₖ = pₖ;
69
- return lbfgs.apply(qₖ, γₖ);
70
- }
71
-
72
- /// @see @ref PANOCDirection::changed_γ
73
- void changed_γ(real_t γₖ, real_t old_γₖ) {
74
- if (direction_params.rescale_on_step_size_changes)
75
- lbfgs.scale_y(γₖ / old_γₖ);
76
- else
77
- lbfgs.reset();
78
- }
79
-
80
- /// @see @ref PANOCDirection::reset
81
- void reset() { lbfgs.reset(); }
82
-
83
- /// @see @ref PANOCDirection::get_name
84
- std::string get_name() const {
85
- return "LBFGSDirection<" + std::string(config_t::get_name()) + '>';
86
- }
87
- auto get_params() const {
88
- return std::tie(lbfgs.get_params(), direction_params);
89
- }
90
-
91
- DirectionParams direction_params;
92
- };
93
-
94
- } // namespace alpaqa