casadi 3.6.4__cp312-none-manylinux2014_i686.whl → 3.6.6__cp312-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
@@ -0,0 +1,626 @@
|
|
1
|
+
// Copyright (C) 2004, 2009 International Business Machines and others.
|
2
|
+
// All Rights Reserved.
|
3
|
+
// This code is published under the Eclipse Public License.
|
4
|
+
//
|
5
|
+
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
|
6
|
+
|
7
|
+
#ifndef __IPDENSEVECTOR_HPP__
|
8
|
+
#define __IPDENSEVECTOR_HPP__
|
9
|
+
|
10
|
+
#include "IpUtils.hpp"
|
11
|
+
#include "IpVector.hpp"
|
12
|
+
#include <map>
|
13
|
+
|
14
|
+
namespace Ipopt
|
15
|
+
{
|
16
|
+
|
17
|
+
/* forward declarations */
|
18
|
+
class DenseVectorSpace;
|
19
|
+
|
20
|
+
/** @name Exceptions */
|
21
|
+
///@{
|
22
|
+
DECLARE_STD_EXCEPTION(METADATA_ERROR);
|
23
|
+
///@}
|
24
|
+
|
25
|
+
/** Dense Vector Implementation.
|
26
|
+
*
|
27
|
+
* This is the default Vector class in Ipopt.
|
28
|
+
* It stores vectors in contiguous Number arrays, unless
|
29
|
+
* the vector has the same value in all entires. In the latter
|
30
|
+
* case, we call the vector "homogeneous", and we store only the
|
31
|
+
* values that is repeated in all elements. If you want to obtain
|
32
|
+
* the values of vector, use the IsHomogeneous() method to find out
|
33
|
+
* what status the vector is in, and then use either Values() const
|
34
|
+
* or Scalar() const methods to get the values. To set the values
|
35
|
+
* of a homogeneous method, use the Set method. To set the values
|
36
|
+
* of a non-homogeneous vector, use the SetValues method, or use
|
37
|
+
* the non-const Values method to get an array that you can
|
38
|
+
* overwrite. In the latter case, storage is ensured.
|
39
|
+
*/
|
40
|
+
class IPOPTLIB_EXPORT DenseVector: public Vector
|
41
|
+
{
|
42
|
+
public:
|
43
|
+
/**@name Constructors / Destructors */
|
44
|
+
///@{
|
45
|
+
/** Default Constructor
|
46
|
+
*/
|
47
|
+
DenseVector(
|
48
|
+
const DenseVectorSpace* owner_space
|
49
|
+
);
|
50
|
+
|
51
|
+
/** Destructor
|
52
|
+
*/
|
53
|
+
virtual ~DenseVector();
|
54
|
+
///@}
|
55
|
+
|
56
|
+
/** @name Additional public methods not in Vector base class. */
|
57
|
+
///@{
|
58
|
+
/** Create a new DenseVector from same VectorSpace */
|
59
|
+
SmartPtr<DenseVector> MakeNewDenseVector() const;
|
60
|
+
|
61
|
+
/** Set elements in the vector to the Number array x. */
|
62
|
+
void SetValues(
|
63
|
+
const Number* x
|
64
|
+
);
|
65
|
+
|
66
|
+
/** Obtain pointer to the internal Number array with vector
|
67
|
+
* elements with the intention to change the vector data.
|
68
|
+
*
|
69
|
+
* @attention This does not produce a copy, and lifetime is not guaranteed!.
|
70
|
+
*/
|
71
|
+
inline Number* Values();
|
72
|
+
|
73
|
+
/** Obtain pointer to the internal Number array with vector
|
74
|
+
* elements without the intention to change the vector data.
|
75
|
+
*
|
76
|
+
* @attention This does not produce a copy, and lifetime is not
|
77
|
+
* guaranteed!
|
78
|
+
*
|
79
|
+
* @attention If this vector is currently homogeneous
|
80
|
+
* (i.e. IsHomogeneous returns true), then you cannot
|
81
|
+
* call this method. Instead, you need to use the Scalar()
|
82
|
+
* method.
|
83
|
+
*/
|
84
|
+
inline const Number* Values() const;
|
85
|
+
|
86
|
+
/** The same as the const version of Values, but we ensure that we
|
87
|
+
* always return a valid array, even if IsHomogeneous returns
|
88
|
+
* true.
|
89
|
+
*/
|
90
|
+
const Number* ExpandedValues() const;
|
91
|
+
|
92
|
+
/** This is the same as Values, but we add it here so that
|
93
|
+
* ExpandedValues can also be used for the non-const case.
|
94
|
+
*/
|
95
|
+
inline Number* ExpandedValues()
|
96
|
+
{
|
97
|
+
return Values();
|
98
|
+
}
|
99
|
+
|
100
|
+
/** Indicates if the vector is homogeneous (i.e., all entries have
|
101
|
+
* the value Scalar().
|
102
|
+
*/
|
103
|
+
bool IsHomogeneous() const
|
104
|
+
{
|
105
|
+
return homogeneous_;
|
106
|
+
}
|
107
|
+
|
108
|
+
/** Scalar value of all entries in a homogeneous vector. */
|
109
|
+
Number Scalar() const
|
110
|
+
{
|
111
|
+
DBG_ASSERT(homogeneous_);
|
112
|
+
return scalar_;
|
113
|
+
}
|
114
|
+
///@}
|
115
|
+
|
116
|
+
/** @name Modifying subranges of the vector. */
|
117
|
+
///@{
|
118
|
+
/** Copy the data in x into the subrange of this vector starting
|
119
|
+
* at position Pos in this vector.
|
120
|
+
*
|
121
|
+
* Position count starts at 0.
|
122
|
+
*/
|
123
|
+
void CopyToPos(
|
124
|
+
Index Pos,
|
125
|
+
const Vector& x
|
126
|
+
);
|
127
|
+
|
128
|
+
/** Copy a subrange of x, starting at Pos, into the full data of
|
129
|
+
* this vector.
|
130
|
+
*
|
131
|
+
* Position count starts at 0.
|
132
|
+
*/
|
133
|
+
void CopyFromPos(
|
134
|
+
Index Pos,
|
135
|
+
const Vector& x
|
136
|
+
);
|
137
|
+
///@}
|
138
|
+
|
139
|
+
protected:
|
140
|
+
/** @name Overloaded methods from Vector base class */
|
141
|
+
///@{
|
142
|
+
virtual void CopyImpl(
|
143
|
+
const Vector& x
|
144
|
+
);
|
145
|
+
|
146
|
+
virtual void ScalImpl(
|
147
|
+
Number alpha
|
148
|
+
);
|
149
|
+
|
150
|
+
virtual void AxpyImpl(
|
151
|
+
Number alpha,
|
152
|
+
const Vector& x
|
153
|
+
);
|
154
|
+
|
155
|
+
virtual Number DotImpl(
|
156
|
+
const Vector& x
|
157
|
+
) const;
|
158
|
+
|
159
|
+
virtual Number Nrm2Impl() const;
|
160
|
+
|
161
|
+
virtual Number AsumImpl() const;
|
162
|
+
|
163
|
+
virtual Number AmaxImpl() const;
|
164
|
+
|
165
|
+
virtual void SetImpl(
|
166
|
+
Number value
|
167
|
+
);
|
168
|
+
|
169
|
+
virtual void ElementWiseDivideImpl(
|
170
|
+
const Vector& x
|
171
|
+
);
|
172
|
+
|
173
|
+
virtual void ElementWiseMultiplyImpl(
|
174
|
+
const Vector& x
|
175
|
+
);
|
176
|
+
|
177
|
+
virtual void ElementWiseSelectImpl(
|
178
|
+
const Vector& x
|
179
|
+
);
|
180
|
+
|
181
|
+
virtual void ElementWiseMaxImpl(
|
182
|
+
const Vector& x
|
183
|
+
);
|
184
|
+
|
185
|
+
virtual void ElementWiseMinImpl(
|
186
|
+
const Vector& x
|
187
|
+
);
|
188
|
+
|
189
|
+
virtual void ElementWiseReciprocalImpl();
|
190
|
+
|
191
|
+
virtual void ElementWiseAbsImpl();
|
192
|
+
|
193
|
+
virtual void ElementWiseSqrtImpl();
|
194
|
+
|
195
|
+
virtual void ElementWiseSgnImpl();
|
196
|
+
|
197
|
+
virtual void AddScalarImpl(
|
198
|
+
Number scalar
|
199
|
+
);
|
200
|
+
|
201
|
+
virtual Number MaxImpl() const;
|
202
|
+
|
203
|
+
virtual Number MinImpl() const;
|
204
|
+
|
205
|
+
virtual Number SumImpl() const;
|
206
|
+
|
207
|
+
virtual Number SumLogsImpl() const;
|
208
|
+
///@}
|
209
|
+
|
210
|
+
/** @name Implemented specialized functions */
|
211
|
+
///@{
|
212
|
+
/** Add two vectors (a * v1 + b * v2).
|
213
|
+
*
|
214
|
+
* Result is stored in this vector.
|
215
|
+
*/
|
216
|
+
void AddTwoVectorsImpl(
|
217
|
+
Number a,
|
218
|
+
const Vector& v1,
|
219
|
+
Number b,
|
220
|
+
const Vector& v2,
|
221
|
+
Number c
|
222
|
+
);
|
223
|
+
|
224
|
+
/** Fraction to the boundary parameter. */
|
225
|
+
Number FracToBoundImpl(
|
226
|
+
const Vector& delta,
|
227
|
+
Number tau
|
228
|
+
) const;
|
229
|
+
|
230
|
+
/** Add the quotient of two vectors, y = a * z/s + c * y. */
|
231
|
+
void AddVectorQuotientImpl(
|
232
|
+
Number a,
|
233
|
+
const Vector& z,
|
234
|
+
const Vector& s,
|
235
|
+
Number c
|
236
|
+
);
|
237
|
+
///@}
|
238
|
+
|
239
|
+
/** @name Output methods */
|
240
|
+
///@{
|
241
|
+
virtual void PrintImpl(
|
242
|
+
const Journalist& jnlst,
|
243
|
+
EJournalLevel level,
|
244
|
+
EJournalCategory category,
|
245
|
+
const std::string& name,
|
246
|
+
Index indent,
|
247
|
+
const std::string& prefix
|
248
|
+
) const
|
249
|
+
{
|
250
|
+
PrintImplOffset(jnlst, level, category, name, indent, prefix, 1);
|
251
|
+
}
|
252
|
+
|
253
|
+
/* Print the entire vector with padding, and start counting with an offset. */
|
254
|
+
void PrintImplOffset(
|
255
|
+
const Journalist& jnlst,
|
256
|
+
EJournalLevel level,
|
257
|
+
EJournalCategory category,
|
258
|
+
const std::string& name,
|
259
|
+
Index indent,
|
260
|
+
const std::string& prefix,
|
261
|
+
Index offset
|
262
|
+
) const;
|
263
|
+
///@}
|
264
|
+
|
265
|
+
friend class ParVector;
|
266
|
+
|
267
|
+
private:
|
268
|
+
/**@name Default Compiler Generated Methods
|
269
|
+
* (Hidden to avoid implicit creation/calling).
|
270
|
+
* These methods are not implemented and
|
271
|
+
* we do not want the compiler to implement
|
272
|
+
* them for us, so we declare them private
|
273
|
+
* and do not define them. This ensures that
|
274
|
+
* they will not be implicitly created/called. */
|
275
|
+
///@{
|
276
|
+
/** Default Constructor */
|
277
|
+
DenseVector();
|
278
|
+
|
279
|
+
/** Copy Constructor */
|
280
|
+
DenseVector(
|
281
|
+
const DenseVector&
|
282
|
+
);
|
283
|
+
|
284
|
+
/** Default Assignment Operator */
|
285
|
+
void operator=(
|
286
|
+
const DenseVector&
|
287
|
+
);
|
288
|
+
///@}
|
289
|
+
|
290
|
+
/** Copy of the owner_space ptr as a DenseVectorSpace instead of a VectorSpace. */
|
291
|
+
const DenseVectorSpace* owner_space_;
|
292
|
+
|
293
|
+
/** Dense Number array of vector values. */
|
294
|
+
Number* values_;
|
295
|
+
|
296
|
+
/** Dense Number array pointer that is used for ExpandedValues */
|
297
|
+
mutable Number* expanded_values_;
|
298
|
+
|
299
|
+
/** Get the internal values array, making sure that memory has been allocated. */
|
300
|
+
inline Number* values_allocated();
|
301
|
+
|
302
|
+
/** Flag for Initialization.
|
303
|
+
*
|
304
|
+
* This flag is false, if the data has not yet been initialized.
|
305
|
+
*/
|
306
|
+
bool initialized_;
|
307
|
+
|
308
|
+
/** Flag indicating whether the vector is currently homogeneous
|
309
|
+
* (that is, all elements have the same value).
|
310
|
+
*
|
311
|
+
* This flag is used to determine whether the elements of the vector
|
312
|
+
* are stored in values_ or in scalar_.
|
313
|
+
*/
|
314
|
+
bool homogeneous_;
|
315
|
+
|
316
|
+
/** Homogeneous value of all elements if the vector is currently homogeneous. */
|
317
|
+
Number scalar_;
|
318
|
+
|
319
|
+
/** Auxiliary method for setting explicitly all elements in values_ to the
|
320
|
+
* current scalar value.
|
321
|
+
*/
|
322
|
+
void set_values_from_scalar();
|
323
|
+
};
|
324
|
+
|
325
|
+
/** @name typedefs for the map variables that define meta data for the DenseVectorSpace */
|
326
|
+
///@{
|
327
|
+
typedef std::map<std::string, std::vector<std::string> > StringMetaDataMapType;
|
328
|
+
typedef std::map<std::string, std::vector<Index> > IntegerMetaDataMapType;
|
329
|
+
typedef std::map<std::string, std::vector<Number> > NumericMetaDataMapType;
|
330
|
+
///@}
|
331
|
+
|
332
|
+
/** This vectors space is the vector space for DenseVector. */
|
333
|
+
class IPOPTLIB_EXPORT DenseVectorSpace: public VectorSpace
|
334
|
+
{
|
335
|
+
public:
|
336
|
+
/** @name Constructors/Destructors. */
|
337
|
+
///@{
|
338
|
+
/** Constructor, requires dimension of all vector for this VectorSpace */
|
339
|
+
DenseVectorSpace(
|
340
|
+
Index dim
|
341
|
+
)
|
342
|
+
: VectorSpace(dim)
|
343
|
+
{ }
|
344
|
+
|
345
|
+
/** Destructor */
|
346
|
+
~DenseVectorSpace()
|
347
|
+
{ }
|
348
|
+
///@}
|
349
|
+
|
350
|
+
/** Method for creating a new vector of this specific type. */
|
351
|
+
inline DenseVector* MakeNewDenseVector() const
|
352
|
+
{
|
353
|
+
return new DenseVector(this);
|
354
|
+
}
|
355
|
+
|
356
|
+
virtual Vector* MakeNew() const
|
357
|
+
{
|
358
|
+
return MakeNewDenseVector();
|
359
|
+
}
|
360
|
+
|
361
|
+
/**@name Methods called by DenseVector for memory management.
|
362
|
+
*
|
363
|
+
* This could allow to have sophisticated memory management in the
|
364
|
+
* VectorSpace.
|
365
|
+
*/
|
366
|
+
///@{
|
367
|
+
/** Allocate internal storage for the DenseVector */
|
368
|
+
inline Number* AllocateInternalStorage() const;
|
369
|
+
|
370
|
+
/** Deallocate internal storage for the DenseVector */
|
371
|
+
inline void FreeInternalStorage(
|
372
|
+
Number* values
|
373
|
+
) const;
|
374
|
+
///@}
|
375
|
+
|
376
|
+
/**@name Methods for dealing with meta data on the vector
|
377
|
+
*/
|
378
|
+
///@{
|
379
|
+
/** Check if string meta exists for tag */
|
380
|
+
inline
|
381
|
+
bool HasStringMetaData(
|
382
|
+
const std::string& tag
|
383
|
+
) const;
|
384
|
+
|
385
|
+
/** Check if Integer meta exists for tag */
|
386
|
+
inline
|
387
|
+
bool HasIntegerMetaData(
|
388
|
+
const std::string& tag
|
389
|
+
) const;
|
390
|
+
|
391
|
+
/** Check if Numeric meta exists for tag */
|
392
|
+
inline
|
393
|
+
bool HasNumericMetaData(
|
394
|
+
const std::string& tag
|
395
|
+
) const;
|
396
|
+
|
397
|
+
/** Get meta data of type std::string by tag */
|
398
|
+
inline const std::vector<std::string>& GetStringMetaData(
|
399
|
+
const std::string& tag
|
400
|
+
) const;
|
401
|
+
|
402
|
+
/** Get meta data of type Index by tag */
|
403
|
+
inline const std::vector<Index>& GetIntegerMetaData(
|
404
|
+
const std::string& tag
|
405
|
+
) const;
|
406
|
+
|
407
|
+
/** Get meta data of type Number by tag */
|
408
|
+
inline const std::vector<Number>& GetNumericMetaData(
|
409
|
+
const std::string& tag
|
410
|
+
) const;
|
411
|
+
|
412
|
+
/** Set meta data of type std::string by tag */
|
413
|
+
inline void SetStringMetaData(
|
414
|
+
const std::string& tag,
|
415
|
+
const std::vector<std::string>& meta_data
|
416
|
+
);
|
417
|
+
|
418
|
+
/** Set meta data of type Index by tag */
|
419
|
+
inline void SetIntegerMetaData(
|
420
|
+
const std::string& tag,
|
421
|
+
const std::vector<Index>& meta_data
|
422
|
+
);
|
423
|
+
|
424
|
+
/** Set meta data of type Number by tag */
|
425
|
+
inline void SetNumericMetaData(
|
426
|
+
const std::string& tag,
|
427
|
+
const std::vector<Number>& meta_data
|
428
|
+
);
|
429
|
+
|
430
|
+
/** Get map of meta data of type Number */
|
431
|
+
inline const StringMetaDataMapType& GetStringMetaData() const;
|
432
|
+
|
433
|
+
/** Get map of meta data of type Number */
|
434
|
+
inline const IntegerMetaDataMapType& GetIntegerMetaData() const;
|
435
|
+
|
436
|
+
/** Get map of meta data of type Number */
|
437
|
+
inline const NumericMetaDataMapType& GetNumericMetaData() const;
|
438
|
+
///@}
|
439
|
+
|
440
|
+
private:
|
441
|
+
// variables to store vector meta data
|
442
|
+
StringMetaDataMapType string_meta_data_;
|
443
|
+
IntegerMetaDataMapType integer_meta_data_;
|
444
|
+
NumericMetaDataMapType numeric_meta_data_;
|
445
|
+
};
|
446
|
+
|
447
|
+
// inline functions
|
448
|
+
inline Number* DenseVector::Values()
|
449
|
+
{
|
450
|
+
// Here we assume that every time someone requests this direct raw
|
451
|
+
// pointer, the data is going to change and the Tag for this
|
452
|
+
// vector has to be updated.
|
453
|
+
|
454
|
+
if( initialized_ && homogeneous_ )
|
455
|
+
{
|
456
|
+
// If currently the vector is a homogeneous vector, set all elements
|
457
|
+
// explicitly to this value
|
458
|
+
set_values_from_scalar();
|
459
|
+
}
|
460
|
+
ObjectChanged();
|
461
|
+
initialized_ = true;
|
462
|
+
homogeneous_ = false;
|
463
|
+
values_allocated();
|
464
|
+
DBG_ASSERT(Dim() == 0 || values_ != NULL);
|
465
|
+
return values_;
|
466
|
+
}
|
467
|
+
|
468
|
+
inline const Number* DenseVector::Values() const
|
469
|
+
{
|
470
|
+
DBG_ASSERT(initialized_ && (Dim() == 0 || values_));
|
471
|
+
return values_;
|
472
|
+
}
|
473
|
+
|
474
|
+
inline Number* DenseVector::values_allocated()
|
475
|
+
{
|
476
|
+
if( values_ == NULL )
|
477
|
+
{
|
478
|
+
values_ = owner_space_->AllocateInternalStorage();
|
479
|
+
}
|
480
|
+
return values_;
|
481
|
+
}
|
482
|
+
|
483
|
+
inline Number* DenseVectorSpace::AllocateInternalStorage() const
|
484
|
+
{
|
485
|
+
if( Dim() > 0 )
|
486
|
+
{
|
487
|
+
return new Number[Dim()];
|
488
|
+
}
|
489
|
+
else
|
490
|
+
{
|
491
|
+
return NULL;
|
492
|
+
}
|
493
|
+
}
|
494
|
+
|
495
|
+
inline
|
496
|
+
void DenseVectorSpace::FreeInternalStorage(
|
497
|
+
Number* values
|
498
|
+
) const
|
499
|
+
{
|
500
|
+
delete[] values;
|
501
|
+
}
|
502
|
+
|
503
|
+
inline SmartPtr<DenseVector> DenseVector::MakeNewDenseVector() const
|
504
|
+
{
|
505
|
+
return owner_space_->MakeNewDenseVector();
|
506
|
+
}
|
507
|
+
|
508
|
+
inline
|
509
|
+
bool DenseVectorSpace::HasStringMetaData(
|
510
|
+
const std::string& tag
|
511
|
+
) const
|
512
|
+
{
|
513
|
+
StringMetaDataMapType::const_iterator iter;
|
514
|
+
iter = string_meta_data_.find(tag);
|
515
|
+
|
516
|
+
if( iter != string_meta_data_.end() )
|
517
|
+
{
|
518
|
+
return true;
|
519
|
+
}
|
520
|
+
|
521
|
+
return false;
|
522
|
+
}
|
523
|
+
|
524
|
+
inline
|
525
|
+
bool DenseVectorSpace::HasIntegerMetaData(
|
526
|
+
const std::string& tag
|
527
|
+
) const
|
528
|
+
{
|
529
|
+
IntegerMetaDataMapType::const_iterator iter;
|
530
|
+
iter = integer_meta_data_.find(tag);
|
531
|
+
|
532
|
+
if( iter != integer_meta_data_.end() )
|
533
|
+
{
|
534
|
+
return true;
|
535
|
+
}
|
536
|
+
|
537
|
+
return false;
|
538
|
+
}
|
539
|
+
|
540
|
+
inline
|
541
|
+
bool DenseVectorSpace::HasNumericMetaData(
|
542
|
+
const std::string& tag
|
543
|
+
) const
|
544
|
+
{
|
545
|
+
NumericMetaDataMapType::const_iterator iter;
|
546
|
+
iter = numeric_meta_data_.find(tag);
|
547
|
+
|
548
|
+
if( iter != numeric_meta_data_.end() )
|
549
|
+
{
|
550
|
+
return true;
|
551
|
+
}
|
552
|
+
|
553
|
+
return false;
|
554
|
+
}
|
555
|
+
|
556
|
+
inline const std::vector<std::string>& DenseVectorSpace::GetStringMetaData(
|
557
|
+
const std::string& tag
|
558
|
+
) const
|
559
|
+
{
|
560
|
+
DBG_ASSERT(HasStringMetaData(tag));
|
561
|
+
StringMetaDataMapType::const_iterator iter;
|
562
|
+
iter = string_meta_data_.find(tag);
|
563
|
+
return iter->second;
|
564
|
+
}
|
565
|
+
|
566
|
+
inline const std::vector<Index>& DenseVectorSpace::GetIntegerMetaData(
|
567
|
+
const std::string& tag
|
568
|
+
) const
|
569
|
+
{
|
570
|
+
DBG_ASSERT(HasIntegerMetaData(tag));
|
571
|
+
IntegerMetaDataMapType::const_iterator iter;
|
572
|
+
iter = integer_meta_data_.find(tag);
|
573
|
+
return iter->second;
|
574
|
+
}
|
575
|
+
|
576
|
+
inline const std::vector<Number>& DenseVectorSpace::GetNumericMetaData(
|
577
|
+
const std::string& tag
|
578
|
+
) const
|
579
|
+
{
|
580
|
+
DBG_ASSERT(HasNumericMetaData(tag));
|
581
|
+
NumericMetaDataMapType::const_iterator iter;
|
582
|
+
iter = numeric_meta_data_.find(tag);
|
583
|
+
return iter->second;
|
584
|
+
}
|
585
|
+
|
586
|
+
inline void DenseVectorSpace::SetStringMetaData(
|
587
|
+
const std::string& tag,
|
588
|
+
const std::vector<std::string>& meta_data
|
589
|
+
)
|
590
|
+
{
|
591
|
+
string_meta_data_[tag] = meta_data;
|
592
|
+
}
|
593
|
+
|
594
|
+
inline void DenseVectorSpace::SetIntegerMetaData(
|
595
|
+
const std::string& tag,
|
596
|
+
const std::vector<Index>& meta_data
|
597
|
+
)
|
598
|
+
{
|
599
|
+
integer_meta_data_[tag] = meta_data;
|
600
|
+
}
|
601
|
+
|
602
|
+
inline void DenseVectorSpace::SetNumericMetaData(
|
603
|
+
const std::string& tag,
|
604
|
+
const std::vector<Number>& meta_data
|
605
|
+
)
|
606
|
+
{
|
607
|
+
numeric_meta_data_[tag] = meta_data;
|
608
|
+
}
|
609
|
+
|
610
|
+
inline const StringMetaDataMapType& DenseVectorSpace::GetStringMetaData() const
|
611
|
+
{
|
612
|
+
return string_meta_data_;
|
613
|
+
}
|
614
|
+
|
615
|
+
inline const IntegerMetaDataMapType& DenseVectorSpace::GetIntegerMetaData() const
|
616
|
+
{
|
617
|
+
return integer_meta_data_;
|
618
|
+
}
|
619
|
+
|
620
|
+
inline const NumericMetaDataMapType& DenseVectorSpace::GetNumericMetaData() const
|
621
|
+
{
|
622
|
+
return numeric_meta_data_;
|
623
|
+
}
|
624
|
+
|
625
|
+
} // namespace Ipopt
|
626
|
+
#endif
|