casadi 3.6.5__cp312-none-macosx_11_0_arm64.whl → 3.6.7__cp312-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.
- casadi/_casadi.so +0 -0
- casadi/casadi-cli +0 -0
- casadi/casadi.py +739 -308
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/casadi-targets.cmake +10 -6
- casadi/cmake/highs/highs-config.cmake +6 -13
- casadi/cmake/highs/highs-targets-release.cmake +13 -13
- casadi/cmake/highs/highs-targets.cmake +25 -22
- casadi/cmake/osqp/osqp-targets.cmake +10 -6
- casadi/cmake/proxsuite/proxsuiteConfigVersion.cmake +0 -5
- casadi/cmake/proxsuite/proxsuiteTargets.cmake +12 -12
- casadi/cmake/qdldl/qdldl-targets.cmake +10 -6
- casadi/cmake/sleqp/sleqp-config-version.cmake +0 -5
- casadi/cmake/sleqp/sleqp-targets.cmake +10 -6
- casadi/cmake/trlib/trlib-config-release.cmake +1 -1
- casadi/cmake/trlib/trlib-config-version.cmake +0 -5
- casadi/cmake/trlib/trlib-config.cmake +12 -12
- casadi/highs +0 -0
- casadi/include/casadi/casadi.i +3 -0
- casadi/include/casadi/casadi_c.h +2 -0
- casadi/include/casadi/config.h +9 -9
- casadi/include/casadi/core/casadi_common.hpp +1 -0
- casadi/include/casadi/core/casadi_export.h +1 -0
- casadi/include/casadi/core/casadi_misc.hpp +52 -0
- casadi/include/casadi/core/casadi_types.hpp +3 -2
- casadi/include/casadi/core/code_generator.hpp +30 -1
- casadi/include/casadi/core/global_options.hpp +2 -0
- casadi/include/casadi/core/mx.hpp +18 -3
- casadi/include/casadi/core/optistack.hpp +23 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +19 -4
- casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
- casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
- casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
- casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
- casadi/include/casadi/core/serializing_stream.hpp +2 -2
- casadi/include/casadi/core/sparsity.hpp +7 -0
- casadi/include/casadi/doc.i +1513 -1016
- casadi/include/casadi/doc_merged.i +965 -719
- casadi/include/casadi/mem.h +1 -0
- casadi/include/daqp/api.h +46 -0
- casadi/include/daqp/auxiliary.h +29 -0
- casadi/include/daqp/bnb.h +32 -0
- casadi/include/daqp/codegen.h +18 -0
- casadi/include/daqp/constants.h +92 -0
- casadi/include/daqp/daqp.h +22 -0
- casadi/include/daqp/daqp_prox.h +18 -0
- casadi/include/daqp/factorization.h +18 -0
- casadi/include/daqp/types.h +161 -0
- casadi/include/daqp/utils.h +44 -0
- casadi/include/fatrop/auxiliary/Common.hpp +34 -0
- casadi/include/fatrop/auxiliary/DynamicLib.hpp +34 -0
- casadi/include/fatrop/auxiliary/FatropOptions.hpp +68 -0
- casadi/include/fatrop/auxiliary/FatropVector.hpp +143 -0
- casadi/include/fatrop/auxiliary/LinearAlgebra.hpp +88 -0
- casadi/include/fatrop/auxiliary/VectorUtils.hpp +54 -0
- casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +493 -0
- casadi/include/fatrop/fatrop.hpp +39 -0
- casadi/include/fatrop/function_evaluation/CasadiCodegen.hpp +104 -0
- casadi/include/fatrop/function_evaluation/FunctionEvaluation.hpp +60 -0
- casadi/include/fatrop/json/json.h +946 -0
- casadi/include/fatrop/ocp/CasadiCApiUserdataWrap.hpp +87 -0
- casadi/include/fatrop/ocp/DuInfEvaluator.hpp +38 -0
- casadi/include/fatrop/ocp/FatropOCP.hpp +161 -0
- casadi/include/fatrop/ocp/FatropOCPBuilder.hpp +52 -0
- casadi/include/fatrop/ocp/FatropOCPResto.hpp +299 -0
- casadi/include/fatrop/ocp/OCP.hpp +82 -0
- casadi/include/fatrop/ocp/OCPAbstract.hpp +254 -0
- casadi/include/fatrop/ocp/OCPAdapter.hpp +197 -0
- casadi/include/fatrop/ocp/OCPCInterface.h +289 -0
- casadi/include/fatrop/ocp/OCPDims.hpp +60 -0
- casadi/include/fatrop/ocp/OCPInitializer.hpp +41 -0
- casadi/include/fatrop/ocp/OCPKKT.hpp +69 -0
- casadi/include/fatrop/ocp/OCPLSRiccati.hpp +198 -0
- casadi/include/fatrop/ocp/OCPLSScaler.hpp +66 -0
- casadi/include/fatrop/ocp/OCPLinearSolver.hpp +75 -0
- casadi/include/fatrop/ocp/OCPNoScaling.hpp +42 -0
- casadi/include/fatrop/ocp/OCPScalingMethod.hpp +42 -0
- casadi/include/fatrop/ocp/StageOCP.hpp +592 -0
- casadi/include/fatrop/ocp/StageOCPApplication.hpp +242 -0
- casadi/include/fatrop/ocp/StageOCPExpressions.hpp +182 -0
- casadi/include/fatrop/ocp/UStageEvalAbstract.hpp +168 -0
- casadi/include/fatrop/ocp/UStageOCPImpl.hpp +152 -0
- casadi/include/fatrop/quasi_newton/bfgs.hpp +159 -0
- casadi/include/fatrop/solver/AlgBuilder.hpp +76 -0
- casadi/include/fatrop/solver/AlgStrategy.hpp +33 -0
- casadi/include/fatrop/solver/FatropAlg.hpp +121 -0
- casadi/include/fatrop/solver/FatropData.hpp +188 -0
- casadi/include/fatrop/solver/FatropOptions.hpp +95 -0
- casadi/include/fatrop/solver/FatropPrinter.hpp +65 -0
- casadi/include/fatrop/solver/FatropStats.hpp +63 -0
- casadi/include/fatrop/solver/Filter.hpp +54 -0
- casadi/include/fatrop/solver/IterationData.hpp +56 -0
- casadi/include/fatrop/solver/LineSearch.hpp +86 -0
- casadi/include/fatrop/solver/NLPL1.hpp +263 -0
- casadi/include/fatrop/templates/NLPAlg.hpp +104 -0
- casadi/include/highs/HConfig.h +8 -7
- casadi/include/highs/Highs.h +93 -23
- casadi/include/highs/filereaderlp/def.hpp +19 -0
- casadi/include/highs/interfaces/highs_c_api.h +200 -24
- casadi/include/highs/io/Filereader.h +1 -1
- casadi/include/highs/io/FilereaderEms.h +1 -1
- casadi/include/highs/io/FilereaderLp.h +1 -1
- casadi/include/highs/io/FilereaderMps.h +1 -1
- casadi/include/highs/io/HMPSIO.h +1 -1
- casadi/include/highs/io/HMpsFF.h +5 -3
- casadi/include/highs/io/HighsIO.h +18 -8
- casadi/include/highs/io/LoadOptions.h +1 -1
- casadi/include/highs/ipm/IpxSolution.h +35 -0
- casadi/include/highs/ipm/IpxWrapper.h +1 -1
- casadi/include/highs/ipm/basiclu/basiclu.h +161 -0
- casadi/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- casadi/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- casadi/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- casadi/include/highs/ipm/basiclu/basiclu_object.h +30 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- casadi/include/highs/ipm/basiclu/basiclu_update.h +125 -0
- casadi/include/highs/ipm/basiclu/lu_def.h +39 -0
- casadi/include/highs/ipm/basiclu/lu_file.h +21 -0
- casadi/include/highs/ipm/basiclu/lu_internal.h +220 -0
- casadi/include/highs/ipm/basiclu/lu_list.h +168 -0
- casadi/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
- casadi/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- casadi/include/highs/ipm/ipx/basis.h +351 -0
- casadi/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
- casadi/include/highs/ipm/ipx/control.h +163 -0
- casadi/include/highs/ipm/ipx/crossover.h +157 -0
- casadi/include/highs/ipm/ipx/diagonal_precond.h +45 -0
- casadi/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
- casadi/include/highs/ipm/ipx/guess_basis.h +21 -0
- casadi/include/highs/ipm/ipx/indexed_vector.h +113 -0
- casadi/include/highs/ipm/ipx/info.h +27 -0
- casadi/include/highs/ipm/ipx/ipm.h +94 -0
- casadi/include/highs/ipm/ipx/ipx_c.h +47 -0
- casadi/include/highs/ipm/ipx/ipx_config.h +9 -0
- casadi/include/highs/ipm/ipx/ipx_info.h +111 -0
- casadi/include/highs/ipm/ipx/ipx_internal.h +88 -0
- casadi/include/highs/ipm/ipx/ipx_parameters.h +75 -0
- casadi/include/highs/ipm/ipx/ipx_status.h +57 -0
- casadi/include/highs/ipm/ipx/iterate.h +328 -0
- casadi/include/highs/ipm/ipx/kkt_solver.h +70 -0
- casadi/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- casadi/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- casadi/include/highs/ipm/ipx/linear_operator.h +26 -0
- casadi/include/highs/ipm/ipx/lp_solver.h +201 -0
- casadi/include/highs/ipm/ipx/lu_factorization.h +79 -0
- casadi/include/highs/ipm/ipx/lu_update.h +129 -0
- casadi/include/highs/ipm/ipx/maxvolume.h +54 -0
- casadi/include/highs/ipm/ipx/model.h +409 -0
- casadi/include/highs/ipm/ipx/multistream.h +52 -0
- casadi/include/highs/ipm/ipx/normal_matrix.h +44 -0
- casadi/include/highs/ipm/ipx/power_method.h +44 -0
- casadi/include/highs/ipm/ipx/sparse_matrix.h +195 -0
- casadi/include/highs/ipm/ipx/sparse_utils.h +58 -0
- casadi/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- casadi/include/highs/ipm/ipx/starting_basis.h +39 -0
- casadi/include/highs/ipm/ipx/symbolic_invert.h +29 -0
- casadi/include/highs/ipm/ipx/timer.h +24 -0
- casadi/include/highs/ipm/ipx/utils.h +39 -0
- casadi/include/highs/lp_data/HConst.h +20 -10
- casadi/include/highs/lp_data/HStruct.h +23 -1
- casadi/include/highs/lp_data/HighsAnalysis.h +1 -1
- casadi/include/highs/lp_data/HighsCallback.h +10 -3
- casadi/include/highs/lp_data/HighsCallbackStruct.h +31 -5
- casadi/include/highs/lp_data/HighsDebug.h +1 -1
- casadi/include/highs/lp_data/HighsInfo.h +20 -2
- casadi/include/highs/lp_data/HighsInfoDebug.h +1 -1
- casadi/include/highs/lp_data/HighsLp.h +17 -1
- casadi/include/highs/lp_data/HighsLpSolverObject.h +1 -1
- casadi/include/highs/lp_data/HighsLpUtils.h +19 -19
- casadi/include/highs/lp_data/HighsModelUtils.h +1 -1
- casadi/include/highs/lp_data/HighsOptions.h +237 -10
- casadi/include/highs/lp_data/HighsRanging.h +1 -1
- casadi/include/highs/lp_data/HighsRuntimeOptions.h +2 -2
- casadi/include/highs/lp_data/HighsSolution.h +2 -2
- casadi/include/highs/lp_data/HighsSolutionDebug.h +1 -1
- casadi/include/highs/lp_data/HighsSolve.h +3 -1
- casadi/include/highs/lp_data/HighsStatus.h +1 -1
- casadi/include/highs/mip/HighsCliqueTable.h +4 -4
- casadi/include/highs/mip/HighsConflictPool.h +1 -1
- casadi/include/highs/mip/HighsCutGeneration.h +1 -1
- casadi/include/highs/mip/HighsCutPool.h +2 -2
- casadi/include/highs/mip/HighsDebugSol.h +22 -29
- casadi/include/highs/mip/HighsDomain.h +10 -2
- casadi/include/highs/mip/HighsDomainChange.h +1 -1
- casadi/include/highs/mip/HighsDynamicRowMatrix.h +5 -3
- casadi/include/highs/mip/HighsGFkSolve.h +3 -3
- casadi/include/highs/mip/HighsImplications.h +3 -3
- casadi/include/highs/mip/HighsLpAggregator.h +1 -1
- casadi/include/highs/mip/HighsLpRelaxation.h +6 -1
- casadi/include/highs/mip/HighsMipSolver.h +4 -2
- casadi/include/highs/mip/HighsMipSolverData.h +47 -4
- casadi/include/highs/mip/HighsModkSeparator.h +2 -2
- casadi/include/highs/mip/HighsNodeQueue.h +5 -3
- casadi/include/highs/mip/HighsObjectiveFunction.h +1 -1
- casadi/include/highs/mip/HighsPathSeparator.h +2 -2
- casadi/include/highs/mip/HighsPrimalHeuristics.h +1 -1
- casadi/include/highs/mip/HighsPseudocost.h +35 -23
- casadi/include/highs/mip/HighsRedcostFixing.h +1 -1
- casadi/include/highs/mip/HighsSearch.h +2 -1
- casadi/include/highs/mip/HighsSeparation.h +1 -1
- casadi/include/highs/mip/HighsSeparator.h +1 -1
- casadi/include/highs/mip/HighsTableauSeparator.h +1 -1
- casadi/include/highs/mip/HighsTransformedLp.h +1 -1
- casadi/include/highs/model/HighsHessian.h +5 -0
- casadi/include/highs/model/HighsHessianUtils.h +2 -0
- casadi/include/highs/model/HighsModel.h +10 -1
- casadi/include/highs/parallel/HighsMutex.h +2 -1
- casadi/include/highs/parallel/HighsParallel.h +7 -2
- casadi/include/highs/parallel/HighsTask.h +1 -2
- casadi/include/highs/pdlp/CupdlpWrapper.h +93 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +41 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +423 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +183 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +28 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +98 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +33 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +1726 -0
- casadi/include/highs/pdqsort/pdqsort.h +532 -0
- casadi/include/highs/presolve/HPresolve.h +27 -14
- casadi/include/highs/presolve/HPresolveAnalysis.h +1 -1
- casadi/include/highs/presolve/HighsPostsolveStack.h +92 -68
- casadi/include/highs/presolve/HighsSymmetry.h +6 -5
- casadi/include/highs/presolve/ICrash.h +8 -2
- casadi/include/highs/presolve/ICrashUtil.h +1 -1
- casadi/include/highs/presolve/ICrashX.h +1 -1
- casadi/include/highs/presolve/PresolveComponent.h +1 -1
- casadi/include/highs/qpsolver/a_asm.hpp +23 -12
- casadi/include/highs/qpsolver/a_quass.hpp +8 -1
- casadi/include/highs/qpsolver/basis.hpp +150 -0
- casadi/include/highs/qpsolver/crashsolution.hpp +12 -0
- casadi/include/highs/qpsolver/dantzigpricing.hpp +72 -0
- casadi/include/highs/qpsolver/devexpricing.hpp +99 -0
- casadi/include/highs/qpsolver/eventhandler.hpp +23 -0
- casadi/include/highs/qpsolver/factor.hpp +400 -0
- casadi/include/highs/qpsolver/feasibility_bounded.hpp +105 -0
- casadi/include/highs/qpsolver/feasibility_highs.hpp +270 -0
- casadi/include/highs/qpsolver/gradient.hpp +39 -0
- casadi/include/highs/qpsolver/instance.hpp +63 -0
- casadi/include/highs/qpsolver/matrix.hpp +335 -0
- casadi/include/highs/qpsolver/pricing.hpp +15 -0
- casadi/include/highs/qpsolver/qpconst.hpp +27 -0
- casadi/include/highs/qpsolver/{vector.hpp → qpvector.hpp} +25 -25
- casadi/include/highs/qpsolver/quass.hpp +1 -1
- casadi/include/highs/qpsolver/ratiotest.hpp +19 -0
- casadi/include/highs/qpsolver/runtime.hpp +38 -0
- casadi/include/highs/qpsolver/settings.hpp +57 -0
- casadi/include/highs/qpsolver/snippets.hpp +29 -0
- casadi/include/highs/qpsolver/statistics.hpp +23 -0
- casadi/include/highs/qpsolver/steepestedgepricing.hpp +167 -0
- casadi/include/highs/simplex/HApp.h +1 -1
- casadi/include/highs/simplex/HEkk.h +52 -18
- casadi/include/highs/simplex/HEkkDual.h +1 -1
- casadi/include/highs/simplex/HEkkDualRHS.h +6 -7
- casadi/include/highs/simplex/HEkkDualRow.h +2 -2
- casadi/include/highs/simplex/HEkkPrimal.h +6 -1
- casadi/include/highs/simplex/HSimplex.h +1 -3
- casadi/include/highs/simplex/HSimplexDebug.h +1 -1
- casadi/include/highs/simplex/HSimplexNla.h +1 -1
- casadi/include/highs/simplex/HSimplexReport.h +1 -1
- casadi/include/highs/simplex/HighsSimplexAnalysis.h +228 -100
- casadi/include/highs/simplex/SimplexConst.h +1 -1
- casadi/include/highs/simplex/SimplexStruct.h +2 -2
- casadi/include/highs/simplex/SimplexTimer.h +1 -1
- casadi/include/highs/test/DevKkt.h +1 -1
- casadi/include/highs/test/KktCh2.h +1 -1
- casadi/include/highs/util/FactorTimer.h +1 -1
- casadi/include/highs/util/HFactor.h +35 -6
- casadi/include/highs/util/HFactorConst.h +1 -1
- casadi/include/highs/util/HFactorDebug.h +1 -1
- casadi/include/highs/util/HSet.h +1 -1
- casadi/include/highs/util/HVector.h +1 -1
- casadi/include/highs/util/HVectorBase.h +1 -1
- casadi/include/highs/util/HighsCDouble.h +3 -3
- casadi/include/highs/util/HighsComponent.h +1 -1
- casadi/include/highs/util/HighsDataStack.h +4 -4
- casadi/include/highs/util/HighsDisjointSets.h +1 -1
- casadi/include/highs/util/HighsHash.h +28 -21
- casadi/include/highs/util/HighsHashTree.h +63 -63
- casadi/include/highs/util/HighsInt.h +1 -1
- casadi/include/highs/util/HighsIntegers.h +8 -9
- casadi/include/highs/util/HighsLinearSumBounds.h +1 -1
- casadi/include/highs/util/HighsMatrixPic.h +1 -1
- casadi/include/highs/util/HighsMatrixSlice.h +9 -6
- casadi/include/highs/util/HighsMatrixUtils.h +1 -1
- casadi/include/highs/util/HighsMemoryAllocation.h +55 -0
- casadi/include/highs/util/HighsRandom.h +27 -15
- casadi/include/highs/util/HighsRbTree.h +2 -2
- casadi/include/highs/util/HighsSort.h +7 -7
- casadi/include/highs/util/HighsSparseMatrix.h +5 -2
- casadi/include/highs/util/HighsSparseVectorSum.h +2 -2
- casadi/include/highs/util/HighsSplay.h +1 -1
- casadi/include/highs/util/HighsTimer.h +18 -9
- casadi/include/highs/util/HighsUtils.h +15 -8
- casadi/include/highs/util/stringutil.h +9 -4
- casadi/include/highs/zstr/strict_fstream.hpp +237 -0
- casadi/include/highs/zstr/zstr.hpp +472 -0
- casadi/include/highs_export.h +43 -0
- casadi/include/licenses/daqp-external/LICENSE +21 -0
- casadi/include/licenses/{alpaqa-external/LICENSE → fatrop-external/LICENSE.txt} +2 -2
- casadi/include/licenses/fatrop-external/external/blasfeo/LICENSE.txt +26 -0
- casadi/include/licenses/fatrop-external/external/pybind11/LICENSE +29 -0
- casadi/include/licenses/fatrop-external/misc/license_header.txt +17 -0
- casadi/include/licenses/highs-external/{LICENSE → LICENSE.txt} +1 -1
- casadi/include/osqp/constants.h +2 -3
- casadi/include/osqp/version.h +9 -0
- casadi/include/sleqp/defs.h +4 -4
- casadi/include/sleqp/export.h +1 -0
- casadi/lib/cmake/tinyxml2/tinyxml2-config-version.cmake +0 -5
- casadi/lib/cmake/tinyxml2/tinyxml2-static-targets.cmake +10 -6
- casadi/lib/libtinyxml2.a +0 -0
- casadi/lib/pkgconfig/tinyxml2.pc +1 -1
- casadi/libCbc.3.10.11.dylib +0 -0
- casadi/libCbc.3.dylib +0 -0
- casadi/libCbc.dylib +0 -0
- casadi/libCbc.la +2 -2
- casadi/libCbcSolver.3.10.11.dylib +0 -0
- casadi/libCbcSolver.3.dylib +0 -0
- casadi/libCbcSolver.dylib +0 -0
- casadi/libCbcSolver.la +2 -2
- casadi/libCgl.1.10.8.dylib +0 -0
- casadi/libCgl.1.dylib +0 -0
- casadi/libCgl.dylib +0 -0
- casadi/libCgl.la +2 -2
- casadi/libClp.1.14.9.dylib +0 -0
- casadi/libClp.1.dylib +0 -0
- casadi/libClp.dylib +0 -0
- casadi/libClp.la +2 -2
- casadi/libClpSolver.1.14.9.dylib +0 -0
- casadi/libClpSolver.1.dylib +0 -0
- casadi/libClpSolver.dylib +0 -0
- casadi/libClpSolver.la +2 -2
- casadi/libCoinUtils.3.11.10.dylib +0 -0
- casadi/libCoinUtils.3.dylib +0 -0
- casadi/libCoinUtils.dylib +0 -0
- casadi/libCoinUtils.la +1 -1
- casadi/libOsi.1.13.9.dylib +0 -0
- casadi/libOsi.1.dylib +0 -0
- casadi/libOsi.dylib +0 -0
- casadi/libOsi.la +2 -2
- casadi/libOsiCbc.3.10.11.dylib +0 -0
- casadi/libOsiCbc.3.dylib +0 -0
- casadi/libOsiCbc.dylib +0 -0
- casadi/libOsiCbc.la +2 -2
- casadi/libOsiClp.1.14.9.dylib +0 -0
- casadi/libOsiClp.1.dylib +0 -0
- casadi/libOsiClp.dylib +0 -0
- casadi/libOsiClp.la +2 -2
- casadi/libOsiCommonTests.1.13.9.dylib +0 -0
- casadi/libOsiCommonTests.1.dylib +0 -0
- casadi/libOsiCommonTests.dylib +0 -0
- casadi/libOsiCommonTests.la +2 -2
- casadi/libblasfeo.dylib +0 -0
- casadi/libbonmin.4.8.9.dylib +0 -0
- casadi/libbonmin.4.dylib +0 -0
- casadi/libbonmin.dylib +0 -0
- casadi/libbonmin.la +2 -2
- casadi/libc++.1.0.dylib +0 -0
- casadi/libcasadi.3.7.dylib +0 -0
- casadi/libcasadi.dylib +0 -0
- casadi/libcasadi_conic_cbc.3.7.dylib +0 -0
- casadi/libcasadi_conic_cbc.dylib +0 -0
- casadi/libcasadi_conic_clp.3.7.dylib +0 -0
- casadi/libcasadi_conic_clp.dylib +0 -0
- casadi/libcasadi_conic_cplex.3.7.dylib +0 -0
- casadi/libcasadi_conic_cplex.dylib +0 -0
- casadi/libcasadi_conic_daqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_daqp.dylib +0 -0
- casadi/libcasadi_conic_fatrop.3.7.dylib +0 -0
- casadi/libcasadi_conic_fatrop.dylib +0 -0
- casadi/libcasadi_conic_gurobi.3.7.dylib +0 -0
- casadi/libcasadi_conic_gurobi.dylib +0 -0
- casadi/libcasadi_conic_highs.3.7.dylib +0 -0
- casadi/libcasadi_conic_highs.dylib +0 -0
- casadi/libcasadi_conic_ipqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_ipqp.dylib +0 -0
- casadi/libcasadi_conic_nlpsol.3.7.dylib +0 -0
- casadi/libcasadi_conic_nlpsol.dylib +0 -0
- casadi/libcasadi_conic_osqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_osqp.dylib +0 -0
- casadi/libcasadi_conic_proxqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_proxqp.dylib +0 -0
- casadi/libcasadi_conic_qpoases.3.7.dylib +0 -0
- casadi/libcasadi_conic_qpoases.dylib +0 -0
- casadi/libcasadi_conic_qrqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_qrqp.dylib +0 -0
- casadi/libcasadi_conic_superscs.3.7.dylib +0 -0
- casadi/libcasadi_conic_superscs.dylib +0 -0
- casadi/libcasadi_importer_shell.3.7.dylib +0 -0
- casadi/libcasadi_importer_shell.dylib +0 -0
- casadi/libcasadi_integrator_collocation.3.7.dylib +0 -0
- casadi/libcasadi_integrator_collocation.dylib +0 -0
- casadi/libcasadi_integrator_cvodes.3.7.dylib +0 -0
- casadi/libcasadi_integrator_cvodes.dylib +0 -0
- casadi/libcasadi_integrator_idas.3.7.dylib +0 -0
- casadi/libcasadi_integrator_idas.dylib +0 -0
- casadi/libcasadi_integrator_rk.3.7.dylib +0 -0
- casadi/libcasadi_integrator_rk.dylib +0 -0
- casadi/libcasadi_interpolant_bspline.3.7.dylib +0 -0
- casadi/libcasadi_interpolant_bspline.dylib +0 -0
- casadi/libcasadi_interpolant_linear.3.7.dylib +0 -0
- casadi/libcasadi_interpolant_linear.dylib +0 -0
- casadi/libcasadi_linsol_csparse.3.7.dylib +0 -0
- casadi/libcasadi_linsol_csparse.dylib +0 -0
- casadi/libcasadi_linsol_csparsecholesky.3.7.dylib +0 -0
- casadi/libcasadi_linsol_csparsecholesky.dylib +0 -0
- casadi/libcasadi_linsol_lapacklu.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lapacklu.dylib +0 -0
- casadi/libcasadi_linsol_lapackqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lapackqr.dylib +0 -0
- casadi/libcasadi_linsol_ldl.3.7.dylib +0 -0
- casadi/libcasadi_linsol_ldl.dylib +0 -0
- casadi/libcasadi_linsol_lsqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lsqr.dylib +0 -0
- casadi/libcasadi_linsol_ma27.3.7.dylib +0 -0
- casadi/libcasadi_linsol_ma27.dylib +0 -0
- casadi/libcasadi_linsol_mumps.3.7.dylib +0 -0
- casadi/libcasadi_linsol_mumps.dylib +0 -0
- casadi/libcasadi_linsol_qr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_qr.dylib +0 -0
- casadi/libcasadi_linsol_symbolicqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_symbolicqr.dylib +0 -0
- casadi/libcasadi_linsol_tridiag.3.7.dylib +0 -0
- casadi/libcasadi_linsol_tridiag.dylib +0 -0
- casadi/libcasadi_nlpsol_ampl.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_ampl.dylib +0 -0
- casadi/libcasadi_nlpsol_blocksqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_blocksqp.dylib +0 -0
- casadi/libcasadi_nlpsol_bonmin.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_bonmin.dylib +0 -0
- casadi/libcasadi_nlpsol_fatrop.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_fatrop.dylib +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.dylib +0 -0
- casadi/libcasadi_nlpsol_ipopt.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_ipopt.dylib +0 -0
- casadi/libcasadi_nlpsol_knitro.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_knitro.dylib +0 -0
- casadi/libcasadi_nlpsol_madnlp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_madnlp.dylib +0 -0
- casadi/libcasadi_nlpsol_qrsqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_qrsqp.dylib +0 -0
- casadi/libcasadi_nlpsol_scpgen.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_scpgen.dylib +0 -0
- casadi/libcasadi_nlpsol_sleqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_sleqp.dylib +0 -0
- casadi/libcasadi_nlpsol_snopt.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_snopt.dylib +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.dylib +0 -0
- casadi/libcasadi_rootfinder_fast_newton.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_fast_newton.dylib +0 -0
- casadi/libcasadi_rootfinder_kinsol.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_kinsol.dylib +0 -0
- casadi/libcasadi_rootfinder_newton.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_newton.dylib +0 -0
- casadi/libcasadi_rootfinder_nlpsol.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_nlpsol.dylib +0 -0
- casadi/libcasadi_sundials_common.3.7.dylib +0 -0
- casadi/libcasadi_sundials_common.dylib +0 -0
- casadi/libcasadi_xmlfile_tinyxml.3.7.dylib +0 -0
- casadi/libcasadi_xmlfile_tinyxml.dylib +0 -0
- casadi/libcoinmetis.2.dylib +0 -0
- casadi/libcoinmetis.dylib +0 -0
- casadi/libcoinmetis.la +1 -1
- casadi/libcoinmumps.3.dylib +0 -0
- casadi/libcoinmumps.dylib +0 -0
- casadi/libcoinmumps.la +2 -2
- casadi/libcplex_adaptor.dylib +0 -0
- casadi/{libamd.3.0.3.dylib → libdaqp.dylib} +0 -0
- casadi/libdaqpstat.a +0 -0
- casadi/libfatrop.dylib +0 -0
- casadi/libgcc_s.1.1.dylib +0 -0
- casadi/libgfortran.5.dylib +0 -0
- casadi/libgurobi_adaptor.dylib +0 -0
- casadi/libhighs.1.7.dylib +0 -0
- casadi/libhighs.1.dylib +0 -0
- casadi/libhighs.dylib +0 -0
- casadi/libindirect.a +0 -0
- casadi/libipopt.3.dylib +0 -0
- casadi/libipopt.dylib +0 -0
- casadi/libipopt.la +2 -2
- casadi/liblinsys.a +0 -0
- casadi/{libsuitesparseconfig.7.0.1.dylib → libmatlab_ipc.dylib} +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.dylib +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libqdldl.dylib +0 -0
- casadi/libquadmath.0.dylib +0 -0
- casadi/libsipopt.3.dylib +0 -0
- casadi/libsipopt.dylib +0 -0
- casadi/libsipopt.la +2 -2
- casadi/libsleqp.1.0.1.dylib +0 -0
- casadi/libsleqp.dylib +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/libtrlib.0.4.dylib +0 -0
- casadi/libtrlib.dylib +0 -0
- casadi/libz.1.2.13.dylib +0 -0
- casadi/pkgconfig/bonmin.pc +1 -1
- casadi/pkgconfig/casadi.pc +5 -5
- casadi/pkgconfig/cbc.pc +1 -1
- casadi/pkgconfig/cgl.pc +1 -1
- casadi/pkgconfig/clp.pc +1 -1
- casadi/pkgconfig/coinmetis.pc +1 -1
- casadi/pkgconfig/coinmumps.pc +2 -2
- casadi/pkgconfig/coinutils.pc +2 -2
- casadi/pkgconfig/highs.pc +4 -4
- casadi/pkgconfig/ipopt.pc +2 -2
- casadi/pkgconfig/osi-cbc.pc +1 -1
- casadi/pkgconfig/osi-clp.pc +1 -1
- casadi/pkgconfig/osi-unittests.pc +1 -1
- casadi/pkgconfig/osi.pc +1 -1
- casadi/pkgconfig/sleqp.pc +1 -1
- casadi/tools/__init__.py +4 -0
- casadi/tools/bounds.py +3 -3
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/METADATA +2 -2
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/RECORD +532 -477
- casadi/cmake/alpaqa/alpaqaConfig.cmake +0 -24
- casadi/cmake/alpaqa/alpaqaConfigVersion.cmake +0 -70
- casadi/cmake/alpaqa/alpaqaTargets-release.cmake +0 -19
- casadi/cmake/alpaqa/alpaqaTargets.cmake +0 -116
- casadi/include/alpaqa/accelerators/anderson.hpp +0 -133
- casadi/include/alpaqa/accelerators/internal/anderson-helpers.hpp +0 -92
- casadi/include/alpaqa/accelerators/internal/limited-memory-qr.hpp +0 -295
- casadi/include/alpaqa/accelerators/lbfgs.hpp +0 -244
- casadi/include/alpaqa/accelerators/steihaugcg.hpp +0 -143
- casadi/include/alpaqa/alpaqa.hpp +0 -3
- casadi/include/alpaqa/casadi/CasADiControlProblem.hpp +0 -185
- casadi/include/alpaqa/casadi/CasADiFunctionWrapper.hpp +0 -104
- casadi/include/alpaqa/casadi/CasADiProblem.hpp +0 -102
- casadi/include/alpaqa/casadi-loader-export.hpp +0 -15
- casadi/include/alpaqa/casadi-ocp-loader-export.hpp +0 -15
- casadi/include/alpaqa/config/config.hpp +0 -165
- casadi/include/alpaqa/dl/dl-problem.h +0 -476
- casadi/include/alpaqa/dl/dl-problem.hpp +0 -301
- casadi/include/alpaqa/export.h +0 -42
- casadi/include/alpaqa/export.hpp +0 -30
- casadi/include/alpaqa/implementation/accelerators/lbfgs.tpp +0 -240
- casadi/include/alpaqa/implementation/casadi/CasADiControlProblem.tpp +0 -594
- casadi/include/alpaqa/implementation/casadi/CasADiLoader-util.hpp +0 -50
- casadi/include/alpaqa/implementation/casadi/CasADiProblem.tpp +0 -425
- casadi/include/alpaqa/implementation/inner/directions/panoc/structured-lbfgs.tpp +0 -164
- casadi/include/alpaqa/implementation/inner/panoc-helpers.tpp +0 -389
- casadi/include/alpaqa/implementation/inner/panoc-ocp.tpp +0 -798
- casadi/include/alpaqa/implementation/inner/panoc.tpp +0 -448
- casadi/include/alpaqa/implementation/inner/pantr.tpp +0 -474
- casadi/include/alpaqa/implementation/inner/zerofpr.tpp +0 -482
- casadi/include/alpaqa/implementation/outer/alm.tpp +0 -228
- casadi/include/alpaqa/implementation/outer/internal/alm-helpers.tpp +0 -80
- casadi/include/alpaqa/implementation/params/params.tpp +0 -158
- casadi/include/alpaqa/implementation/problem/ocproblem.tpp +0 -56
- casadi/include/alpaqa/implementation/problem/type-erased-problem.tpp +0 -211
- casadi/include/alpaqa/implementation/util/io/csv.tpp +0 -120
- casadi/include/alpaqa/implementation/util/print.tpp +0 -151
- casadi/include/alpaqa/inner/directions/panoc/anderson.hpp +0 -98
- casadi/include/alpaqa/inner/directions/panoc/lbfgs.hpp +0 -94
- casadi/include/alpaqa/inner/directions/panoc/structured-lbfgs.hpp +0 -146
- casadi/include/alpaqa/inner/directions/panoc/structured-newton.hpp +0 -264
- casadi/include/alpaqa/inner/directions/panoc-direction-update.hpp +0 -96
- casadi/include/alpaqa/inner/directions/panoc-ocp/lqr.hpp +0 -181
- casadi/include/alpaqa/inner/directions/panoc-ocp/ocp-vars.hpp +0 -492
- casadi/include/alpaqa/inner/directions/pantr/newton-tr.hpp +0 -192
- casadi/include/alpaqa/inner/directions/pantr/pantr-direction.hpp +0 -99
- casadi/include/alpaqa/inner/inner-solve-options.hpp +0 -30
- casadi/include/alpaqa/inner/internal/lipschitz.hpp +0 -27
- casadi/include/alpaqa/inner/internal/panoc-helpers.hpp +0 -10
- casadi/include/alpaqa/inner/internal/panoc-stop-crit.hpp +0 -124
- casadi/include/alpaqa/inner/internal/solverstatus.hpp +0 -42
- casadi/include/alpaqa/inner/panoc-ocp.hpp +0 -302
- casadi/include/alpaqa/inner/panoc.hpp +0 -274
- casadi/include/alpaqa/inner/pantr.hpp +0 -284
- casadi/include/alpaqa/inner/zerofpr.hpp +0 -274
- casadi/include/alpaqa/ipopt/ipopt-adapter.hpp +0 -81
- casadi/include/alpaqa/ipopt/ipopt-enums.hpp +0 -35
- casadi/include/alpaqa/lbfgsb/lbfgsb-adapter.hpp +0 -111
- casadi/include/alpaqa/newton-tr-pantr-alm.hpp +0 -27
- casadi/include/alpaqa/outer/alm.hpp +0 -190
- casadi/include/alpaqa/outer/internal/alm-helpers.hpp +0 -10
- casadi/include/alpaqa/panoc-alm.hpp +0 -27
- casadi/include/alpaqa/panoc-anderson-alm.hpp +0 -27
- casadi/include/alpaqa/params/params.hpp +0 -60
- casadi/include/alpaqa/problem/box-constr-problem.hpp +0 -220
- casadi/include/alpaqa/problem/box.hpp +0 -82
- casadi/include/alpaqa/problem/functional-problem.hpp +0 -73
- casadi/include/alpaqa/problem/kkt-error.hpp +0 -43
- casadi/include/alpaqa/problem/ocproblem-counters.hpp +0 -116
- casadi/include/alpaqa/problem/ocproblem.hpp +0 -662
- casadi/include/alpaqa/problem/problem-counters.hpp +0 -116
- casadi/include/alpaqa/problem/problem-with-counters.hpp +0 -141
- casadi/include/alpaqa/problem/type-erased-problem.hpp +0 -874
- casadi/include/alpaqa/problem/unconstr-problem.hpp +0 -37
- casadi/include/alpaqa/structured-panoc-alm.hpp +0 -27
- casadi/include/alpaqa/structured-zerofpr-alm.hpp +0 -27
- casadi/include/alpaqa/util/alloc-check.hpp +0 -23
- casadi/include/alpaqa/util/atomic-stop-signal.hpp +0 -24
- casadi/include/alpaqa/util/check-dim.hpp +0 -64
- casadi/include/alpaqa/util/copyable_unique_ptr.hpp +0 -32
- casadi/include/alpaqa/util/demangled-typename.hpp +0 -9
- casadi/include/alpaqa/util/enumerate.hpp +0 -70
- casadi/include/alpaqa/util/float.hpp +0 -25
- casadi/include/alpaqa/util/index-set.hpp +0 -97
- casadi/include/alpaqa/util/io/csv.hpp +0 -43
- casadi/include/alpaqa/util/iter-adapter.hpp +0 -68
- casadi/include/alpaqa/util/max-history.hpp +0 -47
- casadi/include/alpaqa/util/noop-delete.hpp +0 -15
- casadi/include/alpaqa/util/not-implemented.hpp +0 -12
- casadi/include/alpaqa/util/print.hpp +0 -78
- casadi/include/alpaqa/util/quadmath/quadmath-print.hpp +0 -20
- casadi/include/alpaqa/util/quadmath/quadmath.hpp +0 -137
- casadi/include/alpaqa/util/required-method.hpp +0 -29
- casadi/include/alpaqa/util/ringbuffer.hpp +0 -212
- casadi/include/alpaqa/util/set-intersection.hpp +0 -129
- casadi/include/alpaqa/util/sparse-ops.hpp +0 -164
- casadi/include/alpaqa/util/timed.hpp +0 -22
- casadi/include/alpaqa/util/type-erasure.hpp +0 -568
- casadi/include/alpaqa/util/type-traits.hpp +0 -58
- casadi/include/alpaqa/zerofpr-alm.hpp +0 -27
- casadi/include/alpaqa/zerofpr-anderson-alm.hpp +0 -27
- casadi/include/alpaqa-version.h +0 -8
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/include/licenses/alpaqa-external/src/thirdparty/lbfgsb/Lbfgsb.3.0/License.txt +0 -71
- casadi/libFortranHighs.dylib +0 -0
- casadi/libalpaqa.1.0.0.dylib +0 -0
- casadi/libalpaqa.dylib +0 -0
- casadi/libcamd.3.0.3.dylib +0 -0
- casadi/libcasadi_nlpsol_alpaqa.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_alpaqa.dylib +0 -0
- casadi/libccolamd.3.0.3.dylib +0 -0
- casadi/libcholmod.4.0.3.dylib +0 -0
- casadi/libcholmod_cuda.4.0.3.dylib +0 -0
- casadi/libcolamd.3.0.3.dylib +0 -0
- casadi/libhighs.1.6.0.dylib +0 -0
- casadi/libhighs.1.6.dylib +0 -0
- casadi/libumfpack.6.1.0.dylib +0 -0
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/WHEEL +0 -0
@@ -1,99 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/config/config.hpp>
|
4
|
-
#include <alpaqa/problem/type-erased-problem.hpp>
|
5
|
-
|
6
|
-
namespace alpaqa {
|
7
|
-
|
8
|
-
/// This class outlines the interface for direction providers used by PANTR-like
|
9
|
-
/// algorithms.
|
10
|
-
///
|
11
|
-
/// @ingroup grp_DirectionProviders
|
12
|
-
template <Config Conf>
|
13
|
-
struct PANTRDirection {
|
14
|
-
USING_ALPAQA_CONFIG(Conf);
|
15
|
-
using Problem = TypeErasedProblem<config_t>;
|
16
|
-
|
17
|
-
/// Initialize the direction provider.
|
18
|
-
///
|
19
|
-
/// @param[in] problem
|
20
|
-
/// Problem description.
|
21
|
-
/// @param[in] y
|
22
|
-
/// Lagrange multipliers.
|
23
|
-
/// @param[in] Σ
|
24
|
-
/// Penalty factors.
|
25
|
-
/// @param[in] γ_0
|
26
|
-
/// Initial step size.
|
27
|
-
/// @param[in] x_0
|
28
|
-
/// Initial iterate.
|
29
|
-
/// @param[in] x̂_0
|
30
|
-
/// Result of proximal gradient step in @p x_0.
|
31
|
-
/// @param[in] p_0
|
32
|
-
/// Proximal gradient step in @p x_0.
|
33
|
-
/// @param[in] grad_ψx_0
|
34
|
-
/// Gradient of the objective in @p x_0.
|
35
|
-
///
|
36
|
-
/// The references @p problem, @p y and @p Σ are guaranteed to remain valid
|
37
|
-
/// for subsequent calls to @ref update, @ref apply, @ref changed_γ and
|
38
|
-
/// @ref reset.
|
39
|
-
void initialize(const Problem &problem, crvec y, crvec Σ, real_t γ_0,
|
40
|
-
crvec x_0, crvec x̂_0, crvec p_0, crvec grad_ψx_0) = delete;
|
41
|
-
|
42
|
-
/// Return whether a direction is available on the very first iteration,
|
43
|
-
/// before the first call to @ref update.
|
44
|
-
bool has_initial_direction() const { return true; }
|
45
|
-
|
46
|
-
/// Update the direction provider when accepting the next iterate.
|
47
|
-
///
|
48
|
-
/// @param[in] γₖ
|
49
|
-
/// Current step size.
|
50
|
-
/// @param[in] γₙₑₓₜ
|
51
|
-
/// Step size for the next iterate.
|
52
|
-
/// @param[in] xₖ
|
53
|
-
/// Current iterate.
|
54
|
-
/// @param[in] xₙₑₓₜ
|
55
|
-
/// Next iterate.
|
56
|
-
/// @param[in] pₖ
|
57
|
-
/// Proximal gradient step in the current iterate.
|
58
|
-
/// @param[in] pₙₑₓₜ
|
59
|
-
/// Proximal gradient step in the next iterate.
|
60
|
-
/// @param[in] grad_ψxₖ
|
61
|
-
/// Gradient of the objective in the current iterate.
|
62
|
-
/// @param[in] grad_ψxₙₑₓₜ
|
63
|
-
/// Gradient of the objective in the next iterate.
|
64
|
-
bool update(real_t γₖ, real_t γₙₑₓₜ, crvec xₖ, crvec xₙₑₓₜ, crvec pₖ,
|
65
|
-
crvec pₙₑₓₜ, crvec grad_ψxₖ, crvec grad_ψxₙₑₓₜ) = delete;
|
66
|
-
|
67
|
-
/// Compute the direction in the given point.
|
68
|
-
///
|
69
|
-
/// @param[in] γₖ
|
70
|
-
/// Current step size.
|
71
|
-
/// @param[in] xₖ
|
72
|
-
/// Current iterate.
|
73
|
-
/// @param[in] x̂ₖ
|
74
|
-
/// Result of proximal gradient step in @p xₖ.
|
75
|
-
/// @param[in] pₖ
|
76
|
-
/// Proximal gradient step in @p xₖ.
|
77
|
-
/// @param[in] grad_ψxₖ
|
78
|
-
/// Gradient of the objective at @p xₖ.
|
79
|
-
/// @param[in] radius
|
80
|
-
/// Trust radius Δ.
|
81
|
-
/// @param[out] qₖ
|
82
|
-
/// Resulting step.
|
83
|
-
/// @return Model decrease.
|
84
|
-
real_t apply(real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ,
|
85
|
-
real_t radius, rvec qₖ) const = delete;
|
86
|
-
|
87
|
-
/// Called when the PANTR step size changes.
|
88
|
-
void changed_γ(real_t γₖ, real_t old_γₖ) = delete;
|
89
|
-
|
90
|
-
/// Called when using the direction failed. A possible behavior could be to
|
91
|
-
/// flush the buffers, hopefully yielding a better direction on the next
|
92
|
-
/// iteration.
|
93
|
-
void reset() = delete;
|
94
|
-
|
95
|
-
/// Get a human-readable name for this direction provider.
|
96
|
-
std::string get_name() const = delete;
|
97
|
-
};
|
98
|
-
|
99
|
-
} // namespace alpaqa
|
@@ -1,30 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/config/config.hpp>
|
4
|
-
|
5
|
-
#include <chrono>
|
6
|
-
#include <optional>
|
7
|
-
|
8
|
-
namespace alpaqa {
|
9
|
-
|
10
|
-
template <Config Conf>
|
11
|
-
struct InnerSolveOptions {
|
12
|
-
USING_ALPAQA_CONFIG(Conf);
|
13
|
-
/// Return the final iterate and multipliers, even if the solver did not
|
14
|
-
/// converge.
|
15
|
-
bool always_overwrite_results = true;
|
16
|
-
/// Maximum run time (in addition to the inner solver's own timeout).
|
17
|
-
/// Zero means no timeout.
|
18
|
-
std::optional<std::chrono::nanoseconds> max_time = std::nullopt;
|
19
|
-
/// Desired tolerance (overrides the solver's own tolerance).
|
20
|
-
/// Zero means no tolerance (use solver's own tolerance).
|
21
|
-
real_t tolerance = 0;
|
22
|
-
/// Output stream to print to.
|
23
|
-
std::ostream *os = nullptr;
|
24
|
-
/// The current iteration of the outer solver.
|
25
|
-
unsigned outer_iter = 0;
|
26
|
-
/// Call @ref TypeErasedProblem::check() before starting to solve.
|
27
|
-
bool check = true;
|
28
|
-
};
|
29
|
-
|
30
|
-
} // namespace alpaqa
|
@@ -1,27 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/config/config.hpp>
|
4
|
-
|
5
|
-
namespace alpaqa {
|
6
|
-
|
7
|
-
template <Config Conf = DefaultConfig>
|
8
|
-
struct LipschitzEstimateParams {
|
9
|
-
USING_ALPAQA_CONFIG(Conf);
|
10
|
-
|
11
|
-
/// Initial estimate of the Lipschitz constant of ∇ψ(x)
|
12
|
-
real_t L_0 = 0;
|
13
|
-
/// Relative step size for initial finite difference Lipschitz estimate.
|
14
|
-
real_t ε = real_t(1e-6);
|
15
|
-
/// Minimum step size for initial finite difference Lipschitz estimate.
|
16
|
-
real_t δ = real_t(1e-12);
|
17
|
-
/// Factor that relates step size γ and Lipschitz constant.
|
18
|
-
/// Parameter α in Algorithm 2 of @cite de_marchi_proximal_2022.
|
19
|
-
/// @f$ 0 < \alpha < 1 @f$
|
20
|
-
real_t Lγ_factor = real_t(0.95);
|
21
|
-
|
22
|
-
void verify() const {
|
23
|
-
// TODO
|
24
|
-
}
|
25
|
-
};
|
26
|
-
|
27
|
-
} // namespace alpaqa
|
@@ -1,124 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <iosfwd>
|
4
|
-
#include <stdexcept>
|
5
|
-
|
6
|
-
namespace alpaqa {
|
7
|
-
|
8
|
-
enum class PANOCStopCrit {
|
9
|
-
/// Find an ε-approximate KKT point in the ∞-norm:
|
10
|
-
/// @f[
|
11
|
-
/// \varepsilon = \left\| \gamma_k^{-1} (x^k - \hat x^k) +
|
12
|
-
/// \nabla \psi(\hat x^k) - \nabla \psi(x^k) \right\|_\infty
|
13
|
-
/// @f]
|
14
|
-
ApproxKKT = 0,
|
15
|
-
/// Find an ε-approximate KKT point in the 2-norm:
|
16
|
-
/// @f[
|
17
|
-
/// \varepsilon = \left\| \gamma_k^{-1} (x^k - \hat x^k) +
|
18
|
-
/// \nabla \psi(\hat x^k) - \nabla \psi(x^k) \right\|_2
|
19
|
-
/// @f]
|
20
|
-
ApproxKKT2,
|
21
|
-
/// ∞-norm of the projected gradient with step size γ:
|
22
|
-
/// @f[
|
23
|
-
/// \varepsilon = \left\| x^k -
|
24
|
-
/// \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_\infty
|
25
|
-
/// @f]
|
26
|
-
ProjGradNorm,
|
27
|
-
/// 2-norm of the projected gradient with step size γ:
|
28
|
-
/// @f[
|
29
|
-
/// \varepsilon = \left\| x^k -
|
30
|
-
/// \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_2
|
31
|
-
/// @f]
|
32
|
-
/// This is the same criterion as used by
|
33
|
-
/// [OpEn](https://alphaville.github.io/optimization-engine/).
|
34
|
-
ProjGradNorm2,
|
35
|
-
/// ∞-norm of the projected gradient with unit step size:
|
36
|
-
/// @f[
|
37
|
-
/// \varepsilon = \left\| x^k -
|
38
|
-
/// \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_\infty
|
39
|
-
/// @f]
|
40
|
-
ProjGradUnitNorm,
|
41
|
-
/// 2-norm of the projected gradient with unit step size:
|
42
|
-
/// @f[
|
43
|
-
/// \varepsilon = \left\| x^k -
|
44
|
-
/// \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_2
|
45
|
-
/// @f]
|
46
|
-
ProjGradUnitNorm2,
|
47
|
-
/// ∞-norm of fixed point residual:
|
48
|
-
/// @f[
|
49
|
-
/// \varepsilon = \gamma_k^{-1} \left\| x^k -
|
50
|
-
/// \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_\infty
|
51
|
-
/// @f]
|
52
|
-
FPRNorm,
|
53
|
-
/// 2-norm of fixed point residual:
|
54
|
-
/// @f[
|
55
|
-
/// \varepsilon = \gamma_k^{-1} \left\| x^k -
|
56
|
-
/// \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_2
|
57
|
-
/// @f]
|
58
|
-
FPRNorm2,
|
59
|
-
/// The stopping criterion used by Ipopt, see
|
60
|
-
/// https://link.springer.com/article/10.1007/s10107-004-0559-y equation (5).
|
61
|
-
///
|
62
|
-
/// Given a candidate iterate @f$ \hat x^k @f$ and the corresponding
|
63
|
-
/// candidate Lagrange multipliers @f$ \hat y^k @f$ for the general
|
64
|
-
/// constraints @f$ g(x)\in D @f$,
|
65
|
-
/// the multipliers @f$ w @f$ for the box constraints @f$ x\in C @f$
|
66
|
-
/// (that are otherwise not computed explicitly) are given by
|
67
|
-
/// @f[
|
68
|
-
/// w^k = v^k - \Pi_C(v^k),
|
69
|
-
/// @f]
|
70
|
-
/// where
|
71
|
-
/// @f[ \begin{aligned}
|
72
|
-
/// v^k &\triangleq
|
73
|
-
/// \hat x^k - \nabla f(\hat x^k) - \nabla g(\hat x^k)\, \hat y^k \\ &=
|
74
|
-
/// \hat x^k - \nabla \psi(\hat x^k)
|
75
|
-
/// \end{aligned} @f]
|
76
|
-
/// The quantity that is compared to the (scaled) tolerance is then given by
|
77
|
-
/// @f[ \begin{aligned}
|
78
|
-
/// \varepsilon' &=
|
79
|
-
/// \left\|
|
80
|
-
/// \nabla f(\hat x^k) + \nabla g(\hat x^k)\, \hat y^k + w^k
|
81
|
-
/// \right\|_\infty \\ &=
|
82
|
-
/// \left\|
|
83
|
-
/// \hat x^k - \Pi_C\left(v^k\right)
|
84
|
-
/// \right\|_\infty
|
85
|
-
/// \end{aligned} @f]
|
86
|
-
/// Finally, the quantity is scaled by the factor
|
87
|
-
/// @f[
|
88
|
-
/// s_d \triangleq \max\left\{
|
89
|
-
/// s_\text{max},\;\frac{\|\hat y^k\|_1 + \|w^k\|_1}{2m + 2n}
|
90
|
-
/// \right\} / s_\text{max},
|
91
|
-
/// @f]
|
92
|
-
/// i.e. @f$ \varepsilon = \varepsilon' / s_d @f$.
|
93
|
-
Ipopt,
|
94
|
-
/// The stopping criterion used by LBFGS++, see
|
95
|
-
/// https://lbfgspp.statr.me/doc/classLBFGSpp_1_1LBFGSBParam.html#afb20e8fd6c6808c1f736218841ba6947
|
96
|
-
///
|
97
|
-
/// @f[
|
98
|
-
/// \varepsilon = \frac{\left\| x^k -
|
99
|
-
/// \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_\infty}
|
100
|
-
/// {\max\left\{1, \|x\|_2 \right\}}
|
101
|
-
/// @f]
|
102
|
-
LBFGSBpp,
|
103
|
-
};
|
104
|
-
|
105
|
-
inline constexpr const char *enum_name(PANOCStopCrit s) {
|
106
|
-
switch (s) {
|
107
|
-
case PANOCStopCrit::ApproxKKT: return "ApproxKKT";
|
108
|
-
case PANOCStopCrit::ApproxKKT2: return "ApproxKKT2";
|
109
|
-
case PANOCStopCrit::ProjGradNorm: return "ProjGradNorm";
|
110
|
-
case PANOCStopCrit::ProjGradNorm2: return "ProjGradNorm2";
|
111
|
-
case PANOCStopCrit::ProjGradUnitNorm: return "ProjGradUnitNorm";
|
112
|
-
case PANOCStopCrit::ProjGradUnitNorm2: return "ProjGradUnitNorm2";
|
113
|
-
case PANOCStopCrit::FPRNorm: return "FPRNorm";
|
114
|
-
case PANOCStopCrit::FPRNorm2: return "FPRNorm2";
|
115
|
-
case PANOCStopCrit::Ipopt: return "Ipopt";
|
116
|
-
case PANOCStopCrit::LBFGSBpp: return "LBFGSBpp";
|
117
|
-
default:;
|
118
|
-
}
|
119
|
-
throw std::out_of_range("invalid value for alpaqa::PANOCStopCrit");
|
120
|
-
}
|
121
|
-
|
122
|
-
std::ostream &operator<<(std::ostream &os, PANOCStopCrit s);
|
123
|
-
|
124
|
-
} // namespace alpaqa
|
@@ -1,42 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/export.h>
|
4
|
-
|
5
|
-
#include <iosfwd>
|
6
|
-
#include <stdexcept>
|
7
|
-
|
8
|
-
namespace alpaqa {
|
9
|
-
|
10
|
-
/// Exit status of a numerical solver such as ALM or PANOC.
|
11
|
-
enum class SolverStatus {
|
12
|
-
Busy = 0, ///< In progress.
|
13
|
-
Converged, ///< Converged and reached given tolerance.
|
14
|
-
MaxTime, ///< Maximum allowed execution time exceeded.
|
15
|
-
MaxIter, ///< Maximum number of iterations exceeded.
|
16
|
-
NotFinite, ///< Intermediate results were infinite or not-a-number.
|
17
|
-
NoProgress, ///< No progress was made in the last iteration.
|
18
|
-
Interrupted, ///< Solver was interrupted by the user.
|
19
|
-
Exception, ///< An unexpected exception was thrown.
|
20
|
-
};
|
21
|
-
|
22
|
-
/// @related SolverStatus
|
23
|
-
inline constexpr const char *enum_name(SolverStatus s) {
|
24
|
-
using Status = SolverStatus;
|
25
|
-
switch (s) {
|
26
|
-
case Status::Busy: return "Busy";
|
27
|
-
case Status::Converged: return "Converged";
|
28
|
-
case Status::MaxTime: return "MaxTime";
|
29
|
-
case Status::MaxIter: return "MaxIter";
|
30
|
-
case Status::NotFinite: return "NotFinite";
|
31
|
-
case Status::NoProgress: return "NoProgress";
|
32
|
-
case Status::Interrupted: return "Interrupted";
|
33
|
-
case Status::Exception: return "Exception";
|
34
|
-
default:;
|
35
|
-
}
|
36
|
-
throw std::out_of_range("invalid value for alpaqa::SolverStatus");
|
37
|
-
}
|
38
|
-
|
39
|
-
/// @related SolverStatus
|
40
|
-
ALPAQA_EXPORT std::ostream &operator<<(std::ostream &, SolverStatus);
|
41
|
-
|
42
|
-
} // namespace alpaqa
|
@@ -1,302 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/accelerators/lbfgs.hpp>
|
4
|
-
#include <alpaqa/inner/panoc.hpp>
|
5
|
-
#include <alpaqa/problem/ocproblem.hpp>
|
6
|
-
|
7
|
-
#include <chrono>
|
8
|
-
#include <iostream>
|
9
|
-
#include <limits>
|
10
|
-
#include <string>
|
11
|
-
|
12
|
-
namespace alpaqa {
|
13
|
-
|
14
|
-
/// Tuning parameters for the PANOC algorithm.
|
15
|
-
template <Config Conf = DefaultConfig>
|
16
|
-
struct PANOCOCPParams {
|
17
|
-
USING_ALPAQA_CONFIG(Conf);
|
18
|
-
|
19
|
-
/// Parameters related to the Lipschitz constant estimate and step size.
|
20
|
-
LipschitzEstimateParams<config_t> Lipschitz;
|
21
|
-
/// Maximum number of inner PANOC iterations.
|
22
|
-
unsigned max_iter = 100;
|
23
|
-
/// Maximum duration.
|
24
|
-
std::chrono::nanoseconds max_time = std::chrono::minutes(5);
|
25
|
-
/// Minimum weight factor between Newton step and projected gradient step,
|
26
|
-
/// line search parameter.
|
27
|
-
real_t min_linesearch_coefficient = real_t(1. / 256);
|
28
|
-
/// Parameter β used in the line search (see Algorithm 2 in
|
29
|
-
/// @cite de_marchi_proximal_2022). @f$ 0 < \beta < 1 @f$
|
30
|
-
real_t linesearch_strictness_factor = real_t(0.95);
|
31
|
-
/// Minimum Lipschitz constant estimate.
|
32
|
-
real_t L_min = real_t(1e-5);
|
33
|
-
/// Maximum Lipschitz constant estimate.
|
34
|
-
real_t L_max = real_t(1e20);
|
35
|
-
/// Maximum number of times to double the Lipschitz constant estimate per
|
36
|
-
/// iteration.
|
37
|
-
unsigned L_max_inc = 16;
|
38
|
-
/// What stopping criterion to use.
|
39
|
-
PANOCStopCrit stop_crit = PANOCStopCrit::ApproxKKT;
|
40
|
-
/// Maximum number of iterations without any progress before giving up.
|
41
|
-
unsigned max_no_progress = 10;
|
42
|
-
/// How often to use a Gauss-Newton step. Zero to disable GN entirely.
|
43
|
-
unsigned gn_interval = 1;
|
44
|
-
bool gn_sticky = true;
|
45
|
-
bool reset_lbfgs_on_gn_step = false;
|
46
|
-
bool lqr_factor_cholesky = true;
|
47
|
-
|
48
|
-
/// L-BFGS parameters (e.g. memory).
|
49
|
-
LBFGSParams<config_t> lbfgs_params;
|
50
|
-
|
51
|
-
/// When to print progress. If set to zero, nothing will be printed.
|
52
|
-
/// If set to N != 0, progress is printed every N iterations.
|
53
|
-
unsigned print_interval = 0;
|
54
|
-
/// The precision of the floating point values printed by the solver.
|
55
|
-
int print_precision = std::numeric_limits<real_t>::max_digits10 / 2;
|
56
|
-
|
57
|
-
real_t quadratic_upperbound_tolerance_factor =
|
58
|
-
real_t(1e2) * std::numeric_limits<real_t>::epsilon();
|
59
|
-
real_t linesearch_tolerance_factor =
|
60
|
-
real_t(1e2) * std::numeric_limits<real_t>::epsilon();
|
61
|
-
|
62
|
-
bool disable_acceleration = false;
|
63
|
-
};
|
64
|
-
|
65
|
-
template <Config Conf = DefaultConfig>
|
66
|
-
struct PANOCOCPProgressInfo {
|
67
|
-
USING_ALPAQA_CONFIG(Conf);
|
68
|
-
|
69
|
-
unsigned k;
|
70
|
-
SolverStatus status;
|
71
|
-
crvec xu;
|
72
|
-
crvec p;
|
73
|
-
real_t norm_sq_p;
|
74
|
-
crvec x̂u;
|
75
|
-
real_t φγ;
|
76
|
-
real_t ψ;
|
77
|
-
crvec grad_ψ;
|
78
|
-
real_t ψ_hat;
|
79
|
-
crvec q;
|
80
|
-
bool gn;
|
81
|
-
length_t nJ;
|
82
|
-
real_t lqr_min_rcond;
|
83
|
-
real_t L;
|
84
|
-
real_t γ;
|
85
|
-
real_t τ;
|
86
|
-
real_t ε;
|
87
|
-
unsigned outer_iter;
|
88
|
-
const TypeErasedControlProblem<config_t> *problem;
|
89
|
-
const PANOCOCPParams<config_t> *params;
|
90
|
-
|
91
|
-
[[nodiscard]] vec u() const;
|
92
|
-
[[nodiscard]] vec û() const;
|
93
|
-
[[nodiscard]] vec x() const;
|
94
|
-
[[nodiscard]] vec x̂() const;
|
95
|
-
};
|
96
|
-
|
97
|
-
template <Config Conf = DefaultConfig>
|
98
|
-
struct PANOCOCPStats {
|
99
|
-
USING_ALPAQA_CONFIG(Conf);
|
100
|
-
|
101
|
-
SolverStatus status = SolverStatus::Busy;
|
102
|
-
real_t ε = inf<config_t>;
|
103
|
-
std::chrono::nanoseconds elapsed_time{};
|
104
|
-
std::chrono::nanoseconds time_prox{};
|
105
|
-
std::chrono::nanoseconds time_forward{};
|
106
|
-
std::chrono::nanoseconds time_backward{};
|
107
|
-
std::chrono::nanoseconds time_jacobians{};
|
108
|
-
std::chrono::nanoseconds time_hessians{};
|
109
|
-
std::chrono::nanoseconds time_indices{};
|
110
|
-
std::chrono::nanoseconds time_lqr_factor{};
|
111
|
-
std::chrono::nanoseconds time_lqr_solve{};
|
112
|
-
std::chrono::nanoseconds time_lbfgs_indices{};
|
113
|
-
std::chrono::nanoseconds time_lbfgs_apply{};
|
114
|
-
std::chrono::nanoseconds time_lbfgs_update{};
|
115
|
-
std::chrono::nanoseconds time_progress_callback{};
|
116
|
-
unsigned iterations = 0;
|
117
|
-
unsigned linesearch_failures = 0;
|
118
|
-
unsigned linesearch_backtracks = 0;
|
119
|
-
unsigned stepsize_backtracks = 0;
|
120
|
-
unsigned lbfgs_failures = 0;
|
121
|
-
unsigned lbfgs_rejected = 0;
|
122
|
-
unsigned τ_1_accepted = 0;
|
123
|
-
unsigned count_τ = 0;
|
124
|
-
real_t sum_τ = 0;
|
125
|
-
real_t final_γ = 0;
|
126
|
-
real_t final_ψ = 0;
|
127
|
-
real_t final_h = 0;
|
128
|
-
real_t final_φγ = 0;
|
129
|
-
};
|
130
|
-
|
131
|
-
template <Config Conf>
|
132
|
-
class PANOCOCPSolver {
|
133
|
-
public:
|
134
|
-
USING_ALPAQA_CONFIG(Conf);
|
135
|
-
|
136
|
-
using Problem = alpaqa::TypeErasedControlProblem<config_t>;
|
137
|
-
using Params = PANOCOCPParams<config_t>;
|
138
|
-
using Stats = PANOCOCPStats<config_t>;
|
139
|
-
using ProgressInfo = PANOCOCPProgressInfo<config_t>;
|
140
|
-
using SolveOptions = InnerSolveOptions<config_t>;
|
141
|
-
|
142
|
-
PANOCOCPSolver(const Params ¶ms) : params(params) {}
|
143
|
-
|
144
|
-
Stats operator()(const Problem &problem, // in
|
145
|
-
const SolveOptions &opts, // in
|
146
|
-
rvec u, // inout
|
147
|
-
rvec y, // in
|
148
|
-
crvec μ, // in
|
149
|
-
rvec err_z); // out
|
150
|
-
|
151
|
-
template <class P>
|
152
|
-
Stats operator()(const P &problem, const SolveOptions &opts, rvec u, rvec y,
|
153
|
-
crvec μ, rvec e) {
|
154
|
-
return operator()(Problem::template make<P>(problem), opts, u, y, μ, e);
|
155
|
-
}
|
156
|
-
|
157
|
-
template <class P>
|
158
|
-
Stats operator()(const P &problem, const SolveOptions &opts, rvec u) {
|
159
|
-
if (problem.get_m() != 0)
|
160
|
-
throw std::invalid_argument("Missing arguments y, Σ, e");
|
161
|
-
mvec y{nullptr, 0}, Σ{nullptr, 0}, e{nullptr, 0};
|
162
|
-
return operator()(problem, opts, u, y, Σ, e);
|
163
|
-
}
|
164
|
-
|
165
|
-
/// Specify a callable that is invoked with some intermediate results on
|
166
|
-
/// each iteration of the algorithm.
|
167
|
-
/// @see @ref ProgressInfo
|
168
|
-
PANOCOCPSolver &
|
169
|
-
set_progress_callback(std::function<void(const ProgressInfo &)> cb) {
|
170
|
-
this->progress_cb = cb;
|
171
|
-
return *this;
|
172
|
-
}
|
173
|
-
|
174
|
-
std::string get_name() const;
|
175
|
-
|
176
|
-
void stop() { stop_signal.stop(); }
|
177
|
-
|
178
|
-
const Params &get_params() const { return params; }
|
179
|
-
|
180
|
-
private:
|
181
|
-
Params params;
|
182
|
-
AtomicStopSignal stop_signal;
|
183
|
-
std::function<void(const ProgressInfo &)> progress_cb;
|
184
|
-
using Helpers = detail::PANOCHelpers<config_t>;
|
185
|
-
|
186
|
-
public:
|
187
|
-
std::ostream *os = &std::cout;
|
188
|
-
};
|
189
|
-
|
190
|
-
template <Config Conf>
|
191
|
-
struct InnerStatsAccumulator<PANOCOCPStats<Conf>> {
|
192
|
-
USING_ALPAQA_CONFIG(Conf);
|
193
|
-
|
194
|
-
/// Total elapsed time in the inner solver.
|
195
|
-
std::chrono::nanoseconds elapsed_time{};
|
196
|
-
/// Total time spent computing proximal mappings.
|
197
|
-
std::chrono::nanoseconds time_prox{};
|
198
|
-
/// Total time spent doing forward simulations.
|
199
|
-
std::chrono::nanoseconds time_forward{};
|
200
|
-
/// Total time spent doing backward gradient evaluations.
|
201
|
-
std::chrono::nanoseconds time_backward{};
|
202
|
-
/// Total time spent computing dynamics Jacobians.
|
203
|
-
std::chrono::nanoseconds time_jacobians{};
|
204
|
-
/// Total time spent computing cost Hessians and Hessian-vector products.
|
205
|
-
std::chrono::nanoseconds time_hessians{};
|
206
|
-
/// Total time spent determining active indices.
|
207
|
-
std::chrono::nanoseconds time_indices{};
|
208
|
-
/// Total time spent performing LQR factorizations.
|
209
|
-
std::chrono::nanoseconds time_lqr_factor{};
|
210
|
-
/// Total time spent solving the (factorized) LQR problem.
|
211
|
-
std::chrono::nanoseconds time_lqr_solve{};
|
212
|
-
/// Total time spent determining active indices for L-BFGS applications.
|
213
|
-
std::chrono::nanoseconds time_lbfgs_indices{};
|
214
|
-
/// Total time spent applying L-BFGS estimates.
|
215
|
-
std::chrono::nanoseconds time_lbfgs_apply{};
|
216
|
-
/// Total time spent updating the L-BFGS estimate.
|
217
|
-
std::chrono::nanoseconds time_lbfgs_update{};
|
218
|
-
/// Total time spent in the user-provided progress callback.
|
219
|
-
std::chrono::nanoseconds time_progress_callback{};
|
220
|
-
/// Total number of inner PANOC iterations.
|
221
|
-
unsigned iterations = 0;
|
222
|
-
/// Total number of PANOC line search failures.
|
223
|
-
unsigned linesearch_failures = 0;
|
224
|
-
/// Total number of PANOC line search backtracking steps.
|
225
|
-
unsigned linesearch_backtracks = 0;
|
226
|
-
/// Total number of PANOC step size reductions.
|
227
|
-
unsigned stepsize_backtracks = 0;
|
228
|
-
/// Total number of times that the L-BFGS direction was not finite.
|
229
|
-
unsigned lbfgs_failures = 0;
|
230
|
-
/// Total number of times that the L-BFGS update was rejected (i.e. it
|
231
|
-
/// could have resulted in a non-positive definite Hessian estimate).
|
232
|
-
unsigned lbfgs_rejected = 0;
|
233
|
-
/// Total number of times that a line search parameter of @f$ \tau = 1 @f$
|
234
|
-
/// was accepted (i.e. no backtracking necessary).
|
235
|
-
unsigned τ_1_accepted = 0;
|
236
|
-
/// The total number of line searches performed (used for computing the
|
237
|
-
/// average value of @f$ \tau @f$).
|
238
|
-
unsigned count_τ = 0;
|
239
|
-
/// The sum of the line search parameter @f$ \tau @f$ in all iterations
|
240
|
-
/// (used for computing the average value of @f$ \tau @f$).
|
241
|
-
real_t sum_τ = 0;
|
242
|
-
/// The final PANOC step size γ.
|
243
|
-
real_t final_γ = 0;
|
244
|
-
/// Final value of the smooth cost @f$ \psi(\hat x) @f$.
|
245
|
-
real_t final_ψ = 0;
|
246
|
-
/// Final value of the nonsmooth cost @f$ h(\hat x) @f$.
|
247
|
-
real_t final_h = 0;
|
248
|
-
/// Final value of the forward-backward envelope, @f$ \varphi_\gamma(x) @f$
|
249
|
-
/// (note that this is in the point @f$ x @f$, not @f$ \hat x @f$).
|
250
|
-
real_t final_φγ = 0;
|
251
|
-
};
|
252
|
-
|
253
|
-
template <Config Conf>
|
254
|
-
InnerStatsAccumulator<PANOCOCPStats<Conf>> &
|
255
|
-
operator+=(InnerStatsAccumulator<PANOCOCPStats<Conf>> &acc,
|
256
|
-
const PANOCOCPStats<Conf> &s) {
|
257
|
-
acc.iterations += s.iterations;
|
258
|
-
acc.elapsed_time += s.elapsed_time;
|
259
|
-
acc.time_prox += s.time_prox;
|
260
|
-
acc.time_forward += s.time_forward;
|
261
|
-
acc.time_backward += s.time_backward;
|
262
|
-
acc.time_jacobians += s.time_jacobians;
|
263
|
-
acc.time_hessians += s.time_hessians;
|
264
|
-
acc.time_indices += s.time_indices;
|
265
|
-
acc.time_lqr_factor += s.time_lqr_factor;
|
266
|
-
acc.time_lqr_solve += s.time_lqr_solve;
|
267
|
-
acc.time_lbfgs_indices += s.time_lbfgs_indices;
|
268
|
-
acc.time_lbfgs_apply += s.time_lbfgs_apply;
|
269
|
-
acc.time_lbfgs_update += s.time_lbfgs_update;
|
270
|
-
acc.time_progress_callback += s.time_progress_callback;
|
271
|
-
acc.linesearch_failures += s.linesearch_failures;
|
272
|
-
acc.linesearch_backtracks += s.linesearch_backtracks;
|
273
|
-
acc.stepsize_backtracks += s.stepsize_backtracks;
|
274
|
-
acc.lbfgs_failures += s.lbfgs_failures;
|
275
|
-
acc.lbfgs_rejected += s.lbfgs_rejected;
|
276
|
-
acc.τ_1_accepted += s.τ_1_accepted;
|
277
|
-
acc.count_τ += s.count_τ;
|
278
|
-
acc.sum_τ += s.sum_τ;
|
279
|
-
acc.final_γ = s.final_γ;
|
280
|
-
acc.final_ψ = s.final_ψ;
|
281
|
-
acc.final_h = s.final_h;
|
282
|
-
acc.final_φγ = s.final_φγ;
|
283
|
-
return acc;
|
284
|
-
}
|
285
|
-
|
286
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, PANOCOCPProgressInfo, DefaultConfig);
|
287
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, PANOCOCPProgressInfo, EigenConfigf);
|
288
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, PANOCOCPProgressInfo, EigenConfigd);
|
289
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, PANOCOCPProgressInfo, EigenConfigl);
|
290
|
-
#ifdef ALPAQA_WITH_QUAD_PRECISION
|
291
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, PANOCOCPProgressInfo, EigenConfigq);
|
292
|
-
#endif
|
293
|
-
|
294
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(class, PANOCOCPSolver, DefaultConfig);
|
295
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(class, PANOCOCPSolver, EigenConfigf);
|
296
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(class, PANOCOCPSolver, EigenConfigd);
|
297
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(class, PANOCOCPSolver, EigenConfigl);
|
298
|
-
#ifdef ALPAQA_WITH_QUAD_PRECISION
|
299
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(class, PANOCOCPSolver, EigenConfigq);
|
300
|
-
#endif
|
301
|
-
|
302
|
-
} // namespace alpaqa
|