casadi 3.6.4__cp38-none-manylinux2014_i686.whl → 3.6.6__cp38-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,555 @@
|
|
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
|
+
#include "IpStdAugSystemSolver.hpp"
|
8
|
+
#include "IpDebug.hpp"
|
9
|
+
|
10
|
+
#include "IpCompoundSymMatrix.hpp"
|
11
|
+
#include "IpCompoundVector.hpp"
|
12
|
+
#include "IpSumSymMatrix.hpp"
|
13
|
+
#include "IpDiagMatrix.hpp"
|
14
|
+
#include "IpIdentityMatrix.hpp"
|
15
|
+
//#include "IpTripletHelper.hpp"
|
16
|
+
|
17
|
+
#include <cstdio>
|
18
|
+
|
19
|
+
namespace Ipopt
|
20
|
+
{
|
21
|
+
#if IPOPT_VERBOSITY > 0
|
22
|
+
static const Index dbg_verbosity = 0;
|
23
|
+
#endif
|
24
|
+
|
25
|
+
StdAugSystemSolver::StdAugSystemSolver(
|
26
|
+
SymLinearSolver& linSolver
|
27
|
+
)
|
28
|
+
: AugSystemSolver(),
|
29
|
+
linsolver_(&linSolver),
|
30
|
+
augmented_system_space_(NULL),
|
31
|
+
sumsym_space_x_(NULL),
|
32
|
+
diag_space_x_(NULL),
|
33
|
+
diag_space_s_(NULL),
|
34
|
+
diag_space_c_(NULL),
|
35
|
+
ident_space_ds_(NULL),
|
36
|
+
diag_space_d_(NULL),
|
37
|
+
w_tag_(0),
|
38
|
+
d_x_tag_(0),
|
39
|
+
delta_x_(0.),
|
40
|
+
d_s_tag_(0),
|
41
|
+
delta_s_(0.),
|
42
|
+
j_c_tag_(0),
|
43
|
+
d_c_tag_(0),
|
44
|
+
delta_c_(0.),
|
45
|
+
j_d_tag_(0),
|
46
|
+
d_d_tag_(0),
|
47
|
+
delta_d_(0.),
|
48
|
+
old_w_(NULL)
|
49
|
+
{
|
50
|
+
DBG_START_METH("StdAugSystemSolver::StdAugSystemSolver()", dbg_verbosity);
|
51
|
+
DBG_ASSERT(IsValid(linsolver_));
|
52
|
+
}
|
53
|
+
|
54
|
+
StdAugSystemSolver::~StdAugSystemSolver()
|
55
|
+
{
|
56
|
+
DBG_START_METH("StdAugSystemSolver::~StdAugSystemSolver()", dbg_verbosity);
|
57
|
+
}
|
58
|
+
|
59
|
+
bool StdAugSystemSolver::InitializeImpl(
|
60
|
+
const OptionsList& options,
|
61
|
+
const std::string& prefix
|
62
|
+
)
|
63
|
+
{
|
64
|
+
// This option is registered by OrigIpoptNLP
|
65
|
+
options.GetBoolValue("warm_start_same_structure", warm_start_same_structure_, prefix);
|
66
|
+
|
67
|
+
if( !warm_start_same_structure_ )
|
68
|
+
{
|
69
|
+
augsys_tag_ = 0;
|
70
|
+
augmented_system_ = NULL;
|
71
|
+
}
|
72
|
+
else
|
73
|
+
{
|
74
|
+
ASSERT_EXCEPTION(IsValid(augmented_system_), INVALID_WARMSTART,
|
75
|
+
"StdAugSystemSolver called with warm_start_same_structure, but augmented system is not initialized.");
|
76
|
+
}
|
77
|
+
|
78
|
+
return linsolver_->Initialize(Jnlst(), IpNLP(), IpData(), IpCq(), options, prefix);
|
79
|
+
}
|
80
|
+
|
81
|
+
ESymSolverStatus StdAugSystemSolver::MultiSolve(
|
82
|
+
const SymMatrix* W,
|
83
|
+
Number W_factor,
|
84
|
+
const Vector* D_x,
|
85
|
+
Number delta_x,
|
86
|
+
const Vector* D_s,
|
87
|
+
Number delta_s,
|
88
|
+
const Matrix* J_c,
|
89
|
+
const Vector* D_c,
|
90
|
+
Number delta_c,
|
91
|
+
const Matrix* J_d,
|
92
|
+
const Vector* D_d,
|
93
|
+
Number delta_d,
|
94
|
+
std::vector<SmartPtr<const Vector> >& rhs_xV,
|
95
|
+
std::vector<SmartPtr<const Vector> >& rhs_sV,
|
96
|
+
std::vector<SmartPtr<const Vector> >& rhs_cV,
|
97
|
+
std::vector<SmartPtr<const Vector> >& rhs_dV,
|
98
|
+
std::vector<SmartPtr<Vector> >& sol_xV,
|
99
|
+
std::vector<SmartPtr<Vector> >& sol_sV,
|
100
|
+
std::vector<SmartPtr<Vector> >& sol_cV,
|
101
|
+
std::vector<SmartPtr<Vector> >& sol_dV,
|
102
|
+
bool check_NegEVals,
|
103
|
+
Index numberOfNegEVals
|
104
|
+
)
|
105
|
+
{
|
106
|
+
DBG_START_METH("StdAugSystemSolver::MultiSolve", dbg_verbosity);
|
107
|
+
DBG_ASSERT(J_c && J_d && "Currently, you MUST specify J_c and J_d in the augmented system");
|
108
|
+
|
109
|
+
IpData().TimingStats().StdAugSystemSolverMultiSolve().Start();
|
110
|
+
|
111
|
+
DBG_ASSERT(W_factor == 0.0 || W_factor == 1.0);
|
112
|
+
|
113
|
+
Index nrhs = (Index) rhs_xV.size();
|
114
|
+
DBG_ASSERT(nrhs > 0);
|
115
|
+
DBG_ASSERT(nrhs == (Index)rhs_sV.size());
|
116
|
+
DBG_ASSERT(nrhs == (Index)rhs_cV.size());
|
117
|
+
DBG_ASSERT(nrhs == (Index)rhs_dV.size());
|
118
|
+
DBG_ASSERT(nrhs == (Index)sol_xV.size());
|
119
|
+
DBG_ASSERT(nrhs == (Index)sol_sV.size());
|
120
|
+
DBG_ASSERT(nrhs == (Index)sol_cV.size());
|
121
|
+
DBG_ASSERT(nrhs == (Index)sol_dV.size());
|
122
|
+
|
123
|
+
// Create the compound matrix of the augmented system if it has not
|
124
|
+
// yet been created - It is assumed that the structure will not change
|
125
|
+
// after this call
|
126
|
+
DBG_DO(bool debug_first_time_through = false);
|
127
|
+
if( !IsValid(augmented_system_) )
|
128
|
+
{
|
129
|
+
// pass in the information to form the structure of the augmented system
|
130
|
+
// rhs_? are passed in to provide a prototype vector
|
131
|
+
// for D_? (since these may be NULL)
|
132
|
+
DBG_ASSERT(W && J_c && J_d);// W must exist during the first call to setup the structure!
|
133
|
+
CreateAugmentedSpace(*W, *J_c, *J_d, *rhs_xV[0], *rhs_sV[0], *rhs_cV[0], *rhs_dV[0]);
|
134
|
+
CreateAugmentedSystem(W, W_factor, D_x, delta_x, D_s, delta_s, *J_c, D_c, delta_c, *J_d, D_d, delta_d, *rhs_xV[0],
|
135
|
+
*rhs_sV[0], *rhs_cV[0], *rhs_dV[0]);
|
136
|
+
DBG_DO(debug_first_time_through = true);
|
137
|
+
}
|
138
|
+
|
139
|
+
// Check if anything that was just passed in is different from
|
140
|
+
// what is currently in the compound matrix of the augmented
|
141
|
+
// system. If anything is different, then update the augmented
|
142
|
+
// system
|
143
|
+
if( AugmentedSystemRequiresChange(W, W_factor, D_x, delta_x, D_s, delta_s, *J_c, D_c, delta_c, *J_d, D_d, delta_d) )
|
144
|
+
{
|
145
|
+
DBG_ASSERT(!debug_first_time_through);
|
146
|
+
CreateAugmentedSystem(W, W_factor, D_x, delta_x, D_s, delta_s, *J_c, D_c, delta_c, *J_d, D_d, delta_d, *rhs_xV[0],
|
147
|
+
*rhs_sV[0], *rhs_cV[0], *rhs_dV[0]);
|
148
|
+
}
|
149
|
+
|
150
|
+
// Sanity checks
|
151
|
+
DBG_ASSERT(rhs_xV[0]->Dim() == sol_xV[0]->Dim());
|
152
|
+
DBG_ASSERT(rhs_sV[0]->Dim() == sol_sV[0]->Dim());
|
153
|
+
DBG_ASSERT(rhs_cV[0]->Dim() == sol_cV[0]->Dim());
|
154
|
+
DBG_ASSERT(rhs_dV[0]->Dim() == sol_dV[0]->Dim());
|
155
|
+
|
156
|
+
// Now construct the overall right hand side vector that will be passed
|
157
|
+
// to the linear solver
|
158
|
+
std::vector<SmartPtr<const Vector> > augmented_rhsV(nrhs);
|
159
|
+
for( Index i = 0; i < nrhs; i++ )
|
160
|
+
{
|
161
|
+
SmartPtr<CompoundVector> augrhs = augmented_vector_space_->MakeNewCompoundVector();
|
162
|
+
augrhs->SetComp(0, *rhs_xV[i]);
|
163
|
+
augrhs->SetComp(1, *rhs_sV[i]);
|
164
|
+
augrhs->SetComp(2, *rhs_cV[i]);
|
165
|
+
augrhs->SetComp(3, *rhs_dV[i]);
|
166
|
+
char buffer[16];
|
167
|
+
Snprintf(buffer, 15, "RHS[%2" IPOPT_INDEX_FORMAT "]", i);
|
168
|
+
augrhs->Print(Jnlst(), J_MOREVECTOR, J_LINEAR_ALGEBRA, buffer);
|
169
|
+
augmented_rhsV[i] = GetRawPtr(augrhs);
|
170
|
+
}
|
171
|
+
|
172
|
+
augmented_system_->Print(Jnlst(), J_MATRIX, J_LINEAR_ALGEBRA, "KKT");
|
173
|
+
#if 0 // debug code
|
174
|
+
if( Jnlst().ProduceOutput(J_MOREMATRIX, J_LINEAR_ALGEBRA) )
|
175
|
+
{
|
176
|
+
Index dbg_nz = TripletHelper::GetNumberEntries(*augmented_system_);
|
177
|
+
Index* dbg_iRows = new Index[dbg_nz];
|
178
|
+
Index* dbg_jCols = new Index[dbg_nz];
|
179
|
+
Number* dbg_values = new Number[dbg_nz];
|
180
|
+
TripletHelper::FillRowCol(dbg_nz, *augmented_system_, dbg_iRows, dbg_jCols);
|
181
|
+
TripletHelper::FillValues(dbg_nz, *augmented_system_, dbg_values);
|
182
|
+
Jnlst().Printf(J_MOREMATRIX, J_LINEAR_ALGEBRA,
|
183
|
+
"******* KKT SYSTEM *******\n");
|
184
|
+
for( Index dbg_i = 0; dbg_i < dbg_nz; dbg_i++ )
|
185
|
+
{
|
186
|
+
Jnlst().Printf(J_MOREMATRIX, J_LINEAR_ALGEBRA,
|
187
|
+
"(%" IPOPT_INDEX_FORMAT ") KKT[%" IPOPT_INDEX_FORMAT "][%" IPOPT_INDEX_FORMAT "] = %23.15e\n", dbg_i, dbg_iRows[dbg_i], dbg_jCols[dbg_i], dbg_values[dbg_i]);
|
188
|
+
}
|
189
|
+
delete[] dbg_iRows;
|
190
|
+
dbg_iRows = NULL;
|
191
|
+
delete[] dbg_jCols;
|
192
|
+
dbg_jCols = NULL;
|
193
|
+
delete[] dbg_values;
|
194
|
+
dbg_values = NULL;
|
195
|
+
}
|
196
|
+
#endif
|
197
|
+
|
198
|
+
// Call the linear solver
|
199
|
+
std::vector<SmartPtr<Vector> > augmented_solV(nrhs);
|
200
|
+
for( Index i = 0; i < nrhs; i++ )
|
201
|
+
{
|
202
|
+
SmartPtr<CompoundVector> augsol = augmented_vector_space_->MakeNewCompoundVector();
|
203
|
+
augsol->SetCompNonConst(0, *sol_xV[i]);
|
204
|
+
augsol->SetCompNonConst(1, *sol_sV[i]);
|
205
|
+
augsol->SetCompNonConst(2, *sol_cV[i]);
|
206
|
+
augsol->SetCompNonConst(3, *sol_dV[i]);
|
207
|
+
augmented_solV[i] = GetRawPtr(augsol);
|
208
|
+
}
|
209
|
+
ESymSolverStatus retval;
|
210
|
+
retval = linsolver_->MultiSolve(*augmented_system_, augmented_rhsV, augmented_solV, check_NegEVals, numberOfNegEVals);
|
211
|
+
if( retval == SYMSOLVER_SUCCESS )
|
212
|
+
{
|
213
|
+
Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
|
214
|
+
"Factorization successful.\n");
|
215
|
+
for( Index i = 0; i < nrhs; i++ )
|
216
|
+
{
|
217
|
+
char buffer[16];
|
218
|
+
Snprintf(buffer, 15, "SOL[%2" IPOPT_INDEX_FORMAT "]", i);
|
219
|
+
augmented_solV[i]->Print(Jnlst(), J_MOREVECTOR, J_LINEAR_ALGEBRA, buffer);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
else
|
223
|
+
{
|
224
|
+
Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
|
225
|
+
"Factorization failed with retval = %d\n", retval);
|
226
|
+
}
|
227
|
+
|
228
|
+
IpData().TimingStats().StdAugSystemSolverMultiSolve().End();
|
229
|
+
return retval;
|
230
|
+
}
|
231
|
+
|
232
|
+
void StdAugSystemSolver::CreateAugmentedSpace(
|
233
|
+
const SymMatrix& W,
|
234
|
+
const Matrix& J_c,
|
235
|
+
const Matrix& J_d,
|
236
|
+
const Vector& proto_x,
|
237
|
+
const Vector& proto_s,
|
238
|
+
const Vector& proto_c,
|
239
|
+
const Vector& proto_d
|
240
|
+
)
|
241
|
+
{
|
242
|
+
DBG_ASSERT(!IsValid(augmented_system_));
|
243
|
+
|
244
|
+
old_w_ = &W;
|
245
|
+
|
246
|
+
//===
|
247
|
+
// Setup the augmented system matrix (described in IpAugSystemSolver.hpp")
|
248
|
+
//===
|
249
|
+
|
250
|
+
// created the compound symmetric matrix space
|
251
|
+
Index n_x = J_c.NCols();
|
252
|
+
Index n_s = J_d.NRows();
|
253
|
+
Index n_c = J_c.NRows();
|
254
|
+
Index n_d = n_s;
|
255
|
+
|
256
|
+
Index total_nRows = n_x + n_s + n_c + n_d;
|
257
|
+
augmented_system_space_ = new CompoundSymMatrixSpace(4, total_nRows);
|
258
|
+
augmented_system_space_->SetBlockDim(0, n_x);
|
259
|
+
augmented_system_space_->SetBlockDim(1, n_s);
|
260
|
+
augmented_system_space_->SetBlockDim(2, n_c);
|
261
|
+
augmented_system_space_->SetBlockDim(3, n_d);
|
262
|
+
|
263
|
+
// (1,1) block
|
264
|
+
// create the spaces and sum matrix for the upper left corner (W + D_x delta_x*I)
|
265
|
+
// of the hessian part for the 1,1 block
|
266
|
+
diag_space_x_ = new DiagMatrixSpace(n_x);
|
267
|
+
|
268
|
+
sumsym_space_x_ = new SumSymMatrixSpace(n_x, 2);
|
269
|
+
sumsym_space_x_->SetTermSpace(0, *W.OwnerSymMatrixSpace());
|
270
|
+
sumsym_space_x_->SetTermSpace(1, *diag_space_x_);
|
271
|
+
augmented_system_space_->SetCompSpace(0, 0, *sumsym_space_x_);
|
272
|
+
|
273
|
+
// (2,2) block
|
274
|
+
// create the spaces and diag matrix for the lower right corner (D_s + delta_s*I)
|
275
|
+
// of the hessian part, the 2,2 block
|
276
|
+
diag_space_s_ = new DiagMatrixSpace(n_s);
|
277
|
+
augmented_system_space_->SetCompSpace(1, 1, *diag_space_s_);
|
278
|
+
|
279
|
+
// (3,1) block
|
280
|
+
augmented_system_space_->SetCompSpace(2, 0, *J_c.OwnerSpace());
|
281
|
+
|
282
|
+
// (3,3) block
|
283
|
+
// create the matrix space and matrix for the 3,3 block
|
284
|
+
diag_space_c_ = new DiagMatrixSpace(n_c);
|
285
|
+
augmented_system_space_->SetCompSpace(2, 2, *diag_space_c_);
|
286
|
+
|
287
|
+
// (4,1) block
|
288
|
+
augmented_system_space_->SetCompSpace(3, 0, *J_d.OwnerSpace());
|
289
|
+
|
290
|
+
// (4,2) block
|
291
|
+
// create the identity matrix space and matrix for the 4,2 block
|
292
|
+
ident_space_ds_ = new IdentityMatrixSpace(n_s);
|
293
|
+
augmented_system_space_->SetCompSpace(3, 1, *ident_space_ds_);
|
294
|
+
|
295
|
+
// (4,4) block
|
296
|
+
// create the sum matrix space and matrix for the 4,4 block
|
297
|
+
diag_space_d_ = new DiagMatrixSpace(n_d);
|
298
|
+
augmented_system_space_->SetCompSpace(3, 3, *diag_space_d_);
|
299
|
+
|
300
|
+
// Create the space for the vectors
|
301
|
+
augmented_vector_space_ = new CompoundVectorSpace(4, n_x + n_s + n_c + n_d);
|
302
|
+
augmented_vector_space_->SetCompSpace(0, *proto_x.OwnerSpace());
|
303
|
+
augmented_vector_space_->SetCompSpace(1, *proto_s.OwnerSpace());
|
304
|
+
augmented_vector_space_->SetCompSpace(2, *proto_c.OwnerSpace());
|
305
|
+
augmented_vector_space_->SetCompSpace(3, *proto_d.OwnerSpace());
|
306
|
+
|
307
|
+
}
|
308
|
+
|
309
|
+
void StdAugSystemSolver::CreateAugmentedSystem(
|
310
|
+
const SymMatrix* W,
|
311
|
+
Number W_factor,
|
312
|
+
const Vector* D_x,
|
313
|
+
Number delta_x,
|
314
|
+
const Vector* D_s,
|
315
|
+
Number delta_s,
|
316
|
+
const Matrix& J_c,
|
317
|
+
const Vector* D_c,
|
318
|
+
Number delta_c,
|
319
|
+
const Matrix& J_d,
|
320
|
+
const Vector* D_d,
|
321
|
+
Number delta_d,
|
322
|
+
const Vector& proto_x,
|
323
|
+
const Vector& proto_s,
|
324
|
+
const Vector& proto_c,
|
325
|
+
const Vector& proto_d
|
326
|
+
)
|
327
|
+
{
|
328
|
+
augmented_system_ = augmented_system_space_->MakeNewCompoundSymMatrix();
|
329
|
+
|
330
|
+
// (1,1) block
|
331
|
+
SmartPtr<SumSymMatrix> sumsym_x = sumsym_space_x_->MakeNewSumSymMatrix();
|
332
|
+
|
333
|
+
if( W )
|
334
|
+
{
|
335
|
+
sumsym_x->SetTerm(0, W_factor, *W);
|
336
|
+
old_w_ = W;
|
337
|
+
w_tag_ = W->GetTag();
|
338
|
+
}
|
339
|
+
else
|
340
|
+
{
|
341
|
+
sumsym_x->SetTerm(0, 0.0, *old_w_);
|
342
|
+
w_tag_ = 0;
|
343
|
+
}
|
344
|
+
w_factor_ = W_factor;
|
345
|
+
|
346
|
+
SmartPtr<DiagMatrix> diag_x = diag_space_x_->MakeNewDiagMatrix();
|
347
|
+
if( D_x )
|
348
|
+
{
|
349
|
+
if( delta_x == 0. )
|
350
|
+
{
|
351
|
+
diag_x->SetDiag(*D_x);
|
352
|
+
}
|
353
|
+
else
|
354
|
+
{
|
355
|
+
SmartPtr<Vector> tmp = D_x->MakeNewCopy();
|
356
|
+
tmp->AddScalar(delta_x);
|
357
|
+
diag_x->SetDiag(*tmp);
|
358
|
+
}
|
359
|
+
d_x_tag_ = D_x->GetTag();
|
360
|
+
}
|
361
|
+
else
|
362
|
+
{
|
363
|
+
SmartPtr<Vector> tmp = proto_x.MakeNew();
|
364
|
+
tmp->Set(delta_x);
|
365
|
+
diag_x->SetDiag(*tmp);
|
366
|
+
d_x_tag_ = 0;
|
367
|
+
}
|
368
|
+
sumsym_x->SetTerm(1, 1.0, *diag_x);
|
369
|
+
delta_x_ = delta_x;
|
370
|
+
|
371
|
+
augmented_system_->SetComp(0, 0, *sumsym_x);
|
372
|
+
|
373
|
+
// (2,2) block
|
374
|
+
SmartPtr<DiagMatrix> diag_s = diag_space_s_->MakeNewDiagMatrix();
|
375
|
+
if( D_s )
|
376
|
+
{
|
377
|
+
if( delta_s == 0. )
|
378
|
+
{
|
379
|
+
diag_s->SetDiag(*D_s);
|
380
|
+
}
|
381
|
+
else
|
382
|
+
{
|
383
|
+
SmartPtr<Vector> tmp = D_s->MakeNewCopy();
|
384
|
+
tmp->AddScalar(delta_s);
|
385
|
+
diag_s->SetDiag(*tmp);
|
386
|
+
}
|
387
|
+
d_s_tag_ = D_s->GetTag();
|
388
|
+
}
|
389
|
+
else
|
390
|
+
{
|
391
|
+
SmartPtr<Vector> tmp = proto_s.MakeNew();
|
392
|
+
tmp->Set(delta_s);
|
393
|
+
diag_s->SetDiag(*tmp);
|
394
|
+
d_s_tag_ = 0;
|
395
|
+
}
|
396
|
+
delta_s_ = delta_s;
|
397
|
+
|
398
|
+
augmented_system_->SetComp(1, 1, *diag_s);
|
399
|
+
|
400
|
+
// (3,1) block
|
401
|
+
augmented_system_->SetComp(2, 0, J_c);
|
402
|
+
j_c_tag_ = J_c.GetTag();
|
403
|
+
|
404
|
+
// (3,3) block
|
405
|
+
SmartPtr<DiagMatrix> diag_c = diag_space_c_->MakeNewDiagMatrix();
|
406
|
+
if( D_c )
|
407
|
+
{
|
408
|
+
if( delta_c == 0. )
|
409
|
+
{
|
410
|
+
diag_c->SetDiag(*D_c);
|
411
|
+
}
|
412
|
+
else
|
413
|
+
{
|
414
|
+
SmartPtr<Vector> tmp = D_c->MakeNewCopy();
|
415
|
+
tmp->AddScalar(-delta_c);
|
416
|
+
diag_c->SetDiag(*tmp);
|
417
|
+
}
|
418
|
+
d_c_tag_ = D_c->GetTag();
|
419
|
+
}
|
420
|
+
else
|
421
|
+
{
|
422
|
+
SmartPtr<Vector> tmp = proto_c.MakeNew();
|
423
|
+
tmp->Set(-delta_c);
|
424
|
+
diag_c->SetDiag(*tmp);
|
425
|
+
d_c_tag_ = 0;
|
426
|
+
}
|
427
|
+
delta_c_ = delta_c;
|
428
|
+
|
429
|
+
augmented_system_->SetComp(2, 2, *diag_c);
|
430
|
+
|
431
|
+
// (4,1) block
|
432
|
+
augmented_system_->SetComp(3, 0, J_d);
|
433
|
+
j_d_tag_ = J_d.GetTag();
|
434
|
+
|
435
|
+
// (4,2) block
|
436
|
+
SmartPtr<IdentityMatrix> ident_ds = ident_space_ds_->MakeNewIdentityMatrix();
|
437
|
+
ident_ds->SetFactor(-1.0);
|
438
|
+
augmented_system_->SetComp(3, 1, *ident_ds);
|
439
|
+
|
440
|
+
// (4,4) block
|
441
|
+
SmartPtr<DiagMatrix> diag_d = diag_space_d_->MakeNewDiagMatrix();
|
442
|
+
if( D_d )
|
443
|
+
{
|
444
|
+
if( delta_d == 0. )
|
445
|
+
{
|
446
|
+
diag_d->SetDiag(*D_d);
|
447
|
+
}
|
448
|
+
else
|
449
|
+
{
|
450
|
+
SmartPtr<Vector> tmp = D_d->MakeNewCopy();
|
451
|
+
tmp->AddScalar(-delta_d);
|
452
|
+
diag_d->SetDiag(*tmp);
|
453
|
+
}
|
454
|
+
d_d_tag_ = D_d->GetTag();
|
455
|
+
}
|
456
|
+
else
|
457
|
+
{
|
458
|
+
SmartPtr<Vector> tmp = proto_d.MakeNew();
|
459
|
+
tmp->Set(-delta_d);
|
460
|
+
diag_d->SetDiag(*tmp);
|
461
|
+
d_d_tag_ = 0;
|
462
|
+
}
|
463
|
+
delta_d_ = delta_d;
|
464
|
+
|
465
|
+
augmented_system_->SetComp(3, 3, *diag_d);
|
466
|
+
|
467
|
+
augsys_tag_ = augmented_system_->GetTag();
|
468
|
+
}
|
469
|
+
|
470
|
+
bool StdAugSystemSolver::AugmentedSystemRequiresChange(
|
471
|
+
const SymMatrix* W,
|
472
|
+
Number W_factor,
|
473
|
+
const Vector* D_x,
|
474
|
+
Number delta_x,
|
475
|
+
const Vector* D_s,
|
476
|
+
Number delta_s,
|
477
|
+
const Matrix& J_c,
|
478
|
+
const Vector* D_c,
|
479
|
+
Number delta_c,
|
480
|
+
const Matrix& J_d,
|
481
|
+
const Vector* D_d,
|
482
|
+
Number delta_d
|
483
|
+
)
|
484
|
+
{
|
485
|
+
DBG_START_METH("StdAugSystemSolver::AugmentedSystemRequiresChange", dbg_verbosity);
|
486
|
+
DBG_ASSERT(augsys_tag_ == augmented_system_->GetTag() && "Someone has changed the augmented system outside of the AugSystemSolver. This should NOT happen.");
|
487
|
+
|
488
|
+
#if IPOPT_VERBOSITY > 0
|
489
|
+
|
490
|
+
bool Wtest = (W && W->GetTag() != w_tag_);
|
491
|
+
bool iWtest = (!W && w_tag_ != 0);
|
492
|
+
bool wfactor_test = (W_factor != w_factor_);
|
493
|
+
bool D_xtest = (D_x && D_x->GetTag() != d_x_tag_);
|
494
|
+
bool iD_xtest = (!D_x && d_x_tag_ != 0);
|
495
|
+
bool delta_xtest = (delta_x != delta_x_);
|
496
|
+
bool D_stest = (D_s && D_s->GetTag() != d_s_tag_);
|
497
|
+
bool iD_stest = (!D_s && d_s_tag_ != 0);
|
498
|
+
bool delta_stest = (delta_s != delta_s_);
|
499
|
+
bool J_ctest = (J_c.GetTag() != j_c_tag_);
|
500
|
+
bool D_ctest = (D_c && D_c->GetTag() != d_c_tag_);
|
501
|
+
bool iD_ctest = (!D_c && d_c_tag_ != 0);
|
502
|
+
bool delta_ctest = (delta_c != delta_c_);
|
503
|
+
bool J_dtest = (J_d.GetTag() != j_d_tag_);
|
504
|
+
bool D_dtest = (D_d && D_d->GetTag() != d_d_tag_);
|
505
|
+
bool iD_dtest = (!D_d && d_d_tag_ != 0);
|
506
|
+
bool delta_dtest = (delta_d != delta_d_);
|
507
|
+
#endif
|
508
|
+
|
509
|
+
DBG_PRINT((2, "Wtest = %d\n", Wtest));
|
510
|
+
DBG_PRINT((2, "iWtest = %d\n", iWtest));
|
511
|
+
DBG_PRINT((2, "wfactor_test = %d\n", wfactor_test));
|
512
|
+
DBG_PRINT((2, "D_xtest = %d\n", D_xtest));
|
513
|
+
DBG_PRINT((2, "iD_xtest = %d\n", iD_xtest));
|
514
|
+
DBG_PRINT((2, "delta_xtest = %d\n", delta_xtest));
|
515
|
+
DBG_PRINT((2, "D_stest = %d\n", D_stest));
|
516
|
+
DBG_PRINT((2, "iD_stest = %d\n", iD_stest));
|
517
|
+
DBG_PRINT((2, "delta_stest = %d\n", delta_stest));
|
518
|
+
DBG_PRINT((2, "J_ctest = %d\n", J_ctest));
|
519
|
+
DBG_PRINT((2, "D_ctest = %d\n", D_ctest));
|
520
|
+
DBG_PRINT((2, "iD_ctest = %d\n", iD_ctest));
|
521
|
+
DBG_PRINT((2, "delta_ctest = %d\n", delta_ctest));
|
522
|
+
DBG_PRINT((2, "J_dtest = %d\n", J_dtest));
|
523
|
+
DBG_PRINT((2, "D_dtest = %d\n", D_dtest));
|
524
|
+
DBG_PRINT((2, "iD_dtest = %d\n", iD_dtest));
|
525
|
+
DBG_PRINT((2, "delta_dtest = %d\n", delta_dtest));
|
526
|
+
|
527
|
+
if( (W && W->GetTag() != w_tag_) || (!W && w_tag_ != 0) || (W_factor != w_factor_) || (D_x && D_x->GetTag() != d_x_tag_)
|
528
|
+
|| (!D_x && d_x_tag_ != 0) || (delta_x != delta_x_) || (D_s && D_s->GetTag() != d_s_tag_) || (!D_s && d_s_tag_ != 0)
|
529
|
+
|| (delta_s != delta_s_) || (J_c.GetTag() != j_c_tag_) || (D_c && D_c->GetTag() != d_c_tag_)
|
530
|
+
|| (!D_c && d_c_tag_ != 0) || (delta_c != delta_c_) || (J_d.GetTag() != j_d_tag_)
|
531
|
+
|| (D_d && D_d->GetTag() != d_d_tag_) || (!D_d && d_d_tag_ != 0) || (delta_d != delta_d_) )
|
532
|
+
{
|
533
|
+
return true;
|
534
|
+
}
|
535
|
+
|
536
|
+
return false;
|
537
|
+
}
|
538
|
+
|
539
|
+
Index StdAugSystemSolver::NumberOfNegEVals() const
|
540
|
+
{
|
541
|
+
DBG_ASSERT(IsValid(augmented_system_));
|
542
|
+
return linsolver_->NumberOfNegEVals();
|
543
|
+
}
|
544
|
+
|
545
|
+
bool StdAugSystemSolver::ProvidesInertia() const
|
546
|
+
{
|
547
|
+
return linsolver_->ProvidesInertia();
|
548
|
+
}
|
549
|
+
|
550
|
+
bool StdAugSystemSolver::IncreaseQuality()
|
551
|
+
{
|
552
|
+
return linsolver_->IncreaseQuality();
|
553
|
+
}
|
554
|
+
|
555
|
+
} // namespace Ipopt
|