casadi 3.6.4__cp37-none-manylinux2014_i686.whl → 3.6.6__cp37-none-manylinux2014_i686.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 +984 -500
- 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 +33 -15
- 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 +13 -0
- casadi/include/casadi/core/casadi_types.hpp +3 -2
- casadi/include/casadi/core/code_generator.hpp +59 -2
- casadi/include/casadi/core/core.hpp +1 -0
- casadi/include/casadi/core/generic_expression.hpp +1 -1
- casadi/include/casadi/core/generic_type.hpp +25 -1
- casadi/include/casadi/core/global_options.hpp +2 -0
- casadi/include/casadi/core/matrix_decl.hpp +15 -0
- casadi/include/casadi/core/mx.hpp +13 -3
- casadi/include/casadi/core/optistack.hpp +23 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +133 -6
- 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/runtime/casadi_sqpmethod.hpp +11 -1
- casadi/include/casadi/core/serializing_stream.hpp +2 -2
- casadi/include/casadi/core/sparsity.hpp +12 -3
- casadi/include/casadi/core/tools.hpp +67 -0
- casadi/include/casadi/doc.i +2283 -1491
- casadi/include/casadi/doc_merged.i +1522 -1065
- casadi/include/casadi/mem.h +1 -0
- casadi/include/coin-or/IpAlgBuilder.hpp +417 -0
- casadi/include/coin-or/IpAlgStrategy.hpp +201 -0
- casadi/include/coin-or/IpAlgTypes.hpp +64 -0
- casadi/include/coin-or/IpAugSystemSolver.hpp +212 -0
- casadi/include/coin-or/IpBlas.hpp +426 -0
- casadi/include/coin-or/IpCachedResults.hpp +897 -0
- casadi/include/coin-or/IpCompoundMatrix.hpp +423 -0
- casadi/include/coin-or/IpCompoundSymMatrix.hpp +348 -0
- casadi/include/coin-or/IpCompoundVector.hpp +395 -0
- casadi/include/coin-or/IpConvCheck.hpp +97 -0
- casadi/include/coin-or/IpDebug.hpp +167 -0
- casadi/include/coin-or/IpDenseVector.hpp +626 -0
- casadi/include/coin-or/IpDiagMatrix.hpp +158 -0
- casadi/include/coin-or/IpEqMultCalculator.hpp +76 -0
- casadi/include/coin-or/IpException.hpp +156 -0
- casadi/include/coin-or/IpExpansionMatrix.hpp +245 -0
- casadi/include/coin-or/IpGenTMatrix.hpp +290 -0
- casadi/include/coin-or/IpHessianUpdater.hpp +73 -0
- casadi/include/coin-or/IpIdentityMatrix.hpp +167 -0
- casadi/include/coin-or/IpIpoptAlg.hpp +257 -0
- casadi/include/coin-or/IpIpoptApplication.hpp +367 -0
- casadi/include/coin-or/IpIpoptCalculatedQuantities.hpp +1009 -0
- casadi/include/coin-or/IpIpoptData.hpp +966 -0
- casadi/include/coin-or/IpIpoptNLP.hpp +328 -0
- casadi/include/coin-or/IpIterateInitializer.hpp +68 -0
- casadi/include/coin-or/IpIteratesVector.hpp +840 -0
- casadi/include/coin-or/IpIterationOutput.hpp +78 -0
- casadi/include/coin-or/IpJournalist.hpp +573 -0
- casadi/include/coin-or/IpLapack.hpp +227 -0
- casadi/include/coin-or/IpLibraryLoader.hpp +76 -0
- casadi/include/coin-or/IpLineSearch.hpp +106 -0
- casadi/include/coin-or/IpLinearSolvers.h +46 -0
- casadi/include/coin-or/IpMatrix.hpp +434 -0
- casadi/include/coin-or/IpMuUpdate.hpp +77 -0
- casadi/include/coin-or/IpNLP.hpp +306 -0
- casadi/include/coin-or/IpNLPScaling.hpp +582 -0
- casadi/include/coin-or/IpObserver.hpp +422 -0
- casadi/include/coin-or/IpOptionsList.hpp +412 -0
- casadi/include/coin-or/IpOrigIpoptNLP.hpp +603 -0
- casadi/include/coin-or/IpPDSystemSolver.hpp +137 -0
- casadi/include/coin-or/IpReferenced.hpp +262 -0
- casadi/include/coin-or/IpRegOptions.hpp +1152 -0
- casadi/include/coin-or/IpReturnCodes.h +23 -0
- casadi/include/coin-or/IpReturnCodes.hpp +18 -0
- casadi/include/coin-or/IpReturnCodes.inc +71 -0
- casadi/include/coin-or/IpReturnCodes_inc.h +45 -0
- casadi/include/coin-or/IpScaledMatrix.hpp +291 -0
- casadi/include/coin-or/IpSearchDirCalculator.hpp +72 -0
- casadi/include/coin-or/IpSmartPtr.hpp +865 -0
- casadi/include/coin-or/IpSolveStatistics.hpp +210 -0
- casadi/include/coin-or/IpSparseSymLinearSolverInterface.hpp +260 -0
- casadi/include/coin-or/IpStdAugSystemSolver.cpp +555 -0
- casadi/include/coin-or/IpStdCInterface.h +428 -0
- casadi/include/coin-or/IpSumSymMatrix.hpp +186 -0
- casadi/include/coin-or/IpSymLinearSolver.hpp +141 -0
- casadi/include/coin-or/IpSymMatrix.hpp +167 -0
- casadi/include/coin-or/IpSymScaledMatrix.hpp +255 -0
- casadi/include/coin-or/IpSymTMatrix.hpp +275 -0
- casadi/include/coin-or/IpTNLP.hpp +820 -0
- casadi/include/coin-or/IpTNLPAdapter.hpp +648 -0
- casadi/include/coin-or/IpTNLPReducer.hpp +274 -0
- casadi/include/coin-or/IpTaggedObject.hpp +128 -0
- casadi/include/coin-or/IpTimedTask.hpp +218 -0
- casadi/include/coin-or/IpTimingStatistics.hpp +323 -0
- casadi/include/coin-or/IpTripletHelper.hpp +308 -0
- casadi/include/coin-or/IpTypes.h +81 -0
- casadi/include/coin-or/IpTypes.hpp +30 -0
- casadi/include/coin-or/IpUtils.hpp +166 -0
- casadi/include/coin-or/IpVector.hpp +892 -0
- casadi/include/coin-or/IpZeroSymMatrix.hpp +155 -0
- casadi/include/coin-or/IpoptConfig.h +45 -0
- casadi/include/coin-or/SensAlgorithm.hpp +114 -0
- casadi/include/coin-or/SensApplication.hpp +188 -0
- casadi/include/coin-or/SensBacksolver.hpp +36 -0
- casadi/include/coin-or/SensMeasurement.hpp +56 -0
- casadi/include/coin-or/SensPCalculator.hpp +137 -0
- casadi/include/coin-or/SensRegOp.hpp +21 -0
- casadi/include/coin-or/SensSchurData.hpp +182 -0
- casadi/include/coin-or/SensSchurDriver.hpp +118 -0
- casadi/include/coin-or/SensSimpleBacksolver.hpp +49 -0
- casadi/include/coin-or/SensStepCalc.hpp +85 -0
- casadi/include/coin-or/SensUtils.hpp +63 -0
- casadi/include/coin-or/metis/defs.h +161 -0
- casadi/include/coin-or/metis/macros.h +143 -0
- casadi/include/coin-or/metis/metis.h +37 -0
- casadi/include/coin-or/metis/proto.h +505 -0
- casadi/include/coin-or/metis/rename.h +418 -0
- casadi/include/coin-or/metis/struct.h +251 -0
- casadi/include/coin-or/mumps/dmumps_c.h +142 -0
- casadi/include/coin-or/mumps/mumps_c_types.h +72 -0
- casadi/include/coin-or/mumps/mumps_compat.h +27 -0
- casadi/include/coin-or/mumps/mumps_int_def.h +11 -0
- casadi/include/coin-or/mumps/mumps_mpi.h +67 -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/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/licenses/daqp-external/LICENSE +21 -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/lib/libtinyxml2.a +0 -0
- casadi/libCbc.so +0 -0
- casadi/libCbc.so.3 +0 -0
- casadi/libCbc.so.3.10.11 +0 -0
- casadi/libCbcSolver.so +0 -0
- casadi/libCbcSolver.so.3 +0 -0
- casadi/libCbcSolver.so.3.10.11 +0 -0
- casadi/libCgl.so +0 -0
- casadi/libCgl.so.1 +0 -0
- casadi/libCgl.so.1.10.8 +0 -0
- casadi/libClp.so +0 -0
- casadi/libClp.so.1 +0 -0
- casadi/libClp.so.1.14.9 +0 -0
- casadi/libClpSolver.so +0 -0
- casadi/libClpSolver.so.1 +0 -0
- casadi/libClpSolver.so.1.14.9 +0 -0
- casadi/libCoinUtils.so +0 -0
- casadi/libCoinUtils.so.3 +0 -0
- casadi/libCoinUtils.so.3.11.10 +0 -0
- casadi/libOsi.so +0 -0
- casadi/libOsi.so.1 +0 -0
- casadi/libOsi.so.1.13.9 +0 -0
- casadi/libOsiCbc.so +0 -0
- casadi/libOsiCbc.so.3 +0 -0
- casadi/libOsiCbc.so.3.10.11 +0 -0
- casadi/libOsiClp.so +0 -0
- casadi/libOsiClp.so.1 +0 -0
- casadi/libOsiClp.so.1.14.9 +0 -0
- casadi/libOsiCommonTests.so +0 -0
- casadi/libOsiCommonTests.so.1 +0 -0
- casadi/libOsiCommonTests.so.1.13.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_daqp.so +0 -0
- casadi/libcasadi_conic_daqp.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_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_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/libdaqp.so +0 -0
- casadi/libdaqpstat.a +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/libipopt.so +0 -0
- casadi/libipopt.so.3 +0 -0
- casadi/libipopt.so.3.14.11 +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/libsipopt.so +0 -0
- casadi/libsipopt.so.3 +0 -0
- casadi/libsipopt.so.3.14.11 +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.4.dist-info → casadi-3.6.6.dist-info}/METADATA +12 -4
- {casadi-3.6.4.dist-info → casadi-3.6.6.dist-info}/RECORD +490 -281
- 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.4.dist-info → casadi-3.6.6.dist-info}/WHEEL +0 -0
@@ -306,15 +306,23 @@ namespace casadi {
|
|
306
306
|
\identifier{qp} */
|
307
307
|
std::vector<MX> primitives() const;
|
308
308
|
|
309
|
+
/// @{
|
309
310
|
/** \brief Split up an expression along symbolic primitives
|
310
311
|
|
311
312
|
\identifier{qq} */
|
312
313
|
std::vector<MX> split_primitives(const MX& x) const;
|
314
|
+
std::vector<SX> split_primitives(const SX& x) const;
|
315
|
+
std::vector<DM> split_primitives(const DM& x) const;
|
316
|
+
/// @}
|
313
317
|
|
318
|
+
/// @{
|
314
319
|
/** \brief Join an expression along symbolic primitives
|
315
320
|
|
316
321
|
\identifier{qr} */
|
317
322
|
MX join_primitives(const std::vector<MX>& v) const;
|
323
|
+
SX join_primitives(const std::vector<SX>& v) const;
|
324
|
+
DM join_primitives(const std::vector<DM>& v) const;
|
325
|
+
/// @}
|
318
326
|
|
319
327
|
/// \cond INTERNAL
|
320
328
|
/** \brief Detect duplicate symbolic expressions
|
@@ -655,6 +663,7 @@ namespace casadi {
|
|
655
663
|
static MX convexify(const MX& H, const Dict& opts = Dict());
|
656
664
|
static MX stop_diff(const MX& expr, casadi_int order);
|
657
665
|
static MX stop_diff(const MX& expr, const MX& var, casadi_int order);
|
666
|
+
static std::vector<MX> difference(const std::vector<MX>& a, const std::vector<MX>& b);
|
658
667
|
///@}
|
659
668
|
/// \endcond
|
660
669
|
|
@@ -836,13 +845,14 @@ namespace casadi {
|
|
836
845
|
return MX::stop_diff(expr, var, order);
|
837
846
|
}
|
838
847
|
|
848
|
+
/** \bried Return all elements of a that do not occur in b, preserving order */
|
849
|
+
inline friend std::vector<MX> difference(const std::vector<MX>& a, const std::vector<MX>& b) {
|
850
|
+
return MX::difference(a, b);
|
851
|
+
}
|
839
852
|
|
840
853
|
/** @} */
|
841
854
|
#endif // SWIG
|
842
855
|
|
843
|
-
/** \bried Return all elements of a that do not occur in b, preserving order */
|
844
|
-
friend std::vector<MX> difference(const std::vector<MX>& a, const std::vector<MX>& b);
|
845
|
-
|
846
856
|
/** \brief returns itself, but with an assertion attached
|
847
857
|
*
|
848
858
|
* If y does not evaluate to 1, a runtime error is raised
|
@@ -200,6 +200,23 @@ public:
|
|
200
200
|
void set_value(const std::vector<MX>& assignments);
|
201
201
|
/// @}
|
202
202
|
|
203
|
+
/// @{
|
204
|
+
/** \brief Set domain of a decision variable
|
205
|
+
*
|
206
|
+
* \param[in] x decision variable
|
207
|
+
* \param[in] type 'real', 'integer' (default: real)
|
208
|
+
*
|
209
|
+
* \verbatim
|
210
|
+
* opti.set_domain(x, "real")
|
211
|
+
* opti.set_domain(x, "integer")
|
212
|
+
* \endverbatim
|
213
|
+
|
214
|
+
\identifier{27t} */
|
215
|
+
void set_domain(const MX& x, const std::string& domain);
|
216
|
+
|
217
|
+
/// @}
|
218
|
+
|
219
|
+
|
203
220
|
/// Crunch the numbers; solve the problem
|
204
221
|
OptiSol solve();
|
205
222
|
|
@@ -451,6 +468,11 @@ public:
|
|
451
468
|
OPTI_PAR, // parameter
|
452
469
|
OPTI_DUAL_G // dual
|
453
470
|
};
|
471
|
+
enum DomainType {
|
472
|
+
OPTI_DOMAIN_REAL,
|
473
|
+
OPTI_DOMAIN_INTEGER
|
474
|
+
};
|
475
|
+
|
454
476
|
|
455
477
|
struct IndexAbstraction {
|
456
478
|
IndexAbstraction() : start(0), stop(0) {}
|
@@ -475,6 +497,7 @@ public:
|
|
475
497
|
casadi_int n;
|
476
498
|
casadi_int m;
|
477
499
|
VariableType type;
|
500
|
+
DomainType domain;
|
478
501
|
casadi_int count;
|
479
502
|
casadi_int i;
|
480
503
|
casadi_int active_i;
|
@@ -29,9 +29,12 @@ struct casadi_nlpsol_detect_bounds_prob {
|
|
29
29
|
casadi_int ng;
|
30
30
|
// Number of bounds
|
31
31
|
casadi_int nb;
|
32
|
-
casadi_int *target_x;
|
33
|
-
casadi_int *target_g;
|
34
|
-
char *is_simple;
|
32
|
+
const casadi_int *target_x;
|
33
|
+
const casadi_int *target_g;
|
34
|
+
const char *is_simple;
|
35
|
+
|
36
|
+
int (*callback)(const T1** arg, T1** res, casadi_int* iw, T1* w, void* callback_data);
|
37
|
+
void* callback_data;
|
35
38
|
};
|
36
39
|
// C-REPLACE "casadi_nlpsol_detect_bounds_prob<T1>" "struct casadi_nlpsol_detect_bounds_prob"
|
37
40
|
|
@@ -48,10 +51,10 @@ struct casadi_nlpsol_prob {
|
|
48
51
|
template<typename T1>
|
49
52
|
struct casadi_nlpsol_detect_bounds_data {
|
50
53
|
// Work vectors
|
51
|
-
const
|
52
|
-
|
54
|
+
const T1** arg;
|
55
|
+
T1** res;
|
53
56
|
casadi_int* iw;
|
54
|
-
|
57
|
+
T1* w;
|
55
58
|
|
56
59
|
// Simple bounds g(x)=A(b)x+b(p);
|
57
60
|
// a[i]*x[target_x[i]]+b[i]
|
@@ -63,12 +66,14 @@ struct casadi_nlpsol_detect_bounds_data {
|
|
63
66
|
T1* lam_xu;
|
64
67
|
};
|
65
68
|
// C-REPLACE "casadi_nlpsol_detect_bounds_data<T1>" "struct casadi_nlpsol_detect_bounds_data"
|
69
|
+
// C-REPLACE "casadi_oracle_data<T1>" "struct casadi_oracle_data"
|
66
70
|
|
67
71
|
// SYMBOL "nlpsol_data"
|
68
72
|
template<typename T1>
|
69
73
|
struct casadi_nlpsol_data {
|
70
74
|
// Problem structure
|
71
75
|
const casadi_nlpsol_prob<T1>* prob;
|
76
|
+
casadi_oracle_data<T1>* oracle;
|
72
77
|
// Variable bounds
|
73
78
|
T1 *lbz, *ubz;
|
74
79
|
// Current primal solution
|
@@ -147,3 +152,125 @@ void casadi_nlpsol_init(casadi_nlpsol_data<T1>* d, const T1*** arg, T1*** res,
|
|
147
152
|
}
|
148
153
|
|
149
154
|
}
|
155
|
+
|
156
|
+
// C-REPLACE "fabs" "casadi_fabs"
|
157
|
+
|
158
|
+
// SYMBOL "nlpsol_detect_bounds_before"
|
159
|
+
template<typename T1>
|
160
|
+
int casadi_detect_bounds_before(casadi_nlpsol_data<T1>* d_nlp) {
|
161
|
+
const casadi_nlpsol_prob<T1>* p_nlp = d_nlp->prob;
|
162
|
+
casadi_nlpsol_detect_bounds_data<T1>* d_bounds = &d_nlp->detect_bounds;
|
163
|
+
const casadi_nlpsol_detect_bounds_prob<T1>* p_bounds = &p_nlp->detect_bounds;
|
164
|
+
|
165
|
+
casadi_int nx = p_nlp->nx;
|
166
|
+
d_bounds->arg[0] = d_nlp->p;
|
167
|
+
d_bounds->res[0] = d_bounds->a;
|
168
|
+
d_bounds->res[1] = d_bounds->b;
|
169
|
+
p_bounds->callback(d_bounds->arg, d_bounds->res,
|
170
|
+
d_bounds->iw, d_bounds->w, p_bounds->callback_data);
|
171
|
+
|
172
|
+
for (casadi_int i=0;i<p_bounds->nb;++i) {
|
173
|
+
if (d_bounds->a[i]==0) {
|
174
|
+
casadi_int k = p_bounds->target_g[i];
|
175
|
+
if (d_nlp->lbg[k]>d_bounds->b[i]) return 1;
|
176
|
+
if (d_nlp->ubg[k]<d_bounds->b[i]) return 1;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
T1* lbz = d_nlp->lbz+nx;
|
181
|
+
T1* ubz = d_nlp->ubz+nx;
|
182
|
+
T1* lam = d_nlp->lam+nx;
|
183
|
+
|
184
|
+
for (casadi_int i=0;i<nx;++i) {
|
185
|
+
d_bounds->lam_xl[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]<0)*d_nlp->lam_x0[i] : 0.;
|
186
|
+
d_bounds->lam_xu[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]>0)*d_nlp->lam_x0[i] : 0.;
|
187
|
+
}
|
188
|
+
|
189
|
+
for (casadi_int i=0;i<nx;++i) {
|
190
|
+
d_bounds->target_l[i] = i;
|
191
|
+
d_bounds->target_u[i] = i;
|
192
|
+
}
|
193
|
+
|
194
|
+
// Update lbz/ubz
|
195
|
+
casadi_int k=0;
|
196
|
+
for (casadi_int i=0;i<p_bounds->ng;++i) {
|
197
|
+
if (p_bounds->is_simple[i]) {
|
198
|
+
// Update lbz/ubz
|
199
|
+
T1 lb = (d_nlp->lbg[i]-d_bounds->b[k])/fabs(d_bounds->a[k]);
|
200
|
+
T1 ub = (d_nlp->ubg[i]-d_bounds->b[k])/fabs(d_bounds->a[k]);
|
201
|
+
casadi_int j = p_bounds->target_x[k];
|
202
|
+
|
203
|
+
if (lb==d_nlp->lbz[j]) {
|
204
|
+
if (d_nlp->lam_g0) d_bounds->lam_xl[j] += (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
|
205
|
+
} else if (lb>d_nlp->lbz[j]) {
|
206
|
+
d_nlp->lbz[j] = lb;
|
207
|
+
d_bounds->target_l[j] = nx+i;
|
208
|
+
if (d_nlp->lam_g0) d_bounds->lam_xl[j] = (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
|
209
|
+
}
|
210
|
+
|
211
|
+
if (ub==d_nlp->ubz[j]) {
|
212
|
+
if (d_nlp->lam_g0) d_bounds->lam_xu[j] += (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
|
213
|
+
} else if (ub<d_nlp->ubz[j]) {
|
214
|
+
d_nlp->ubz[j] = ub;
|
215
|
+
d_bounds->target_u[j] = nx+i;
|
216
|
+
if (d_nlp->lam_g0) d_bounds->lam_xu[j] = (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
|
217
|
+
}
|
218
|
+
|
219
|
+
k++;
|
220
|
+
} else {
|
221
|
+
|
222
|
+
// Update lbz/ubz
|
223
|
+
*lbz++ = d_nlp->lbg[i];
|
224
|
+
*ubz++ = d_nlp->ubg[i];
|
225
|
+
|
226
|
+
if (d_nlp->lam_g0) *lam++ = d_nlp->lam_g0[i];
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
for (casadi_int i=0;i<nx;++i) {
|
231
|
+
d_nlp->lam[i] = d_bounds->lam_xl[i]+d_bounds->lam_xu[i];
|
232
|
+
}
|
233
|
+
return 0;
|
234
|
+
}
|
235
|
+
|
236
|
+
// SYMBOL "nlpsol_detect_bounds_after"
|
237
|
+
template<typename T1>
|
238
|
+
int casadi_detect_bounds_after(casadi_nlpsol_data<T1>* d_nlp) {
|
239
|
+
const casadi_nlpsol_prob<T1>* p_nlp = d_nlp->prob;
|
240
|
+
casadi_nlpsol_detect_bounds_data<T1>* d_bounds = &d_nlp->detect_bounds;
|
241
|
+
const casadi_nlpsol_detect_bounds_prob<T1>* p_bounds = &p_nlp->detect_bounds;
|
242
|
+
casadi_int nx = p_nlp->nx;
|
243
|
+
|
244
|
+
casadi_fill(d_nlp->lam_x, nx, 0.);
|
245
|
+
casadi_fill(d_nlp->lam_g, p_bounds->ng, 0.);
|
246
|
+
|
247
|
+
casadi_int k = 0;
|
248
|
+
casadi_int k_normal = 0;
|
249
|
+
for (casadi_int i=0;i<p_bounds->ng;++i) {
|
250
|
+
if (p_bounds->is_simple[i]) {
|
251
|
+
casadi_int j = p_bounds->target_x[k];
|
252
|
+
if (d_nlp->g) d_nlp->g[i] = d_bounds->a[k]*d_nlp->z[j]+d_bounds->b[k];
|
253
|
+
k++;
|
254
|
+
} else {
|
255
|
+
if (d_nlp->g) d_nlp->g[i] = d_nlp->z[nx+k_normal];
|
256
|
+
if (d_nlp->lam_g) d_nlp->lam_g[i] = d_nlp->lam[nx+k_normal];
|
257
|
+
k_normal++;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
for (casadi_int i=0;i<nx;++i) {
|
262
|
+
if (d_bounds->target_l[i]<nx) {
|
263
|
+
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
|
264
|
+
} else {
|
265
|
+
if (d_nlp->lam_g)
|
266
|
+
d_nlp->lam_g[d_bounds->target_l[i]-nx] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
|
267
|
+
}
|
268
|
+
if (d_bounds->target_u[i]<nx) {
|
269
|
+
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
|
270
|
+
} else {
|
271
|
+
if (d_nlp->lam_g)
|
272
|
+
d_nlp->lam_g[d_bounds->target_u[i]-nx] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
|
273
|
+
}
|
274
|
+
}
|
275
|
+
return 0;
|
276
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
//
|
2
|
+
// MIT No Attribution
|
3
|
+
//
|
4
|
+
// Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
|
5
|
+
//
|
6
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
7
|
+
// software and associated documentation files (the "Software"), to deal in the Software
|
8
|
+
// without restriction, including without limitation the rights to use, copy, modify,
|
9
|
+
// merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
// permit persons to whom the Software is furnished to do so.
|
11
|
+
//
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
14
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
15
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
16
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
17
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
//
|
19
|
+
|
20
|
+
|
21
|
+
// SYMBOL "ocp_block"
|
22
|
+
struct casadi_ocp_block {
|
23
|
+
casadi_int offset_r;
|
24
|
+
casadi_int offset_c;
|
25
|
+
casadi_int rows;
|
26
|
+
casadi_int cols;
|
27
|
+
};
|
28
|
+
// C-REPLACE "casadi_ocp_block" "struct casadi_ocp_block"
|
29
|
+
|
30
|
+
// SYMBOL "unpack_ocp_blocks"
|
31
|
+
template<typename T1>
|
32
|
+
void casadi_unpack_ocp_blocks(casadi_ocp_block* blocks, const casadi_int* packed) {
|
33
|
+
casadi_int i;
|
34
|
+
casadi_int N = *packed++;
|
35
|
+
for (i=0;i<N;++i) {
|
36
|
+
blocks[i].offset_r = *packed++;
|
37
|
+
blocks[i].offset_c = *packed++;
|
38
|
+
blocks[i].rows = *packed++;
|
39
|
+
blocks[i].cols = *packed++;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// SYMBOL "ptr_ocp_block"
|
44
|
+
template<typename T1>
|
45
|
+
void casadi_ptr_ocp_block(casadi_int N, T1** vs, T1* v, const casadi_ocp_block* blocks, int eye) {
|
46
|
+
casadi_int k, offset = 0;
|
47
|
+
for (k=0;k<N;++k) {
|
48
|
+
vs[k] = v+offset;
|
49
|
+
if (eye) {
|
50
|
+
offset += blocks[k].rows;
|
51
|
+
} else {
|
52
|
+
offset += blocks[k].rows*blocks[k].cols;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
//
|
2
|
+
// MIT No Attribution
|
3
|
+
//
|
4
|
+
// Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
|
5
|
+
//
|
6
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
7
|
+
// software and associated documentation files (the "Software"), to deal in the Software
|
8
|
+
// without restriction, including without limitation the rights to use, copy, modify,
|
9
|
+
// merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
// permit persons to whom the Software is furnished to do so.
|
11
|
+
//
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
14
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
15
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
16
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
17
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
//
|
19
|
+
|
20
|
+
// C-REPLACE "OracleMemory* m;" ""
|
21
|
+
|
22
|
+
|
23
|
+
// SYMBOL "oracle_data"
|
24
|
+
template<typename T1>
|
25
|
+
struct casadi_oracle_data {
|
26
|
+
const T1** arg;
|
27
|
+
T1** res;
|
28
|
+
casadi_int* iw;
|
29
|
+
T1* w;
|
30
|
+
|
31
|
+
void* m;
|
32
|
+
};
|
33
|
+
|
34
|
+
// C-REPLACE "casadi_oracle_data<T1>" "struct casadi_oracle_data"
|
35
|
+
|
36
|
+
// SYMBOL "oracle_init"
|
37
|
+
template<typename T1>
|
38
|
+
void casadi_oracle_init(casadi_oracle_data<T1>* d, const T1*** arg, T1*** res,
|
39
|
+
casadi_int** iw, T1** w) {
|
40
|
+
d->arg = *arg;
|
41
|
+
d->res = *res;
|
42
|
+
d->iw = *iw;
|
43
|
+
d->w = *w;
|
44
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
//
|
2
|
+
// MIT No Attribution
|
3
|
+
//
|
4
|
+
// Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
|
5
|
+
//
|
6
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
7
|
+
// software and associated documentation files (the "Software"), to deal in the Software
|
8
|
+
// without restriction, including without limitation the rights to use, copy, modify,
|
9
|
+
// merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
// permit persons to whom the Software is furnished to do so.
|
11
|
+
//
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
14
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
15
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
16
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
17
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
//
|
19
|
+
|
20
|
+
// SYMBOL "oracle_callback"
|
21
|
+
template<typename T1>
|
22
|
+
struct casadi_oracle_callback {
|
23
|
+
int (*eval)(const T1** arg, T1** res, casadi_int* iw, T1* w, int mem);
|
24
|
+
int (*checkout)(void);
|
25
|
+
void (*release)(int);
|
26
|
+
};
|
27
|
+
// C-REPLACE "casadi_oracle_callback<T1>" "struct casadi_oracle_callback"
|
28
|
+
// C-REPLACE "casadi_oracle_data<T1>" "struct casadi_oracle_data"
|
29
|
+
|
30
|
+
// SYMBOL "call"
|
31
|
+
template<typename T1>
|
32
|
+
int casadi_oracle_call(const casadi_oracle_callback<T1>* cb, casadi_oracle_data<T1>* d) {
|
33
|
+
int flag;
|
34
|
+
int mem = 0;
|
35
|
+
if (cb->checkout) mem = cb->checkout();
|
36
|
+
flag = cb->eval(d->arg, d->res, d->iw, d->w, mem);
|
37
|
+
if (cb->release) cb->release(mem);
|
38
|
+
return flag;
|
39
|
+
}
|
@@ -292,6 +292,7 @@ namespace casadi {
|
|
292
292
|
#include "casadi_qrqp.hpp"
|
293
293
|
#include "casadi_kkt.hpp"
|
294
294
|
#include "casadi_ipqp.hpp"
|
295
|
+
#include "casadi_oracle.hpp"
|
295
296
|
#include "casadi_nlp.hpp"
|
296
297
|
#include "casadi_sqpmethod.hpp"
|
297
298
|
#include "casadi_feasiblesqpmethod.hpp"
|
@@ -307,7 +308,9 @@ namespace casadi {
|
|
307
308
|
#include "casadi_sum.hpp"
|
308
309
|
#include "casadi_sparsity.hpp"
|
309
310
|
#include "casadi_jac.hpp"
|
310
|
-
|
311
|
+
#include "casadi_oracle_callback.hpp"
|
312
|
+
#include "casadi_ocp_block.hpp"
|
313
|
+
#include "casadi_scaled_copy.hpp"
|
311
314
|
} // namespace casadi
|
312
315
|
|
313
316
|
/// \endcond
|
@@ -0,0 +1,31 @@
|
|
1
|
+
//
|
2
|
+
// MIT No Attribution
|
3
|
+
//
|
4
|
+
// Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl, KU Leuven.
|
5
|
+
//
|
6
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
7
|
+
// software and associated documentation files (the "Software"), to deal in the Software
|
8
|
+
// without restriction, including without limitation the rights to use, copy, modify,
|
9
|
+
// merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
// permit persons to whom the Software is furnished to do so.
|
11
|
+
//
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
14
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
15
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
16
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
17
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
//
|
19
|
+
|
20
|
+
// SYMBOL "scaled_copy"
|
21
|
+
template<typename T1>
|
22
|
+
void casadi_scaled_copy(T1 s, const T1* x, casadi_int n, T1* y) {
|
23
|
+
casadi_int i;
|
24
|
+
if (y) {
|
25
|
+
if (x) {
|
26
|
+
for (i=0; i<n; ++i) *y++ = s*(*x++);
|
27
|
+
} else {
|
28
|
+
for (i=0; i<n; ++i) *y++ = 0.;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -57,6 +57,11 @@ struct casadi_sqpmethod_data {
|
|
57
57
|
T1* temp_mem;
|
58
58
|
// temp_sol
|
59
59
|
T1* temp_sol;
|
60
|
+
|
61
|
+
const T1** arg;
|
62
|
+
T1** res;
|
63
|
+
casadi_int* iw;
|
64
|
+
T1* w;
|
60
65
|
};
|
61
66
|
// C-REPLACE "casadi_sqpmethod_data<T1>" "struct casadi_sqpmethod_data"
|
62
67
|
|
@@ -113,7 +118,8 @@ void casadi_sqpmethod_work(const casadi_sqpmethod_prob<T1>* p,
|
|
113
118
|
|
114
119
|
// SYMBOL "sqpmethod_init"
|
115
120
|
template<typename T1>
|
116
|
-
void casadi_sqpmethod_init(casadi_sqpmethod_data<T1>* d,
|
121
|
+
void casadi_sqpmethod_init(casadi_sqpmethod_data<T1>* d,
|
122
|
+
const T1*** arg, T1*** res, casadi_int** iw, T1** w,
|
117
123
|
int elastic_mode, int so_corr) {
|
118
124
|
// Local variables
|
119
125
|
casadi_int nnz_h, nnz_a, nx, ng;
|
@@ -165,4 +171,8 @@ void casadi_sqpmethod_init(casadi_sqpmethod_data<T1>* d, casadi_int** iw, T1** w
|
|
165
171
|
// Jacobian
|
166
172
|
d->Jk = *w; *w += nnz_a;
|
167
173
|
}
|
174
|
+
d->arg = *arg;
|
175
|
+
d->res = *res;
|
176
|
+
d->iw = *iw;
|
177
|
+
d->w = *w;
|
168
178
|
}
|
@@ -99,7 +99,7 @@ namespace casadi {
|
|
99
99
|
void unpack(Slice& e);
|
100
100
|
void unpack(int& e);
|
101
101
|
|
102
|
-
#if SIZE_MAX != UINT_MAX
|
102
|
+
#if SIZE_MAX != UINT_MAX || defined(__EMSCRIPTEN__)
|
103
103
|
void unpack(unsigned int& e);
|
104
104
|
#endif
|
105
105
|
void unpack(bool& e);
|
@@ -236,7 +236,7 @@ namespace casadi {
|
|
236
236
|
void pack(const GenericType& e);
|
237
237
|
void pack(std::istream& s);
|
238
238
|
void pack(int e);
|
239
|
-
#if SIZE_MAX != UINT_MAX
|
239
|
+
#if SIZE_MAX != UINT_MAX || defined(__EMSCRIPTEN__)
|
240
240
|
void pack(unsigned int e);
|
241
241
|
#endif
|
242
242
|
void pack(bool e);
|
@@ -1006,7 +1006,7 @@ namespace casadi {
|
|
1006
1006
|
/** \brief Propagate sparsity through a linear solve
|
1007
1007
|
|
1008
1008
|
\identifier{d9} */
|
1009
|
-
void spsolve(bvec_t* X,
|
1009
|
+
void spsolve(bvec_t* X, bvec_t* B, bool tr) const;
|
1010
1010
|
#endif // SWIG
|
1011
1011
|
|
1012
1012
|
/** \brief Get the location of all non-zero elements as they would appear in a Dense matrix
|
@@ -1199,17 +1199,26 @@ namespace casadi {
|
|
1199
1199
|
/** \brief Generate a hash value incrementally, array
|
1200
1200
|
|
1201
1201
|
\identifier{dq} */
|
1202
|
-
|
1202
|
+
template<typename T>
|
1203
|
+
inline void hash_combine(std::size_t& seed, const T* v, std::size_t sz) {
|
1203
1204
|
for (casadi_int i=0; i<sz; ++i) hash_combine(seed, v[i]);
|
1204
1205
|
}
|
1205
1206
|
|
1206
1207
|
/** \brief Generate a hash value incrementally (function taken from boost)
|
1207
1208
|
|
1208
1209
|
\identifier{dr} */
|
1209
|
-
|
1210
|
+
template<typename T>
|
1211
|
+
inline void hash_combine(std::size_t& seed, const std::vector<T>& v) {
|
1210
1212
|
hash_combine(seed, get_ptr(v), v.size());
|
1211
1213
|
}
|
1212
1214
|
|
1215
|
+
template<>
|
1216
|
+
inline size_t hash_value(std::string v) {
|
1217
|
+
size_t seed = 0;
|
1218
|
+
hash_combine(seed, v.c_str(), v.size());
|
1219
|
+
return seed;
|
1220
|
+
}
|
1221
|
+
|
1213
1222
|
/** \brief Hash a sparsity pattern
|
1214
1223
|
|
1215
1224
|
\identifier{ds} */
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of CasADi.
|
3
|
+
*
|
4
|
+
* CasADi -- A symbolic framework for dynamic optimization.
|
5
|
+
* Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl,
|
6
|
+
* KU Leuven. All rights reserved.
|
7
|
+
* Copyright (C) 2011-2014 Greg Horn
|
8
|
+
*
|
9
|
+
* CasADi is free software; you can redistribute it and/or
|
10
|
+
* modify it under the terms of the GNU Lesser General Public
|
11
|
+
* License as published by the Free Software Foundation; either
|
12
|
+
* version 3 of the License, or (at your option) any later version.
|
13
|
+
*
|
14
|
+
* CasADi is distributed in the hope that it will be useful,
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
* Lesser General Public License for more details.
|
18
|
+
*
|
19
|
+
* You should have received a copy of the GNU Lesser General Public
|
20
|
+
* License along with CasADi; if not, write to the Free Software
|
21
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
|
25
|
+
|
26
|
+
#ifndef CASADI_TOOLS_HPP
|
27
|
+
#define CASADI_TOOLS_HPP
|
28
|
+
|
29
|
+
#include "casadi/core/function.hpp"
|
30
|
+
|
31
|
+
namespace casadi {
|
32
|
+
|
33
|
+
/** \brief Apply a transformation defined externally
|
34
|
+
|
35
|
+
\param name Name of the shared library
|
36
|
+
\param op Name of the operation
|
37
|
+
\param f Function to transform
|
38
|
+
\param opts Options
|
39
|
+
|
40
|
+
\identifier{27i} */
|
41
|
+
CASADI_EXPORT Function external_transform(const std::string& name,
|
42
|
+
const std::string& op,
|
43
|
+
const Function& f,
|
44
|
+
const Dict& opts=Dict());
|
45
|
+
|
46
|
+
|
47
|
+
typedef void (*external_print_callback_t)(const char* s);
|
48
|
+
typedef const char* (*external_transform_t)(char api_version, const char* casadi_version,
|
49
|
+
const char* in,
|
50
|
+
external_print_callback_t cb_stdout, external_print_callback_t cb_stderr);
|
51
|
+
|
52
|
+
} // namespace casadi
|
53
|
+
|
54
|
+
#ifndef SWIG
|
55
|
+
extern "C" {
|
56
|
+
CASADI_EXPORT const char* external_transform_test_success__f(char api_version,
|
57
|
+
const char* casadi_version,
|
58
|
+
const char* in,
|
59
|
+
casadi::external_print_callback_t cb_stdout, casadi::external_print_callback_t cb_stderr);
|
60
|
+
CASADI_EXPORT const char* external_transform_test_fail__f(char api_version,
|
61
|
+
const char* casadi_version,
|
62
|
+
const char* in,
|
63
|
+
casadi::external_print_callback_t cb_stdout, casadi::external_print_callback_t cb_stderr);
|
64
|
+
}
|
65
|
+
#endif // SWIG
|
66
|
+
|
67
|
+
#endif // CASADI_TOOLS_HPP
|