casadi 3.6.5__cp312-none-manylinux2014_x86_64.whl → 3.6.7__cp312-none-manylinux2014_x86_64.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.py +739 -308
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/highs/highs-config.cmake +6 -13
- casadi/cmake/highs/highs-targets-release.cmake +13 -13
- casadi/cmake/highs/highs-targets.cmake +13 -10
- casadi/highs +0 -0
- casadi/include/casadi/casadi.i +3 -0
- casadi/include/casadi/casadi_c.h +2 -0
- casadi/include/casadi/config.h +8 -8
- casadi/include/casadi/core/casadi_common.hpp +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 +6 -5
- 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 +42 -0
- casadi/include/licenses/daqp-external/LICENSE +21 -0
- casadi/include/licenses/fatrop-external/LICENSE.txt +165 -0
- casadi/include/licenses/fatrop-external/external/blasfeo/LICENSE.txt +26 -0
- casadi/include/licenses/fatrop-external/external/pybind11/LICENSE +29 -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 +2 -2
- casadi/lib64/libtinyxml2.a +0 -0
- casadi/libCbcSolver.so +0 -0
- casadi/libCbcSolver.so.3 +0 -0
- casadi/libCbcSolver.so.3.10.11 +0 -0
- casadi/libClpSolver.so +0 -0
- casadi/libClpSolver.so.1 +0 -0
- casadi/libClpSolver.so.1.14.9 +0 -0
- casadi/libbonmin.so +0 -0
- casadi/libbonmin.so.4 +0 -0
- casadi/libbonmin.so.4.8.9 +0 -0
- casadi/libcasadi.so +0 -0
- casadi/libcasadi.so.3.7 +0 -0
- casadi/libcasadi_conic_cbc.so +0 -0
- casadi/libcasadi_conic_cbc.so.3.7 +0 -0
- casadi/libcasadi_conic_clp.so +0 -0
- casadi/libcasadi_conic_clp.so.3.7 +0 -0
- casadi/libcasadi_conic_cplex.so +0 -0
- casadi/libcasadi_conic_cplex.so.3.7 +0 -0
- casadi/libcasadi_conic_daqp.so +0 -0
- casadi/libcasadi_conic_daqp.so.3.7 +0 -0
- casadi/libcasadi_conic_fatrop.so +0 -0
- casadi/libcasadi_conic_fatrop.so.3.7 +0 -0
- casadi/libcasadi_conic_gurobi.so +0 -0
- casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
- casadi/libcasadi_conic_highs.so +0 -0
- casadi/libcasadi_conic_highs.so.3.7 +0 -0
- casadi/libcasadi_conic_hpipm.so +0 -0
- casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
- casadi/libcasadi_conic_ipqp.so +0 -0
- casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
- casadi/libcasadi_conic_nlpsol.so +0 -0
- casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
- casadi/libcasadi_conic_osqp.so +0 -0
- casadi/libcasadi_conic_osqp.so.3.7 +0 -0
- casadi/libcasadi_conic_proxqp.so +0 -0
- casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
- casadi/libcasadi_conic_qpoases.so +0 -0
- casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
- casadi/libcasadi_conic_qrqp.so +0 -0
- casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
- casadi/libcasadi_conic_superscs.so +0 -0
- casadi/libcasadi_conic_superscs.so.3.7 +0 -0
- casadi/libcasadi_integrator_collocation.so +0 -0
- casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
- casadi/libcasadi_integrator_cvodes.so +0 -0
- casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
- casadi/libcasadi_integrator_idas.so +0 -0
- casadi/libcasadi_integrator_idas.so.3.7 +0 -0
- casadi/libcasadi_integrator_rk.so +0 -0
- casadi/libcasadi_integrator_rk.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ampl.so +0 -0
- casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_bonmin.so +0 -0
- casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_fatrop.so +0 -0
- casadi/libcasadi_nlpsol_fatrop.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ipopt.so +0 -0
- casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_knitro.so +0 -0
- casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_madnlp.so +0 -0
- casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_scpgen.so +0 -0
- casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sleqp.so +0 -0
- casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_snopt.so +0 -0
- casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_worhp.so +0 -0
- casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_kinsol.so +0 -0
- casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_newton.so +0 -0
- casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_nlpsol.so +0 -0
- casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
- casadi/libcasadi_sundials_common.so +0 -0
- casadi/libcasadi_sundials_common.so.3.7 +0 -0
- casadi/libcoinmetis.la +1 -1
- casadi/libcoinmetis.so +0 -0
- casadi/libcoinmetis.so.2 +0 -0
- casadi/libcoinmetis.so.2.0.0 +0 -0
- casadi/libdaqp.so +0 -0
- casadi/libdaqpstat.a +0 -0
- casadi/libfatrop.so +0 -0
- casadi/libhighs.so +0 -0
- casadi/libhighs.so.1 +0 -0
- casadi/libhighs.so.1.7.2 +0 -0
- casadi/libindirect.a +0 -0
- casadi/liblinsys.a +0 -0
- casadi/libmatlab_ipc.so +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.so +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libsleqp.so +0 -0
- casadi/libsleqp.so.1.0.1 +0 -0
- casadi/libspral.a +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/pkgconfig/casadi.pc +1 -1
- casadi/pkgconfig/highs.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 +425 -255
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/libFortranHighs.so +0 -0
- casadi/libhighs.so.1.6 +0 -0
- casadi/libhighs.so.1.6.0 +0 -0
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,592 @@
|
|
1
|
+
/*
|
2
|
+
* Fatrop - A fast trajectory optimization solver
|
3
|
+
* Copyright (C) 2022 - 2024 Lander Vanroye, KU Leuven. All rights reserved.
|
4
|
+
*
|
5
|
+
* This file is part of Fatrop.
|
6
|
+
*
|
7
|
+
* Fatrop is free software: you can redistribute it and/or modify
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
10
|
+
* (at your option) any later version.
|
11
|
+
*
|
12
|
+
* Fatrop is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
* GNU Lesser General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* along with Fatrop. If not, see <http://www.gnu.org/licenses/>. */
|
19
|
+
|
20
|
+
// Basic OCP template: initial and terminal constraints eq constraints, Function evaluation provided by Casadi CodeGen
|
21
|
+
#ifndef OCPTEMPLATEBASICINCLUDED
|
22
|
+
#define OCPTEMPLATEBASICINCLUDED
|
23
|
+
#include "OCPAbstract.hpp"
|
24
|
+
#include <string>
|
25
|
+
#include <iostream>
|
26
|
+
#include <fatrop/auxiliary/DynamicLib.hpp>
|
27
|
+
#include <fatrop/auxiliary/Common.hpp>
|
28
|
+
#include "fatrop/function_evaluation/CasadiCodegen.hpp"
|
29
|
+
#include "fatrop/json/json.h"
|
30
|
+
#include <fstream>
|
31
|
+
#include <sstream>
|
32
|
+
|
33
|
+
namespace fatrop
|
34
|
+
{
|
35
|
+
/* TODO: at this pofatrop_int the StageOCP's implementation implements function evaluation through Casadi Codegen
|
36
|
+
* it should become an interface that can be implemented by user defined function evaluation methods
|
37
|
+
* the StageOCP is then characterised by its structure that is a bit less general than the OCPAbstract interface
|
38
|
+
* more in particular it seperates initial, intermediate and terminal stages, where it has different constraints and objectives
|
39
|
+
* see the commented class at the end of this file
|
40
|
+
*
|
41
|
+
* the casadi implementation should become a derived class of this interface
|
42
|
+
*/
|
43
|
+
|
44
|
+
/// BasicOCP is a OCPAbstract implementation that is built on top of CasAdi Codegenerated functions
|
45
|
+
/// it seperates the initial and terminal stages and the intermediate stages, each of these can have different constraints and running objective
|
46
|
+
/// the dynamics is the same for all stages
|
47
|
+
/// this problem structure corresponds to a single-stage rockit problem, which it is intented to be used for
|
48
|
+
class StageOCP : public OCPAbstract
|
49
|
+
{
|
50
|
+
public:
|
51
|
+
StageOCP(const fatrop_int nu, const fatrop_int nx, const fatrop_int ngI, const fatrop_int ng, const fatrop_int ngF, const fatrop_int ng_ineqI, const fatrop_int ng_ineq, const fatrop_int ng_ineqF, const fatrop_int n_stage_params, const fatrop_int n_global_params, const fatrop_int K)
|
52
|
+
:
|
53
|
+
nu_(nu),
|
54
|
+
nx_(nx),
|
55
|
+
ngI_(ngI),
|
56
|
+
ng_(ng),
|
57
|
+
ngF_(ngF),
|
58
|
+
ng_ineqI_(ng_ineqI),
|
59
|
+
ng_ineq_(ng_ineq),
|
60
|
+
ng_ineqF_(ng_ineqF),
|
61
|
+
n_stage_params_(n_stage_params),
|
62
|
+
n_global_params_(n_global_params),
|
63
|
+
K_(K)
|
64
|
+
{
|
65
|
+
}
|
66
|
+
fatrop_int get_nx(const fatrop_int k) const override;
|
67
|
+
fatrop_int get_nu(const fatrop_int k) const override;
|
68
|
+
fatrop_int get_ng(const fatrop_int k) const override;
|
69
|
+
fatrop_int get_ng_ineq(const fatrop_int k) const override;
|
70
|
+
fatrop_int get_n_global_params() const override;
|
71
|
+
fatrop_int get_n_stage_params(const fatrop_int k) const override;
|
72
|
+
fatrop_int get_horizon_length() const override;
|
73
|
+
const fatrop_int nu_;
|
74
|
+
const fatrop_int nx_;
|
75
|
+
const fatrop_int ngI_;
|
76
|
+
const fatrop_int ng_;
|
77
|
+
const fatrop_int ngF_;
|
78
|
+
const fatrop_int ng_ineqI_;
|
79
|
+
const fatrop_int ng_ineq_;
|
80
|
+
const fatrop_int ng_ineqF_;
|
81
|
+
const fatrop_int n_stage_params_;
|
82
|
+
const fatrop_int n_global_params_;
|
83
|
+
const fatrop_int K_;
|
84
|
+
};
|
85
|
+
class StageOCPRockit : public StageOCP
|
86
|
+
{
|
87
|
+
public:
|
88
|
+
StageOCPRockit(const fatrop_int nu,
|
89
|
+
const fatrop_int nx,
|
90
|
+
const fatrop_int ngI,
|
91
|
+
const fatrop_int ng,
|
92
|
+
const fatrop_int ngF,
|
93
|
+
const fatrop_int ng_ineqI,
|
94
|
+
const fatrop_int ng_ineq,
|
95
|
+
const fatrop_int ng_ineqF,
|
96
|
+
const fatrop_int n_stage_params,
|
97
|
+
const fatrop_int n_global_params,
|
98
|
+
const fatrop_int K,
|
99
|
+
const EvalCasGen &BAbtf,
|
100
|
+
const EvalCasGen &bkf,
|
101
|
+
const EvalCasGen &RSQrqtIf,
|
102
|
+
const EvalCasGen &rqIf,
|
103
|
+
const EvalCasGen &RSQrqtf,
|
104
|
+
const EvalCasGen &rqf,
|
105
|
+
const EvalCasGen &RSQrqtFf,
|
106
|
+
const EvalCasGen &rqFf,
|
107
|
+
const EvalCasGen &GgtIf,
|
108
|
+
const EvalCasGen &gIf,
|
109
|
+
const EvalCasGen &Ggtf,
|
110
|
+
const EvalCasGen &gf,
|
111
|
+
const EvalCasGen &GgtFf,
|
112
|
+
const EvalCasGen &gFf,
|
113
|
+
const EvalCasGen &Ggt_ineqIf,
|
114
|
+
const EvalCasGen &gineqIf,
|
115
|
+
const EvalCasGen &Ggt_ineqf,
|
116
|
+
const EvalCasGen &gineqf,
|
117
|
+
const EvalCasGen &Ggt_ineqFf,
|
118
|
+
const EvalCasGen &gineqFf,
|
119
|
+
const EvalCasGen &LkIf,
|
120
|
+
const EvalCasGen &Lkf,
|
121
|
+
const EvalCasGen &LFf,
|
122
|
+
const std::vector<double> &bounds_L,
|
123
|
+
const std::vector<double> &bounds_U,
|
124
|
+
const std::vector<double> &stage_params,
|
125
|
+
const std::vector<double> &global_params,
|
126
|
+
const std::vector<double> &initial_u,
|
127
|
+
const std::vector<double> &initial_x);
|
128
|
+
fatrop_int get_default_stage_params(double *stage_params_res, const fatrop_int k) const override
|
129
|
+
{
|
130
|
+
fatrop_int offs = k * n_stage_params_;
|
131
|
+
const double *stage_params_p = stage_params.data();
|
132
|
+
for (fatrop_int i = 0; i < n_stage_params_; i++)
|
133
|
+
{
|
134
|
+
stage_params_res[i] = stage_params_p[offs + i];
|
135
|
+
}
|
136
|
+
return 0;
|
137
|
+
}
|
138
|
+
fatrop_int get_default_global_params(double *global_params_res) const override
|
139
|
+
{
|
140
|
+
const double *global_params_p = global_params.data();
|
141
|
+
for (fatrop_int i = 0; i < n_global_params_; i++)
|
142
|
+
{
|
143
|
+
global_params_res[i] = global_params_p[i];
|
144
|
+
}
|
145
|
+
return 0;
|
146
|
+
}
|
147
|
+
fatrop_int eval_BAbt(const double *states_kp1,
|
148
|
+
const double *inputs_k,
|
149
|
+
const double *states_k,
|
150
|
+
const double *stage_params_k,
|
151
|
+
const double *global_params,
|
152
|
+
MAT *res,
|
153
|
+
const fatrop_int k) override;
|
154
|
+
fatrop_int eval_RSQrqt(const double *objective_scale,
|
155
|
+
const double *inputs_k,
|
156
|
+
const double *states_k,
|
157
|
+
const double *lam_dyn_k,
|
158
|
+
const double *lam_eq_k,
|
159
|
+
const double *lam_ineq_k,
|
160
|
+
const double *stage_params_k,
|
161
|
+
const double *global_params,
|
162
|
+
MAT *res,
|
163
|
+
const fatrop_int k) override;
|
164
|
+
fatrop_int eval_Ggt(
|
165
|
+
const double *inputs_k,
|
166
|
+
const double *states_k,
|
167
|
+
const double *stage_params_k,
|
168
|
+
const double *global_params,
|
169
|
+
MAT *res,
|
170
|
+
const fatrop_int k) override;
|
171
|
+
fatrop_int eval_Ggt_ineq(
|
172
|
+
const double *inputs_k,
|
173
|
+
const double *states_k,
|
174
|
+
const double *stage_params_k,
|
175
|
+
const double *global_params,
|
176
|
+
MAT *res,
|
177
|
+
const fatrop_int k) override;
|
178
|
+
fatrop_int eval_b(
|
179
|
+
const double *states_kp1,
|
180
|
+
const double *inputs_k,
|
181
|
+
const double *states_k,
|
182
|
+
const double *stage_params_k,
|
183
|
+
const double *global_params,
|
184
|
+
double *constraint_violation_k,
|
185
|
+
const fatrop_int k) override;
|
186
|
+
fatrop_int eval_g(
|
187
|
+
const double *inputs_k,
|
188
|
+
const double *states_k,
|
189
|
+
const double *stage_params_k,
|
190
|
+
const double *global_params,
|
191
|
+
double *res,
|
192
|
+
const fatrop_int k) override;
|
193
|
+
fatrop_int eval_gineq(
|
194
|
+
const double *inputs_k,
|
195
|
+
const double *states_k,
|
196
|
+
const double *stage_params_k,
|
197
|
+
const double *global_params,
|
198
|
+
double *res,
|
199
|
+
const fatrop_int k) override;
|
200
|
+
fatrop_int eval_rq(
|
201
|
+
const double *objective_scale,
|
202
|
+
const double *inputs_k,
|
203
|
+
const double *states_k,
|
204
|
+
const double *stage_params_k,
|
205
|
+
const double *global_params,
|
206
|
+
double *res,
|
207
|
+
const fatrop_int k) override;
|
208
|
+
|
209
|
+
fatrop_int eval_L(
|
210
|
+
const double *objective_scale,
|
211
|
+
const double *inputs_k,
|
212
|
+
const double *states_k,
|
213
|
+
const double *stage_params_k,
|
214
|
+
const double *global_params,
|
215
|
+
double *res,
|
216
|
+
const fatrop_int k) override;
|
217
|
+
fatrop_int get_initial_xk(double *xk, const fatrop_int k) const override
|
218
|
+
{
|
219
|
+
const double *initial_x_p = initial_x.data();
|
220
|
+
for (fatrop_int i = 0; i < nx_; i++)
|
221
|
+
{
|
222
|
+
xk[i] = initial_x_p[i + k * nx_];
|
223
|
+
}
|
224
|
+
return 0;
|
225
|
+
};
|
226
|
+
fatrop_int get_initial_uk(double *uk, const fatrop_int k) const override
|
227
|
+
{
|
228
|
+
const double *initial_u_p = initial_u.data();
|
229
|
+
for (fatrop_int i = 0; i < nu_; i++)
|
230
|
+
{
|
231
|
+
uk[i] = initial_u_p[i + k * nu_];
|
232
|
+
}
|
233
|
+
return 0;
|
234
|
+
};
|
235
|
+
fatrop_int set_initial_xk(double *xk, const fatrop_int k)
|
236
|
+
{
|
237
|
+
double *initial_x_p = initial_x.data();
|
238
|
+
for (fatrop_int i = 0; i < nx_; i++)
|
239
|
+
{
|
240
|
+
initial_x_p[i + k * nx_] = xk[i];
|
241
|
+
}
|
242
|
+
return 0;
|
243
|
+
};
|
244
|
+
fatrop_int set_initial_uk(double *uk, const fatrop_int k)
|
245
|
+
{
|
246
|
+
double *initial_u_p = initial_u.data();
|
247
|
+
for (fatrop_int i = 0; i < nu_; i++)
|
248
|
+
{
|
249
|
+
initial_u_p[i + k * nu_] = uk[i];
|
250
|
+
}
|
251
|
+
return 0;
|
252
|
+
};
|
253
|
+
fatrop_int get_bounds(double *lower, double *upper, const fatrop_int k) const override
|
254
|
+
{
|
255
|
+
const double *bounds_L_p = bounds_L.data();
|
256
|
+
const double *bounds_U_p = bounds_U.data();
|
257
|
+
fatrop_int offs = 0;
|
258
|
+
fatrop_int ngineq = ng_ineq_;
|
259
|
+
if (k == 0)
|
260
|
+
{
|
261
|
+
offs = 0;
|
262
|
+
}
|
263
|
+
else
|
264
|
+
{
|
265
|
+
offs = ng_ineqI_ + (k - 1) * ng_ineq_;
|
266
|
+
}
|
267
|
+
if (k == 0)
|
268
|
+
{
|
269
|
+
ngineq = ng_ineqI_;
|
270
|
+
}
|
271
|
+
else if (k == K_ - 1)
|
272
|
+
{
|
273
|
+
ngineq = ng_ineqF_;
|
274
|
+
}
|
275
|
+
|
276
|
+
for (fatrop_int i = 0; i < ngineq; i++)
|
277
|
+
{
|
278
|
+
lower[i] = bounds_L_p[i + offs];
|
279
|
+
upper[i] = bounds_U_p[i + offs];
|
280
|
+
}
|
281
|
+
return 0;
|
282
|
+
};
|
283
|
+
|
284
|
+
|
285
|
+
private:
|
286
|
+
EvalCasGen BAbtf;
|
287
|
+
EvalCasGen bkf;
|
288
|
+
EvalCasGen RSQrqtIf;
|
289
|
+
EvalCasGen rqIf;
|
290
|
+
EvalCasGen RSQrqtf;
|
291
|
+
EvalCasGen rqf;
|
292
|
+
EvalCasGen RSQrqtFf;
|
293
|
+
EvalCasGen rqFf;
|
294
|
+
EvalCasGen GgtIf;
|
295
|
+
EvalCasGen gIf;
|
296
|
+
EvalCasGen Ggtf;
|
297
|
+
EvalCasGen gf;
|
298
|
+
EvalCasGen GgtFf;
|
299
|
+
EvalCasGen gFf;
|
300
|
+
EvalCasGen Ggt_ineqIf;
|
301
|
+
EvalCasGen g_ineqIf;
|
302
|
+
EvalCasGen Ggt_ineqf;
|
303
|
+
EvalCasGen g_ineqf;
|
304
|
+
EvalCasGen Ggt_ineqFf;
|
305
|
+
EvalCasGen g_ineqFf;
|
306
|
+
EvalCasGen LkIf;
|
307
|
+
EvalCasGen Lkf;
|
308
|
+
EvalCasGen LFf;
|
309
|
+
std::vector<double> initial_x;
|
310
|
+
std::vector<double> initial_u;
|
311
|
+
std::vector<double> bounds_L;
|
312
|
+
std::vector<double> bounds_U;
|
313
|
+
std::vector<double> stage_params;
|
314
|
+
std::vector<double> global_params;
|
315
|
+
};
|
316
|
+
|
317
|
+
class StageOCPBuilder
|
318
|
+
{
|
319
|
+
public:
|
320
|
+
static std::shared_ptr<StageOCP> FromRockitInterface(const std::shared_ptr<DLHandler> &handle, const json::jobject& json_spec)
|
321
|
+
{
|
322
|
+
|
323
|
+
// set up ocp
|
324
|
+
const bool GN = false;
|
325
|
+
// shared_ptr<DLHandler> handle = make_shared<DLHandler>(functions);
|
326
|
+
// std::ifstream t(json_spec_file);
|
327
|
+
// std::stringstream buffer;
|
328
|
+
// buffer << t.rdbuf();
|
329
|
+
// json::jobject json_spec = json::jobject::parse(buffer.str());
|
330
|
+
const fatrop_int K = json_spec["K"];
|
331
|
+
const fatrop_int nx = json_spec["nx"];
|
332
|
+
const fatrop_int nu = json_spec["nu"];
|
333
|
+
const fatrop_int ngI = json_spec["ngI"];
|
334
|
+
const fatrop_int ng = json_spec["ng"];
|
335
|
+
const fatrop_int ngF = json_spec["ngF"];
|
336
|
+
const fatrop_int ng_ineqI = json_spec["ng_ineqI"];
|
337
|
+
const fatrop_int ng_ineq = json_spec["ng_ineq"];
|
338
|
+
const fatrop_int ng_ineqF = json_spec["ng_ineqF"];
|
339
|
+
const fatrop_int no_stage_params = json_spec["n_stage_params"];
|
340
|
+
const fatrop_int no_global_params = json_spec["n_global_params"];
|
341
|
+
std::vector<double> lowerI = json_spec["lowerI"].get_number_array<double>("%lf");
|
342
|
+
std::vector<double> upperI = json_spec["upperI"].get_number_array<double>("%lf");
|
343
|
+
std::vector<double> lower = json_spec["lower"].get_number_array<double>("%lf");
|
344
|
+
std::vector<double> upper = json_spec["upper"].get_number_array<double>("%lf");
|
345
|
+
std::vector<double> lowerF = json_spec["lowerF"].get_number_array<double>("%lf");
|
346
|
+
std::vector<double> upperF = json_spec["upperF"].get_number_array<double>("%lf");
|
347
|
+
lower.insert(lower.begin(), lowerI.begin(), lowerI.end());
|
348
|
+
upper.insert(upper.begin(), upperI.begin(), upperI.end());
|
349
|
+
lower.insert(lower.end(), lowerF.begin(), lowerF.end());
|
350
|
+
upper.insert(upper.end(), upperF.begin(), upperF.end());
|
351
|
+
std::vector<double> initial_u = json_spec["initial_u"].get_number_array<double>("%lf");
|
352
|
+
std::vector<double> initial_x = json_spec["initial_x"].get_number_array<double>("%lf");
|
353
|
+
EvalCasGen BAbtf(handle, "BAbt");
|
354
|
+
EvalCasGen bkf(handle, "bk");
|
355
|
+
EvalCasGen RSQrqtIf = GN ? EvalCasGen(handle, "RSQrqtIGN") : EvalCasGen(handle, "RSQrqtI");
|
356
|
+
EvalCasGen rqIf(handle, "rqI");
|
357
|
+
EvalCasGen RSQrqtf = GN ? EvalCasGen(handle, "RSQrqtGN") : EvalCasGen(handle, "RSQrqt");
|
358
|
+
EvalCasGen rqf(handle, "rqk");
|
359
|
+
EvalCasGen RSQrqtFf = GN ? EvalCasGen(handle, "RSQrqtFGN") : EvalCasGen(handle, "RSQrqtF");
|
360
|
+
EvalCasGen rqFf(handle, "rqF");
|
361
|
+
EvalCasGen GgtIf(handle, "GgtI");
|
362
|
+
EvalCasGen gIf(handle, "gI");
|
363
|
+
EvalCasGen Ggtf(handle, "Ggt");
|
364
|
+
EvalCasGen gf(handle, "g");
|
365
|
+
EvalCasGen GgtFf(handle, "GgtF");
|
366
|
+
EvalCasGen gFf(handle, "gF");
|
367
|
+
EvalCasGen LIf(handle, "LI");
|
368
|
+
EvalCasGen Lkf(handle, "Lk");
|
369
|
+
EvalCasGen LFf(handle, "LF");
|
370
|
+
EvalCasGen GgineqItf(handle, "GgineqIt");
|
371
|
+
EvalCasGen gineqIf(handle, "gineqI");
|
372
|
+
EvalCasGen Ggineqtf(handle, "Ggineqt");
|
373
|
+
EvalCasGen gineqf(handle, "gineq");
|
374
|
+
EvalCasGen GgineqFtf(handle, "GgineqFt");
|
375
|
+
EvalCasGen gineqFf(handle, "gineqF");
|
376
|
+
std::shared_ptr<StageOCP> stageocp = std::make_shared<StageOCPRockit>(nu, nx, ngI, ng, ngF, ng_ineqI, ng_ineq, ng_ineqF, no_stage_params, no_global_params, K,
|
377
|
+
BAbtf,
|
378
|
+
bkf,
|
379
|
+
RSQrqtIf,
|
380
|
+
rqIf,
|
381
|
+
RSQrqtf,
|
382
|
+
rqf,
|
383
|
+
RSQrqtFf,
|
384
|
+
rqFf,
|
385
|
+
GgtIf,
|
386
|
+
gIf,
|
387
|
+
Ggtf,
|
388
|
+
gf,
|
389
|
+
GgtFf,
|
390
|
+
gFf,
|
391
|
+
GgineqItf,
|
392
|
+
gineqIf,
|
393
|
+
Ggineqtf,
|
394
|
+
gineqf,
|
395
|
+
GgineqFtf,
|
396
|
+
gineqFf,
|
397
|
+
LIf,
|
398
|
+
Lkf,
|
399
|
+
LFf, lower, upper,
|
400
|
+
json_spec["stage_params"].get_number_array<double>("%lf"),
|
401
|
+
json_spec["global_params"].get_number_array<double>("%lf"),
|
402
|
+
initial_u, initial_x);
|
403
|
+
return stageocp;
|
404
|
+
}
|
405
|
+
};
|
406
|
+
}
|
407
|
+
#endif // OCPTEMPLATEBASICINCLUDED
|
408
|
+
|
409
|
+
// class SingleStageOCPAbstract
|
410
|
+
// {
|
411
|
+
// public:
|
412
|
+
// // problem dimensions
|
413
|
+
// virtual fatrop_int get_ng_initial() { return 0; };
|
414
|
+
// virtual fatrop_int get_ng_intermediate() { return 0; };
|
415
|
+
// virtual fatrop_int get_ng_terminal() { return 0; };
|
416
|
+
// virtual fatrop_int get_ng_ineq_initial() { return 0; };
|
417
|
+
// virtual fatrop_int get_ng_ineq_intermediate() { return 0; };
|
418
|
+
// virtual fatrop_int get_ng_ineq_terminal() { return 0; }
|
419
|
+
// virtual fatrop_int get_nxk(const fatrop_int k) const = 0;
|
420
|
+
// virtual fatrop_int get_nuk(const fatrop_int k) const = 0;
|
421
|
+
// virtual fatrop_int get_n_global_params() const = 0;
|
422
|
+
// virtual fatrop_int get_n_stage_params_k(const fatrop_int k) const = 0;
|
423
|
+
// // functions related to dynamics
|
424
|
+
// virtual fatrop_int eval_BAbt(const double *states_kp1,
|
425
|
+
// const double *inputs_k,
|
426
|
+
// const double *states_k,
|
427
|
+
// const double *stage_params_k,
|
428
|
+
// const double *global_params,
|
429
|
+
// MAT *res) = 0;
|
430
|
+
// virtual fatrop_int eval_RSQrqt_initial(const double *objective_scale,
|
431
|
+
// const double *inputs_k,
|
432
|
+
// const double *states_k,
|
433
|
+
// const double *lam_dyn_k,
|
434
|
+
// const double *lam_eq_k,
|
435
|
+
// const double *lam_ineq_k,
|
436
|
+
// const double *stage_params_k,
|
437
|
+
// const double *global_params,
|
438
|
+
// MAT *res) = 0;
|
439
|
+
// virtual fatrop_int eval_RSQrqt_intermediate(const double *objective_scale,
|
440
|
+
// const double *inputs_k,
|
441
|
+
// const double *states_k,
|
442
|
+
// const double *lam_dyn_k,
|
443
|
+
// const double *lam_eq_k,
|
444
|
+
// const double *lam_ineq_k,
|
445
|
+
// const double *stage_params_k,
|
446
|
+
// const double *global_params,
|
447
|
+
// MAT *res) = 0;
|
448
|
+
// virtual fatrop_int eval_RSQrqt_terminal(const double *objective_scale,
|
449
|
+
// const double *inputs_k,
|
450
|
+
// const double *states_k,
|
451
|
+
// const double *lam_dyn_k,
|
452
|
+
// const double *lam_eq_k,
|
453
|
+
// const double *lam_ineq_k,
|
454
|
+
// const double *stage_params_k,
|
455
|
+
// const double *global_params,
|
456
|
+
// MAT *res) = 0;
|
457
|
+
// virtual fatrop_int eval_Ggtk_initial(
|
458
|
+
// const double *inputs_k,
|
459
|
+
// const double *states_k,
|
460
|
+
// const double *stage_params_k,
|
461
|
+
// const double *global_params,
|
462
|
+
// MAT *res) { return 0; };
|
463
|
+
// virtual fatrop_int eval_Ggtk_intermediate(
|
464
|
+
// const double *inputs_k,
|
465
|
+
// const double *states_k,
|
466
|
+
// const double *stage_params_k,
|
467
|
+
// const double *global_params,
|
468
|
+
// MAT *res) { return 0; };
|
469
|
+
// virtual fatrop_int eval_Ggtk_terminal(
|
470
|
+
// const double *inputs_k,
|
471
|
+
// const double *states_k,
|
472
|
+
// const double *stage_params_k,
|
473
|
+
// const double *global_params,
|
474
|
+
// MAT *res) { return 0; };
|
475
|
+
// virtual fatrop_int eval_Ggt_ineq_initial(
|
476
|
+
// const double *inputs_k,
|
477
|
+
// const double *states_k,
|
478
|
+
// const double *stage_params_k,
|
479
|
+
// const double *global_params,
|
480
|
+
// MAT *res) { return 0; };
|
481
|
+
// virtual fatrop_int eval_Ggt_ineq_intermediate(
|
482
|
+
// const double *inputs_k,
|
483
|
+
// const double *states_k,
|
484
|
+
// const double *stage_params_k,
|
485
|
+
// const double *global_params,
|
486
|
+
// MAT *res) { return 0; };
|
487
|
+
// virtual fatrop_int eval_Ggt_ineq_terminal(
|
488
|
+
// const double *inputs_k,
|
489
|
+
// const double *states_k,
|
490
|
+
// const double *stage_params_k,
|
491
|
+
// const double *global_params,
|
492
|
+
// MAT *res) { return 0; };
|
493
|
+
// virtual fatrop_int eval_b_initial(
|
494
|
+
// const double *states_kp1,
|
495
|
+
// const double *inputs_k,
|
496
|
+
// const double *states_k,
|
497
|
+
// const double *stage_params_k,
|
498
|
+
// const double *global_params,
|
499
|
+
// double *constraint_violation_k) = 0;
|
500
|
+
// virtual fatrop_int eval_b_intermediate(
|
501
|
+
// const double *states_kp1,
|
502
|
+
// const double *inputs_k,
|
503
|
+
// const double *states_k,
|
504
|
+
// const double *stage_params_k,
|
505
|
+
// const double *global_params,
|
506
|
+
// double *constraint_violation_k) = 0;
|
507
|
+
// virtual fatrop_int eval_b_terminal(
|
508
|
+
// const double *states_kp1,
|
509
|
+
// const double *inputs_k,
|
510
|
+
// const double *states_k,
|
511
|
+
// const double *stage_params_k,
|
512
|
+
// const double *global_params,
|
513
|
+
// double *constraint_violation_k) = 0;
|
514
|
+
// virtual fatrop_int eval_g_initial(
|
515
|
+
// const double *inputs_k,
|
516
|
+
// const double *states_k,
|
517
|
+
// const double *stage_params_k,
|
518
|
+
// const double *global_params,
|
519
|
+
// double *res) { return 0; };
|
520
|
+
// virtual fatrop_int eval_g_intermediate(
|
521
|
+
// const double *inputs_k,
|
522
|
+
// const double *states_k,
|
523
|
+
// const double *stage_params_k,
|
524
|
+
// const double *global_params,
|
525
|
+
// double *res) { return 0; };
|
526
|
+
// virtual fatrop_int eval_g_terminal(
|
527
|
+
// const double *inputs_k,
|
528
|
+
// const double *states_k,
|
529
|
+
// const double *stage_params_k,
|
530
|
+
// const double *global_params,
|
531
|
+
// double *res) { return 0; };
|
532
|
+
// virtual fatrop_int eval_gineq_initial(
|
533
|
+
// const double *inputs_k,
|
534
|
+
// const double *states_k,
|
535
|
+
// const double *stage_params_k,
|
536
|
+
// const double *global_params,
|
537
|
+
// double *res) { return 0; };
|
538
|
+
// virtual fatrop_int eval_gineq_intermediate(
|
539
|
+
// const double *inputs_k,
|
540
|
+
// const double *states_k,
|
541
|
+
// const double *stage_params_k,
|
542
|
+
// const double *global_params,
|
543
|
+
// double *res) { return 0; };
|
544
|
+
// virtual fatrop_int eval_gineq_terminal(
|
545
|
+
// const double *inputs_k,
|
546
|
+
// const double *states_k,
|
547
|
+
// const double *stage_params_k,
|
548
|
+
// const double *global_params,
|
549
|
+
// double *res) { return 0; };
|
550
|
+
// virtual fatrop_int eval_rq_initial(
|
551
|
+
// const double *objective_scale,
|
552
|
+
// const double *inputs_k,
|
553
|
+
// const double *states_k,
|
554
|
+
// const double *stage_params_k,
|
555
|
+
// const double *global_params,
|
556
|
+
// double *res) = 0;
|
557
|
+
// virtual fatrop_int eval_rq_intermediate(
|
558
|
+
// const double *objective_scale,
|
559
|
+
// const double *inputs_k,
|
560
|
+
// const double *states_k,
|
561
|
+
// const double *stage_params_k,
|
562
|
+
// const double *global_params,
|
563
|
+
// double *res) = 0;
|
564
|
+
// virtual fatrop_int eval_rq_terminal(
|
565
|
+
// const double *objective_scale,
|
566
|
+
// const double *inputs_k,
|
567
|
+
// const double *states_k,
|
568
|
+
// const double *stage_params_k,
|
569
|
+
// const double *global_params,
|
570
|
+
// double *res) = 0;
|
571
|
+
// virtual fatrop_int eval_L_initial(
|
572
|
+
// const double *objective_scale,
|
573
|
+
// const double *inputs_k,
|
574
|
+
// const double *states_k,
|
575
|
+
// const double *stage_params_k,
|
576
|
+
// const double *global_params,
|
577
|
+
// double *res) = 0;
|
578
|
+
// virtual fatrop_int eval_L_intermediate(
|
579
|
+
// const double *objective_scale,
|
580
|
+
// const double *inputs_k,
|
581
|
+
// const double *states_k,
|
582
|
+
// const double *stage_params_k,
|
583
|
+
// const double *global_params,
|
584
|
+
// double *res) = 0;
|
585
|
+
// virtual fatrop_int eval_L_terminal(
|
586
|
+
// const double *objective_scale,
|
587
|
+
// const double *inputs_k,
|
588
|
+
// const double *states_k,
|
589
|
+
// const double *stage_params_k,
|
590
|
+
// const double *global_params,
|
591
|
+
// double *res) = 0;
|
592
|
+
// };
|