casadi 3.6.5__cp38-none-manylinux2014_i686.whl → 3.6.7__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 +739 -308
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/highs/highs-config.cmake +6 -13
- casadi/cmake/highs/highs-targets-release.cmake +13 -13
- casadi/cmake/highs/highs-targets.cmake +13 -10
- casadi/highs +0 -0
- casadi/include/casadi/casadi.i +3 -0
- casadi/include/casadi/casadi_c.h +2 -0
- casadi/include/casadi/config.h +8 -8
- casadi/include/casadi/core/casadi_common.hpp +1 -0
- casadi/include/casadi/core/casadi_misc.hpp +52 -0
- casadi/include/casadi/core/casadi_types.hpp +3 -2
- casadi/include/casadi/core/code_generator.hpp +30 -1
- casadi/include/casadi/core/global_options.hpp +2 -0
- casadi/include/casadi/core/mx.hpp +18 -3
- casadi/include/casadi/core/optistack.hpp +23 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +19 -4
- casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
- casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
- casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
- casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
- casadi/include/casadi/core/serializing_stream.hpp +2 -2
- casadi/include/casadi/core/sparsity.hpp +7 -0
- casadi/include/casadi/doc.i +1513 -1016
- casadi/include/casadi/doc_merged.i +965 -719
- casadi/include/casadi/mem.h +1 -0
- casadi/include/daqp/api.h +46 -0
- casadi/include/daqp/auxiliary.h +29 -0
- casadi/include/daqp/bnb.h +32 -0
- casadi/include/daqp/codegen.h +18 -0
- casadi/include/daqp/constants.h +92 -0
- casadi/include/daqp/daqp.h +22 -0
- casadi/include/daqp/daqp_prox.h +18 -0
- casadi/include/daqp/factorization.h +18 -0
- casadi/include/daqp/types.h +161 -0
- casadi/include/daqp/utils.h +44 -0
- casadi/include/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/libCbcSolver.so +0 -0
- casadi/libCbcSolver.so.3 +0 -0
- casadi/libCbcSolver.so.3.10.11 +0 -0
- casadi/libClpSolver.so +0 -0
- casadi/libClpSolver.so.1 +0 -0
- casadi/libClpSolver.so.1.14.9 +0 -0
- casadi/libbonmin.so +0 -0
- casadi/libbonmin.so.4 +0 -0
- casadi/libbonmin.so.4.8.9 +0 -0
- casadi/libcasadi.so +0 -0
- casadi/libcasadi.so.3.7 +0 -0
- casadi/libcasadi_conic_cbc.so +0 -0
- casadi/libcasadi_conic_cbc.so.3.7 +0 -0
- casadi/libcasadi_conic_clp.so +0 -0
- casadi/libcasadi_conic_clp.so.3.7 +0 -0
- casadi/libcasadi_conic_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/libcoinmetis.la +1 -1
- casadi/libcoinmetis.so +0 -0
- casadi/libcoinmetis.so.2 +0 -0
- casadi/libcoinmetis.so.2.0.0 +0 -0
- casadi/libdaqp.so +0 -0
- casadi/libdaqpstat.a +0 -0
- casadi/libhighs.so +0 -0
- casadi/libhighs.so.1 +0 -0
- casadi/libhighs.so.1.7.2 +0 -0
- casadi/libindirect.a +0 -0
- casadi/liblinsys.a +0 -0
- casadi/libmatlab_ipc.so +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.so +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libsleqp.so +0 -0
- casadi/libsleqp.so.1.0.1 +0 -0
- casadi/libspral.a +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/pkgconfig/casadi.pc +1 -1
- casadi/pkgconfig/highs.pc +1 -1
- casadi/tools/__init__.py +4 -0
- casadi/tools/bounds.py +3 -3
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/METADATA +2 -2
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/RECORD +365 -250
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/libFortranHighs.so +0 -0
- casadi/libhighs.so.1.6 +0 -0
- casadi/libhighs.so.1.6.0 +0 -0
- {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
#ifndef __SRC_LIB_PRICING_HPP__
|
2
|
+
#define __SRC_LIB_PRICING_HPP__
|
3
|
+
|
4
|
+
#include "qpvector.hpp"
|
5
|
+
|
6
|
+
class Pricing {
|
7
|
+
public:
|
8
|
+
virtual HighsInt price(const QpVector& x, const QpVector& gradient) = 0;
|
9
|
+
virtual void update_weights(const QpVector& aq, const QpVector& ep, HighsInt p,
|
10
|
+
HighsInt q) = 0;
|
11
|
+
virtual void recompute() = 0;
|
12
|
+
virtual ~Pricing() {}
|
13
|
+
};
|
14
|
+
|
15
|
+
#endif
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#pragma once
|
2
|
+
#ifndef __SRC_LIB_QPCONST_HPP__
|
3
|
+
#define __SRC_LIB_QPCONST_HPP__
|
4
|
+
|
5
|
+
enum class QpSolverStatus { OK, NOTPOSITIVDEFINITE, DEGENERATE };
|
6
|
+
|
7
|
+
enum class QpModelStatus {
|
8
|
+
kNotset, // 0
|
9
|
+
kUndetermined,
|
10
|
+
kOptimal,
|
11
|
+
kUnbounded,
|
12
|
+
kInfeasible,
|
13
|
+
kIterationLimit,
|
14
|
+
kTimeLimit,
|
15
|
+
kLargeNullspace,
|
16
|
+
kError
|
17
|
+
};
|
18
|
+
|
19
|
+
enum class BasisStatus {
|
20
|
+
kInactive,
|
21
|
+
kActiveAtLower = 1,
|
22
|
+
kActiveAtUpper,
|
23
|
+
kInactiveInBasis
|
24
|
+
};
|
25
|
+
|
26
|
+
|
27
|
+
#endif
|
@@ -8,19 +8,19 @@
|
|
8
8
|
#include <string>
|
9
9
|
#include <vector>
|
10
10
|
|
11
|
-
struct
|
11
|
+
struct QpVector {
|
12
12
|
HighsInt num_nz;
|
13
13
|
HighsInt dim;
|
14
14
|
std::vector<HighsInt> index;
|
15
15
|
std::vector<double> value;
|
16
16
|
|
17
|
-
|
17
|
+
QpVector(HighsInt d) : dim(d) {
|
18
18
|
index.resize(dim);
|
19
19
|
value.resize(dim, 0.0);
|
20
20
|
num_nz = 0;
|
21
21
|
}
|
22
22
|
|
23
|
-
|
23
|
+
QpVector(const QpVector& vec)
|
24
24
|
: num_nz(vec.num_nz), dim(vec.dim), index(vec.index), value(vec.value) {}
|
25
25
|
|
26
26
|
void reset() {
|
@@ -31,7 +31,7 @@ struct Vector {
|
|
31
31
|
num_nz = 0;
|
32
32
|
}
|
33
33
|
|
34
|
-
|
34
|
+
QpVector& repopulate(const QpVector& other) {
|
35
35
|
reset();
|
36
36
|
for (HighsInt i = 0; i < other.num_nz; i++) {
|
37
37
|
index[i] = other.index[i];
|
@@ -41,7 +41,7 @@ struct Vector {
|
|
41
41
|
return *this;
|
42
42
|
}
|
43
43
|
|
44
|
-
|
44
|
+
QpVector& operator=(const QpVector& other) {
|
45
45
|
num_nz = other.num_nz;
|
46
46
|
dim = other.dim;
|
47
47
|
index = other.index;
|
@@ -49,7 +49,7 @@ struct Vector {
|
|
49
49
|
return *this;
|
50
50
|
}
|
51
51
|
|
52
|
-
static
|
52
|
+
static QpVector& unit(HighsInt dim, HighsInt u, QpVector& target) {
|
53
53
|
target.reset();
|
54
54
|
target.index[0] = u;
|
55
55
|
target.value[u] = 1.0;
|
@@ -57,15 +57,15 @@ struct Vector {
|
|
57
57
|
return target;
|
58
58
|
}
|
59
59
|
|
60
|
-
static
|
61
|
-
|
60
|
+
static QpVector unit(HighsInt dim, HighsInt u) {
|
61
|
+
QpVector vec(dim);
|
62
62
|
vec.index[0] = u;
|
63
63
|
vec.value[u] = 1.0;
|
64
64
|
vec.num_nz = 1;
|
65
65
|
return vec;
|
66
66
|
}
|
67
67
|
|
68
|
-
void report(std::string name = "") {
|
68
|
+
void report(std::string name = "") const {
|
69
69
|
if (name != "") {
|
70
70
|
printf("%s: ", name.c_str());
|
71
71
|
}
|
@@ -85,7 +85,7 @@ struct Vector {
|
|
85
85
|
return val;
|
86
86
|
}
|
87
87
|
|
88
|
-
void sanitize(double threshold =
|
88
|
+
void sanitize(double threshold = 1e-14) {
|
89
89
|
HighsInt new_idx = 0;
|
90
90
|
|
91
91
|
for (HighsInt i = 0; i < num_nz; i++) {
|
@@ -108,20 +108,20 @@ struct Vector {
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
|
111
|
+
QpVector& scale(double a) {
|
112
112
|
for (HighsInt i = 0; i < num_nz; i++) {
|
113
113
|
value[index[i]] *= a;
|
114
114
|
}
|
115
115
|
return *this;
|
116
116
|
}
|
117
117
|
|
118
|
-
|
118
|
+
QpVector& saxpy(double a, double b, const QpVector& x) {
|
119
119
|
scale(a);
|
120
120
|
saxpy(b, x);
|
121
121
|
return *this;
|
122
122
|
}
|
123
123
|
|
124
|
-
|
124
|
+
QpVector& saxpy(double a, const QpVector& x) {
|
125
125
|
sanitize(0.0);
|
126
126
|
for (HighsInt i = 0; i < x.num_nz; i++) {
|
127
127
|
if (value[x.index[i]] == 0.0) {
|
@@ -141,8 +141,8 @@ struct Vector {
|
|
141
141
|
// resparsify();
|
142
142
|
// }
|
143
143
|
|
144
|
-
|
145
|
-
|
144
|
+
QpVector operator+(const QpVector& other) const {
|
145
|
+
QpVector result(dim);
|
146
146
|
|
147
147
|
for (HighsInt i = 0; i < dim; i++) {
|
148
148
|
result.value[i] = value[i] + other.value[i];
|
@@ -154,8 +154,8 @@ struct Vector {
|
|
154
154
|
return result;
|
155
155
|
}
|
156
156
|
|
157
|
-
|
158
|
-
|
157
|
+
QpVector operator-(const QpVector& other) const {
|
158
|
+
QpVector result(dim);
|
159
159
|
|
160
160
|
for (HighsInt i = 0; i < dim; i++) {
|
161
161
|
result.value[i] = value[i] - other.value[i];
|
@@ -167,8 +167,8 @@ struct Vector {
|
|
167
167
|
return result;
|
168
168
|
}
|
169
169
|
|
170
|
-
|
171
|
-
|
170
|
+
QpVector operator-() const {
|
171
|
+
QpVector result(dim);
|
172
172
|
|
173
173
|
for (HighsInt i = 0; i < num_nz; i++) {
|
174
174
|
result.index[i] = index[i];
|
@@ -179,8 +179,8 @@ struct Vector {
|
|
179
179
|
return result;
|
180
180
|
}
|
181
181
|
|
182
|
-
|
183
|
-
|
182
|
+
QpVector operator*(const double d) const {
|
183
|
+
QpVector result(dim);
|
184
184
|
|
185
185
|
for (HighsInt i = 0; i < num_nz; i++) {
|
186
186
|
result.index[i] = index[i];
|
@@ -191,7 +191,7 @@ struct Vector {
|
|
191
191
|
return result;
|
192
192
|
}
|
193
193
|
|
194
|
-
double dot(const
|
194
|
+
double dot(const QpVector& other) const {
|
195
195
|
double dot = 0.0;
|
196
196
|
for (HighsInt i = 0; i < num_nz; i++) {
|
197
197
|
dot += value[index[i]] * other.value[index[i]];
|
@@ -200,7 +200,7 @@ struct Vector {
|
|
200
200
|
return dot;
|
201
201
|
}
|
202
202
|
|
203
|
-
double operator*(const
|
203
|
+
double operator*(const QpVector& other) const { return dot(other); }
|
204
204
|
|
205
205
|
double dot(const HighsInt* idx, const double* val, HighsInt nnz) const {
|
206
206
|
double dot = 0.0;
|
@@ -211,7 +211,7 @@ struct Vector {
|
|
211
211
|
return dot;
|
212
212
|
}
|
213
213
|
|
214
|
-
|
214
|
+
QpVector& operator+=(const QpVector& other) {
|
215
215
|
// sanitize();
|
216
216
|
for (HighsInt i = 0; i < other.num_nz; i++) {
|
217
217
|
// if (value[other.index[i]] == 0.0) {
|
@@ -223,7 +223,7 @@ struct Vector {
|
|
223
223
|
return *this;
|
224
224
|
}
|
225
225
|
|
226
|
-
|
226
|
+
QpVector& operator*=(const double d) {
|
227
227
|
for (HighsInt i = 0; i < num_nz; i++) {
|
228
228
|
value[index[i]] *= d;
|
229
229
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#ifndef __SRC_LIB_RATIOTEST_HPP__
|
2
|
+
#define __SRC_LIB_RATIOTEST_HPP__
|
3
|
+
|
4
|
+
#include <limits>
|
5
|
+
|
6
|
+
#include "runtime.hpp"
|
7
|
+
|
8
|
+
struct RatiotestResult {
|
9
|
+
double alpha;
|
10
|
+
HighsInt limitingconstraint;
|
11
|
+
bool nowactiveatlower;
|
12
|
+
};
|
13
|
+
|
14
|
+
RatiotestResult ratiotest(Runtime& runtime, const QpVector& p,
|
15
|
+
const QpVector& rowmove, double alphastart);
|
16
|
+
|
17
|
+
Instance ratiotest_relax_instance(Runtime& runtime);
|
18
|
+
|
19
|
+
#endif
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#ifndef __SRC_LIB_RUNTIME_HPP__
|
2
|
+
#define __SRC_LIB_RUNTIME_HPP__
|
3
|
+
|
4
|
+
#include "util/HighsTimer.h"
|
5
|
+
#include "instance.hpp"
|
6
|
+
#include "settings.hpp"
|
7
|
+
#include "statistics.hpp"
|
8
|
+
#include "qpsolver/qpconst.hpp"
|
9
|
+
|
10
|
+
struct Runtime {
|
11
|
+
Instance instance;
|
12
|
+
Instance relaxed_for_ratiotest;
|
13
|
+
Instance scaled;
|
14
|
+
Instance perturbed;
|
15
|
+
Settings settings;
|
16
|
+
Statistics& statistics;
|
17
|
+
|
18
|
+
QpVector primal;
|
19
|
+
QpVector rowactivity;
|
20
|
+
QpVector dualvar;
|
21
|
+
QpVector dualcon;
|
22
|
+
QpModelStatus status = QpModelStatus::kUndetermined;
|
23
|
+
|
24
|
+
std::vector<BasisStatus> status_var;
|
25
|
+
std::vector<BasisStatus> status_con;
|
26
|
+
|
27
|
+
Runtime(Instance& inst, Statistics& stats)
|
28
|
+
: instance(inst),
|
29
|
+
statistics(stats),
|
30
|
+
primal(QpVector(instance.num_var)),
|
31
|
+
rowactivity(QpVector(instance.num_con)),
|
32
|
+
dualvar(instance.num_var),
|
33
|
+
dualcon(instance.num_con),
|
34
|
+
status_var(instance.num_var),
|
35
|
+
status_con(instance.num_con) {}
|
36
|
+
};
|
37
|
+
|
38
|
+
#endif
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#ifndef __SRC_LIB_SETTINGS_HPP__
|
2
|
+
#define __SRC_LIB_SETTINGS_HPP__
|
3
|
+
|
4
|
+
#include "eventhandler.hpp"
|
5
|
+
#include "qpconst.hpp"
|
6
|
+
#include "statistics.hpp"
|
7
|
+
|
8
|
+
enum class RatiotestStrategy { TwoPass, Textbook };
|
9
|
+
|
10
|
+
enum class PricingStrategy { SteepestEdge, DantzigWolfe, Devex };
|
11
|
+
|
12
|
+
enum class Phase1Strategy { HIGHS, QUASS, BOUNDED };
|
13
|
+
|
14
|
+
struct Settings {
|
15
|
+
RatiotestStrategy ratiotest = RatiotestStrategy::TwoPass;
|
16
|
+
double ratiotest_t = 1e-9;
|
17
|
+
double ratiotest_d = 1e-8;
|
18
|
+
|
19
|
+
PricingStrategy pricing = PricingStrategy::Devex;
|
20
|
+
|
21
|
+
double pnorm_zero_threshold = 1e-11; // if ||p|| < this threshold, p is determined to not be an improving search direction
|
22
|
+
double improvement_zero_threshold = 1e-4; // if p^t gradient < this threshold, p is determined to not be an improving search direction
|
23
|
+
double d_zero_threshold = 1e-12; // minimal value for pivot, will declare degeneracy if no larger pivot is found
|
24
|
+
double lambda_zero_threshold = 1e-9; // used for pricing / optimality checking
|
25
|
+
double pQp_zero_threshold = 1e-7; // if p'Qp < this, p is determined to not have curvature, a simplex-like iteration is performed.
|
26
|
+
|
27
|
+
bool hessianregularization = false; // if true, a small multiple of the identity matrix will be added to the Hessian
|
28
|
+
double hessianregularizationfactor = 1e-7; // multiple of identity matrix added to hessian in case of regularization
|
29
|
+
|
30
|
+
Phase1Strategy phase1strategy = Phase1Strategy::HIGHS;
|
31
|
+
bool phase1movefreevarsbasic = false;
|
32
|
+
bool phase1boundfreevars = false;
|
33
|
+
|
34
|
+
HighsInt reportingfequency = 1;
|
35
|
+
Eventhandler<Statistics&> iteration_log;
|
36
|
+
Eventhandler<QpModelStatus&> qp_model_status_log;
|
37
|
+
Eventhandler<HighsInt&> nullspace_limit_log;
|
38
|
+
|
39
|
+
HighsInt nullspace_limit = 4000;
|
40
|
+
|
41
|
+
HighsInt reinvertfrequency = 1000;
|
42
|
+
HighsInt gradientrecomputefrequency = 100;
|
43
|
+
HighsInt reducedgradientrecomputefrequency =
|
44
|
+
std::numeric_limits<HighsInt>::infinity();
|
45
|
+
HighsInt reducedhessianrecomputefrequency =
|
46
|
+
std::numeric_limits<HighsInt>::infinity();
|
47
|
+
|
48
|
+
HighsInt iteration_limit = std::numeric_limits<HighsInt>::infinity();
|
49
|
+
double time_limit = std::numeric_limits<double>::infinity();
|
50
|
+
|
51
|
+
bool rowscaling = true;
|
52
|
+
bool varscaling = true;
|
53
|
+
|
54
|
+
bool perturbation = false;
|
55
|
+
};
|
56
|
+
|
57
|
+
#endif
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#ifndef __SRC_LIB_SNIPPETS_HPP__
|
2
|
+
#define __SRC_LIB_SNIPPETS_HPP__
|
3
|
+
|
4
|
+
#include <algorithm>
|
5
|
+
#include <vector>
|
6
|
+
|
7
|
+
template <typename T>
|
8
|
+
bool contains(const std::vector<T>& vec, const T& element) {
|
9
|
+
return std::find(vec.begin(), vec.end(), element) != vec.end();
|
10
|
+
}
|
11
|
+
|
12
|
+
template <typename T>
|
13
|
+
bool remove(std::vector<T>& vec, const T& element) {
|
14
|
+
auto rem = std::remove(vec.begin(), vec.end(), element);
|
15
|
+
auto rem2 = vec.erase(rem, vec.end());
|
16
|
+
return rem2 != vec.end();
|
17
|
+
}
|
18
|
+
|
19
|
+
template <typename T>
|
20
|
+
HighsInt indexof(const std::vector<T>& vec, const T& element) {
|
21
|
+
auto it = std::find(vec.begin(), vec.end(), element);
|
22
|
+
if (it != vec.end()) {
|
23
|
+
return distance(vec.begin(), it);
|
24
|
+
} else {
|
25
|
+
return -1;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
#endif
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#ifndef __SRC_LIB_STATISTICS_HPP__
|
2
|
+
#define __SRC_LIB_STATISTICS_HPP__
|
3
|
+
|
4
|
+
#include <chrono>
|
5
|
+
#include <vector>
|
6
|
+
|
7
|
+
struct Statistics {
|
8
|
+
HighsInt phase1_iterations = 0;
|
9
|
+
HighsInt num_iterations = 0;
|
10
|
+
std::chrono::high_resolution_clock::time_point time_start;
|
11
|
+
std::chrono::high_resolution_clock::time_point time_end;
|
12
|
+
|
13
|
+
std::vector<HighsInt> iteration;
|
14
|
+
std::vector<HighsInt> nullspacedimension;
|
15
|
+
std::vector<double> objval;
|
16
|
+
std::vector<double> time;
|
17
|
+
std::vector<double> sum_primal_infeasibilities;
|
18
|
+
std::vector<HighsInt> num_primal_infeasibilities;
|
19
|
+
std::vector<double> density_nullspace;
|
20
|
+
std::vector<double> density_factor;
|
21
|
+
};
|
22
|
+
|
23
|
+
#endif
|
@@ -0,0 +1,167 @@
|
|
1
|
+
#ifndef __SRC_LIB_PRICING_STEEPESTEDGEPRICING_HPP__
|
2
|
+
#define __SRC_LIB_PRICING_STEEPESTEDGEPRICING_HPP__
|
3
|
+
|
4
|
+
#include "qpsolver/basis.hpp"
|
5
|
+
#include "qpsolver/pricing.hpp"
|
6
|
+
#include "qpsolver/runtime.hpp"
|
7
|
+
|
8
|
+
//
|
9
|
+
|
10
|
+
class SteepestEdgePricing : public Pricing {
|
11
|
+
private:
|
12
|
+
Runtime& runtime;
|
13
|
+
Basis& basis;
|
14
|
+
ReducedCosts& redcosts;
|
15
|
+
std::vector<double> weights;
|
16
|
+
|
17
|
+
HighsInt chooseconstrainttodrop(const QpVector& lambda) {
|
18
|
+
auto active_constraint_index = basis.getactive();
|
19
|
+
auto constraintindexinbasisfactor = basis.getindexinfactor();
|
20
|
+
|
21
|
+
HighsInt minidx = -1;
|
22
|
+
double maxval = 0.0;
|
23
|
+
for (size_t i = 0; i < active_constraint_index.size(); i++) {
|
24
|
+
HighsInt indexinbasis =
|
25
|
+
constraintindexinbasisfactor[active_constraint_index[i]];
|
26
|
+
if (indexinbasis == -1) {
|
27
|
+
printf("error\n");
|
28
|
+
}
|
29
|
+
assert(indexinbasis != -1);
|
30
|
+
|
31
|
+
double val = lambda.value[indexinbasis] * lambda.value[indexinbasis] /
|
32
|
+
weights[indexinbasis];
|
33
|
+
if (val > maxval && fabs(lambda.value[indexinbasis]) >
|
34
|
+
runtime.settings.lambda_zero_threshold) {
|
35
|
+
if (basis.getstatus(active_constraint_index[i]) ==
|
36
|
+
BasisStatus::kActiveAtLower &&
|
37
|
+
-lambda.value[indexinbasis] > 0) {
|
38
|
+
minidx = active_constraint_index[i];
|
39
|
+
maxval = val;
|
40
|
+
} else if (basis.getstatus(active_constraint_index[i]) ==
|
41
|
+
BasisStatus::kActiveAtUpper &&
|
42
|
+
lambda.value[indexinbasis] > 0) {
|
43
|
+
minidx = active_constraint_index[i];
|
44
|
+
maxval = val;
|
45
|
+
} else {
|
46
|
+
// TODO
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
return minidx;
|
52
|
+
}
|
53
|
+
|
54
|
+
public:
|
55
|
+
SteepestEdgePricing(Runtime& rt, Basis& bas, ReducedCosts& rc)
|
56
|
+
: runtime(rt),
|
57
|
+
basis(bas),
|
58
|
+
redcosts(rc),
|
59
|
+
weights(std::vector<double>(rt.instance.num_var, 1.0)) {
|
60
|
+
compute_exact_weights();
|
61
|
+
};
|
62
|
+
|
63
|
+
HighsInt price(const QpVector& x, const QpVector& gradient) {
|
64
|
+
HighsInt minidx = chooseconstrainttodrop(redcosts.getReducedCosts());
|
65
|
+
return minidx;
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
double compute_exact_weight(HighsInt i) {
|
70
|
+
QpVector y_i = basis.btran(QpVector::unit(runtime.instance.num_var, i));
|
71
|
+
return y_i.dot(y_i);
|
72
|
+
}
|
73
|
+
|
74
|
+
void compute_exact_weights() {
|
75
|
+
for (int i=0; i<runtime.instance.num_var; i++) {
|
76
|
+
weights[i] = compute_exact_weight(i);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
bool check_weight(HighsInt i) {
|
81
|
+
double weight_is = weights[i];
|
82
|
+
double weight_comp = compute_exact_weight(i);
|
83
|
+
if(fabs(weight_comp - weight_is) > 1e-2) {
|
84
|
+
//printf("weights[%d] = %lf, should be %lf\n", i, weight_is, weight_comp);
|
85
|
+
return false;
|
86
|
+
}
|
87
|
+
return true;
|
88
|
+
}
|
89
|
+
|
90
|
+
bool check_weights() {
|
91
|
+
|
92
|
+
std::vector<int> correct_weights;
|
93
|
+
std::vector<int> incorrect_weights;
|
94
|
+
for (int i=0; i<runtime.instance.num_var; i++) {
|
95
|
+
bool correct = check_weight(i);
|
96
|
+
if (correct) {
|
97
|
+
correct_weights.push_back(i);
|
98
|
+
} else {
|
99
|
+
incorrect_weights.push_back(i);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
printf("correct weights: ");
|
104
|
+
for (int& i : correct_weights) {
|
105
|
+
printf("%d ", i);
|
106
|
+
}
|
107
|
+
printf("\n");
|
108
|
+
|
109
|
+
printf("incorrect weights: ");
|
110
|
+
for (int& i : incorrect_weights) {
|
111
|
+
printf("%d ", i);
|
112
|
+
}
|
113
|
+
printf("\n");
|
114
|
+
|
115
|
+
return incorrect_weights.size() == 0;
|
116
|
+
}
|
117
|
+
|
118
|
+
void recompute() {
|
119
|
+
compute_exact_weights();
|
120
|
+
}
|
121
|
+
|
122
|
+
void update_weights(const QpVector& aq, const QpVector& ep, HighsInt p,
|
123
|
+
HighsInt q) {
|
124
|
+
HighsInt rowindex_p = basis.getindexinfactor()[p];
|
125
|
+
//printf("Update weights, p = %d, rowindex = %d, q = %d\n", p, rowindex_p, q);
|
126
|
+
|
127
|
+
//if (!check_weights()) {
|
128
|
+
// printf("weight check failed\n");
|
129
|
+
// exit(1);
|
130
|
+
//}
|
131
|
+
|
132
|
+
QpVector delta = basis.ftran(aq);
|
133
|
+
|
134
|
+
//double old_weight_p_updated = weights[rowindex_p];
|
135
|
+
// exact weight coming in needs to come in before update.
|
136
|
+
double old_weight_p_computed = ep.dot(ep);
|
137
|
+
|
138
|
+
//if (fabs(old_weight_p_computed - old_weight_p_updated) >= 1e-2) {
|
139
|
+
// printf("old weight[p] discrepancy: updated = %lf, computed=%lf\n", old_weight_p_updated, old_weight_p_computed);
|
140
|
+
//}
|
141
|
+
|
142
|
+
double weight_p = old_weight_p_computed;
|
143
|
+
|
144
|
+
|
145
|
+
double t_p = aq.value[rowindex_p];
|
146
|
+
for (HighsInt i = 0; i < runtime.instance.num_var; i++) {
|
147
|
+
if (i != rowindex_p) {
|
148
|
+
double t_i = aq.value[i];
|
149
|
+
weights[i] = weights[i]
|
150
|
+
- 2 * (t_i / t_p) * delta.value[i]
|
151
|
+
+ ((t_i * t_i) / (t_p * t_p)) * weight_p;
|
152
|
+
//printf("weights[%d] = %lf\n", i, weights[i]);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
//QpVector new_ep = basis.btran(QpVector::unit(runtime.instance.num_var, rowindex_p));
|
156
|
+
//double computed_weight = new_ep.dot(new_ep);
|
157
|
+
double new_weight_p_updated = weight_p / (t_p * t_p);
|
158
|
+
|
159
|
+
//if (fabs(updated_weight - computed_weight) > 1e-4) {
|
160
|
+
// printf("updated weight %lf vs computed weight %lf. aq[p] = %lf\n", updated_weight, computed_weight, t_p);
|
161
|
+
// printf("old weight = %lf, aq[p] = %lf, ^2 = %lf, new weight = %lf\n", weight_p, t_p, t_p*t_p, updated_weight);
|
162
|
+
//}
|
163
|
+
weights[rowindex_p] = new_weight_p_updated;
|
164
|
+
}
|
165
|
+
};
|
166
|
+
|
167
|
+
#endif
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/* */
|
3
3
|
/* This file is part of the HiGHS linear optimization suite */
|
4
4
|
/* */
|
5
|
-
/* Written and engineered 2008-
|
5
|
+
/* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
|
6
6
|
/* Leona Gottwald and Michael Feldmeier */
|
7
7
|
/* */
|
8
8
|
/* Available as open-source under the MIT License */
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/* */
|
3
3
|
/* This file is part of the HiGHS linear optimization suite */
|
4
4
|
/* */
|
5
|
-
/* Written and engineered 2008-
|
5
|
+
/* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
|
6
6
|
/* Leona Gottwald and Michael Feldmeier */
|
7
7
|
/* */
|
8
8
|
/* Available as open-source under the MIT License */
|
@@ -25,7 +25,41 @@ class HighsLpSolverObject;
|
|
25
25
|
|
26
26
|
class HEkk {
|
27
27
|
public:
|
28
|
-
HEkk()
|
28
|
+
HEkk()
|
29
|
+
: callback_(nullptr),
|
30
|
+
options_(nullptr),
|
31
|
+
timer_(nullptr),
|
32
|
+
lp_name_(""),
|
33
|
+
model_status_(HighsModelStatus::kNotset),
|
34
|
+
simplex_in_scaled_space_(false),
|
35
|
+
cost_scale_(1.0),
|
36
|
+
cost_perturbation_base_(0.0),
|
37
|
+
cost_perturbation_max_abs_cost_(0.0),
|
38
|
+
iteration_count_(0),
|
39
|
+
dual_simplex_cleanup_level_(0),
|
40
|
+
dual_simplex_phase1_cleanup_level_(0),
|
41
|
+
previous_iteration_cycling_detected(-kHighsIInf),
|
42
|
+
solve_bailout_(false),
|
43
|
+
called_return_from_solve_(false),
|
44
|
+
exit_algorithm_(SimplexAlgorithm::kNone),
|
45
|
+
return_primal_solution_status_(0),
|
46
|
+
return_dual_solution_status_(0),
|
47
|
+
original_num_col_(0),
|
48
|
+
original_num_row_(0),
|
49
|
+
original_num_nz_(0),
|
50
|
+
original_offset_(0.0),
|
51
|
+
edge_weight_error_(0.0),
|
52
|
+
build_synthetic_tick_(0.0),
|
53
|
+
total_synthetic_tick_(0.0),
|
54
|
+
debug_solve_call_num_(0),
|
55
|
+
debug_basis_id_(0),
|
56
|
+
time_report_(false),
|
57
|
+
debug_initial_build_synthetic_tick_(0),
|
58
|
+
debug_solve_report_(false),
|
59
|
+
debug_iteration_report_(false),
|
60
|
+
debug_basis_report_(false),
|
61
|
+
debug_dual_feasible(false),
|
62
|
+
debug_max_relative_dual_steepest_edge_weight_error(0) {}
|
29
63
|
/**
|
30
64
|
* @brief Interface to simplex solvers
|
31
65
|
*/
|
@@ -155,14 +189,14 @@ class HEkk {
|
|
155
189
|
HSimplexNla simplex_nla_;
|
156
190
|
HotStart hot_start_;
|
157
191
|
|
158
|
-
double cost_scale_
|
192
|
+
double cost_scale_;
|
159
193
|
double cost_perturbation_base_;
|
160
194
|
double cost_perturbation_max_abs_cost_;
|
161
|
-
HighsInt iteration_count_
|
162
|
-
HighsInt dual_simplex_cleanup_level_
|
163
|
-
HighsInt dual_simplex_phase1_cleanup_level_
|
195
|
+
HighsInt iteration_count_;
|
196
|
+
HighsInt dual_simplex_cleanup_level_;
|
197
|
+
HighsInt dual_simplex_phase1_cleanup_level_;
|
164
198
|
|
165
|
-
HighsInt previous_iteration_cycling_detected
|
199
|
+
HighsInt previous_iteration_cycling_detected;
|
166
200
|
|
167
201
|
bool solve_bailout_;
|
168
202
|
bool called_return_from_solve_;
|
@@ -197,17 +231,17 @@ class HEkk {
|
|
197
231
|
|
198
232
|
double edge_weight_error_;
|
199
233
|
|
200
|
-
double build_synthetic_tick_
|
201
|
-
double total_synthetic_tick_
|
202
|
-
HighsInt debug_solve_call_num_
|
203
|
-
HighsInt debug_basis_id_
|
204
|
-
bool time_report_
|
205
|
-
HighsInt debug_initial_build_synthetic_tick_
|
206
|
-
bool debug_solve_report_
|
207
|
-
bool debug_iteration_report_
|
208
|
-
bool debug_basis_report_
|
209
|
-
bool debug_dual_feasible
|
210
|
-
double debug_max_relative_dual_steepest_edge_weight_error
|
234
|
+
double build_synthetic_tick_;
|
235
|
+
double total_synthetic_tick_;
|
236
|
+
HighsInt debug_solve_call_num_;
|
237
|
+
HighsInt debug_basis_id_;
|
238
|
+
bool time_report_;
|
239
|
+
HighsInt debug_initial_build_synthetic_tick_;
|
240
|
+
bool debug_solve_report_;
|
241
|
+
bool debug_iteration_report_;
|
242
|
+
bool debug_basis_report_;
|
243
|
+
bool debug_dual_feasible;
|
244
|
+
double debug_max_relative_dual_steepest_edge_weight_error;
|
211
245
|
|
212
246
|
std::vector<HighsSimplexBadBasisChangeRecord> bad_basis_change_;
|
213
247
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/* */
|
3
3
|
/* This file is part of the HiGHS linear optimization suite */
|
4
4
|
/* */
|
5
|
-
/* Written and engineered 2008-
|
5
|
+
/* Written and engineered 2008-2024 by Julian Hall, Ivet Galabova, */
|
6
6
|
/* Leona Gottwald and Michael Feldmeier */
|
7
7
|
/* */
|
8
8
|
/* Available as open-source under the MIT License */
|