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
@@ -0,0 +1,493 @@
|
|
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
|
+
#ifndef FATROP_BLASFEO_INCLUDED
|
20
|
+
#define FATROP_BLASFEO_INCLUDED
|
21
|
+
|
22
|
+
// macros
|
23
|
+
extern "C"
|
24
|
+
{
|
25
|
+
void blasfeo_ref_drowpe(int kmax, int *ipiv, struct blasfeo_dmat *sA);
|
26
|
+
void blasfeo_ref_drowpei(int kmax, int *ipiv, struct blasfeo_dmat *sA);
|
27
|
+
}
|
28
|
+
#define MAT blasfeo_dmat
|
29
|
+
#define VEC blasfeo_dvec
|
30
|
+
#define MEMSIZE_MAT blasfeo_memsize_dmat
|
31
|
+
#define CREATE_MAT blasfeo_create_dmat
|
32
|
+
// #define ROWPE blasfeo_drowpe
|
33
|
+
#define ROWPE blasfeo_ref_drowpe
|
34
|
+
#define VECPE blasfeo_dvecpe
|
35
|
+
#define VECPEI blasfeo_dvecpei
|
36
|
+
// #define ROWPEI blasfeo_drowpei
|
37
|
+
#define ROWPEI blasfeo_ref_drowpei
|
38
|
+
#define COLPE blasfeo_dcolpe
|
39
|
+
#define COLPEI blasfeo_dcolpei
|
40
|
+
#define CREATE_MAT blasfeo_create_dmat
|
41
|
+
#define MATEL BLASFEO_DMATEL
|
42
|
+
#define ROWSW blasfeo_drowsw
|
43
|
+
#define COLSW blasfeo_dcolsw
|
44
|
+
#define GEAD blasfeo_dgead
|
45
|
+
#define GECP blasfeo_dgecp
|
46
|
+
#define GESC blasfeo_dgesc
|
47
|
+
#define VECCP blasfeo_dveccp
|
48
|
+
#define VECCPSC blasfeo_dveccpsc
|
49
|
+
// #define TRSM_LLNN blasfeo_dtrsm_llnn
|
50
|
+
#define TRSM_RLTN blasfeo_dtrsm_rltn
|
51
|
+
#define VECEL BLASFEO_DVECEL
|
52
|
+
#define MEMSIZE_VEC blasfeo_memsize_dvec
|
53
|
+
#define CREATE_VEC blasfeo_create_dvec
|
54
|
+
#define GEMM_NT blasfeo_dgemm_nt
|
55
|
+
#define GEAD blasfeo_dgead
|
56
|
+
#define SYRK_LN_MN blasfeo_dsyrk_ln_mn
|
57
|
+
#define SYRK_LN blasfeo_dsyrk_ln
|
58
|
+
#define GETR blasfeo_dgetr
|
59
|
+
#define TRTR_L blasfeo_dtrtr_l
|
60
|
+
#define POTRF_L_MN blasfeo_dpotrf_l_mn
|
61
|
+
#define ROWEX blasfeo_drowex
|
62
|
+
#define ROWIN blasfeo_drowin
|
63
|
+
#define COLIN blasfeo_dcolin
|
64
|
+
#define ROWAD fatrop_drowad
|
65
|
+
#define TRSV_LTN blasfeo_dtrsv_ltn
|
66
|
+
#define TRSV_LNN blasfeo_dtrsv_lnn
|
67
|
+
#define TRSV_UTN blasfeo_dtrsv_utn
|
68
|
+
#define GEMV_T blasfeo_dgemv_t
|
69
|
+
#define GEMV_N blasfeo_dgemv_n
|
70
|
+
#define VECSE blasfeo_dvecse
|
71
|
+
#define VECSC blasfeo_dvecsc
|
72
|
+
#define PACKMAT blasfeo_pack_dmat
|
73
|
+
#define UNPACKVEC blasfeo_unpack_dvec
|
74
|
+
#define PACKVEC blasfeo_pack_dvec
|
75
|
+
#define PMAT PermMat
|
76
|
+
#define AXPY blasfeo_daxpy
|
77
|
+
#define AXPBY blasfeo_daxpby
|
78
|
+
#define DOT blasfeo_ddot
|
79
|
+
#define GESE blasfeo_dgese
|
80
|
+
#define DIARE blasfeo_ddiare
|
81
|
+
#define COLSC blasfeo_dcolsc
|
82
|
+
#define VECMUL blasfeo_dvecmul
|
83
|
+
#define VECMULACC blasfeo_dvecmulacc
|
84
|
+
#define GER blasfeo_dger
|
85
|
+
|
86
|
+
// functions not implemented by blasfeo_hp
|
87
|
+
#define GEADTR fatrop_dgead_transposed
|
88
|
+
#define VECCPR fatrop_dveccp_reversed
|
89
|
+
#define ROWAD fatrop_drowad
|
90
|
+
#define TRSV_UNU fatrop_dtrsv_unu
|
91
|
+
#define TRSV_UTU fatrop_dtrsv_utu
|
92
|
+
|
93
|
+
#if defined(BLASFEO_REF_API)
|
94
|
+
#define TRSM_RLNN blasfeo_dtrsm_rlnn
|
95
|
+
#else
|
96
|
+
void blasfeo_ref_dtrsm_rlnn_copy(int m, int n, double alpha, struct MAT *sA, int ai, int aj, struct MAT *sB, int bi, int bj, struct MAT *sD, int di, int dj);
|
97
|
+
#define TRSM_RLNN blasfeo_ref_dtrsm_rlnn_copy
|
98
|
+
#endif
|
99
|
+
|
100
|
+
#ifndef __GNUC__
|
101
|
+
|
102
|
+
#define MAX(a, b) max(a, b)
|
103
|
+
#define MIN(a, b) min(a, b)
|
104
|
+
|
105
|
+
#else
|
106
|
+
|
107
|
+
#define MAX(a, b) \
|
108
|
+
( \
|
109
|
+
{ \
|
110
|
+
__typeof__(a) _a = (a); \
|
111
|
+
__typeof__(b) _b = (b); \
|
112
|
+
_a > _b ? _a : _b; \
|
113
|
+
})
|
114
|
+
#define MIN(a, b) \
|
115
|
+
( \
|
116
|
+
{ \
|
117
|
+
__typeof__(a) _a = (a); \
|
118
|
+
__typeof__(b) _b = (b); \
|
119
|
+
_a < _b ? _a : _b; \
|
120
|
+
})
|
121
|
+
|
122
|
+
#endif
|
123
|
+
|
124
|
+
#include <iostream>
|
125
|
+
extern "C"
|
126
|
+
{
|
127
|
+
#include <blasfeo.h>
|
128
|
+
}
|
129
|
+
#include "fatrop/auxiliary/LinearAlgebra.hpp"
|
130
|
+
#include "fatrop/auxiliary/FatropVector.hpp"
|
131
|
+
#include "fatrop/auxiliary/Common.hpp"
|
132
|
+
#include <cmath>
|
133
|
+
#if DEBUG
|
134
|
+
#include <assert.h>
|
135
|
+
#endif
|
136
|
+
namespace fatrop
|
137
|
+
{
|
138
|
+
void fatrop_dcolsc(fatrop_int kmax, double alpha, struct blasfeo_dmat *sA, fatrop_int ai, fatrop_int aj);
|
139
|
+
// copy elements from sx to sy but in reversed order to avoid aliasing issues in recursion
|
140
|
+
void fatrop_dveccp_reversed(fatrop_int m, struct blasfeo_dvec *sx, fatrop_int xi, struct blasfeo_dvec *sy, fatrop_int yi);
|
141
|
+
// for debugging purposes
|
142
|
+
// void fatrop_potrf_l_mn(fatrop_int m, fatrop_int n, struct blasfeo_dmat *sC, fatrop_int ci, fatrop_int cj, struct blasfeo_dmat *sD, fatrop_int di, fatrop_int dj);
|
143
|
+
void test();
|
144
|
+
/** \brief D <= alpha * B * A^{-1} , with A lower triangular employing explicit inverse of diagonal, fatrop uses its own (naive) implementation since it not implemented yet in blasfeo */
|
145
|
+
void fatrop_dtrsm_rlnn(fatrop_int m, fatrop_int n, double alpha, MAT *sA, fatrop_int offs_ai, fatrop_int offs_aj, MAT *sB, fatrop_int offs_bi, fatrop_int offs_bj, MAT *sD, fatrop_int offs_di, fatrop_int offs_dj);
|
146
|
+
/** \brief D <= alpha * B * A^{-1} , with A lower triangular employing explicit inverse of diagonal, fatrop uses its own (naive) implementation since it not implemented yet in blasfeo */
|
147
|
+
void fatrop_dtrsm_rlnn_alt(fatrop_int m, fatrop_int n, double alpha, MAT *sA, fatrop_int offs_ai, fatrop_int offs_aj, MAT *sB, fatrop_int offs_bi, fatrop_int offs_bj, MAT *sD, fatrop_int offs_di, fatrop_int offs_dj);
|
148
|
+
/** \brief B <= B + alpha*A^T (B is mxn) */
|
149
|
+
void fatrop_dgead_transposed(fatrop_int m, fatrop_int n, double alpha, struct blasfeo_dmat *sA, fatrop_int offs_ai, fatrop_int offs_aj, struct blasfeo_dmat *sB, fatrop_int offs_bi, fatrop_int offs_bj);
|
150
|
+
void fatrop_identity(const fatrop_int m, MAT *sA, const fatrop_int ai, const fatrop_int aj);
|
151
|
+
void fatrop_drowad(fatrop_int kmax, double alpha, struct blasfeo_dvec *sx, fatrop_int xi, struct blasfeo_dmat *sA, fatrop_int ai, fatrop_int aj);
|
152
|
+
/** \brief this class is used for blasfeo matrices*/
|
153
|
+
class FatropMatBF : public FatropMat
|
154
|
+
{
|
155
|
+
public:
|
156
|
+
/** \brief constructor memory still has to be allocated*/
|
157
|
+
FatropMatBF(const fatrop_int nrows, const fatrop_int ncols, const fatrop_int row_offset, const fatrop_int col_offset);
|
158
|
+
/** \brief constructor memory already allocated*/
|
159
|
+
FatropMatBF(const fatrop_int nrows, const fatrop_int ncols, const fatrop_int row_offset, const fatrop_int col_offset, MAT *matbf);
|
160
|
+
/** \brief constructor memory already allocated*/
|
161
|
+
FatropMatBF(MAT *matbf);
|
162
|
+
/** \brief type conversion to blasfeo matrix pointer*/
|
163
|
+
inline explicit operator MAT *() const
|
164
|
+
{
|
165
|
+
return this->mat_;
|
166
|
+
}
|
167
|
+
/** \brief acces to element of matrix */
|
168
|
+
inline double &at(const fatrop_int ai, const fatrop_int aj) const
|
169
|
+
{
|
170
|
+
#if DEBUG
|
171
|
+
assert(ai < nrows_);
|
172
|
+
assert(aj < ncols_);
|
173
|
+
#endif
|
174
|
+
return MATEL(mat_, ai + row_offset_, aj + col_offset_);
|
175
|
+
};
|
176
|
+
/** \brief get element of matrix */
|
177
|
+
inline double get_el(const fatrop_int ai, const fatrop_int aj) const { return this->at(ai, aj); };
|
178
|
+
/** \brief get number of rows */
|
179
|
+
inline fatrop_int nrows() const { return nrows_; };
|
180
|
+
/** \brief get number of cols */
|
181
|
+
inline fatrop_int ncols() const { return ncols_; };
|
182
|
+
/** \brief copies all elements from a given fatrop_matrix to this matrix*/
|
183
|
+
void operator=(const FatropMat &fm);
|
184
|
+
/** \brief set data pointer*/
|
185
|
+
void set_datap(MAT *matbf)
|
186
|
+
{
|
187
|
+
mat_ = matbf;
|
188
|
+
}
|
189
|
+
/** \brief take a block of size (p,q), starting at (i,j)*/
|
190
|
+
FatropMatBF block(const fatrop_int i, const fatrop_int j, const fatrop_int p, const fatrop_int q) const
|
191
|
+
{
|
192
|
+
return FatropMatBF(p, q, row_offset_ + i, col_offset_ + j, this->mat_);
|
193
|
+
}
|
194
|
+
|
195
|
+
private:
|
196
|
+
MAT *mat_ = NULL;
|
197
|
+
const fatrop_int row_offset_;
|
198
|
+
const fatrop_int col_offset_;
|
199
|
+
const fatrop_int nrows_;
|
200
|
+
const fatrop_int ncols_;
|
201
|
+
};
|
202
|
+
|
203
|
+
class MATBF
|
204
|
+
{
|
205
|
+
public:
|
206
|
+
MATBF(const int m, const int n) : m_(m), n_(n)
|
207
|
+
{
|
208
|
+
blasfeo_allocate_dmat(m_, n_, &mat_);
|
209
|
+
}
|
210
|
+
MATBF(MATBF &&other) : m_(other.m_), n_(other.n_)
|
211
|
+
{
|
212
|
+
mat_ = other.mat_;
|
213
|
+
other.mat_.pA = nullptr;
|
214
|
+
other.mat_.mem = nullptr;
|
215
|
+
other.mat_.dA = nullptr;
|
216
|
+
}
|
217
|
+
~MATBF()
|
218
|
+
{
|
219
|
+
blasfeo_free_dmat(&mat_);
|
220
|
+
}
|
221
|
+
operator MAT *()
|
222
|
+
{
|
223
|
+
return &mat_;
|
224
|
+
}
|
225
|
+
MAT mat_;
|
226
|
+
const int m_;
|
227
|
+
const int n_;
|
228
|
+
};
|
229
|
+
|
230
|
+
class VECBF
|
231
|
+
{
|
232
|
+
public:
|
233
|
+
VECBF(const int m) : m_(m)
|
234
|
+
{
|
235
|
+
blasfeo_allocate_dvec(m_, &vec_);
|
236
|
+
// zero out vector
|
237
|
+
blasfeo_dvecse(m_, 0.0, &vec_, 0);
|
238
|
+
}
|
239
|
+
VECBF(VECBF &&other) : m_(other.m_)
|
240
|
+
{
|
241
|
+
vec_ = other.vec_;
|
242
|
+
other.vec_.pa = nullptr;
|
243
|
+
other.vec_.mem = nullptr;
|
244
|
+
}
|
245
|
+
~VECBF()
|
246
|
+
{
|
247
|
+
blasfeo_free_dvec(&vec_);
|
248
|
+
}
|
249
|
+
operator VEC *()
|
250
|
+
{
|
251
|
+
return &vec_;
|
252
|
+
}
|
253
|
+
bool has_inf()
|
254
|
+
{
|
255
|
+
for (int i = 0; i < m_; i++)
|
256
|
+
{
|
257
|
+
if (std::isinf(VECEL(&vec_, i)))
|
258
|
+
{
|
259
|
+
return true;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
return false;
|
263
|
+
}
|
264
|
+
VEC vec_;
|
265
|
+
const int m_;
|
266
|
+
};
|
267
|
+
|
268
|
+
/** \brief this class is used for the allocation of a blasfeo matrix, the dimsensions are set from a vector */
|
269
|
+
class FatropMemoryMatBF
|
270
|
+
{
|
271
|
+
public:
|
272
|
+
/** \brief constuction for allocation on fatrop_memory_allocator*/
|
273
|
+
FatropMemoryMatBF(const FatropVector<fatrop_int> &nrows, const FatropVector<fatrop_int> &ncols, fatrop_int N);
|
274
|
+
// TODO: if rvalue-reference is used -> unecessary copy, use move sementics instead.;
|
275
|
+
FatropMemoryMatBF(const fatrop_int nrows, const fatrop_int ncols, fatrop_int N);
|
276
|
+
/** \brief calculate memory size*/
|
277
|
+
fatrop_int memory_size() const;
|
278
|
+
/** \brief set up memory element and advance pointer */
|
279
|
+
void set_up();
|
280
|
+
/** \brief get fatrop matrix bf */
|
281
|
+
FatropMatBF operator[](const fatrop_int N) const;
|
282
|
+
/** \brief get first blasfeo_xmat* struct */
|
283
|
+
explicit operator MAT *() const
|
284
|
+
{
|
285
|
+
return mat;
|
286
|
+
}
|
287
|
+
FatropMemoryMatBF(const FatropMemoryMatBF &cpy) = delete;
|
288
|
+
FatropMemoryMatBF &operator=(const FatropMemoryMatBF &) = delete;
|
289
|
+
~FatropMemoryMatBF();
|
290
|
+
|
291
|
+
private:
|
292
|
+
void *mem = NULL;
|
293
|
+
MAT *mat;
|
294
|
+
const fatrop_int N_;
|
295
|
+
const FatropVector<fatrop_int> nrows_;
|
296
|
+
const FatropVector<fatrop_int> ncols_;
|
297
|
+
};
|
298
|
+
/** this class is used for blasfeo vectors*/
|
299
|
+
class FatropVecBF : public FatropVec
|
300
|
+
{
|
301
|
+
public:
|
302
|
+
/** \brief constructor memory still has to be allocated*/
|
303
|
+
FatropVecBF(const fatrop_int nels, const fatrop_int offset);
|
304
|
+
/** \brief constructor memory already allocated*/
|
305
|
+
FatropVecBF(const fatrop_int nels, const fatrop_int offset, VEC *vecbf);
|
306
|
+
/** \brief type conversion to blasfeo vector pointer*/
|
307
|
+
explicit operator VEC *() const;
|
308
|
+
/** \brief access to element of matrix */
|
309
|
+
inline double &at(const fatrop_int ai) const
|
310
|
+
{
|
311
|
+
#if DEBUG
|
312
|
+
assert(ai < nels_);
|
313
|
+
#endif
|
314
|
+
return VECEL(vec_, ai + offset_);
|
315
|
+
};
|
316
|
+
/** \brief get element of vector */
|
317
|
+
double get_el(const fatrop_int ai) const;
|
318
|
+
/** \brief get number of elements */
|
319
|
+
fatrop_int nels() const;
|
320
|
+
/** \brief get offset */
|
321
|
+
fatrop_int offset() const;
|
322
|
+
/** \brief copies all elements from a given fatrop_vector to this vector*/
|
323
|
+
void operator=(const FatropVec &fm);
|
324
|
+
void operator=(const double &val)
|
325
|
+
{
|
326
|
+
blasfeo_dvecse(nels(), val, vec_, offset());
|
327
|
+
}
|
328
|
+
|
329
|
+
void copy(const FatropVecBF &fm) const;
|
330
|
+
void copyto(std::vector<double> &dest) const;
|
331
|
+
void operator=(const std::vector<double> &fm);
|
332
|
+
/** \brief set data pointer*/
|
333
|
+
void set_datap(VEC *vecbf);
|
334
|
+
/** \brief take a block of size (p), starting at (i)*/
|
335
|
+
FatropVecBF block(const fatrop_int i, const fatrop_int p) const;
|
336
|
+
void SwapWith(FatropVecBF &vb);
|
337
|
+
void SetConstant(double constant) const;
|
338
|
+
friend double sum(const FatropVecBF &va)
|
339
|
+
{
|
340
|
+
double ret = 0.0;
|
341
|
+
for (int i = 0; i < va.nels(); i++)
|
342
|
+
{
|
343
|
+
ret += va.at(i);
|
344
|
+
}
|
345
|
+
return ret;
|
346
|
+
}
|
347
|
+
bool has_inf() const
|
348
|
+
{
|
349
|
+
for (int i = 0; i < nels(); i++)
|
350
|
+
{
|
351
|
+
if (std::isinf(VECEL(vec_, i)))
|
352
|
+
{
|
353
|
+
return true;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
return false;
|
357
|
+
}
|
358
|
+
bool has_nan() const
|
359
|
+
{
|
360
|
+
for (int i = 0; i < nels(); i++)
|
361
|
+
{
|
362
|
+
if (std::isnan(VECEL(vec_, i)))
|
363
|
+
{
|
364
|
+
return true;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
return false;
|
368
|
+
}
|
369
|
+
|
370
|
+
protected:
|
371
|
+
VEC *vec_ = NULL;
|
372
|
+
const fatrop_int offset_;
|
373
|
+
const fatrop_int nels_;
|
374
|
+
};
|
375
|
+
|
376
|
+
void axpy(const double alpha, const FatropVecBF &va, const FatropVecBF &vb, const FatropVecBF &vc);
|
377
|
+
void copy(const FatropVecBF &va, const FatropVecBF &vb);
|
378
|
+
void axpby(const double alpha, const FatropVecBF &va, const double beta, const FatropVecBF &vb, const FatropVecBF &vc);
|
379
|
+
double dot(const FatropVecBF &va, FatropVecBF &vb);
|
380
|
+
double Linf(const FatropVecBF &va);
|
381
|
+
double LinfScaled(const FatropVecBF &va, const FatropVecBF &scales);
|
382
|
+
double minabs(const FatropVecBF &va);
|
383
|
+
double L1(const FatropVecBF &va);
|
384
|
+
double sumsqr(const FatropVecBF &va);
|
385
|
+
|
386
|
+
/** \brief this class is used for the allocation of a blasfeo vector, the dimsensions are set from a vector */
|
387
|
+
class FatropMemoryVecBF
|
388
|
+
{
|
389
|
+
public:
|
390
|
+
/** \brief constuction for allocation on MemoryAllocator*/
|
391
|
+
FatropMemoryVecBF(const FatropVector<fatrop_int> &nels, fatrop_int N);
|
392
|
+
// TODO: if rvalue-reference is used -> unecessary copy, use move sementics instead.;
|
393
|
+
FatropMemoryVecBF(const fatrop_int nels, fatrop_int N = 1);
|
394
|
+
/** \brief calculate memory size*/
|
395
|
+
fatrop_int memory_size() const;
|
396
|
+
/** \brief set up memory element and advance pointer */
|
397
|
+
void set_up();
|
398
|
+
/** \brief get fatrop matrix bf */
|
399
|
+
FatropVecBF operator[](const fatrop_int N) const;
|
400
|
+
/** \brief get first blasfeo_xmat* struct */
|
401
|
+
explicit operator VEC *() const
|
402
|
+
{
|
403
|
+
return vec;
|
404
|
+
}
|
405
|
+
FatropMemoryVecBF(const FatropMemoryVecBF &cpy) = delete;
|
406
|
+
FatropMemoryVecBF &operator=(const FatropMemoryVecBF &) = delete;
|
407
|
+
~FatropMemoryVecBF();
|
408
|
+
|
409
|
+
private:
|
410
|
+
void *mem = NULL;
|
411
|
+
VEC *vec;
|
412
|
+
const fatrop_int N_;
|
413
|
+
const FatropVector<fatrop_int> nels_;
|
414
|
+
};
|
415
|
+
|
416
|
+
/** \brief this class represents a permutation matrix */
|
417
|
+
class PermMat : public FatropMat
|
418
|
+
{
|
419
|
+
public:
|
420
|
+
/** \brief constructor memory still has to be allocated */
|
421
|
+
PermMat(const fatrop_int dim);
|
422
|
+
;
|
423
|
+
/** \brief constructor memory already allocated */
|
424
|
+
PermMat(const fatrop_int dim, fatrop_int *data);
|
425
|
+
;
|
426
|
+
/** \brief get number of rows */
|
427
|
+
fatrop_int nrows() const { return dim_; };
|
428
|
+
/** \brief get number of columns */
|
429
|
+
fatrop_int ncols() const { return dim_; };
|
430
|
+
/** \brief get element of matrix represented by this permutation matrix - only used for debugging and testing purposes */
|
431
|
+
double get_el(const fatrop_int ai, const fatrop_int aj) const;
|
432
|
+
void print(const fatrop_int kmax) const;
|
433
|
+
/** \brief set data pointer*/
|
434
|
+
void set_datap(fatrop_int *data);
|
435
|
+
/** \brief set data point*/
|
436
|
+
void set_datap(const fatrop_int i, const fatrop_int val);
|
437
|
+
/** \brief apply row permutation*/
|
438
|
+
void PM(const fatrop_int kmax, MAT *M) const;
|
439
|
+
/** \brief apply vec permutation*/
|
440
|
+
void PV(const fatrop_int kmax, VEC *V, const fatrop_int offs) const;
|
441
|
+
/** \brief apply vec permutation*/
|
442
|
+
void PtV(const fatrop_int kmax, VEC *V, const fatrop_int offs) const;
|
443
|
+
/** \brief apply row permutation on partial matrix*/
|
444
|
+
void PM(const fatrop_int kmax, const fatrop_int n, MAT *M, const fatrop_int ai, const fatrop_int aj) const;
|
445
|
+
/** \brief apply inverse row permutation*/
|
446
|
+
void
|
447
|
+
PtM(const fatrop_int kmax, MAT *M) const;
|
448
|
+
/** \brief apply inverse col permutation*/
|
449
|
+
void MP(const fatrop_int kmax, MAT *M) const;
|
450
|
+
/** \brief apply col permutation*/
|
451
|
+
void MPt(const fatrop_int kmax, MAT *M) const;
|
452
|
+
/** fatrop_int pointer of permutation vector */
|
453
|
+
explicit operator fatrop_int *() { return data_; };
|
454
|
+
|
455
|
+
// private:
|
456
|
+
const fatrop_int dim_;
|
457
|
+
fatrop_int *data_ = NULL;
|
458
|
+
};
|
459
|
+
|
460
|
+
/** \brief this class is used for the allocation of a permutation matrix */
|
461
|
+
class MemoryPermMat : public PermMat
|
462
|
+
{
|
463
|
+
public:
|
464
|
+
/** \brief constructor */
|
465
|
+
MemoryPermMat(const fatrop_int dim, const fatrop_int N);
|
466
|
+
/** \brief calculate needed memory size*/
|
467
|
+
fatrop_int memory_size() const;
|
468
|
+
/** \brief set up memory*/
|
469
|
+
void set_up();
|
470
|
+
explicit operator PermMat *()
|
471
|
+
{
|
472
|
+
return perm_p;
|
473
|
+
};
|
474
|
+
MemoryPermMat(const MemoryPermMat &cpy) = delete;
|
475
|
+
MemoryPermMat &operator=(const MemoryPermMat &) = delete;
|
476
|
+
~MemoryPermMat();
|
477
|
+
|
478
|
+
private:
|
479
|
+
void *mem = NULL;
|
480
|
+
const fatrop_int dim_;
|
481
|
+
const fatrop_int N_;
|
482
|
+
PermMat *perm_p;
|
483
|
+
};
|
484
|
+
MatrixInd max_el(fatrop_int m, fatrop_int n, MAT *matr, fatrop_int ai, fatrop_int aj);
|
485
|
+
|
486
|
+
/** \brief Function to calculate LU factorization result is saved in A, L is lower unitriangular */
|
487
|
+
void LU_FACT(const fatrop_int m, const fatrop_int n, const fatrop_int n_max, fatrop_int &rank, MAT *A, PMAT *Pl_p, PMAT *Pr_p, double tol = 1e-8);
|
488
|
+
/** \brief Function to calculate LU factorization but A, and result (L and U) are transposed, all indices refer to the dimensions of the original A matrix (and not the transposed one) */
|
489
|
+
void LU_FACT_transposed(const fatrop_int m, const fatrop_int n, const fatrop_int n_max, fatrop_int &rank, MAT *At, PMAT *Pl_p, PMAT *Pr_p, double tol = 1e-5);
|
490
|
+
void fatrop_dtrsv_unu(const fatrop_int m, const fatrop_int n, blasfeo_dmat *sA, const fatrop_int ai, const fatrop_int aj, blasfeo_dvec *sx, const fatrop_int xi, blasfeo_dvec *sz, const fatrop_int zi);
|
491
|
+
void fatrop_dtrsv_utu(const fatrop_int m, blasfeo_dmat *sA, const fatrop_int ai, const fatrop_int aj, blasfeo_dvec *sx, const fatrop_int xi, blasfeo_dvec *sz, const fatrop_int zi);
|
492
|
+
} // namespace fatrop
|
493
|
+
#endif // FATROP_BLASFEO_INCLUDED
|
@@ -0,0 +1,39 @@
|
|
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
|
+
#ifndef FATROP_INCLUDED
|
20
|
+
#define FATROP_INCLUDED
|
21
|
+
#include "fatrop/ocp/StageOCPApplication.hpp"
|
22
|
+
// #include "fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp"
|
23
|
+
// #include "fatrop/ocp/OCPKKT.hpp"
|
24
|
+
// #include "fatrop/ocp/OCPAdapter.hpp"
|
25
|
+
// #include "fatrop/ocp/OCPAbstact.hpp"
|
26
|
+
// #include "fatrop/auxiliary/FatropVector.hpp"
|
27
|
+
// #include "fatrop/solver/FatropAlg.hpp"
|
28
|
+
// #include "fatrop/solver/FatropData.hpp"
|
29
|
+
// #include "fatrop/ocp/OCPScalingMethod.hpp"
|
30
|
+
// #include "fatrop/ocp/OCPNoScaling.hpp"
|
31
|
+
// #include "fatrop/solver/AlgStrategy.hpp"
|
32
|
+
// #include "fatrop/solver/FatropOptions.hpp"
|
33
|
+
// #include "fatrop/function_evaluation/CasadiCodegen.hpp"
|
34
|
+
// #include "fatrop/solver/AlgBuilder.hpp"
|
35
|
+
// #include "fatrop/ocp/StageOCPApplication.hpp"
|
36
|
+
// #include "fatrop/ocp/FatropOCPBuilder.hpp"
|
37
|
+
|
38
|
+
// #include "SparseSolvers/InterfaceMUMPS.hpp"
|
39
|
+
#endif //FATROP_INCLUDED
|
@@ -0,0 +1,104 @@
|
|
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
|
+
#ifndef CASADICODEGENINCLUDED
|
20
|
+
#define CASADICODEGENINCLUDED
|
21
|
+
#include <vector>
|
22
|
+
#include <string>
|
23
|
+
#include <memory>
|
24
|
+
#include "FunctionEvaluation.hpp"
|
25
|
+
#include "fatrop/auxiliary/DynamicLib.hpp"
|
26
|
+
|
27
|
+
#ifdef ENABLE_MULTITHREADING
|
28
|
+
#include <omp.h>
|
29
|
+
#endif
|
30
|
+
|
31
|
+
/* Typedefs */
|
32
|
+
typedef long long int casadi_int;
|
33
|
+
typedef void (*signal_t)(void);
|
34
|
+
typedef casadi_int (*getint_t)(void);
|
35
|
+
typedef int (*work_t)(casadi_int *sz_arg, casadi_int *sz_res, casadi_int *sz_iw, casadi_int *sz_w);
|
36
|
+
typedef const casadi_int *(*sparsity_t)(casadi_int ind);
|
37
|
+
typedef int (*eval_t)(const double **arg, double **res, casadi_int *iw, double *w, int mem);
|
38
|
+
typedef int (*casadi_checkout_t)(void);
|
39
|
+
typedef void (*casadi_release_t)(int);
|
40
|
+
namespace fatrop
|
41
|
+
{
|
42
|
+
class EvalCasGen : public EvalBase
|
43
|
+
{
|
44
|
+
public:
|
45
|
+
EvalCasGen();
|
46
|
+
/// constructor from file
|
47
|
+
EvalCasGen(const std::shared_ptr<DLHandler> &handle, const std::string &function_name);
|
48
|
+
EvalCasGen(
|
49
|
+
const signal_t incref,
|
50
|
+
const signal_t decref,
|
51
|
+
const casadi_checkout_t checkout,
|
52
|
+
const casadi_release_t release,
|
53
|
+
const getint_t n_in_fcn,
|
54
|
+
const getint_t n_out_fcn,
|
55
|
+
const sparsity_t sp_in,
|
56
|
+
const sparsity_t sp_out,
|
57
|
+
const work_t work,
|
58
|
+
const eval_t eval);
|
59
|
+
/// pointer to result_buffer
|
60
|
+
#ifndef ENABLE_MULTITHREADING
|
61
|
+
// double *output_buffer_p;
|
62
|
+
#else
|
63
|
+
// std::vector<double *> output_buffer_p = std::vector<double *>(omp_get_max_threads());
|
64
|
+
#endif
|
65
|
+
/// pointer to casadi codegen evalutation function
|
66
|
+
eval_t eval; // !! multhithreading of this function not yet supported
|
67
|
+
/// casadi int work vector
|
68
|
+
casadi_int *iw;
|
69
|
+
/// casadi double work vector
|
70
|
+
double *w;
|
71
|
+
/// increase reference counter
|
72
|
+
signal_t incref;
|
73
|
+
/// decrease reference counter
|
74
|
+
signal_t decref;
|
75
|
+
/// input size
|
76
|
+
int *input_size;
|
77
|
+
/// release casadi memory
|
78
|
+
casadi_release_t release;
|
79
|
+
/// thread local mem id
|
80
|
+
int mem;
|
81
|
+
/// double work vector
|
82
|
+
#ifndef ENABLE_MULTITHREADING
|
83
|
+
std::vector<double> work_vector_d;
|
84
|
+
std::vector<double*> res_vec;
|
85
|
+
std::vector<const double*> arg_vec;
|
86
|
+
/// int work vector
|
87
|
+
std::vector<casadi_int> work_vector_i;
|
88
|
+
#else
|
89
|
+
std::vector<std::vector<double>> work_vector_d;
|
90
|
+
std::vector<std::vector<double*>> res_vec;
|
91
|
+
std::vector<std::vector<const double*>> arg_vec;
|
92
|
+
std::vector<std::vector<casadi_int>> work_vector_i;
|
93
|
+
#endif
|
94
|
+
/// evaluate function and save res in "ccs format with lda==out_m"
|
95
|
+
int eval_buffer(const double **arg);
|
96
|
+
/// for reference counting of handle pointer
|
97
|
+
std::shared_ptr<DLHandler> handle;
|
98
|
+
~EvalCasGen();
|
99
|
+
};
|
100
|
+
// define a macro that instantiates an EvalCasGen object with a given name
|
101
|
+
|
102
|
+
} // fatrop
|
103
|
+
|
104
|
+
#endif // CASADICODEGENINCLUDED
|
@@ -0,0 +1,60 @@
|
|
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
|
+
#ifndef FUNCTIONEVALUATIONINCLUDED
|
20
|
+
#define FUNCTIONEVALUATIONINCLUDED
|
21
|
+
#include <vector>
|
22
|
+
#include <cstring>
|
23
|
+
#include "fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp"
|
24
|
+
#include "fatrop/auxiliary/Common.hpp"
|
25
|
+
|
26
|
+
#ifdef ENABLE_MULTITHREADING
|
27
|
+
#include <omp.h>
|
28
|
+
#endif
|
29
|
+
|
30
|
+
namespace fatrop
|
31
|
+
{
|
32
|
+
/// Class used to evaluate a numerical functions. Functions can be implemented by hand or casadi codegen API or by plain casadi.
|
33
|
+
class EvalBase
|
34
|
+
{
|
35
|
+
public:
|
36
|
+
/// number of input vectors of the function
|
37
|
+
fatrop_int n_in;
|
38
|
+
/// number of columns in output matrix
|
39
|
+
fatrop_int out_m;
|
40
|
+
/// number of rows in output matrix
|
41
|
+
fatrop_int out_n;
|
42
|
+
/// number of nonzeros in output matrix
|
43
|
+
fatrop_int out_nnz;
|
44
|
+
/// sparsity pattern of output matrix sparsity pattern [m,n|0,ncol0, ncol0:1 , ..., | nnz | row_el0, row_el1, ...]
|
45
|
+
std::vector<fatrop_int> sparsity_out;
|
46
|
+
/// buffer to safe evaluation result, in a buffer we always save a matrix in CCS format with lda==out_m
|
47
|
+
#ifndef ENABLE_MULTITHREADING
|
48
|
+
std::vector<double> buffer;
|
49
|
+
#else
|
50
|
+
std::vector<std::vector<double>> buffer = std::vector<std::vector<double>>(omp_get_max_threads());
|
51
|
+
#endif
|
52
|
+
/// evaluate function and save res in "ccs format with lda==out_m"
|
53
|
+
virtual fatrop_int eval_buffer(const double **arg) = 0;
|
54
|
+
/// evaluate function and save res in "blasfeo format"
|
55
|
+
fatrop_int eval_bf(const double **arg, MAT *bf_mat);
|
56
|
+
fatrop_int eval_array(const double **arg, double *array);
|
57
|
+
~EvalBase(){};
|
58
|
+
};
|
59
|
+
}; // namespace fatrop
|
60
|
+
#endif // FUNCTIONEVALUATIONINCLUDED
|