casadi 3.6.5__cp37-none-win_amd64.whl → 3.6.6__cp37-none-win_amd64.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.pyd +0 -0
- casadi/bin/libtinyxml2.dll +0 -0
- casadi/blasfeo.lib +0 -0
- casadi/casadi-cli.exe +0 -0
- casadi/casadi.lib +0 -0
- casadi/casadi.py +663 -257
- casadi/cbc.exe +0 -0
- casadi/clp.exe +0 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/highs/highs-config.cmake +7 -14
- casadi/cmake/highs/highs-targets-release.cmake +13 -13
- casadi/cmake/highs/highs-targets.cmake +11 -9
- casadi/daqp.lib +0 -0
- casadi/fatrop.lib +0 -0
- casadi/highs.exe +0 -0
- casadi/highs.lib +0 -0
- casadi/hpipm.lib +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 +13 -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 +13 -3
- casadi/include/casadi/core/optistack.hpp +23 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +2 -0
- 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 +1397 -955
- casadi/include/casadi/doc_merged.i +867 -675
- 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/dlfcn.h +94 -0
- casadi/include/fatrop/auxiliary/Common.hpp +33 -0
- casadi/include/fatrop/auxiliary/DynamicLib.hpp +34 -0
- casadi/include/fatrop/auxiliary/FatropOptions.hpp +68 -0
- casadi/include/fatrop/auxiliary/FatropVector.hpp +143 -0
- casadi/include/fatrop/auxiliary/LinearAlgebra.hpp +88 -0
- casadi/include/fatrop/auxiliary/VectorUtils.hpp +54 -0
- casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +492 -0
- casadi/include/fatrop/function_evaluation/CasadiCodegen.hpp +104 -0
- casadi/include/fatrop/function_evaluation/FunctionEvaluation.hpp +60 -0
- casadi/include/fatrop/json/json.h +946 -0
- casadi/include/fatrop/ocp/CasadiCApiUserdataWrap.hpp +87 -0
- casadi/include/fatrop/ocp/DuInfEvaluator.hpp +38 -0
- casadi/include/fatrop/ocp/FatropOCP.hpp +161 -0
- casadi/include/fatrop/ocp/FatropOCPBuilder.hpp +52 -0
- casadi/include/fatrop/ocp/OCP.hpp +82 -0
- casadi/include/fatrop/ocp/OCPAbstract.hpp +254 -0
- casadi/include/fatrop/ocp/OCPAdapter.hpp +197 -0
- casadi/include/fatrop/ocp/OCPCInterface.h +289 -0
- casadi/include/fatrop/ocp/OCPDims.hpp +60 -0
- casadi/include/fatrop/ocp/OCPInitializer.hpp +41 -0
- casadi/include/fatrop/ocp/OCPKKT.hpp +69 -0
- casadi/include/fatrop/ocp/OCPLSRiccati.hpp +191 -0
- casadi/include/fatrop/ocp/OCPLSScaler.hpp +66 -0
- casadi/include/fatrop/ocp/OCPLinearSolver.hpp +75 -0
- casadi/include/fatrop/ocp/OCPNoScaling.hpp +42 -0
- casadi/include/fatrop/ocp/OCPScalingMethod.hpp +42 -0
- casadi/include/fatrop/ocp/StageOCP.hpp +592 -0
- casadi/include/fatrop/ocp/StageOCPApplication.hpp +242 -0
- casadi/include/fatrop/ocp/StageOCPExpressions.hpp +182 -0
- casadi/include/fatrop/ocp/UStageEvalAbstract.hpp +168 -0
- casadi/include/fatrop/ocp/UStageOCPImpl.hpp +152 -0
- casadi/include/fatrop/quasi_newton/bfgs.hpp +159 -0
- casadi/include/fatrop/solver/AlgBuilder.hpp +66 -0
- casadi/include/fatrop/solver/AlgStrategy.hpp +33 -0
- casadi/include/fatrop/solver/FatropAlg.hpp +108 -0
- casadi/include/fatrop/solver/FatropData.hpp +188 -0
- casadi/include/fatrop/solver/FatropOptions.hpp +94 -0
- casadi/include/fatrop/solver/FatropPrinter.hpp +65 -0
- casadi/include/fatrop/solver/FatropStats.hpp +63 -0
- casadi/include/fatrop/solver/Filter.hpp +54 -0
- casadi/include/fatrop/solver/IterationData.hpp +55 -0
- casadi/include/fatrop/solver/LineSearch.hpp +86 -0
- casadi/include/fatrop/solver/NLPL1.hpp +263 -0
- casadi/include/fatrop/templates/NLPAlg.hpp +102 -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/highs_export.h +42 -0
- casadi/include/licenses/daqp-external/LICENSE +21 -0
- casadi/include/licenses/fatrop-external/LICENSE.txt +165 -0
- casadi/include/licenses/fatrop-external/external/blasfeo/LICENSE.txt +26 -0
- casadi/include/licenses/fatrop-external/external/pybind11/LICENSE +29 -0
- casadi/include/licenses/highs-external/{LICENSE → LICENSE.txt} +1 -1
- casadi/include/osqp/constants.h +2 -3
- casadi/include/osqp/version.h +9 -0
- casadi/include/sleqp/defs.h +2 -2
- casadi/ipopt.lib +0 -0
- casadi/lapack.lib +0 -0
- casadi/lib/libtinyxml2.dll.a +0 -0
- casadi/libCbc-3.dll +0 -0
- casadi/libCbc.dll.a +0 -0
- casadi/libCbcSolver-3.dll +0 -0
- casadi/libCbcSolver.dll.a +0 -0
- casadi/libCgl-1.dll +0 -0
- casadi/libCgl.dll.a +0 -0
- casadi/libClp-1.dll +0 -0
- casadi/libClp.dll.a +0 -0
- casadi/libClpSolver-1.dll +0 -0
- casadi/libClpSolver.dll.a +0 -0
- casadi/libCoinUtils-3.dll +0 -0
- casadi/libCoinUtils.dll.a +0 -0
- casadi/libOsi-1.dll +0 -0
- casadi/libOsi.dll.a +0 -0
- casadi/libOsiCbc-3.dll +0 -0
- casadi/libOsiCbc.dll.a +0 -0
- casadi/libOsiClp-1.dll +0 -0
- casadi/libOsiClp.dll.a +0 -0
- casadi/libOsiCommonTests-1.dll +0 -0
- casadi/libOsiCommonTests.dll.a +0 -0
- casadi/libalpaqa.dll +0 -0
- casadi/libalpaqa.dll.a +0 -0
- casadi/libblasfeo.dll +0 -0
- casadi/libblasfeo.dll.a +0 -0
- casadi/libbonmin-4.dll +0 -0
- casadi/libbonmin.dll.a +0 -0
- casadi/libcasadi-tp-openblas.dll +0 -0
- casadi/libcasadi-tp-openblas.dll.a +0 -0
- casadi/libcasadi.dll +0 -0
- casadi/libcasadi.dll.a +0 -0
- casadi/libcasadi_conic_cbc.dll +0 -0
- casadi/libcasadi_conic_cbc.dll.a +0 -0
- casadi/libcasadi_conic_clp.dll +0 -0
- casadi/libcasadi_conic_clp.dll.a +0 -0
- casadi/libcasadi_conic_cplex.dll +0 -0
- casadi/libcasadi_conic_cplex.dll.a +0 -0
- casadi/libcasadi_conic_daqp.dll +0 -0
- casadi/libcasadi_conic_daqp.dll.a +0 -0
- casadi/libcasadi_conic_fatrop.dll +0 -0
- casadi/libcasadi_conic_fatrop.dll.a +0 -0
- casadi/libcasadi_conic_gurobi.dll +0 -0
- casadi/libcasadi_conic_gurobi.dll.a +0 -0
- casadi/libcasadi_conic_highs.dll +0 -0
- casadi/libcasadi_conic_highs.dll.a +0 -0
- casadi/libcasadi_conic_hpipm.dll +0 -0
- casadi/libcasadi_conic_hpipm.dll.a +0 -0
- casadi/libcasadi_conic_ipqp.dll +0 -0
- casadi/libcasadi_conic_ipqp.dll.a +0 -0
- casadi/libcasadi_conic_nlpsol.dll +0 -0
- casadi/libcasadi_conic_nlpsol.dll.a +0 -0
- casadi/libcasadi_conic_osqp.dll +0 -0
- casadi/libcasadi_conic_osqp.dll.a +0 -0
- casadi/libcasadi_conic_proxqp.dll +0 -0
- casadi/libcasadi_conic_proxqp.dll.a +0 -0
- casadi/libcasadi_conic_qpoases.dll +0 -0
- casadi/libcasadi_conic_qpoases.dll.a +0 -0
- casadi/libcasadi_conic_qrqp.dll +0 -0
- casadi/libcasadi_conic_qrqp.dll.a +0 -0
- casadi/libcasadi_conic_superscs.dll +0 -0
- casadi/libcasadi_conic_superscs.dll.a +0 -0
- casadi/libcasadi_importer_shell.dll +0 -0
- casadi/libcasadi_importer_shell.dll.a +0 -0
- casadi/libcasadi_integrator_collocation.dll +0 -0
- casadi/libcasadi_integrator_collocation.dll.a +0 -0
- casadi/libcasadi_integrator_cvodes.dll +0 -0
- casadi/libcasadi_integrator_cvodes.dll.a +0 -0
- casadi/libcasadi_integrator_idas.dll +0 -0
- casadi/libcasadi_integrator_idas.dll.a +0 -0
- casadi/libcasadi_integrator_rk.dll +0 -0
- casadi/libcasadi_integrator_rk.dll.a +0 -0
- casadi/libcasadi_interpolant_bspline.dll +0 -0
- casadi/libcasadi_interpolant_bspline.dll.a +0 -0
- casadi/libcasadi_interpolant_linear.dll +0 -0
- casadi/libcasadi_interpolant_linear.dll.a +0 -0
- casadi/libcasadi_linsol_csparse.dll +0 -0
- casadi/libcasadi_linsol_csparse.dll.a +0 -0
- casadi/libcasadi_linsol_csparsecholesky.dll +0 -0
- casadi/libcasadi_linsol_csparsecholesky.dll.a +0 -0
- casadi/libcasadi_linsol_lapacklu.dll +0 -0
- casadi/libcasadi_linsol_lapacklu.dll.a +0 -0
- casadi/libcasadi_linsol_lapackqr.dll +0 -0
- casadi/libcasadi_linsol_lapackqr.dll.a +0 -0
- casadi/libcasadi_linsol_ldl.dll +0 -0
- casadi/libcasadi_linsol_ldl.dll.a +0 -0
- casadi/libcasadi_linsol_lsqr.dll +0 -0
- casadi/libcasadi_linsol_lsqr.dll.a +0 -0
- casadi/libcasadi_linsol_ma27.dll +0 -0
- casadi/libcasadi_linsol_ma27.dll.a +0 -0
- casadi/libcasadi_linsol_mumps.dll +0 -0
- casadi/libcasadi_linsol_mumps.dll.a +0 -0
- casadi/libcasadi_linsol_qr.dll +0 -0
- casadi/libcasadi_linsol_qr.dll.a +0 -0
- casadi/libcasadi_linsol_symbolicqr.dll +0 -0
- casadi/libcasadi_linsol_symbolicqr.dll.a +0 -0
- casadi/libcasadi_linsol_tridiag.dll +0 -0
- casadi/libcasadi_linsol_tridiag.dll.a +0 -0
- casadi/libcasadi_nlpsol_alpaqa.dll +0 -0
- casadi/libcasadi_nlpsol_alpaqa.dll.a +0 -0
- casadi/libcasadi_nlpsol_ampl.dll +0 -0
- casadi/libcasadi_nlpsol_ampl.dll.a +0 -0
- casadi/libcasadi_nlpsol_blocksqp.dll +0 -0
- casadi/libcasadi_nlpsol_blocksqp.dll.a +0 -0
- casadi/libcasadi_nlpsol_bonmin.dll +0 -0
- casadi/libcasadi_nlpsol_bonmin.dll.a +0 -0
- casadi/libcasadi_nlpsol_fatrop.dll +0 -0
- casadi/libcasadi_nlpsol_fatrop.dll.a +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.dll +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.dll.a +0 -0
- casadi/libcasadi_nlpsol_ipopt.dll +0 -0
- casadi/libcasadi_nlpsol_ipopt.dll.a +0 -0
- casadi/libcasadi_nlpsol_knitro.dll +0 -0
- casadi/libcasadi_nlpsol_knitro.dll.a +0 -0
- casadi/libcasadi_nlpsol_madnlp.dll +0 -0
- casadi/libcasadi_nlpsol_madnlp.dll.a +0 -0
- casadi/libcasadi_nlpsol_qrsqp.dll +0 -0
- casadi/libcasadi_nlpsol_qrsqp.dll.a +0 -0
- casadi/libcasadi_nlpsol_scpgen.dll +0 -0
- casadi/libcasadi_nlpsol_scpgen.dll.a +0 -0
- casadi/libcasadi_nlpsol_sleqp.dll +0 -0
- casadi/libcasadi_nlpsol_sleqp.dll.a +0 -0
- casadi/libcasadi_nlpsol_snopt.dll +0 -0
- casadi/libcasadi_nlpsol_snopt.dll.a +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.dll +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.dll.a +0 -0
- casadi/libcasadi_nlpsol_worhp.dll +0 -0
- casadi/libcasadi_nlpsol_worhp.dll.a +0 -0
- casadi/libcasadi_rootfinder_fast_newton.dll +0 -0
- casadi/libcasadi_rootfinder_fast_newton.dll.a +0 -0
- casadi/libcasadi_rootfinder_kinsol.dll +0 -0
- casadi/libcasadi_rootfinder_kinsol.dll.a +0 -0
- casadi/libcasadi_rootfinder_newton.dll +0 -0
- casadi/libcasadi_rootfinder_newton.dll.a +0 -0
- casadi/libcasadi_rootfinder_nlpsol.dll +0 -0
- casadi/libcasadi_rootfinder_nlpsol.dll.a +0 -0
- casadi/libcasadi_sundials_common.dll +0 -0
- casadi/libcasadi_sundials_common.dll.a +0 -0
- casadi/libcasadi_xmlfile_tinyxml.dll +0 -0
- casadi/libcasadi_xmlfile_tinyxml.dll.a +0 -0
- casadi/libcoinmetis-2.dll +0 -0
- casadi/libcoinmetis.dll.a +0 -0
- casadi/libcoinmumps-3.dll +0 -0
- casadi/libcoinmumps.dll.a +0 -0
- casadi/libcplex_adaptor.dll +0 -0
- casadi/libdaqp.dll +0 -0
- casadi/libdaqp.dll.a +0 -0
- casadi/libdaqpstat.a +0 -0
- casadi/{libFortranHighs.dll → libdl.dll} +0 -0
- casadi/libdl.dll.a +0 -0
- casadi/libfatrop.dll +0 -0
- casadi/libfatrop.dll.a +0 -0
- casadi/libgurobi_adaptor.dll +0 -0
- casadi/libhighs.dll +0 -0
- casadi/libhighs.dll.a +0 -0
- casadi/libhpipm.dll +0 -0
- casadi/libhpipm.dll.a +0 -0
- casadi/libipopt-3.dll +0 -0
- casadi/libipopt.dll.a +0 -0
- casadi/libmatlab_ipc.dll +0 -0
- casadi/libmatlab_ipc.dll.a +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.dll +0 -0
- casadi/libosqp.dll.a +0 -0
- casadi/libqdldl.dll +0 -0
- casadi/libqdldl.dll.a +0 -0
- casadi/libsipopt-3.dll +0 -0
- casadi/libsipopt.dll.a +0 -0
- casadi/libsleqp.dll +0 -0
- casadi/libsleqp.dll.a +0 -0
- casadi/libtinyxml2.dll +0 -0
- casadi/libtrlib.dll +0 -0
- casadi/libtrlib.dll.a +0 -0
- casadi/matlab_ipc.lib +0 -0
- casadi/osqp.lib +0 -0
- casadi/pkgconfig/casadi.pc +1 -1
- casadi/pkgconfig/highs.pc +1 -1
- casadi/sleqp.lib +0 -0
- casadi/spral_ssids.exe +0 -0
- casadi/tools/__init__.py +4 -0
- casadi/tools/bounds.py +3 -3
- {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/METADATA +2 -2
- {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/RECORD +500 -324
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/libFortranHighs.dll.a +0 -0
- {casadi-3.6.5.dist-info → casadi-3.6.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,263 @@
|
|
1
|
+
#pragma once
|
2
|
+
#include "fatrop/templates/NLPAlg.hpp"
|
3
|
+
#include "fatrop/solver/FatropOptions.hpp"
|
4
|
+
#include <memory>
|
5
|
+
namespace fatrop
|
6
|
+
{
|
7
|
+
class NLPL1 : public FatropNLP
|
8
|
+
{
|
9
|
+
public:
|
10
|
+
NLPL1(const std::shared_ptr<FatropNLP> &orig, const std::shared_ptr<FatropOptions>& opts) : orig_(orig), orig_dims_(orig->get_nlp_dims()), lower_(orig_dims_.nineqs), upper_(orig_dims_.nineqs), upper_bounded_(orig_dims_.nineqs), lower_bounded_(orig_dims_.nineqs), slack_dummy_(orig_dims_.nineqs), sigma_dummy_(orig_dims_.nineqs), gradb_dummy_(orig_dims_.nineqs), zl_dummy_(orig_dims_.nineqs), zu_dummy_(orig_dims_.nineqs), sigma_cache_(orig_dims_.nineqs * 3), gradb_cache_(orig_dims_.nineqs * 3)
|
11
|
+
{
|
12
|
+
opts -> register_option(DoubleOption::lower_bounded("L1_rho", "L1 penalty parameter", &rho, 1e4, 0.0));
|
13
|
+
auto lower_v = lower_[0];
|
14
|
+
auto upper_v = upper_[0];
|
15
|
+
orig_->get_bounds(lower_v, upper_v);
|
16
|
+
n_p = orig_dims_.nineqs;
|
17
|
+
n_n = orig_dims_.nineqs;
|
18
|
+
for (fatrop_int i = 0; i < orig_dims_.nineqs; ++i)
|
19
|
+
{
|
20
|
+
bool lower_bounded = !std::isinf(lower_v.at(i));
|
21
|
+
bool upper_bounded = !std::isinf(upper_v.at(i));
|
22
|
+
upper_bounded_[i] = upper_bounded;
|
23
|
+
lower_bounded_[i] = lower_bounded;
|
24
|
+
}
|
25
|
+
this_dims_.nvars = orig_dims_.nvars;
|
26
|
+
this_dims_.nineqs = orig_dims_.nineqs + n_n + n_p;
|
27
|
+
this_dims_.neqs = orig_dims_.neqs;
|
28
|
+
}
|
29
|
+
virtual fatrop_int eval_lag_hess(
|
30
|
+
double obj_scale,
|
31
|
+
const FatropVecBF &primal_vars,
|
32
|
+
const FatropVecBF &slack_vars,
|
33
|
+
const FatropVecBF &lam) override
|
34
|
+
{
|
35
|
+
FatropVecBF slack_dummy_v = slack_dummy_[0];
|
36
|
+
update_slack_vars(slack_vars, slack_dummy_v);
|
37
|
+
orig_->eval_lag_hess(obj_scale, primal_vars, slack_dummy_v, lam);
|
38
|
+
return 0;
|
39
|
+
};
|
40
|
+
|
41
|
+
virtual fatrop_int eval_constr_jac(
|
42
|
+
const FatropVecBF &primal_vars,
|
43
|
+
const FatropVecBF &slack_vars) override
|
44
|
+
{
|
45
|
+
FatropVecBF slack_dummy_v = slack_dummy_[0];
|
46
|
+
update_slack_vars(slack_vars, slack_dummy_v);
|
47
|
+
orig_->eval_constr_jac(primal_vars, slack_dummy_v);
|
48
|
+
return 0;
|
49
|
+
};
|
50
|
+
void update_slack_vars(const FatropVecBF &slack_vars, FatropVecBF &slack_dummy)
|
51
|
+
{
|
52
|
+
fatrop_int offs_n = orig_dims_.nineqs;
|
53
|
+
fatrop_int offs_p = orig_dims_.nineqs + n_n;
|
54
|
+
for (fatrop_int i = 0; i < orig_dims_.nineqs; ++i)
|
55
|
+
{
|
56
|
+
slack_dummy.at(i) = slack_vars.at(i) - slack_vars.at(i + offs_n) + slack_vars.at(i + offs_p);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
virtual fatrop_int eval_constraint_viol(
|
60
|
+
const FatropVecBF &primal_vars,
|
61
|
+
const FatropVecBF &slack_vars,
|
62
|
+
FatropVecBF &constraint_violation) override
|
63
|
+
{
|
64
|
+
FatropVecBF slack_dummy_v = slack_dummy_[0];
|
65
|
+
update_slack_vars(slack_vars, slack_dummy_v);
|
66
|
+
orig_->eval_constraint_viol(primal_vars, slack_dummy_v, constraint_violation);
|
67
|
+
return 0;
|
68
|
+
};
|
69
|
+
virtual fatrop_int eval_obj_grad(
|
70
|
+
double obj_scale,
|
71
|
+
const FatropVecBF &primal_vars,
|
72
|
+
const FatropVecBF &slack_vars,
|
73
|
+
FatropVecBF &gradient_x,
|
74
|
+
FatropVecBF &gradient_s) override
|
75
|
+
{
|
76
|
+
orig_->eval_obj_grad(obj_scale, primal_vars, slack_vars, gradient_x, gradient_s);
|
77
|
+
gradient_s.block(orig_dims_.nineqs, n_n + n_p) = rho;
|
78
|
+
return 0;
|
79
|
+
};
|
80
|
+
virtual fatrop_int eval_obj(
|
81
|
+
double obj_scale,
|
82
|
+
const FatropVecBF &primal_vars,
|
83
|
+
const FatropVecBF &slack_vars,
|
84
|
+
double &res) override
|
85
|
+
{
|
86
|
+
orig_->eval_obj(obj_scale, primal_vars, slack_vars, res);
|
87
|
+
res += rho * sum(slack_vars.block(orig_dims_.nineqs, n_n + n_p));
|
88
|
+
return 0;
|
89
|
+
};
|
90
|
+
void get_initialization(const FatropVecBF &primal_vars_orig, FatropVecBF &intialization)
|
91
|
+
{
|
92
|
+
intialization.block(0, orig_dims_.nvars).copy(primal_vars_orig.block(0, orig_dims_.nvars));
|
93
|
+
}
|
94
|
+
virtual fatrop_int eval_dual_inf(
|
95
|
+
double obj_scale,
|
96
|
+
const FatropVecBF &lam,
|
97
|
+
const FatropVecBF &grad_x,
|
98
|
+
const FatropVecBF &grad_s,
|
99
|
+
FatropVecBF &du_inf_x, FatropVecBF &du_inf_s_wo_z) override
|
100
|
+
{
|
101
|
+
auto du_inf_s_wo_z_or = du_inf_s_wo_z.block(0, orig_dims_.nineqs);
|
102
|
+
orig_->eval_dual_inf(obj_scale, lam, grad_x, grad_s, du_inf_x, du_inf_s_wo_z_or);
|
103
|
+
auto lam_I = lam.block(orig_dims_.neqs - orig_dims_.nineqs, orig_dims_.nineqs);
|
104
|
+
axpby(1.0, lam_I, 1.0, grad_s.block(orig_dims_.nineqs, n_n), du_inf_s_wo_z.block(orig_dims_.nineqs, n_n));
|
105
|
+
axpby(-1.0, lam_I, 1.0, grad_s.block(orig_dims_.nineqs + n_n, n_p), du_inf_s_wo_z.block(orig_dims_.nineqs + n_n, n_p));
|
106
|
+
return 0;
|
107
|
+
}
|
108
|
+
void update_sigma_gradb(double inertia, const FatropVecBF &sigma_s, const FatropVecBF &sigma_n, const FatropVecBF &sigma_p, const FatropVecBF &gradb_s, const FatropVecBF &gradb_n, const FatropVecBF &gradb_p, const FatropVecBF &sigma_update, const FatropVecBF &gradb_update)
|
109
|
+
{
|
110
|
+
for (int i = 0; i < orig_dims_.nineqs; ++i)
|
111
|
+
{
|
112
|
+
double sigma_updt = 1.0 / (1.0 / (sigma_s.at(i) + inertia) + 1.0 / (sigma_n.at(i) + inertia) + 1.0 / (sigma_p.at(i) + inertia));
|
113
|
+
sigma_update.at(i) = sigma_updt - inertia;
|
114
|
+
gradb_update.at(i) = ((gradb_s.at(i)) / (sigma_s.at(i) + inertia) - (gradb_n.at(i)) / (sigma_n.at(i) + inertia) + (gradb_p.at(i)) / (sigma_p.at(i) + inertia)) * sigma_updt;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
void update_delta_snp(double inertia, const FatropVecBF &sigma_s, const FatropVecBF &sigma_n, const FatropVecBF &sigma_p, const FatropVecBF &gradb_s, const FatropVecBF &gradb_n, const FatropVecBF &gradb_p, const FatropVecBF &lam_I, const FatropVecBF &delta_s, const FatropVecBF &delta_n, const FatropVecBF &delta_p)
|
118
|
+
{
|
119
|
+
for (int i = 0; i < orig_dims_.nineqs; ++i)
|
120
|
+
{
|
121
|
+
double lam_I_i = lam_I.at(i);
|
122
|
+
delta_s.at(i) = (-gradb_s.at(i) + lam_I_i) / (sigma_s.at(i) + inertia);
|
123
|
+
delta_n.at(i) = (-gradb_n.at(i) - lam_I_i) / (sigma_n.at(i) + inertia);
|
124
|
+
delta_p.at(i) = (-gradb_p.at(i) + lam_I_i) / (sigma_p.at(i) + inertia);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
virtual fatrop_int solve_pd_sys(
|
129
|
+
const double inertia_correction_w,
|
130
|
+
const double inertia_correction_c,
|
131
|
+
const FatropVecBF &ux,
|
132
|
+
const FatropVecBF &lam,
|
133
|
+
const FatropVecBF &delta_s,
|
134
|
+
const FatropVecBF &sigma_total,
|
135
|
+
const FatropVecBF &gradb_total) override
|
136
|
+
{
|
137
|
+
inertia_correction_w_cache = inertia_correction_w;
|
138
|
+
sigma_cache_[0].copy(sigma_total);
|
139
|
+
gradb_cache_[0].copy(gradb_total);
|
140
|
+
auto lam_I = lam.block(orig_dims_.neqs - orig_dims_.nineqs, orig_dims_.nineqs);
|
141
|
+
auto sigma_s = sigma_total.block(0, orig_dims_.nineqs);
|
142
|
+
auto sigma_n = sigma_total.block(orig_dims_.nineqs, n_n);
|
143
|
+
auto sigma_p = sigma_total.block(orig_dims_.nineqs + n_n, n_p);
|
144
|
+
auto gradb_s = gradb_total.block(0, orig_dims_.nineqs);
|
145
|
+
auto gradb_n = gradb_total.block(orig_dims_.nineqs, n_n);
|
146
|
+
auto gradb_p = gradb_total.block(orig_dims_.nineqs + n_n, n_p);
|
147
|
+
auto delta_s_or = delta_s.block(0, orig_dims_.nineqs);
|
148
|
+
auto delta_n = delta_s.block(orig_dims_.nineqs, n_n);
|
149
|
+
auto delta_p = delta_s.block(orig_dims_.nineqs + n_n, n_p);
|
150
|
+
update_sigma_gradb(inertia_correction_w, sigma_s, sigma_n, sigma_p, gradb_s, gradb_n, gradb_p, sigma_dummy_[0], gradb_dummy_[0]);
|
151
|
+
int ret = orig_->solve_pd_sys(inertia_correction_w, inertia_correction_c, ux, lam, delta_s.block(0, orig_dims_.nineqs), sigma_dummy_[0], gradb_dummy_[0]);
|
152
|
+
update_delta_snp(inertia_correction_w, sigma_s, sigma_n, sigma_p, gradb_s, gradb_n, gradb_p, lam_I, delta_s_or, delta_n, delta_p);
|
153
|
+
return ret;
|
154
|
+
};
|
155
|
+
virtual fatrop_int solve_soc_rhs(
|
156
|
+
const FatropVecBF &ux,
|
157
|
+
const FatropVecBF &lam,
|
158
|
+
const FatropVecBF &delta_s,
|
159
|
+
const FatropVecBF &cosntraint_violation) override
|
160
|
+
{
|
161
|
+
auto lam_I = lam.block(orig_dims_.neqs - orig_dims_.nineqs, orig_dims_.nineqs);
|
162
|
+
auto sigma_s = sigma_cache_[0].block(0, orig_dims_.nineqs);
|
163
|
+
auto sigma_n = sigma_cache_[0].block(orig_dims_.nineqs, n_n);
|
164
|
+
auto sigma_p = sigma_cache_[0].block(orig_dims_.nineqs + n_n, n_p);
|
165
|
+
auto gradb_s = gradb_cache_[0].block(0, orig_dims_.nineqs);
|
166
|
+
auto gradb_n = gradb_cache_[0].block(orig_dims_.nineqs, n_n);
|
167
|
+
auto gradb_p = gradb_cache_[0].block(orig_dims_.nineqs + n_n, n_p);
|
168
|
+
auto delta_s_or = delta_s.block(0, orig_dims_.nineqs);
|
169
|
+
auto delta_n = delta_s.block(orig_dims_.nineqs, n_n);
|
170
|
+
auto delta_p = delta_s.block(orig_dims_.nineqs + n_n, n_p);
|
171
|
+
int ret = orig_->solve_soc_rhs(ux, lam, delta_s.block(0, orig_dims_.nineqs), cosntraint_violation);
|
172
|
+
update_delta_snp(inertia_correction_w_cache, sigma_s, sigma_n, sigma_p, gradb_s, gradb_n, gradb_p, lam_I, delta_s_or, delta_n, delta_p);
|
173
|
+
return ret;
|
174
|
+
}
|
175
|
+
virtual NLPDims get_nlp_dims() const override { return this_dims_; };
|
176
|
+
virtual fatrop_int compute_scalings(
|
177
|
+
double &obj_scale,
|
178
|
+
FatropVecBF &x_scales,
|
179
|
+
FatropVecBF &lam_scales,
|
180
|
+
const FatropVecBF &grad_curr_x, const FatropVecBF &grad_curr_s) override
|
181
|
+
{
|
182
|
+
return orig_->compute_scalings(obj_scale, x_scales, lam_scales, grad_curr_x, grad_curr_s);
|
183
|
+
};
|
184
|
+
virtual fatrop_int initialize_slacks(double mu0,
|
185
|
+
FatropVecBF &s_curr) override
|
186
|
+
{
|
187
|
+
auto s_curr_or = s_curr.block(0, orig_dims_.nineqs);
|
188
|
+
auto n_curr = s_curr.block(orig_dims_.nineqs, n_n);
|
189
|
+
auto p_curr = s_curr.block(orig_dims_.nineqs + n_n, n_p);
|
190
|
+
int ret = orig_->initialize_slacks(mu0, s_curr_or);
|
191
|
+
auto upper_v = upper_[0];
|
192
|
+
auto lower_v = lower_[0];
|
193
|
+
// set zero for now TODO use quadratic formula here
|
194
|
+
for (int i = 0; i < orig_dims_.nineqs; i++)
|
195
|
+
{
|
196
|
+
double dist_L = lower_bounded_[i] ? s_curr_or.at(i) - lower_v.at(i) : 0.0;
|
197
|
+
double dist_U = upper_bounded_[i] ? upper_v.at(i) - s_curr_or.at(i) : 0.0;
|
198
|
+
double viol = 0.0;
|
199
|
+
double s_proj = s_curr_or.at(i);
|
200
|
+
if (lower_bounded_[i] && dist_L < 0.0)
|
201
|
+
{
|
202
|
+
// std::cout << "lower" << std::endl;
|
203
|
+
s_proj = s_curr_or.at(i) - dist_L;
|
204
|
+
}
|
205
|
+
if (upper_bounded_[i] && dist_U < 0.0)
|
206
|
+
{
|
207
|
+
// std::cout << "upper" << std::endl;
|
208
|
+
s_proj = s_curr_or.at(i) + dist_U;
|
209
|
+
}
|
210
|
+
viol = (s_curr_or.at(i) - s_proj);
|
211
|
+
double n_init = (mu0 - rho * viol) / (2 * rho) + std::sqrt(std::pow((mu0 - rho * viol) / (2 * rho), 2) + mu0 * viol / (2 * rho));
|
212
|
+
// if viol >>>> 0 -> n_init = 0 if viol <<< 0 n_init = viol
|
213
|
+
n_curr.at(i) = n_init;
|
214
|
+
p_curr.at(i) = viol + n_init;
|
215
|
+
}
|
216
|
+
return ret;
|
217
|
+
}
|
218
|
+
virtual fatrop_int initialize_dual(
|
219
|
+
const FatropVecBF &grad_x,
|
220
|
+
const FatropVecBF &grad_s,
|
221
|
+
FatropVecBF &dlam,
|
222
|
+
const FatropVecBF &zL,
|
223
|
+
const FatropVecBF &zU) override
|
224
|
+
{
|
225
|
+
// todo check if this is correct
|
226
|
+
return orig_->initialize_dual(grad_x, grad_s, dlam, zL.block(0, orig_dims_.nineqs), zU.block(0, orig_dims_.nineqs));
|
227
|
+
};
|
228
|
+
virtual fatrop_int get_bounds(
|
229
|
+
FatropVecBF &lower,
|
230
|
+
FatropVecBF &upper) const override
|
231
|
+
{
|
232
|
+
orig_->get_bounds(lower, upper);
|
233
|
+
lower.block(orig_dims_.nineqs, n_n) = 0.0;
|
234
|
+
lower.block(orig_dims_.nineqs + n_n, n_p) = 0.0;
|
235
|
+
upper.block(orig_dims_.nineqs, n_n) = std::numeric_limits<double>::infinity();
|
236
|
+
upper.block(orig_dims_.nineqs + n_n, n_p) = std::numeric_limits<double>::infinity();
|
237
|
+
return 0;
|
238
|
+
};
|
239
|
+
virtual fatrop_int get_initial_sol_guess(
|
240
|
+
FatropVecBF &initial) const override
|
241
|
+
{
|
242
|
+
orig_->get_initial_sol_guess(initial);
|
243
|
+
return 0;
|
244
|
+
}
|
245
|
+
std::shared_ptr<FatropNLP> orig_;
|
246
|
+
NLPDims orig_dims_;
|
247
|
+
NLPDims this_dims_;
|
248
|
+
FatropMemoryVecBF lower_, upper_;
|
249
|
+
std::vector<bool> upper_bounded_;
|
250
|
+
std::vector<bool> lower_bounded_;
|
251
|
+
fatrop_int n_p = 0;
|
252
|
+
fatrop_int n_n = 0;
|
253
|
+
FatropMemoryVecBF slack_dummy_;
|
254
|
+
FatropMemoryVecBF sigma_dummy_;
|
255
|
+
FatropMemoryVecBF gradb_dummy_;
|
256
|
+
FatropMemoryVecBF zl_dummy_;
|
257
|
+
FatropMemoryVecBF zu_dummy_;
|
258
|
+
double inertia_correction_w_cache = 0.0;
|
259
|
+
FatropMemoryVecBF sigma_cache_;
|
260
|
+
FatropMemoryVecBF gradb_cache_;
|
261
|
+
double rho = 1e4;
|
262
|
+
};
|
263
|
+
};
|
@@ -0,0 +1,102 @@
|
|
1
|
+
/*
|
2
|
+
* Fatrop - A fast trajectory optimization solver
|
3
|
+
* Copyright (C) 2022 - 2024 Lander Vanroye, KU Leuven. All rights reserved.
|
4
|
+
*
|
5
|
+
* This file is part of Fatrop.
|
6
|
+
*
|
7
|
+
* Fatrop is free software: you can redistribute it and/or modify
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
10
|
+
* (at your option) any later version.
|
11
|
+
*
|
12
|
+
* Fatrop is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
* GNU Lesser General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* along with Fatrop. If not, see <http://www.gnu.org/licenses/>. */
|
19
|
+
#ifndef NLPINCLUDED
|
20
|
+
#define NLPINCLUDED
|
21
|
+
#include "fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp"
|
22
|
+
#include "fatrop/auxiliary/Common.hpp"
|
23
|
+
namespace fatrop
|
24
|
+
{
|
25
|
+
struct NLPDims
|
26
|
+
{
|
27
|
+
fatrop_int nvars;
|
28
|
+
fatrop_int neqs;
|
29
|
+
fatrop_int nineqs;
|
30
|
+
};
|
31
|
+
class FatropNLP
|
32
|
+
{
|
33
|
+
public:
|
34
|
+
virtual fatrop_int eval_lag_hess(
|
35
|
+
double obj_scale,
|
36
|
+
const FatropVecBF &primal_vars,
|
37
|
+
const FatropVecBF &slack_vars,
|
38
|
+
const FatropVecBF &lam) = 0;
|
39
|
+
virtual fatrop_int eval_constr_jac(
|
40
|
+
const FatropVecBF &primal_vars,
|
41
|
+
const FatropVecBF &slack_vars) = 0;
|
42
|
+
virtual fatrop_int eval_constraint_viol(
|
43
|
+
const FatropVecBF &primal_vars,
|
44
|
+
const FatropVecBF &slack_vars,
|
45
|
+
FatropVecBF &constraint_violation) = 0;
|
46
|
+
virtual fatrop_int eval_obj_grad(
|
47
|
+
double obj_scale,
|
48
|
+
const FatropVecBF &primal_vars,
|
49
|
+
const FatropVecBF &slack_vars,
|
50
|
+
FatropVecBF &gradient_x,
|
51
|
+
FatropVecBF &gradient_s) = 0;
|
52
|
+
virtual fatrop_int eval_obj(
|
53
|
+
double obj_scale,
|
54
|
+
const FatropVecBF &primal_vars,
|
55
|
+
const FatropVecBF &slack_vars,
|
56
|
+
double &res) = 0;
|
57
|
+
virtual fatrop_int eval_dual_inf(
|
58
|
+
double obj_scale,
|
59
|
+
const FatropVecBF &lam,
|
60
|
+
const FatropVecBF &grad_x,
|
61
|
+
const FatropVecBF &grad_s,
|
62
|
+
FatropVecBF &du_inf_x, FatropVecBF& du_inf_s) = 0;
|
63
|
+
virtual fatrop_int solve_pd_sys(
|
64
|
+
const double inertia_correction_w,
|
65
|
+
const double inertia_correction_c,
|
66
|
+
const FatropVecBF &ux,
|
67
|
+
const FatropVecBF &lam,
|
68
|
+
const FatropVecBF &delta_s,
|
69
|
+
const FatropVecBF &sigma_total,
|
70
|
+
const FatropVecBF &gradb_total) = 0;
|
71
|
+
virtual fatrop_int solve_soc_rhs(
|
72
|
+
const FatropVecBF &ux,
|
73
|
+
const FatropVecBF &lam,
|
74
|
+
const FatropVecBF &delta_s,
|
75
|
+
const FatropVecBF &cosntraint_violation) = 0;
|
76
|
+
virtual NLPDims get_nlp_dims() const = 0;
|
77
|
+
virtual fatrop_int compute_scalings(
|
78
|
+
double &obj_scale,
|
79
|
+
FatropVecBF &x_scales,
|
80
|
+
FatropVecBF &lam_scales,
|
81
|
+
const FatropVecBF &grad_curr_x, const FatropVecBF& grad_curr_s) = 0;
|
82
|
+
virtual fatrop_int initialize_slacks(double mu0,
|
83
|
+
FatropVecBF &s_curr) = 0;
|
84
|
+
virtual fatrop_int initialize_dual(
|
85
|
+
const FatropVecBF &grad_x,
|
86
|
+
const FatropVecBF &grad_s,
|
87
|
+
FatropVecBF &dlam,
|
88
|
+
const FatropVecBF &zL,
|
89
|
+
const FatropVecBF &zU) = 0;
|
90
|
+
virtual fatrop_int get_bounds(
|
91
|
+
FatropVecBF &lower,
|
92
|
+
FatropVecBF &upper) const = 0;
|
93
|
+
virtual fatrop_int get_initial_sol_guess(
|
94
|
+
FatropVecBF &initial) const = 0;
|
95
|
+
// virtual fatrop_int GetDefaultParams(
|
96
|
+
// FatropOptions ¶ms) const = 0;
|
97
|
+
virtual fatrop_int Callback(FatropVecBF& primal_vars){return 0;};
|
98
|
+
virtual void finalize(){};
|
99
|
+
virtual void reset(){};
|
100
|
+
};
|
101
|
+
} // namespace fatrop
|
102
|
+
#endif // NLPINCLUDED
|
casadi/include/highs/HConfig.h
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
#ifndef HCONFIG_H_
|
2
2
|
#define HCONFIG_H_
|
3
3
|
|
4
|
-
|
4
|
+
#define FAST_BUILD
|
5
5
|
/* #undef ZLIB_FOUND */
|
6
|
+
/* #undef CUPDLP_CPU */
|
6
7
|
#define CMAKE_BUILD_TYPE "Release"
|
7
8
|
#define CMAKE_INSTALL_PREFIX "/work/build/external_projects"
|
8
9
|
/* #undef HIGHSINT64 */
|
10
|
+
/* #undef HIGHS_NO_DEFAULT_THREADS */
|
9
11
|
#define HIGHS_HAVE_MM_PAUSE
|
10
12
|
#define HIGHS_HAVE_BUILTIN_CLZ
|
11
13
|
/* #undef HIGHS_HAVE_BITSCAN_REVERSE */
|
12
14
|
|
13
|
-
#define HIGHS_GITHASH "
|
14
|
-
#define HIGHS_COMPILATION_DATE "2024-03-01"
|
15
|
+
#define HIGHS_GITHASH "5ce7a2753"
|
15
16
|
#define HIGHS_VERSION_MAJOR 1
|
16
|
-
#define HIGHS_VERSION_MINOR
|
17
|
-
#define HIGHS_VERSION_PATCH
|
17
|
+
#define HIGHS_VERSION_MINOR 7
|
18
|
+
#define HIGHS_VERSION_PATCH 2
|
18
19
|
#define HIGHS_DIR "/work/build/external_projects/src/highs-external"
|
19
20
|
|
20
21
|
#endif /* HCONFIG_H_ */
|
casadi/include/highs/Highs.h
CHANGED
@@ -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 */
|
@@ -37,7 +37,6 @@ HighsInt highsVersionMajor();
|
|
37
37
|
HighsInt highsVersionMinor();
|
38
38
|
HighsInt highsVersionPatch();
|
39
39
|
const char* highsGithash();
|
40
|
-
const char* highsCompilationDate();
|
41
40
|
|
42
41
|
/**
|
43
42
|
* @brief Class to set parameters and run HiGHS
|
@@ -78,11 +77,6 @@ class Highs {
|
|
78
77
|
*/
|
79
78
|
std::string githash() const { return highsGithash(); }
|
80
79
|
|
81
|
-
/**
|
82
|
-
* @brief Return compilation date
|
83
|
-
*/
|
84
|
-
std::string compilationDate() const { return highsCompilationDate(); }
|
85
|
-
|
86
80
|
/**
|
87
81
|
* @brief Reset the options and then call clearModel()
|
88
82
|
*/
|
@@ -384,6 +378,13 @@ class Highs {
|
|
384
378
|
*/
|
385
379
|
double getInfinity() { return kHighsInf; }
|
386
380
|
|
381
|
+
/**
|
382
|
+
* @brief Get the size of HighsInt
|
383
|
+
*/
|
384
|
+
HighsInt getSizeofHighsInt() {
|
385
|
+
return sizeof(options_.num_user_settable_options_);
|
386
|
+
}
|
387
|
+
|
387
388
|
/**
|
388
389
|
* @brief Get the run time of HiGHS
|
389
390
|
*/
|
@@ -409,6 +410,22 @@ class Highs {
|
|
409
410
|
*/
|
410
411
|
const HighsPresolveLog& getPresolveLog() const { return presolve_log_; }
|
411
412
|
|
413
|
+
/**
|
414
|
+
* @brief Return a const pointer to the original column indices for
|
415
|
+
* the presolved model
|
416
|
+
*/
|
417
|
+
const HighsInt* getPresolveOrigColsIndex() const {
|
418
|
+
return presolve_.data_.postSolveStack.getOrigColsIndex();
|
419
|
+
}
|
420
|
+
|
421
|
+
/**
|
422
|
+
* @brief Return a const pointer to the original row indices for the
|
423
|
+
* presolved model
|
424
|
+
*/
|
425
|
+
const HighsInt* getPresolveOrigRowsIndex() const {
|
426
|
+
return presolve_.data_.postSolveStack.getOrigRowsIndex();
|
427
|
+
}
|
428
|
+
|
412
429
|
/**
|
413
430
|
* @brief Return a const reference to the incumbent LP
|
414
431
|
*/
|
@@ -482,6 +499,14 @@ class Highs {
|
|
482
499
|
*/
|
483
500
|
HighsStatus getRanging(HighsRanging& ranging);
|
484
501
|
|
502
|
+
/**
|
503
|
+
* @brief Get the ill-conditioning information for the current basis
|
504
|
+
*/
|
505
|
+
HighsStatus getIllConditioning(HighsIllConditioning& ill_conditioning,
|
506
|
+
const bool constraint,
|
507
|
+
const HighsInt method = 0,
|
508
|
+
const double ill_conditioning_bound = 1e-4);
|
509
|
+
|
485
510
|
/**
|
486
511
|
* @brief Get the current model objective value
|
487
512
|
*/
|
@@ -617,7 +642,7 @@ class Highs {
|
|
617
642
|
* @brief Get multiple columns from the model given by a set
|
618
643
|
*/
|
619
644
|
HighsStatus getCols(
|
620
|
-
const HighsInt num_set_entries, //!< The number of
|
645
|
+
const HighsInt num_set_entries, //!< The number of indices in the set
|
621
646
|
const HighsInt* set, //!< Array of size num_set_entries with indices of
|
622
647
|
//!< columns to get
|
623
648
|
HighsInt& num_col, //!< Number of columns got from the model
|
@@ -689,7 +714,7 @@ class Highs {
|
|
689
714
|
* @brief Get multiple rows from the model given by a set
|
690
715
|
*/
|
691
716
|
HighsStatus getRows(
|
692
|
-
const HighsInt num_set_entries, //!< The number of
|
717
|
+
const HighsInt num_set_entries, //!< The number of indices in the set
|
693
718
|
const HighsInt*
|
694
719
|
set, //!< Array of size num_set_entries with indices of rows to get
|
695
720
|
HighsInt& num_row, //!< Number of rows got from the model
|
@@ -739,6 +764,17 @@ class Highs {
|
|
739
764
|
*/
|
740
765
|
HighsStatus writeModel(const std::string& filename = "");
|
741
766
|
|
767
|
+
/**
|
768
|
+
* @brief Write out the incumbent presolved model to a file
|
769
|
+
*/
|
770
|
+
HighsStatus writePresolvedModel(const std::string& filename = "");
|
771
|
+
|
772
|
+
/**
|
773
|
+
* @brief Write out the given model to a file
|
774
|
+
*/
|
775
|
+
HighsStatus writeLocalModel(HighsModel& model,
|
776
|
+
const std::string& filename = "");
|
777
|
+
|
742
778
|
/**
|
743
779
|
* @brief Write out the internal HighsBasis instance to a file
|
744
780
|
*/
|
@@ -786,6 +822,14 @@ class Highs {
|
|
786
822
|
HighsStatus changeColsIntegrality(const HighsInt* mask,
|
787
823
|
const HighsVarType* integrality);
|
788
824
|
|
825
|
+
/**
|
826
|
+
* @brief Clear the integrality of all columns
|
827
|
+
*/
|
828
|
+
HighsStatus clearIntegrality() {
|
829
|
+
this->model_.lp_.integrality_.clear();
|
830
|
+
return HighsStatus::kOk;
|
831
|
+
}
|
832
|
+
|
789
833
|
/**
|
790
834
|
* @brief Change the cost of a column
|
791
835
|
*/
|
@@ -900,7 +944,7 @@ class Highs {
|
|
900
944
|
* @brief Adds a variable to the incumbent model, without the cost or matrix
|
901
945
|
* coefficients
|
902
946
|
*/
|
903
|
-
HighsStatus addVar(const double lower, const double upper) {
|
947
|
+
HighsStatus addVar(const double lower = 0, const double upper = kHighsInf) {
|
904
948
|
return this->addVars(1, &lower, &upper);
|
905
949
|
}
|
906
950
|
|
@@ -943,8 +987,9 @@ class Highs {
|
|
943
987
|
|
944
988
|
/**
|
945
989
|
* @brief Delete multiple columns from the incumbent model given by
|
946
|
-
* a mask (full length array with 1 =>
|
947
|
-
* of any column
|
990
|
+
* a mask (full length array with 1 => delete; 0 => keep). New index
|
991
|
+
* of any column kept is returned in place of the value 0. For
|
992
|
+
* deleted columns, a value of -1 is returned.
|
948
993
|
*/
|
949
994
|
HighsStatus deleteCols(HighsInt* mask);
|
950
995
|
|
@@ -964,9 +1009,10 @@ class Highs {
|
|
964
1009
|
}
|
965
1010
|
|
966
1011
|
/**
|
967
|
-
* @brief Delete multiple variables from the incumbent model given
|
968
|
-
* a mask (full length array with 1 =>
|
969
|
-
* of any variable not deleted is returned in place of the
|
1012
|
+
* @brief Delete multiple variables from the incumbent model given
|
1013
|
+
* by a mask (full length array with 1 => delete; 0 => keep). New
|
1014
|
+
* index of any variable not deleted is returned in place of the
|
1015
|
+
* value 0. For deleted variables, a value of -1 is returned.
|
970
1016
|
*/
|
971
1017
|
HighsStatus deleteVars(HighsInt* mask) { return deleteCols(mask); }
|
972
1018
|
|
@@ -983,8 +1029,9 @@ class Highs {
|
|
983
1029
|
|
984
1030
|
/**
|
985
1031
|
* @brief Delete multiple rows from the incumbent model given by a
|
986
|
-
* mask (full length array with 1 =>
|
987
|
-
* any row not deleted is returned in place of the value 0.
|
1032
|
+
* mask (full length array with 1 => delete; 0 => keep). New index
|
1033
|
+
* of any row not deleted is returned in place of the value 0. For
|
1034
|
+
* deleted rows, a value of -1 is returned.
|
988
1035
|
*/
|
989
1036
|
HighsStatus deleteRows(HighsInt* mask);
|
990
1037
|
|
@@ -1019,20 +1066,22 @@ class Highs {
|
|
1019
1066
|
/**
|
1020
1067
|
* @brief Set the callback method to use for HiGHS
|
1021
1068
|
*/
|
1022
|
-
HighsStatus setCallback(
|
1023
|
-
|
1024
|
-
|
1069
|
+
HighsStatus setCallback(HighsCallbackFunctionType user_callback,
|
1070
|
+
void* user_callback_data = nullptr);
|
1071
|
+
HighsStatus setCallback(HighsCCallbackType c_callback,
|
1025
1072
|
void* user_callback_data = nullptr);
|
1026
1073
|
|
1027
1074
|
/**
|
1028
1075
|
* @brief Start callback of given type
|
1029
1076
|
*/
|
1030
1077
|
HighsStatus startCallback(const int callback_type);
|
1078
|
+
HighsStatus startCallback(const HighsCallbackType callback_type);
|
1031
1079
|
|
1032
1080
|
/**
|
1033
1081
|
* @brief Stop callback of given type
|
1034
1082
|
*/
|
1035
1083
|
HighsStatus stopCallback(const int callback_type);
|
1084
|
+
HighsStatus stopCallback(const HighsCallbackType callback_type);
|
1036
1085
|
|
1037
1086
|
/**
|
1038
1087
|
* @brief Use the HighsBasis passed to set the internal HighsBasis
|
@@ -1163,6 +1212,8 @@ class Highs {
|
|
1163
1212
|
|
1164
1213
|
// Start of deprecated methods
|
1165
1214
|
|
1215
|
+
std::string compilationDate() const { return "deprecated"; }
|
1216
|
+
|
1166
1217
|
HighsStatus setLogCallback(void (*user_log_callback)(HighsLogType,
|
1167
1218
|
const char*, void*),
|
1168
1219
|
void* user_log_callback_data = nullptr);
|
@@ -1301,7 +1352,7 @@ class Highs {
|
|
1301
1352
|
this->model_.hessian_.exactResize();
|
1302
1353
|
}
|
1303
1354
|
|
1304
|
-
HighsStatus
|
1355
|
+
HighsStatus completeSolutionFromDiscreteAssignment();
|
1305
1356
|
|
1306
1357
|
HighsStatus callSolveLp(HighsLp& lp, const string message);
|
1307
1358
|
HighsStatus callSolveQp();
|
@@ -1336,7 +1387,7 @@ class Highs {
|
|
1336
1387
|
//
|
1337
1388
|
// Methods to clear solver data for users in Highs class members
|
1338
1389
|
// before (possibly) updating them with data from trying to solve
|
1339
|
-
// the
|
1390
|
+
// the incumbent model.
|
1340
1391
|
//
|
1341
1392
|
// Invalidates all solver data in Highs class members by calling
|
1342
1393
|
// invalidateModelStatus(), invalidateSolution(), invalidateBasis(),
|
@@ -1366,7 +1417,8 @@ class Highs {
|
|
1366
1417
|
|
1367
1418
|
HighsStatus returnFromWriteSolution(FILE* file,
|
1368
1419
|
const HighsStatus return_status);
|
1369
|
-
HighsStatus returnFromRun(const HighsStatus return_status
|
1420
|
+
HighsStatus returnFromRun(const HighsStatus return_status,
|
1421
|
+
const bool undo_mods);
|
1370
1422
|
HighsStatus returnFromHighs(const HighsStatus return_status);
|
1371
1423
|
void reportSolvedLpQpStats();
|
1372
1424
|
|
@@ -1444,6 +1496,7 @@ class Highs {
|
|
1444
1496
|
HighsStatus getPrimalRayInterface(bool& has_primal_ray,
|
1445
1497
|
double* primal_ray_value);
|
1446
1498
|
HighsStatus getRangingInterface();
|
1499
|
+
|
1447
1500
|
bool aFormatOk(const HighsInt num_nz, const HighsInt format);
|
1448
1501
|
bool qFormatOk(const HighsInt num_nz, const HighsInt format);
|
1449
1502
|
void clearZeroHessian();
|
@@ -1454,6 +1507,23 @@ class Highs {
|
|
1454
1507
|
|
1455
1508
|
HighsStatus handleInfCost();
|
1456
1509
|
void restoreInfCost(HighsStatus& return_status);
|
1510
|
+
HighsStatus optionChangeAction();
|
1511
|
+
HighsStatus computeIllConditioning(HighsIllConditioning& ill_conditioning,
|
1512
|
+
const bool constraint,
|
1513
|
+
const HighsInt method,
|
1514
|
+
const double ill_conditioning_bound);
|
1515
|
+
void formIllConditioningLp0(HighsLp& ill_conditioning_lp,
|
1516
|
+
std::vector<HighsInt>& basic_var,
|
1517
|
+
const bool constraint);
|
1518
|
+
void formIllConditioningLp1(HighsLp& ill_conditioning_lp,
|
1519
|
+
std::vector<HighsInt>& basic_var,
|
1520
|
+
const bool constraint,
|
1521
|
+
const double ill_conditioning_bound);
|
1522
|
+
bool infeasibleBoundsOk();
|
1457
1523
|
};
|
1458
1524
|
|
1525
|
+
// Start of deprecated methods not in the Highs class
|
1526
|
+
|
1527
|
+
const char* highsCompilationDate();
|
1528
|
+
|
1459
1529
|
#endif
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#ifndef __READERLP_DEF_HPP__
|
2
|
+
#define __READERLP_DEF_HPP__
|
3
|
+
|
4
|
+
#include <stdexcept>
|
5
|
+
#include <string>
|
6
|
+
|
7
|
+
void inline lpassert(bool condition) {
|
8
|
+
if (!condition) {
|
9
|
+
throw std::invalid_argument("File not existent or illegal file format.");
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
const std::string LP_KEYWORD_INF[] = {"infinity", "inf"};
|
14
|
+
const std::string LP_KEYWORD_FREE[] = {"free"};
|
15
|
+
|
16
|
+
const unsigned int LP_KEYWORD_INF_N = 2;
|
17
|
+
const unsigned int LP_KEYWORD_FREE_N = 1;
|
18
|
+
|
19
|
+
#endif
|