casadi 3.6.5__cp311-none-macosx_11_0_arm64.whl → 3.6.7__cp311-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,874 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include <alpaqa/config/config.hpp>
|
4
|
-
#include <alpaqa/export.hpp>
|
5
|
-
#include <alpaqa/problem/box.hpp>
|
6
|
-
#include <alpaqa/util/alloc-check.hpp>
|
7
|
-
#include <alpaqa/util/check-dim.hpp>
|
8
|
-
#include <alpaqa/util/not-implemented.hpp>
|
9
|
-
#include <alpaqa/util/required-method.hpp>
|
10
|
-
#include <alpaqa/util/type-erasure.hpp>
|
11
|
-
#include <chrono>
|
12
|
-
#include <stdexcept>
|
13
|
-
#include <type_traits>
|
14
|
-
#include <utility>
|
15
|
-
|
16
|
-
namespace alpaqa {
|
17
|
-
|
18
|
-
/// Struct containing function pointers to all problem functions (like the
|
19
|
-
/// objective and constraint functions, with their derivatives, and more).
|
20
|
-
/// Some default implementations are available.
|
21
|
-
/// Internal struct, it is used by @ref TypeErasedProblem.
|
22
|
-
template <Config Conf>
|
23
|
-
struct ProblemVTable : util::BasicVTable {
|
24
|
-
USING_ALPAQA_CONFIG(Conf);
|
25
|
-
using Box = alpaqa::Box<config_t>;
|
26
|
-
|
27
|
-
template <class F>
|
28
|
-
using optional_function_t = util::BasicVTable::optional_function_t<F, ProblemVTable>;
|
29
|
-
template <class F>
|
30
|
-
using optional_const_function_t =
|
31
|
-
util::BasicVTable::optional_const_function_t<F, ProblemVTable>;
|
32
|
-
|
33
|
-
// clang-format off
|
34
|
-
|
35
|
-
// Required
|
36
|
-
required_const_function_t<void(crvec z, rvec e)>
|
37
|
-
eval_proj_diff_g;
|
38
|
-
required_const_function_t<void(rvec y, real_t M)>
|
39
|
-
eval_proj_multipliers;
|
40
|
-
required_const_function_t<real_t(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)>
|
41
|
-
eval_prox_grad_step;
|
42
|
-
required_const_function_t<real_t(crvec x)>
|
43
|
-
eval_f;
|
44
|
-
required_const_function_t<void(crvec x, rvec grad_fx)>
|
45
|
-
eval_grad_f;
|
46
|
-
required_const_function_t<void(crvec x, rvec gx)>
|
47
|
-
eval_g;
|
48
|
-
required_const_function_t<void(crvec x, crvec y, rvec grad_gxy)>
|
49
|
-
eval_grad_g_prod;
|
50
|
-
optional_const_function_t<index_t(real_t γ, crvec x, crvec grad_ψ, rindexvec J)>
|
51
|
-
eval_inactive_indices_res_lna = default_eval_inactive_indices_res_lna;
|
52
|
-
|
53
|
-
// Second order
|
54
|
-
optional_const_function_t<void(crvec x, rindexvec inner_idx, rindexvec outer_ptr, rvec J_values)>
|
55
|
-
eval_jac_g = default_eval_jac_g;
|
56
|
-
optional_const_function_t<length_t()>
|
57
|
-
get_jac_g_num_nonzeros = default_get_jac_g_num_nonzeros;
|
58
|
-
optional_const_function_t<void(crvec x, index_t i, rvec grad_gi)>
|
59
|
-
eval_grad_gi = default_eval_grad_gi;
|
60
|
-
optional_const_function_t<void(crvec x, crvec y, real_t scale, crvec v, rvec Hv)>
|
61
|
-
eval_hess_L_prod = default_eval_hess_L_prod;
|
62
|
-
optional_const_function_t<void(crvec x, crvec y, real_t scale, rindexvec inner_idx, rindexvec outer_ptr, rvec H_values)>
|
63
|
-
eval_hess_L = default_eval_hess_L;
|
64
|
-
optional_const_function_t<length_t()>
|
65
|
-
get_hess_L_num_nonzeros = default_get_hess_L_num_nonzeros;
|
66
|
-
optional_const_function_t<void(crvec x, crvec y, crvec Σ, real_t scale, crvec v, rvec Hv)>
|
67
|
-
eval_hess_ψ_prod = default_eval_hess_ψ_prod;
|
68
|
-
optional_const_function_t<void(crvec x, crvec y, crvec Σ, real_t scale, rindexvec inner_idx, rindexvec outer_ptr, rvec H_values)>
|
69
|
-
eval_hess_ψ = default_eval_hess_ψ;
|
70
|
-
optional_const_function_t<length_t()>
|
71
|
-
get_hess_ψ_num_nonzeros = default_get_hess_ψ_num_nonzeros;
|
72
|
-
|
73
|
-
// Combined evaluations
|
74
|
-
optional_const_function_t<real_t(crvec x, rvec grad_fx)>
|
75
|
-
eval_f_grad_f = default_eval_f_grad_f;
|
76
|
-
optional_const_function_t<real_t(crvec x, rvec g)>
|
77
|
-
eval_f_g = default_eval_f_g;
|
78
|
-
optional_const_function_t<void(crvec x, crvec y, rvec grad_f, rvec grad_gxy)>
|
79
|
-
eval_grad_f_grad_g_prod = default_eval_grad_f_grad_g_prod;
|
80
|
-
|
81
|
-
// Lagrangian and augmented lagrangian evaluations
|
82
|
-
optional_const_function_t<void(crvec x, crvec y, rvec grad_L, rvec work_n)>
|
83
|
-
eval_grad_L = default_eval_grad_L;
|
84
|
-
optional_const_function_t<real_t(crvec x, crvec y, crvec Σ, rvec ŷ)>
|
85
|
-
eval_ψ = default_eval_ψ;
|
86
|
-
optional_const_function_t<void(crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)>
|
87
|
-
eval_grad_ψ = default_eval_grad_ψ;
|
88
|
-
optional_const_function_t<real_t(crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)>
|
89
|
-
eval_ψ_grad_ψ = default_eval_ψ_grad_ψ;
|
90
|
-
|
91
|
-
// Constraint sets
|
92
|
-
optional_const_function_t<const Box &()>
|
93
|
-
get_box_C = default_get_box_C;
|
94
|
-
optional_const_function_t<const Box &()>
|
95
|
-
get_box_D = default_get_box_D;
|
96
|
-
|
97
|
-
// Check
|
98
|
-
optional_const_function_t<void()>
|
99
|
-
check = default_check;
|
100
|
-
|
101
|
-
// clang-format on
|
102
|
-
|
103
|
-
ALPAQA_EXPORT static real_t calc_ŷ_dᵀŷ(const void *self, rvec g_ŷ, crvec y, crvec Σ,
|
104
|
-
const ProblemVTable &vtable);
|
105
|
-
ALPAQA_EXPORT static index_t default_eval_inactive_indices_res_lna(const void *, real_t, crvec,
|
106
|
-
crvec, rindexvec,
|
107
|
-
const ProblemVTable &);
|
108
|
-
ALPAQA_EXPORT static void default_eval_jac_g(const void *, crvec, rindexvec, rindexvec, rvec,
|
109
|
-
const ProblemVTable &);
|
110
|
-
ALPAQA_EXPORT static length_t default_get_jac_g_num_nonzeros(const void *,
|
111
|
-
const ProblemVTable &);
|
112
|
-
ALPAQA_EXPORT static void default_eval_grad_gi(const void *, crvec, index_t, rvec,
|
113
|
-
const ProblemVTable &);
|
114
|
-
ALPAQA_EXPORT static void default_eval_hess_L_prod(const void *, crvec, crvec, real_t, crvec,
|
115
|
-
rvec, const ProblemVTable &);
|
116
|
-
ALPAQA_EXPORT static void default_eval_hess_L(const void *, crvec, crvec, real_t, rindexvec,
|
117
|
-
rindexvec, rvec, const ProblemVTable &);
|
118
|
-
ALPAQA_EXPORT static length_t default_get_hess_L_num_nonzeros(const void *,
|
119
|
-
const ProblemVTable &);
|
120
|
-
ALPAQA_EXPORT static void default_eval_hess_ψ_prod(const void *self, crvec x, crvec y, crvec,
|
121
|
-
real_t scale, crvec v, rvec Hv,
|
122
|
-
const ProblemVTable &vtable);
|
123
|
-
ALPAQA_EXPORT static void default_eval_hess_ψ(const void *self, crvec x, crvec y, crvec,
|
124
|
-
real_t scale, rindexvec inner_idx,
|
125
|
-
rindexvec outer_ptr, rvec H_values,
|
126
|
-
const ProblemVTable &vtable);
|
127
|
-
ALPAQA_EXPORT static length_t default_get_hess_ψ_num_nonzeros(const void *,
|
128
|
-
const ProblemVTable &);
|
129
|
-
ALPAQA_EXPORT static real_t default_eval_f_grad_f(const void *self, crvec x, rvec grad_fx,
|
130
|
-
const ProblemVTable &vtable);
|
131
|
-
ALPAQA_EXPORT static real_t default_eval_f_g(const void *self, crvec x, rvec g,
|
132
|
-
const ProblemVTable &vtable);
|
133
|
-
ALPAQA_EXPORT static void default_eval_grad_f_grad_g_prod(const void *self, crvec x, crvec y,
|
134
|
-
rvec grad_f, rvec grad_gxy,
|
135
|
-
const ProblemVTable &vtable);
|
136
|
-
ALPAQA_EXPORT static void default_eval_grad_L(const void *self, crvec x, crvec y, rvec grad_L,
|
137
|
-
rvec work_n, const ProblemVTable &vtable);
|
138
|
-
ALPAQA_EXPORT static real_t default_eval_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec ŷ,
|
139
|
-
const ProblemVTable &vtable);
|
140
|
-
ALPAQA_EXPORT static void default_eval_grad_ψ(const void *self, crvec x, crvec y, crvec Σ,
|
141
|
-
rvec grad_ψ, rvec work_n, rvec work_m,
|
142
|
-
const ProblemVTable &vtable);
|
143
|
-
ALPAQA_EXPORT static real_t default_eval_ψ_grad_ψ(const void *self, crvec x, crvec y, crvec Σ,
|
144
|
-
rvec grad_ψ, rvec work_n, rvec work_m,
|
145
|
-
const ProblemVTable &vtable);
|
146
|
-
ALPAQA_EXPORT static const Box &default_get_box_C(const void *, const ProblemVTable &);
|
147
|
-
ALPAQA_EXPORT static const Box &default_get_box_D(const void *, const ProblemVTable &);
|
148
|
-
ALPAQA_EXPORT static void default_check(const void *, const ProblemVTable &);
|
149
|
-
|
150
|
-
length_t n, m;
|
151
|
-
|
152
|
-
template <class P>
|
153
|
-
ProblemVTable(std::in_place_t, P &p) : util::BasicVTable{std::in_place, p} {
|
154
|
-
auto &vtable = *this;
|
155
|
-
|
156
|
-
// Initialize all methods
|
157
|
-
|
158
|
-
// Required
|
159
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_proj_diff_g);
|
160
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_proj_multipliers);
|
161
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_prox_grad_step);
|
162
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_f);
|
163
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_grad_f);
|
164
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_g);
|
165
|
-
ALPAQA_TE_REQUIRED_METHOD(vtable, P, eval_grad_g_prod);
|
166
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_inactive_indices_res_lna, p);
|
167
|
-
// Second order
|
168
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_jac_g, p);
|
169
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, get_jac_g_num_nonzeros, p);
|
170
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_grad_gi, p);
|
171
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_hess_L_prod, p);
|
172
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_hess_L, p);
|
173
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, get_hess_L_num_nonzeros, p);
|
174
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_hess_ψ_prod, p);
|
175
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_hess_ψ, p);
|
176
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, get_hess_ψ_num_nonzeros, p);
|
177
|
-
// Combined evaluations
|
178
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_f_grad_f, p);
|
179
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_f_g, p);
|
180
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_grad_f_grad_g_prod, p);
|
181
|
-
// Lagrangian and augmented lagrangian evaluations
|
182
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_grad_L, p);
|
183
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_ψ, p);
|
184
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_grad_ψ, p);
|
185
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, eval_ψ_grad_ψ, p);
|
186
|
-
// Constraint set
|
187
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, get_box_C, p);
|
188
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, get_box_D, p);
|
189
|
-
// Check
|
190
|
-
ALPAQA_TE_OPTIONAL_METHOD(vtable, P, check, p);
|
191
|
-
|
192
|
-
// Dimensions
|
193
|
-
vtable.n = p.get_n();
|
194
|
-
vtable.m = p.get_m();
|
195
|
-
}
|
196
|
-
ProblemVTable() = default;
|
197
|
-
};
|
198
|
-
|
199
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, ProblemVTable, DefaultConfig);
|
200
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, ProblemVTable, EigenConfigf);
|
201
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, ProblemVTable, EigenConfigd);
|
202
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, ProblemVTable, EigenConfigl);
|
203
|
-
#ifdef ALPAQA_WITH_QUAD_PRECISION
|
204
|
-
ALPAQA_EXPORT_EXTERN_TEMPLATE(struct, ProblemVTable, EigenConfigq);
|
205
|
-
#endif
|
206
|
-
|
207
|
-
/// @addtogroup grp_Problems
|
208
|
-
/// @{
|
209
|
-
|
210
|
-
/// The main polymorphic minimization problem interface.
|
211
|
-
///
|
212
|
-
/// This class wraps the actual problem implementation class, filling in the
|
213
|
-
/// missing member functions with sensible defaults, and providing a uniform
|
214
|
-
/// interface that is used by the solvers.
|
215
|
-
///
|
216
|
-
/// The problem implementations do not inherit from an abstract base class.
|
217
|
-
/// Instead, [structural typing](https://en.wikipedia.org/wiki/Structural_type_system)
|
218
|
-
/// is used. The @ref ProblemVTable constructor uses reflection to discover
|
219
|
-
/// which member functions are provided by the problem implementation. See
|
220
|
-
/// @ref page_problem_formulations for more information, and
|
221
|
-
/// @ref C++/CustomCppProblem/main.cpp for an example.
|
222
|
-
template <Config Conf = DefaultConfig, class Allocator = std::allocator<std::byte>>
|
223
|
-
class TypeErasedProblem : public util::TypeErased<ProblemVTable<Conf>, Allocator> {
|
224
|
-
public:
|
225
|
-
USING_ALPAQA_CONFIG(Conf);
|
226
|
-
using Box = alpaqa::Box<config_t>;
|
227
|
-
using VTable = ProblemVTable<config_t>;
|
228
|
-
using allocator_type = Allocator;
|
229
|
-
using TypeErased = util::TypeErased<VTable, allocator_type>;
|
230
|
-
using TypeErased::TypeErased;
|
231
|
-
|
232
|
-
protected:
|
233
|
-
using TypeErased::call;
|
234
|
-
using TypeErased::self;
|
235
|
-
using TypeErased::vtable;
|
236
|
-
|
237
|
-
public:
|
238
|
-
template <class T, class... Args>
|
239
|
-
static TypeErasedProblem make(Args &&...args) {
|
240
|
-
return TypeErased::template make<TypeErasedProblem, T>(std::forward<Args>(args)...);
|
241
|
-
}
|
242
|
-
|
243
|
-
/// @name Problem dimensions
|
244
|
-
/// @{
|
245
|
-
|
246
|
-
/// **[Required]**
|
247
|
-
/// Number of decision variables.
|
248
|
-
length_t get_n() const;
|
249
|
-
/// **[Required]**
|
250
|
-
/// Number of constraints.
|
251
|
-
length_t get_m() const;
|
252
|
-
|
253
|
-
/// @}
|
254
|
-
|
255
|
-
/// @name Required cost and constraint functions
|
256
|
-
/// @{
|
257
|
-
|
258
|
-
/// **[Required]**
|
259
|
-
/// Function that evaluates the cost, @f$ f(x) @f$
|
260
|
-
/// @param [in] x
|
261
|
-
/// Decision variable @f$ x \in \R^n @f$
|
262
|
-
real_t eval_f(crvec x) const;
|
263
|
-
/// **[Required]**
|
264
|
-
/// Function that evaluates the gradient of the cost, @f$ \nabla f(x) @f$
|
265
|
-
/// @param [in] x
|
266
|
-
/// Decision variable @f$ x \in \R^n @f$
|
267
|
-
/// @param [out] grad_fx
|
268
|
-
/// Gradient of cost function @f$ \nabla f(x) \in \R^n @f$
|
269
|
-
void eval_grad_f(crvec x, rvec grad_fx) const;
|
270
|
-
/// **[Required]**
|
271
|
-
/// Function that evaluates the constraints, @f$ g(x) @f$
|
272
|
-
/// @param [in] x
|
273
|
-
/// Decision variable @f$ x \in \R^n @f$
|
274
|
-
/// @param [out] gx
|
275
|
-
/// Value of the constraints @f$ g(x) \in \R^m @f$
|
276
|
-
void eval_g(crvec x, rvec gx) const;
|
277
|
-
/// **[Required]**
|
278
|
-
/// Function that evaluates the gradient of the constraints times a vector,
|
279
|
-
/// @f$ \nabla g(x)\,y = \tp{\jac_g(x)}y @f$
|
280
|
-
/// @param [in] x
|
281
|
-
/// Decision variable @f$ x \in \R^n @f$
|
282
|
-
/// @param [in] y
|
283
|
-
/// Vector @f$ y \in \R^m @f$ to multiply the gradient by
|
284
|
-
/// @param [out] grad_gxy
|
285
|
-
/// Gradient of the constraints
|
286
|
-
/// @f$ \nabla g(x)\,y \in \R^n @f$
|
287
|
-
void eval_grad_g_prod(crvec x, crvec y, rvec grad_gxy) const;
|
288
|
-
|
289
|
-
/// @}
|
290
|
-
|
291
|
-
/// @name Projections onto constraint sets and proximal mappings
|
292
|
-
/// @{
|
293
|
-
|
294
|
-
/// **[Required]**
|
295
|
-
/// Function that evaluates the difference between the given point @f$ z @f$
|
296
|
-
/// and its projection onto the constraint set @f$ D @f$.
|
297
|
-
/// @param [in] z
|
298
|
-
/// Slack variable, @f$ z \in \R^m @f$
|
299
|
-
/// @param [out] e
|
300
|
-
/// The difference relative to its projection,
|
301
|
-
/// @f$ e = z - \Pi_D(z) \in \R^m @f$
|
302
|
-
/// @note @p z and @p e can refer to the same vector.
|
303
|
-
void eval_proj_diff_g(crvec z, rvec e) const;
|
304
|
-
/// **[Required]**
|
305
|
-
/// Function that projects the Lagrange multipliers for ALM.
|
306
|
-
/// @param [inout] y
|
307
|
-
/// Multipliers, @f$ y \leftarrow \Pi_Y(y) \in \R^m @f$
|
308
|
-
/// @param [in] M
|
309
|
-
/// The radius/size of the set @f$ Y @f$.
|
310
|
-
/// See @ref ALMParams::max_multiplier.
|
311
|
-
void eval_proj_multipliers(rvec y, real_t M) const;
|
312
|
-
/// **[Required]**
|
313
|
-
/// Function that computes a proximal gradient step.
|
314
|
-
/// @param [in] γ
|
315
|
-
/// Step size, @f$ \gamma \in \R_{>0} @f$
|
316
|
-
/// @param [in] x
|
317
|
-
/// Decision variable @f$ x \in \R^n @f$
|
318
|
-
/// @param [in] grad_ψ
|
319
|
-
/// Gradient of the subproblem cost, @f$ \nabla\psi(x) \in \R^n @f$
|
320
|
-
/// @param [out] x̂
|
321
|
-
/// Next proximal gradient iterate, @f$ \hat x = T_\gamma(x) =
|
322
|
-
/// \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \in \R^n @f$
|
323
|
-
/// @param [out] p
|
324
|
-
/// The proximal gradient step,
|
325
|
-
/// @f$ p = \hat x - x \in \R^n @f$
|
326
|
-
/// @return The nonsmooth function evaluated at x̂,
|
327
|
-
/// @f$ h(\hat x) @f$.
|
328
|
-
/// @note The vector @f$ p @f$ is often used in stopping criteria, so its
|
329
|
-
/// numerical accuracy is more important than that of @f$ \hat x @f$.
|
330
|
-
real_t eval_prox_grad_step(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) const;
|
331
|
-
/// **[Optional]**
|
332
|
-
/// Function that computes the inactive indices @f$ \mathcal J(x) @f$ for
|
333
|
-
/// the evaluation of the linear Newton approximation of the residual, as in
|
334
|
-
/// @cite pas2022alpaqa.
|
335
|
-
/// @param [in] γ
|
336
|
-
/// Step size, @f$ \gamma \in \R_{>0} @f$
|
337
|
-
/// @param [in] x
|
338
|
-
/// Decision variable @f$ x \in \R^n @f$
|
339
|
-
/// @param [in] grad_ψ
|
340
|
-
/// Gradient of the subproblem cost, @f$ \nabla\psi(x) \in \R^n @f$
|
341
|
-
/// @param [out] J
|
342
|
-
/// The indices of the components of @f$ x @f$ that are in the
|
343
|
-
/// index set @f$ \mathcal J(x) @f$. In ascending order, at most n.
|
344
|
-
/// @return The number of inactive constraints, @f$ \# \mathcal J(x) @f$.
|
345
|
-
///
|
346
|
-
/// For example, in the case of box constraints, we have
|
347
|
-
/// @f[ \mathcal J(x) \defeq \defset{i \in \N_{[0, n-1]}}{\underline x_i
|
348
|
-
/// \lt x_i - \gamma\nabla_{\!x_i}\psi(x) \lt \overline x_i}. @f]
|
349
|
-
index_t eval_inactive_indices_res_lna(real_t γ, crvec x, crvec grad_ψ, rindexvec J) const;
|
350
|
-
|
351
|
-
/// @}
|
352
|
-
|
353
|
-
/// @name Constraint sets
|
354
|
-
/// @{
|
355
|
-
|
356
|
-
/// **[Optional]**
|
357
|
-
/// Get the rectangular constraint set of the decision variables,
|
358
|
-
/// @f$ x \in C @f$.
|
359
|
-
const Box &get_box_C() const;
|
360
|
-
/// **[Optional]**
|
361
|
-
/// Get the rectangular constraint set of the general constraint function,
|
362
|
-
/// @f$ g(x) \in D @f$.
|
363
|
-
const Box &get_box_D() const;
|
364
|
-
|
365
|
-
/// @}
|
366
|
-
|
367
|
-
/// @name Functions for second-order solvers
|
368
|
-
/// @{
|
369
|
-
|
370
|
-
/// **[Optional]**
|
371
|
-
/// Function that evaluates the Jacobian of the constraints as a sparse
|
372
|
-
/// matrix, @f$ \jac_g(x) @f$
|
373
|
-
/// @param [in] x
|
374
|
-
/// Decision variable @f$ x \in \R^n @f$
|
375
|
-
/// @param [inout] inner_idx
|
376
|
-
/// Inner indices (row indices of nonzeros).
|
377
|
-
/// @param [inout] outer_ptr
|
378
|
-
/// Outer pointers (points to the first nonzero in each column).
|
379
|
-
/// @param [out] J_values
|
380
|
-
/// Nonzero values of the Jacobian
|
381
|
-
/// @f$ \jac_g(x) \in \R^{m\times n} @f$
|
382
|
-
/// If @p J_values has size zero, this function should initialize
|
383
|
-
/// @p inner_idx and @p outer_ptr. If @p J_values is nonempty, @p inner_idx
|
384
|
-
/// and @p outer_ptr can be assumed to be initialized, and this function
|
385
|
-
/// should evaluate @p J_values.
|
386
|
-
///
|
387
|
-
/// Required for second-order solvers only.
|
388
|
-
void eval_jac_g(crvec x, rindexvec inner_idx, rindexvec outer_ptr, rvec J_values) const;
|
389
|
-
/// **[Optional]**
|
390
|
-
/// Function that gets the number of nonzeros of the sparse Jacobian of the
|
391
|
-
/// constraints. Should return -1 for a dense Jacobian.
|
392
|
-
///
|
393
|
-
/// Required for second-order solvers only.
|
394
|
-
length_t get_jac_g_num_nonzeros() const;
|
395
|
-
/// **[Optional]**
|
396
|
-
/// Function that evaluates the gradient of one specific constraint,
|
397
|
-
/// @f$ \nabla g_i(x) @f$
|
398
|
-
/// @param [in] x
|
399
|
-
/// Decision variable @f$ x \in \R^n @f$
|
400
|
-
/// @param [in] i
|
401
|
-
/// Which constraint @f$ 0 \le i \lt m @f$
|
402
|
-
/// @param [out] grad_gi
|
403
|
-
/// Gradient of the constraint
|
404
|
-
/// @f$ \nabla g_i(x) \in \R^n @f$
|
405
|
-
///
|
406
|
-
/// Required for second-order solvers only.
|
407
|
-
void eval_grad_gi(crvec x, index_t i, rvec grad_gi) const;
|
408
|
-
/// **[Optional]**
|
409
|
-
/// Function that evaluates the Hessian of the Lagrangian multiplied by a
|
410
|
-
/// vector,
|
411
|
-
/// @f$ \nabla_{xx}^2L(x, y)\,v @f$
|
412
|
-
/// @param [in] x
|
413
|
-
/// Decision variable @f$ x \in \R^n @f$
|
414
|
-
/// @param [in] y
|
415
|
-
/// Lagrange multipliers @f$ y \in \R^m @f$
|
416
|
-
/// @param [in] scale
|
417
|
-
/// Scale factor for the cost function.
|
418
|
-
/// @param [in] v
|
419
|
-
/// Vector to multiply by @f$ v \in \R^n @f$
|
420
|
-
/// @param [out] Hv
|
421
|
-
/// Hessian-vector product
|
422
|
-
/// @f$ \nabla_{xx}^2 L(x, y)\,v \in \R^{n} @f$
|
423
|
-
///
|
424
|
-
/// Required for second-order solvers only.
|
425
|
-
void eval_hess_L_prod(crvec x, crvec y, real_t scale, crvec v, rvec Hv) const;
|
426
|
-
/// **[Optional]**
|
427
|
-
/// Function that evaluates the Hessian of the Lagrangian as a sparse matrix,
|
428
|
-
/// @f$ \nabla_{xx}^2L(x, y) @f$
|
429
|
-
/// @param [in] x
|
430
|
-
/// Decision variable @f$ x \in \R^n @f$
|
431
|
-
/// @param [in] y
|
432
|
-
/// Lagrange multipliers @f$ y \in \R^m @f$
|
433
|
-
/// @param [in] scale
|
434
|
-
/// Scale factor for the cost function.
|
435
|
-
/// @param [inout] inner_idx
|
436
|
-
/// Inner indices (row indices of nonzeros).
|
437
|
-
/// @param [inout] outer_ptr
|
438
|
-
/// Outer pointers (points to the first nonzero in each column).
|
439
|
-
/// @param [out] H_values
|
440
|
-
/// Nonzero values of the Hessian
|
441
|
-
/// @f$ \nabla_{xx}^2 L(x, y) \in \R^{n\times n} @f$.
|
442
|
-
/// If @p H_values has size zero, this function should initialize
|
443
|
-
/// @p inner_idx and @p outer_ptr. If @p H_values is nonempty, @p inner_idx
|
444
|
-
/// and @p outer_ptr can be assumed to be initialized, and this function
|
445
|
-
/// should evaluate @p H_values.
|
446
|
-
///
|
447
|
-
/// Required for second-order solvers only.
|
448
|
-
void eval_hess_L(crvec x, crvec y, real_t scale, rindexvec inner_idx, rindexvec outer_ptr,
|
449
|
-
rvec H_values) const;
|
450
|
-
/// **[Optional]**
|
451
|
-
/// Function that gets the number of nonzeros of the sparse Hessian of the
|
452
|
-
/// Lagrangian. Should return -1 for a dense Hessian.
|
453
|
-
///
|
454
|
-
/// Required for second-order solvers only.
|
455
|
-
length_t get_hess_L_num_nonzeros() const;
|
456
|
-
/// **[Optional]**
|
457
|
-
/// Function that evaluates the Hessian of the augmented Lagrangian
|
458
|
-
/// multiplied by a vector,
|
459
|
-
/// @f$ \nabla_{xx}^2L_\Sigma(x, y)\,v @f$
|
460
|
-
/// @param [in] x
|
461
|
-
/// Decision variable @f$ x \in \R^n @f$
|
462
|
-
/// @param [in] y
|
463
|
-
/// Lagrange multipliers @f$ y \in \R^m @f$
|
464
|
-
/// @param [in] Σ
|
465
|
-
/// Penalty weights @f$ \Sigma @f$
|
466
|
-
/// @param [in] scale
|
467
|
-
/// Scale factor for the cost function.
|
468
|
-
/// @param [in] v
|
469
|
-
/// Vector to multiply by @f$ v \in \R^n @f$
|
470
|
-
/// @param [out] Hv
|
471
|
-
/// Hessian-vector product
|
472
|
-
/// @f$ \nabla_{xx}^2 L_\Sigma(x, y)\,v \in \R^{n} @f$
|
473
|
-
///
|
474
|
-
/// Required for second-order solvers only.
|
475
|
-
void eval_hess_ψ_prod(crvec x, crvec y, crvec Σ, real_t scale, crvec v, rvec Hv) const;
|
476
|
-
/// **[Optional]**
|
477
|
-
/// Function that evaluates the Hessian of the augmented Lagrangian,
|
478
|
-
/// @f$ \nabla_{xx}^2L_\Sigma(x, y) @f$
|
479
|
-
/// @param [in] x
|
480
|
-
/// Decision variable @f$ x \in \R^n @f$
|
481
|
-
/// @param [in] y
|
482
|
-
/// Lagrange multipliers @f$ y \in \R^m @f$
|
483
|
-
/// @param [in] Σ
|
484
|
-
/// Penalty weights @f$ \Sigma @f$
|
485
|
-
/// @param [in] scale
|
486
|
-
/// Scale factor for the cost function.
|
487
|
-
/// @param [inout] inner_idx
|
488
|
-
/// Inner indices (row indices of nonzeros).
|
489
|
-
/// @param [inout] outer_ptr
|
490
|
-
/// Outer pointers (points to the first nonzero in each column).
|
491
|
-
/// @param [out] H_values
|
492
|
-
/// Nonzero values of the Hessian
|
493
|
-
/// @f$ \nabla_{xx}^2 L_\Sigma(x, y) \in \R^{n\times n} @f$
|
494
|
-
/// If @p H_values has size zero, this function should initialize
|
495
|
-
/// @p inner_idx and @p outer_ptr. If @p H_values is nonempty, @p inner_idx
|
496
|
-
/// and @p outer_ptr can be assumed to be initialized, and this function
|
497
|
-
/// should evaluate @p H_values.
|
498
|
-
///
|
499
|
-
/// Required for second-order solvers only.
|
500
|
-
void eval_hess_ψ(crvec x, crvec y, crvec Σ, real_t scale, rindexvec inner_idx,
|
501
|
-
rindexvec outer_ptr, rvec H_values) const;
|
502
|
-
/// **[Optional]**
|
503
|
-
/// Function that gets the number of nonzeros of the Hessian of the
|
504
|
-
/// augmented Lagrangian.
|
505
|
-
///
|
506
|
-
/// Required for second-order solvers only.
|
507
|
-
length_t get_hess_ψ_num_nonzeros() const;
|
508
|
-
|
509
|
-
/// @}
|
510
|
-
|
511
|
-
/// @name Combined evaluations
|
512
|
-
/// @{
|
513
|
-
|
514
|
-
/// **[Optional]**
|
515
|
-
/// Evaluate both @f$ f(x) @f$ and its gradient, @f$ \nabla f(x) @f$.
|
516
|
-
/// @default_impl ProblemVTable::default_eval_f_grad_f
|
517
|
-
real_t eval_f_grad_f(crvec x, rvec grad_fx) const;
|
518
|
-
/// **[Optional]**
|
519
|
-
/// Evaluate both @f$ f(x) @f$ and @f$ g(x) @f$.
|
520
|
-
/// @default_impl ProblemVTable::default_eval_f_g
|
521
|
-
real_t eval_f_g(crvec x, rvec g) const;
|
522
|
-
/// **[Optional]**
|
523
|
-
/// Evaluate both @f$ \nabla f(x) @f$ and @f$ \nabla g(x)\,y @f$.
|
524
|
-
/// @default_impl ProblemVTable::default_eval_grad_f_grad_g_prod
|
525
|
-
void eval_grad_f_grad_g_prod(crvec x, crvec y, rvec grad_f, rvec grad_gxy) const;
|
526
|
-
/// **[Optional]**
|
527
|
-
/// Evaluate the gradient of the Lagrangian
|
528
|
-
/// @f$ \nabla_x L(x, y) = \nabla f(x) + \nabla g(x)\,y @f$
|
529
|
-
/// @default_impl ProblemVTable::default_eval_grad_L
|
530
|
-
void eval_grad_L(crvec x, crvec y, rvec grad_L, rvec work_n) const;
|
531
|
-
|
532
|
-
/// @}
|
533
|
-
|
534
|
-
/// @name Augmented Lagrangian
|
535
|
-
/// @{
|
536
|
-
|
537
|
-
/// **[Optional]**
|
538
|
-
/// Calculate both ψ(x) and the vector ŷ that can later be used to compute
|
539
|
-
/// ∇ψ.
|
540
|
-
/// @f[ \psi(x) = f(x) + \tfrac{1}{2}
|
541
|
-
/// \text{dist}_\Sigma^2\left(g(x) + \Sigma^{-1}y,\;D\right) @f]
|
542
|
-
/// @f[ \hat y = \Sigma\, \left(g(x) + \Sigma^{-1}y - \Pi_D\left(g(x)
|
543
|
-
/// + \Sigma^{-1}y\right)\right) @f]
|
544
|
-
/// @default_impl ProblemVTable::default_eval_ψ
|
545
|
-
real_t eval_ψ(crvec x, ///< [in] Decision variable @f$ x @f$
|
546
|
-
crvec y, ///< [in] Lagrange multipliers @f$ y @f$
|
547
|
-
crvec Σ, ///< [in] Penalty weights @f$ \Sigma @f$
|
548
|
-
rvec ŷ ///< [out] @f$ \hat y @f$
|
549
|
-
) const;
|
550
|
-
/// **[Optional]**
|
551
|
-
/// Calculate the gradient ∇ψ(x).
|
552
|
-
/// @f[ \nabla \psi(x) = \nabla f(x) + \nabla g(x)\,\hat y(x) @f]
|
553
|
-
/// @default_impl ProblemVTable::default_eval_grad_ψ
|
554
|
-
void eval_grad_ψ(crvec x, ///< [in] Decision variable @f$ x @f$
|
555
|
-
crvec y, ///< [in] Lagrange multipliers @f$ y @f$
|
556
|
-
crvec Σ, ///< [in] Penalty weights @f$ \Sigma @f$
|
557
|
-
rvec grad_ψ, ///< [out] @f$ \nabla \psi(x) @f$
|
558
|
-
rvec work_n, ///< Dimension @f$ n @f$
|
559
|
-
rvec work_m ///< Dimension @f$ m @f$
|
560
|
-
) const;
|
561
|
-
/// **[Optional]**
|
562
|
-
/// Calculate both ψ(x) and its gradient ∇ψ(x).
|
563
|
-
/// @f[ \psi(x) = f(x) + \tfrac{1}{2}
|
564
|
-
/// \text{dist}_\Sigma^2\left(g(x) + \Sigma^{-1}y,\;D\right) @f]
|
565
|
-
/// @f[ \nabla \psi(x) = \nabla f(x) + \nabla g(x)\,\hat y(x) @f]
|
566
|
-
/// @default_impl ProblemVTable::default_eval_ψ_grad_ψ
|
567
|
-
real_t eval_ψ_grad_ψ(crvec x, ///< [in] Decision variable @f$ x @f$
|
568
|
-
crvec y, ///< [in] Lagrange multipliers @f$ y @f$
|
569
|
-
crvec Σ, ///< [in] Penalty weights @f$ \Sigma @f$
|
570
|
-
rvec grad_ψ, ///< [out] @f$ \nabla \psi(x) @f$
|
571
|
-
rvec work_n, ///< Dimension @f$ n @f$
|
572
|
-
rvec work_m ///< Dimension @f$ m @f$
|
573
|
-
) const;
|
574
|
-
|
575
|
-
/// @}
|
576
|
-
|
577
|
-
/// @name Checks
|
578
|
-
/// @{
|
579
|
-
|
580
|
-
/// **[Optional]**
|
581
|
-
/// Check that the problem formulation is well-defined, the dimensions match,
|
582
|
-
/// etc. Throws an exception if this is not the case.
|
583
|
-
void check() const;
|
584
|
-
|
585
|
-
/// @}
|
586
|
-
|
587
|
-
/// @name Querying specialized implementations
|
588
|
-
/// @{
|
589
|
-
|
590
|
-
/// Returns true if the problem provides an implementation of
|
591
|
-
/// @ref eval_inactive_indices_res_lna.
|
592
|
-
bool provides_eval_inactive_indices_res_lna() const {
|
593
|
-
return vtable.eval_inactive_indices_res_lna != vtable.default_eval_inactive_indices_res_lna;
|
594
|
-
}
|
595
|
-
/// Returns true if the problem provides an implementation of
|
596
|
-
/// @ref eval_jac_g.
|
597
|
-
bool provides_eval_jac_g() const { return vtable.eval_jac_g != vtable.default_eval_jac_g; }
|
598
|
-
/// Returns true if the problem provides an implementation of
|
599
|
-
/// @ref get_jac_g_num_nonzeros.
|
600
|
-
bool provides_get_jac_g_num_nonzeros() const {
|
601
|
-
return vtable.get_jac_g_num_nonzeros != vtable.default_get_jac_g_num_nonzeros;
|
602
|
-
}
|
603
|
-
/// Returns true if the problem provides an implementation of
|
604
|
-
/// @ref eval_grad_gi.
|
605
|
-
bool provides_eval_grad_gi() const {
|
606
|
-
return vtable.eval_grad_gi != vtable.default_eval_grad_gi;
|
607
|
-
}
|
608
|
-
/// Returns true if the problem provides an implementation of
|
609
|
-
/// @ref eval_hess_L_prod.
|
610
|
-
bool provides_eval_hess_L_prod() const {
|
611
|
-
return vtable.eval_hess_L_prod != vtable.default_eval_hess_L_prod;
|
612
|
-
}
|
613
|
-
/// Returns true if the problem provides an implementation of
|
614
|
-
/// @ref eval_hess_L.
|
615
|
-
bool provides_eval_hess_L() const { return vtable.eval_hess_L != vtable.default_eval_hess_L; }
|
616
|
-
/// Returns true if the problem provides an implementation of
|
617
|
-
/// @ref get_hess_L_num_nonzeros.
|
618
|
-
bool provides_get_hess_L_num_nonzeros() const {
|
619
|
-
return vtable.get_hess_L_num_nonzeros != vtable.default_get_hess_L_num_nonzeros;
|
620
|
-
}
|
621
|
-
/// Returns true if the problem provides an implementation of
|
622
|
-
/// @ref eval_hess_ψ_prod.
|
623
|
-
bool provides_eval_hess_ψ_prod() const {
|
624
|
-
return vtable.eval_hess_ψ_prod != vtable.default_eval_hess_ψ_prod;
|
625
|
-
}
|
626
|
-
/// Returns true if the problem provides an implementation of
|
627
|
-
/// @ref eval_hess_ψ.
|
628
|
-
bool provides_eval_hess_ψ() const { return vtable.eval_hess_ψ != vtable.default_eval_hess_ψ; }
|
629
|
-
/// Returns true if the problem provides an implementation of
|
630
|
-
/// @ref get_hess_ψ_num_nonzeros.
|
631
|
-
bool provides_get_hess_ψ_num_nonzeros() const {
|
632
|
-
return vtable.get_hess_ψ_num_nonzeros != vtable.default_get_hess_ψ_num_nonzeros;
|
633
|
-
}
|
634
|
-
/// Returns true if the problem provides a specialized implementation of
|
635
|
-
/// @ref eval_f_grad_f, false if it uses the default implementation.
|
636
|
-
bool provides_eval_f_grad_f() const {
|
637
|
-
return vtable.eval_f_grad_f != vtable.default_eval_f_grad_f;
|
638
|
-
}
|
639
|
-
/// Returns true if the problem provides a specialized implementation of
|
640
|
-
/// @ref eval_f_g, false if it uses the default implementation.
|
641
|
-
bool provides_eval_f_g() const { return vtable.eval_f_g != vtable.default_eval_f_g; }
|
642
|
-
/// Returns true if the problem provides a specialized implementation of
|
643
|
-
/// @ref eval_grad_f_grad_g_prod, false if it uses the default implementation.
|
644
|
-
bool provides_eval_grad_f_grad_g_prod() const {
|
645
|
-
return vtable.eval_grad_f_grad_g_prod != vtable.default_eval_grad_f_grad_g_prod;
|
646
|
-
}
|
647
|
-
/// Returns true if the problem provides a specialized implementation of
|
648
|
-
/// @ref eval_grad_L, false if it uses the default implementation.
|
649
|
-
bool provides_eval_grad_L() const { return vtable.eval_grad_L != vtable.default_eval_grad_L; }
|
650
|
-
/// Returns true if the problem provides a specialized implementation of
|
651
|
-
/// @ref eval_ψ, false if it uses the default implementation.
|
652
|
-
bool provides_eval_ψ() const { return vtable.eval_ψ != vtable.default_eval_ψ; }
|
653
|
-
/// Returns true if the problem provides a specialized implementation of
|
654
|
-
/// @ref eval_grad_ψ, false if it uses the default implementation.
|
655
|
-
bool provides_eval_grad_ψ() const { return vtable.eval_grad_ψ != vtable.default_eval_grad_ψ; }
|
656
|
-
/// Returns true if the problem provides a specialized implementation of
|
657
|
-
/// @ref eval_ψ_grad_ψ, false if it uses the default implementation.
|
658
|
-
bool provides_eval_ψ_grad_ψ() const {
|
659
|
-
return vtable.eval_ψ_grad_ψ != vtable.default_eval_ψ_grad_ψ;
|
660
|
-
}
|
661
|
-
/// Returns true if the problem provides an implementation of
|
662
|
-
/// @ref get_box_C.
|
663
|
-
bool provides_get_box_C() const { return vtable.get_box_C != vtable.default_get_box_C; }
|
664
|
-
/// Returns true if the problem provides an implementation of
|
665
|
-
/// @ref get_box_D.
|
666
|
-
bool provides_get_box_D() const { return vtable.get_box_D != vtable.default_get_box_D; }
|
667
|
-
/// Returns true if the problem provides an implementation of @ref check.
|
668
|
-
bool provides_check() const { return vtable.check != vtable.default_check; }
|
669
|
-
|
670
|
-
/// @}
|
671
|
-
|
672
|
-
/// @name Helpers
|
673
|
-
/// @{
|
674
|
-
|
675
|
-
/// Given g(x), compute the intermediate results ŷ and dᵀŷ that can later be
|
676
|
-
/// used to compute ψ(x) and ∇ψ(x).
|
677
|
-
///
|
678
|
-
/// Computes the result using the following algorithm:
|
679
|
-
/// @f[ \begin{aligned}
|
680
|
-
/// \zeta &= g(x) + \Sigma^{-1} y \\[]
|
681
|
-
/// d &= \zeta - \Pi_D(\zeta)
|
682
|
-
/// = \operatorname{eval\_proj\_diff\_g}(\zeta, \zeta) \\[]
|
683
|
-
/// \hat y &= \Sigma d \\[]
|
684
|
-
/// \end{aligned} @f]
|
685
|
-
/// @see @ref page_math
|
686
|
-
///
|
687
|
-
/// @param[inout] g_ŷ
|
688
|
-
/// Input @f$ g(x) @f$, outputs @f$ \hat y @f$
|
689
|
-
/// @param[in] y
|
690
|
-
/// Lagrange multipliers @f$ y @f$
|
691
|
-
/// @param[in] Σ
|
692
|
-
/// Penalty weights @f$ \Sigma @f$
|
693
|
-
/// @return The inner product @f$ d^\top \hat y @f$
|
694
|
-
real_t calc_ŷ_dᵀŷ(rvec g_ŷ, crvec y, crvec Σ) const;
|
695
|
-
|
696
|
-
/// @}
|
697
|
-
};
|
698
|
-
|
699
|
-
/// @}
|
700
|
-
|
701
|
-
#ifndef DOXYGEN
|
702
|
-
template <class Tref>
|
703
|
-
explicit TypeErasedProblem(Tref &&d)
|
704
|
-
-> TypeErasedProblem<typename std::remove_cvref_t<Tref>::config_t>;
|
705
|
-
|
706
|
-
template <class Tref, class Allocator>
|
707
|
-
explicit TypeErasedProblem(Tref &&d, Allocator alloc)
|
708
|
-
-> TypeErasedProblem<typename std::remove_cvref_t<Tref>::config_t, Allocator>;
|
709
|
-
#endif
|
710
|
-
|
711
|
-
template <Config Conf, class Allocator>
|
712
|
-
auto TypeErasedProblem<Conf, Allocator>::get_n() const -> length_t {
|
713
|
-
return vtable.n;
|
714
|
-
}
|
715
|
-
template <Config Conf, class Allocator>
|
716
|
-
auto TypeErasedProblem<Conf, Allocator>::get_m() const -> length_t {
|
717
|
-
return vtable.m;
|
718
|
-
}
|
719
|
-
|
720
|
-
template <Config Conf, class Allocator>
|
721
|
-
void TypeErasedProblem<Conf, Allocator>::eval_proj_diff_g(crvec z, rvec e) const {
|
722
|
-
return call(vtable.eval_proj_diff_g, z, e);
|
723
|
-
}
|
724
|
-
template <Config Conf, class Allocator>
|
725
|
-
void TypeErasedProblem<Conf, Allocator>::eval_proj_multipliers(rvec y, real_t M) const {
|
726
|
-
return call(vtable.eval_proj_multipliers, y, M);
|
727
|
-
}
|
728
|
-
template <Config Conf, class Allocator>
|
729
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_prox_grad_step(real_t γ, crvec x, crvec grad_ψ,
|
730
|
-
rvec x̂, rvec p) const -> real_t {
|
731
|
-
return call(vtable.eval_prox_grad_step, γ, x, grad_ψ, x̂, p);
|
732
|
-
}
|
733
|
-
template <Config Conf, class Allocator>
|
734
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_inactive_indices_res_lna(real_t γ, crvec x,
|
735
|
-
crvec grad_ψ,
|
736
|
-
rindexvec J) const
|
737
|
-
-> index_t {
|
738
|
-
return call(vtable.eval_inactive_indices_res_lna, γ, x, grad_ψ, J);
|
739
|
-
}
|
740
|
-
template <Config Conf, class Allocator>
|
741
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_f(crvec x) const -> real_t {
|
742
|
-
return call(vtable.eval_f, x);
|
743
|
-
}
|
744
|
-
template <Config Conf, class Allocator>
|
745
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_f(crvec x, rvec grad_fx) const {
|
746
|
-
return call(vtable.eval_grad_f, x, grad_fx);
|
747
|
-
}
|
748
|
-
template <Config Conf, class Allocator>
|
749
|
-
void TypeErasedProblem<Conf, Allocator>::eval_g(crvec x, rvec gx) const {
|
750
|
-
return call(vtable.eval_g, x, gx);
|
751
|
-
}
|
752
|
-
template <Config Conf, class Allocator>
|
753
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_g_prod(crvec x, crvec y, rvec grad_gxy) const {
|
754
|
-
return call(vtable.eval_grad_g_prod, x, y, grad_gxy);
|
755
|
-
}
|
756
|
-
template <Config Conf, class Allocator>
|
757
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_gi(crvec x, index_t i, rvec grad_gi) const {
|
758
|
-
return call(vtable.eval_grad_gi, x, i, grad_gi);
|
759
|
-
}
|
760
|
-
template <Config Conf, class Allocator>
|
761
|
-
void TypeErasedProblem<Conf, Allocator>::eval_jac_g(crvec x, rindexvec inner_idx,
|
762
|
-
rindexvec outer_ptr, rvec J_values) const {
|
763
|
-
return call(vtable.eval_jac_g, x, inner_idx, outer_ptr, J_values);
|
764
|
-
}
|
765
|
-
template <Config Conf, class Allocator>
|
766
|
-
auto TypeErasedProblem<Conf, Allocator>::get_jac_g_num_nonzeros() const -> length_t {
|
767
|
-
return call(vtable.get_jac_g_num_nonzeros);
|
768
|
-
}
|
769
|
-
template <Config Conf, class Allocator>
|
770
|
-
void TypeErasedProblem<Conf, Allocator>::eval_hess_L_prod(crvec x, crvec y, real_t scale, crvec v,
|
771
|
-
rvec Hv) const {
|
772
|
-
return call(vtable.eval_hess_L_prod, x, y, scale, v, Hv);
|
773
|
-
}
|
774
|
-
template <Config Conf, class Allocator>
|
775
|
-
void TypeErasedProblem<Conf, Allocator>::eval_hess_L(crvec x, crvec y, real_t scale,
|
776
|
-
rindexvec inner_idx, rindexvec outer_ptr,
|
777
|
-
rvec H_values) const {
|
778
|
-
return call(vtable.eval_hess_L, x, y, scale, inner_idx, outer_ptr, H_values);
|
779
|
-
}
|
780
|
-
template <Config Conf, class Allocator>
|
781
|
-
auto TypeErasedProblem<Conf, Allocator>::get_hess_L_num_nonzeros() const -> length_t {
|
782
|
-
return call(vtable.get_hess_L_num_nonzeros);
|
783
|
-
}
|
784
|
-
template <Config Conf, class Allocator>
|
785
|
-
void TypeErasedProblem<Conf, Allocator>::eval_hess_ψ_prod(crvec x, crvec y, crvec Σ, real_t scale,
|
786
|
-
crvec v, rvec Hv) const {
|
787
|
-
return call(vtable.eval_hess_ψ_prod, x, y, Σ, scale, v, Hv);
|
788
|
-
}
|
789
|
-
template <Config Conf, class Allocator>
|
790
|
-
void TypeErasedProblem<Conf, Allocator>::eval_hess_ψ(crvec x, crvec y, crvec Σ, real_t scale,
|
791
|
-
rindexvec inner_idx, rindexvec outer_ptr,
|
792
|
-
rvec H_values) const {
|
793
|
-
return call(vtable.eval_hess_ψ, x, y, Σ, scale, inner_idx, outer_ptr, H_values);
|
794
|
-
}
|
795
|
-
template <Config Conf, class Allocator>
|
796
|
-
auto TypeErasedProblem<Conf, Allocator>::get_hess_ψ_num_nonzeros() const -> length_t {
|
797
|
-
return call(vtable.get_hess_ψ_num_nonzeros);
|
798
|
-
}
|
799
|
-
template <Config Conf, class Allocator>
|
800
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_f_grad_f(crvec x, rvec grad_fx) const -> real_t {
|
801
|
-
return call(vtable.eval_f_grad_f, x, grad_fx);
|
802
|
-
}
|
803
|
-
template <Config Conf, class Allocator>
|
804
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_f_g(crvec x, rvec g) const -> real_t {
|
805
|
-
return call(vtable.eval_f_g, x, g);
|
806
|
-
}
|
807
|
-
template <Config Conf, class Allocator>
|
808
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_f_grad_g_prod(crvec x, crvec y, rvec grad_f,
|
809
|
-
rvec grad_gxy) const {
|
810
|
-
return call(vtable.eval_grad_f_grad_g_prod, x, y, grad_f, grad_gxy);
|
811
|
-
}
|
812
|
-
template <Config Conf, class Allocator>
|
813
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_L(crvec x, crvec y, rvec grad_L,
|
814
|
-
rvec work_n) const {
|
815
|
-
return call(vtable.eval_grad_L, x, y, grad_L, work_n);
|
816
|
-
}
|
817
|
-
template <Config Conf, class Allocator>
|
818
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_ψ(crvec x, crvec y, crvec Σ, rvec ŷ) const -> real_t {
|
819
|
-
return call(vtable.eval_ψ, x, y, Σ, ŷ);
|
820
|
-
}
|
821
|
-
template <Config Conf, class Allocator>
|
822
|
-
void TypeErasedProblem<Conf, Allocator>::eval_grad_ψ(crvec x, crvec y, crvec Σ, rvec grad_ψ,
|
823
|
-
rvec work_n, rvec work_m) const {
|
824
|
-
return call(vtable.eval_grad_ψ, x, y, Σ, grad_ψ, work_n, work_m);
|
825
|
-
}
|
826
|
-
template <Config Conf, class Allocator>
|
827
|
-
auto TypeErasedProblem<Conf, Allocator>::eval_ψ_grad_ψ(crvec x, crvec y, crvec Σ, rvec grad_ψ,
|
828
|
-
rvec work_n, rvec work_m) const -> real_t {
|
829
|
-
return call(vtable.eval_ψ_grad_ψ, x, y, Σ, grad_ψ, work_n, work_m);
|
830
|
-
}
|
831
|
-
template <Config Conf, class Allocator>
|
832
|
-
auto TypeErasedProblem<Conf, Allocator>::calc_ŷ_dᵀŷ(rvec g_ŷ, crvec y, crvec Σ) const -> real_t {
|
833
|
-
return call(vtable.calc_ŷ_dᵀŷ, g_ŷ, y, Σ);
|
834
|
-
}
|
835
|
-
template <Config Conf, class Allocator>
|
836
|
-
auto TypeErasedProblem<Conf, Allocator>::get_box_C() const -> const Box & {
|
837
|
-
return call(vtable.get_box_C);
|
838
|
-
}
|
839
|
-
template <Config Conf, class Allocator>
|
840
|
-
auto TypeErasedProblem<Conf, Allocator>::get_box_D() const -> const Box & {
|
841
|
-
return call(vtable.get_box_D);
|
842
|
-
}
|
843
|
-
template <Config Conf, class Allocator>
|
844
|
-
void TypeErasedProblem<Conf, Allocator>::check() const {
|
845
|
-
return call(vtable.check);
|
846
|
-
}
|
847
|
-
|
848
|
-
/// @addtogroup grp_Problems
|
849
|
-
/// @{
|
850
|
-
|
851
|
-
template <Config Conf>
|
852
|
-
void print_provided_functions(std::ostream &os, const TypeErasedProblem<Conf> &problem) {
|
853
|
-
os << "inactive_indices_res_lna: " << problem.provides_eval_inactive_indices_res_lna() << '\n'
|
854
|
-
<< " grad_gi: " << problem.provides_eval_grad_gi() << '\n'
|
855
|
-
<< " jac_g: " << problem.provides_eval_jac_g() << '\n'
|
856
|
-
<< " hess_L_prod: " << problem.provides_eval_hess_L_prod() << '\n'
|
857
|
-
<< " hess_L: " << problem.provides_eval_hess_L() << '\n'
|
858
|
-
<< " hess_ψ_prod: " << problem.provides_eval_hess_ψ_prod() << '\n'
|
859
|
-
<< " hess_ψ: " << problem.provides_eval_hess_ψ() << '\n'
|
860
|
-
<< " f_grad_f: " << problem.provides_eval_f_grad_f() << '\n'
|
861
|
-
<< " f_g: " << problem.provides_eval_f_g() << '\n'
|
862
|
-
<< " grad_f_grad_g_prod: " << problem.provides_eval_grad_f_grad_g_prod() << '\n'
|
863
|
-
<< " grad_L: " << problem.provides_eval_grad_L() << '\n'
|
864
|
-
<< " ψ: " << problem.provides_eval_ψ() << '\n'
|
865
|
-
<< " grad_ψ: " << problem.provides_eval_grad_ψ() << '\n'
|
866
|
-
<< " ψ_grad_ψ: " << problem.provides_eval_ψ_grad_ψ() << '\n'
|
867
|
-
<< " get_box_C: " << problem.provides_get_box_C() << '\n'
|
868
|
-
<< " get_box_D: " << problem.provides_get_box_D() << '\n'
|
869
|
-
<< " check: " << problem.provides_check() << '\n';
|
870
|
-
}
|
871
|
-
|
872
|
-
/// @}
|
873
|
-
|
874
|
-
} // namespace alpaqa
|