lpsolver 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +70 -26
- data/ext/lpsolver/Makefile +273 -0
- data/ext/lpsolver/ext.c +353 -0
- data/ext/lpsolver/ext.o +0 -0
- data/ext/lpsolver/extconf.rb +79 -0
- data/ext/lpsolver/native.so +0 -0
- data/ext/lpsolver-highs/AUTHORS +7 -0
- data/ext/lpsolver-highs/BUILD.bazel +243 -0
- data/ext/lpsolver-highs/CITATION.cff +29 -0
- data/ext/lpsolver-highs/CMakeCache.txt +406 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCCompiler.cmake +81 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake +101 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeSystem.cmake +15 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/CMakeCCompilerId.c +904 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/a.out +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +919 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/a.out +0 -0
- data/ext/lpsolver-highs/CMakeFiles/CMakeConfigureLog.yaml +576 -0
- data/ext/lpsolver-highs/CMakeFiles/cmake.check_cache +1 -0
- data/ext/lpsolver-highs/CMakeLists.txt +983 -0
- data/ext/lpsolver-highs/CODE_OF_CONDUCT.md +128 -0
- data/ext/lpsolver-highs/CONTRIBUTING.md +31 -0
- data/ext/lpsolver-highs/FEATURES.md +61 -0
- data/ext/lpsolver-highs/LICENSE.txt +21 -0
- data/ext/lpsolver-highs/MODULE.bazel +38 -0
- data/ext/lpsolver-highs/README.md +281 -0
- data/ext/lpsolver-highs/THIRD_PARTY_NOTICES.md +78 -0
- data/ext/lpsolver-highs/Version.txt +4 -0
- data/ext/lpsolver-highs/WORKSPACE +33 -0
- data/ext/lpsolver-highs/app/CMakeLists.txt +110 -0
- data/ext/lpsolver-highs/app/HighsRuntimeOptions.h +292 -0
- data/ext/lpsolver-highs/app/RunHighs.cpp +147 -0
- data/ext/lpsolver-highs/app/highs_webdemo_shell.html +73 -0
- data/ext/lpsolver-highs/build/bin/highs +0 -0
- data/ext/lpsolver-highs/build/include/highs/HConfig.h +22 -0
- data/ext/lpsolver-highs/build/include/highs/Highs.h +1812 -0
- data/ext/lpsolver-highs/build/include/highs/interfaces/highs_c_api.h +2651 -0
- data/ext/lpsolver-highs/build/include/highs/io/Filereader.h +45 -0
- data/ext/lpsolver-highs/build/include/highs/io/FilereaderLp.h +49 -0
- data/ext/lpsolver-highs/build/include/highs/io/FilereaderMps.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/io/HMPSIO.h +78 -0
- data/ext/lpsolver-highs/build/include/highs/io/HMpsFF.h +245 -0
- data/ext/lpsolver-highs/build/include/highs/io/HighsIO.h +118 -0
- data/ext/lpsolver-highs/build/include/highs/io/LoadOptions.h +24 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/builder.hpp +25 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/def.hpp +19 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/model.hpp +68 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/reader.hpp +10 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/IpxSolution.h +32 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/IpxWrapper.h +106 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu.h +161 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_object.h +30 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_update.h +125 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_def.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_file.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_internal.h +220 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_list.h +173 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basis.h +350 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/control.h +167 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/crossover.h +157 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/diagonal_precond.h +45 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/guess_basis.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/indexed_vector.h +113 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/info.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipm.h +94 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_c.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_config.h +9 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_info.h +111 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_internal.h +89 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_parameters.h +76 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_status.h +57 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/iterate.h +331 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver.h +70 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/linear_operator.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lp_solver.h +204 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_factorization.h +79 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_update.h +129 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/maxvolume.h +54 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/model.h +413 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/multistream.h +52 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/normal_matrix.h +44 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/power_method.h +44 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_matrix.h +195 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_utils.h +58 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/starting_basis.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/symbolic_invert.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/timer.h +25 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/utils.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HConst.h +430 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HStruct.h +213 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsAnalysis.h +23 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallback.h +104 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallbackStruct.h +70 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsDebug.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsIis.h +139 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfo.h +421 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfoDebug.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLp.h +97 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpSolverObject.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpUtils.h +330 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsModelUtils.h +129 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsOptions.h +1715 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsRanging.h +43 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolution.h +179 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolutionDebug.h +87 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolve.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsStatus.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCliqueTable.h +329 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsConflictPool.h +109 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCutGeneration.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCutPool.h +168 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDebugSol.h +133 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDomain.h +657 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDomainChange.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDynamicRowMatrix.h +104 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsGFkSolve.h +439 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsImplications.h +194 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsLpAggregator.h +50 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsLpRelaxation.h +361 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipAnalysis.h +71 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolver.h +159 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolverData.h +313 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsModkSeparator.h +60 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsNodeQueue.h +312 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsObjectiveFunction.h +71 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPathSeparator.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPrimalHeuristics.h +75 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPseudocost.h +366 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsRedcostFixing.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSearch.h +241 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparation.h +41 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparator.h +60 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsTableauSeparator.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsTransformedLp.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/mip/MipTimer.h +544 -0
- data/ext/lpsolver-highs/build/include/highs/mip/feasibilityjump.hh +800 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsHessian.h +54 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsHessianUtils.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsModel.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsBinarySemaphore.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsCacheAlign.h +82 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsCombinable.h +116 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsMutex.h +124 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsParallel.h +128 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsRaceTimer.h +38 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSchedulerConstants.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSpinMutex.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSplitDeque.h +606 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsTask.h +170 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsTaskExecutor.h +217 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/CupdlpWrapper.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpTimer.h +155 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpWrapper.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/defs.hpp +222 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/linalg.hpp +61 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/logger.hpp +80 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/pdhg.hpp +358 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/restart.hpp +96 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/scaling.hpp +74 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/solver_results.hpp +65 -0
- data/ext/lpsolver-highs/build/include/highs/pdqsort/pdqsort.h +532 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HPresolve.h +505 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HPresolveAnalysis.h +52 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HighsPostsolveStack.h +943 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HighsSymmetry.h +284 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrash.h +124 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrashUtil.h +62 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrashX.h +23 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/PresolveComponent.h +90 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/a_asm.hpp +77 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/a_quass.hpp +22 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/basis.hpp +159 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/crashsolution.hpp +20 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/dantzigpricing.hpp +80 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/devexpricing.hpp +108 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/eventhandler.hpp +30 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/factor.hpp +408 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_bounded.hpp +114 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_highs.hpp +301 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/gradient.hpp +46 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/instance.hpp +70 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/matrix.hpp +342 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/perturbation.hpp +15 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/pricing.hpp +22 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/qpconst.hpp +34 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/qpvector.hpp +242 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/quass.hpp +27 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/ratiotest.hpp +26 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/runtime.hpp +45 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/scaling.hpp +15 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/settings.hpp +84 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/snippets.hpp +36 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/statistics.hpp +30 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/steepestedgepricing.hpp +173 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HApp.h +550 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkk.h +419 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDual.h +513 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRHS.h +134 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRow.h +201 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkPrimal.h +191 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplex.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexDebug.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexNla.h +158 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexReport.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HighsSimplexAnalysis.h +500 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexConst.h +273 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexStruct.h +263 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexTimer.h +414 -0
- data/ext/lpsolver-highs/build/include/highs/test_kkt/DevKkt.h +143 -0
- data/ext/lpsolver-highs/build/include/highs/test_kkt/KktCh2.h +79 -0
- data/ext/lpsolver-highs/build/include/highs/util/FactorTimer.h +199 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactor.h +587 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactorConst.h +81 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactorDebug.h +55 -0
- data/ext/lpsolver-highs/build/include/highs/util/HSet.h +89 -0
- data/ext/lpsolver-highs/build/include/highs/util/HVector.h +22 -0
- data/ext/lpsolver-highs/build/include/highs/util/HVectorBase.h +102 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsCDouble.h +323 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsComponent.h +53 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsDataStack.h +83 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsDisjointSets.h +107 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsHash.h +1274 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsHashTree.h +1461 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsInt.h +36 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsIntegers.h +212 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsLinearSumBounds.h +203 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixPic.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixSlice.h +561 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixUtils.h +57 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMemoryAllocation.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsRandom.h +242 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsRbTree.h +452 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSort.h +131 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSparseMatrix.h +151 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSparseVectorSum.h +95 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSplay.h +135 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsTimer.h +385 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsUtils.h +272 -0
- data/ext/lpsolver-highs/build/include/highs/util/stringutil.h +46 -0
- data/ext/lpsolver-highs/build/include/highs/zstr/strict_fstream.hpp +237 -0
- data/ext/lpsolver-highs/build/include/highs/zstr/zstr.hpp +473 -0
- data/ext/lpsolver-highs/build/include/highs_export.h +43 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config-version.cmake +65 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config.cmake +36 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets-release.cmake +19 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets.cmake +111 -0
- data/ext/lpsolver-highs/build/lib/libhighs.a +0 -0
- data/ext/lpsolver-highs/build/lib/pkgconfig/highs.pc +12 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/AUTHORS +7 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CITATION.cff +29 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CODE_OF_CONDUCT.md +128 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CONTRIBUTING.md +31 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/FEATURES.md +61 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/LICENSE.txt +21 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/README.md +281 -0
- data/ext/lpsolver-highs/build_webdemo.sh +46 -0
- data/ext/lpsolver-highs/check/Avgas.cpp +245 -0
- data/ext/lpsolver-highs/check/Avgas.h +44 -0
- data/ext/lpsolver-highs/check/CMakeLists.txt +573 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.bazel.in +6 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.in +12 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.meson.in +6 -0
- data/ext/lpsolver-highs/check/SpecialLps.h +405 -0
- data/ext/lpsolver-highs/check/TestAlienBasis.cpp +720 -0
- data/ext/lpsolver-highs/check/TestBasis.cpp +359 -0
- data/ext/lpsolver-highs/check/TestBasisSolves.cpp +669 -0
- data/ext/lpsolver-highs/check/TestCAPI.c +2513 -0
- data/ext/lpsolver-highs/check/TestCallbacks.cpp +608 -0
- data/ext/lpsolver-highs/check/TestCheckSolution.cpp +740 -0
- data/ext/lpsolver-highs/check/TestCrossover.cpp +111 -0
- data/ext/lpsolver-highs/check/TestDualize.cpp +172 -0
- data/ext/lpsolver-highs/check/TestEkk.cpp +100 -0
- data/ext/lpsolver-highs/check/TestFactor.cpp +389 -0
- data/ext/lpsolver-highs/check/TestFilereader.cpp +568 -0
- data/ext/lpsolver-highs/check/TestFortranAPI.f90 +65 -0
- data/ext/lpsolver-highs/check/TestHSet.cpp +80 -0
- data/ext/lpsolver-highs/check/TestHighsCDouble.cpp +109 -0
- data/ext/lpsolver-highs/check/TestHighsGFkSolve.cpp +102 -0
- data/ext/lpsolver-highs/check/TestHighsHash.cpp +126 -0
- data/ext/lpsolver-highs/check/TestHighsHessian.cpp +329 -0
- data/ext/lpsolver-highs/check/TestHighsIntegers.cpp +42 -0
- data/ext/lpsolver-highs/check/TestHighsModel.cpp +134 -0
- data/ext/lpsolver-highs/check/TestHighsParallel.cpp +277 -0
- data/ext/lpsolver-highs/check/TestHighsRbTree.cpp +109 -0
- data/ext/lpsolver-highs/check/TestHighsSparseMatrix.cpp +126 -0
- data/ext/lpsolver-highs/check/TestHighsVersion.cpp +61 -0
- data/ext/lpsolver-highs/check/TestHipo.cpp +122 -0
- data/ext/lpsolver-highs/check/TestICrash.cpp +46 -0
- data/ext/lpsolver-highs/check/TestIO.cpp +163 -0
- data/ext/lpsolver-highs/check/TestIis.cpp +1063 -0
- data/ext/lpsolver-highs/check/TestInfo.cpp +116 -0
- data/ext/lpsolver-highs/check/TestIpm.cpp +226 -0
- data/ext/lpsolver-highs/check/TestIpx.cpp +96 -0
- data/ext/lpsolver-highs/check/TestLPFileFormat.cpp +22 -0
- data/ext/lpsolver-highs/check/TestLogging.cpp +69 -0
- data/ext/lpsolver-highs/check/TestLpModification.cpp +2497 -0
- data/ext/lpsolver-highs/check/TestLpOrientation.cpp +121 -0
- data/ext/lpsolver-highs/check/TestLpSolvers.cpp +555 -0
- data/ext/lpsolver-highs/check/TestLpValidation.cpp +689 -0
- data/ext/lpsolver-highs/check/TestMain.cpp +6 -0
- data/ext/lpsolver-highs/check/TestMipSolver.cpp +1406 -0
- data/ext/lpsolver-highs/check/TestModelProperties.cpp +143 -0
- data/ext/lpsolver-highs/check/TestMultiObjective.cpp +198 -0
- data/ext/lpsolver-highs/check/TestNames.cpp +187 -0
- data/ext/lpsolver-highs/check/TestOptions.cpp +544 -0
- data/ext/lpsolver-highs/check/TestPdlp.cpp +327 -0
- data/ext/lpsolver-highs/check/TestPdlpHi.cpp +40 -0
- data/ext/lpsolver-highs/check/TestPresolve.cpp +912 -0
- data/ext/lpsolver-highs/check/TestQpSolver.cpp +1345 -0
- data/ext/lpsolver-highs/check/TestRanging.cpp +558 -0
- data/ext/lpsolver-highs/check/TestRays.cpp +1010 -0
- data/ext/lpsolver-highs/check/TestSemiVariables.cpp +329 -0
- data/ext/lpsolver-highs/check/TestSetup.cpp +12 -0
- data/ext/lpsolver-highs/check/TestSort.cpp +247 -0
- data/ext/lpsolver-highs/check/TestSpecialLps.cpp +775 -0
- data/ext/lpsolver-highs/check/TestThrow.cpp +83 -0
- data/ext/lpsolver-highs/check/TestTspSolver.cpp +19 -0
- data/ext/lpsolver-highs/check/TestUserScale.cpp +444 -0
- data/ext/lpsolver-highs/check/cublas_example.cpp +76 -0
- data/ext/lpsolver-highs/check/cublas_gpu_start.cpp +88 -0
- data/ext/lpsolver-highs/check/hipo_test_option_files/hipo_options_0 +1 -0
- data/ext/lpsolver-highs/check/instances/1448.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1449a.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1449b.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1451.lp +8 -0
- data/ext/lpsolver-highs/check/instances/2122.lp +1822 -0
- data/ext/lpsolver-highs/check/instances/2171.mps +717 -0
- data/ext/lpsolver-highs/check/instances/25fv47.mps +6919 -0
- data/ext/lpsolver-highs/check/instances/2821-duplicate.mps +31 -0
- data/ext/lpsolver-highs/check/instances/2821-qmatrix.mps +31 -0
- data/ext/lpsolver-highs/check/instances/2821-quadobj.mps +29 -0
- data/ext/lpsolver-highs/check/instances/2821-summation.mps +30 -0
- data/ext/lpsolver-highs/check/instances/2821.mps +29 -0
- data/ext/lpsolver-highs/check/instances/2894.mps +89 -0
- data/ext/lpsolver-highs/check/instances/80bau3b.mps +23732 -0
- data/ext/lpsolver-highs/check/instances/WithInf.set +3 -0
- data/ext/lpsolver-highs/check/instances/adlittle.mps +335 -0
- data/ext/lpsolver-highs/check/instances/afiro.mps +83 -0
- data/ext/lpsolver-highs/check/instances/avgas.mps +51 -0
- data/ext/lpsolver-highs/check/instances/bell5.mps +384 -0
- data/ext/lpsolver-highs/check/instances/bgetam.mps +2112 -0
- data/ext/lpsolver-highs/check/instances/blending.mps +13 -0
- data/ext/lpsolver-highs/check/instances/box1.mps +1085 -0
- data/ext/lpsolver-highs/check/instances/chip.mps +13 -0
- data/ext/lpsolver-highs/check/instances/comment.mps +23 -0
- data/ext/lpsolver-highs/check/instances/cplex1.mps +9674 -0
- data/ext/lpsolver-highs/check/instances/dD2e.mps +10 -0
- data/ext/lpsolver-highs/check/instances/dcmulti.mps +2310 -0
- data/ext/lpsolver-highs/check/instances/e226.mps +1733 -0
- data/ext/lpsolver-highs/check/instances/egout-ac.mps +473 -0
- data/ext/lpsolver-highs/check/instances/egout.mps +403 -0
- data/ext/lpsolver-highs/check/instances/etamacro.mps +2084 -0
- data/ext/lpsolver-highs/check/instances/ex72a.mps +849 -0
- data/ext/lpsolver-highs/check/instances/fixed-binary.lp +11 -0
- data/ext/lpsolver-highs/check/instances/flugpl.mps +111 -0
- data/ext/lpsolver-highs/check/instances/flugpl_illegal_integer.sol +24 -0
- data/ext/lpsolver-highs/check/instances/flugpl_integer.sol +25 -0
- data/ext/lpsolver-highs/check/instances/forest6.mps +261 -0
- data/ext/lpsolver-highs/check/instances/galenet.mps +34 -0
- data/ext/lpsolver-highs/check/instances/gams10am.mps +478 -0
- data/ext/lpsolver-highs/check/instances/garbage.ems +3 -0
- data/ext/lpsolver-highs/check/instances/garbage.lp +3 -0
- data/ext/lpsolver-highs/check/instances/garbage.mps +3 -0
- data/ext/lpsolver-highs/check/instances/gas11.mps +2924 -0
- data/ext/lpsolver-highs/check/instances/gesa2.mps +5459 -0
- data/ext/lpsolver-highs/check/instances/greenbea.mps +19215 -0
- data/ext/lpsolver-highs/check/instances/gt2.mps +534 -0
- data/ext/lpsolver-highs/check/instances/infeasible-mip0.mps +140 -0
- data/ext/lpsolver-highs/check/instances/infeasible-mip1.mps +371 -0
- data/ext/lpsolver-highs/check/instances/israel.mps +1490 -0
- data/ext/lpsolver-highs/check/instances/issue-2095.mps +836 -0
- data/ext/lpsolver-highs/check/instances/issue-2173.mps +3331 -0
- data/ext/lpsolver-highs/check/instances/issue-2204.mps +143 -0
- data/ext/lpsolver-highs/check/instances/issue-2290.mps +158 -0
- data/ext/lpsolver-highs/check/instances/issue-2388.lp +76 -0
- data/ext/lpsolver-highs/check/instances/issue-2402.mps +435 -0
- data/ext/lpsolver-highs/check/instances/issue-2446.mps +9154 -0
- data/ext/lpsolver-highs/check/instances/issue-2585.lp +16 -0
- data/ext/lpsolver-highs/check/instances/issue-2874-3.mps +97 -0
- data/ext/lpsolver-highs/check/instances/klein1.mps +422 -0
- data/ext/lpsolver-highs/check/instances/lseu.mps +371 -0
- data/ext/lpsolver-highs/check/instances/model.xyz +1 -0
- data/ext/lpsolver-highs/check/instances/nan0.mps +13 -0
- data/ext/lpsolver-highs/check/instances/nan1.mps +13 -0
- data/ext/lpsolver-highs/check/instances/nan2.mps +13 -0
- data/ext/lpsolver-highs/check/instances/no-newline-eof.lp +5 -0
- data/ext/lpsolver-highs/check/instances/p01.mps +909 -0
- data/ext/lpsolver-highs/check/instances/p0548.mps +1992 -0
- data/ext/lpsolver-highs/check/instances/primal1.mps +3909 -0
- data/ext/lpsolver-highs/check/instances/qap04.mps +606 -0
- data/ext/lpsolver-highs/check/instances/qcqp.lp +8 -0
- data/ext/lpsolver-highs/check/instances/qjh.lp +9 -0
- data/ext/lpsolver-highs/check/instances/qjh.mps +18 -0
- data/ext/lpsolver-highs/check/instances/qjh_qmatrix.mps +19 -0
- data/ext/lpsolver-highs/check/instances/qjh_quadobj.mps +18 -0
- data/ext/lpsolver-highs/check/instances/qjh_quadobj_qmatrix.mps +25 -0
- data/ext/lpsolver-highs/check/instances/qjh_uncon.lp +10 -0
- data/ext/lpsolver-highs/check/instances/qjh_uncon.mps +17 -0
- data/ext/lpsolver-highs/check/instances/qpinfeasible.lp +8 -0
- data/ext/lpsolver-highs/check/instances/qptestnw.lp +7 -0
- data/ext/lpsolver-highs/check/instances/qpunbounded.lp +5 -0
- data/ext/lpsolver-highs/check/instances/refinery.mps +1882 -0
- data/ext/lpsolver-highs/check/instances/rgn.mps +559 -0
- data/ext/lpsolver-highs/check/instances/scrs8.mps +2717 -0
- data/ext/lpsolver-highs/check/instances/sctest.mps +66 -0
- data/ext/lpsolver-highs/check/instances/semi-continuous.lp +13 -0
- data/ext/lpsolver-highs/check/instances/semi-continuous.mps +24 -0
- data/ext/lpsolver-highs/check/instances/semi-integer.lp +15 -0
- data/ext/lpsolver-highs/check/instances/semi-integer.mps +22 -0
- data/ext/lpsolver-highs/check/instances/shell.mps +4039 -0
- data/ext/lpsolver-highs/check/instances/silly-names.mps +14 -0
- data/ext/lpsolver-highs/check/instances/small_mip.mps +87 -0
- data/ext/lpsolver-highs/check/instances/smalllp.mps +21 -0
- data/ext/lpsolver-highs/check/instances/sp150x300d.mps +1983 -0
- data/ext/lpsolver-highs/check/instances/stair.mps +2499 -0
- data/ext/lpsolver-highs/check/instances/standata.mps +2317 -0
- data/ext/lpsolver-highs/check/instances/standgub.mps +2428 -0
- data/ext/lpsolver-highs/check/instances/standmps.mps +2695 -0
- data/ext/lpsolver-highs/check/instances/test.mps +53 -0
- data/ext/lpsolver-highs/check/instances/vol1.mps +1895 -0
- data/ext/lpsolver-highs/check/instances/warnings.mps +68 -0
- data/ext/lpsolver-highs/check/instances/woodinfe.mps +216 -0
- data/ext/lpsolver-highs/check/matrix_multiplication.hpp +49 -0
- data/ext/lpsolver-highs/check/meson.build +92 -0
- data/ext/lpsolver-highs/check/pythontest.py +11 -0
- data/ext/lpsolver-highs/check/sample_options_file +8 -0
- data/ext/lpsolver-highs/cmake/CheckAtomic.cmake +74 -0
- data/ext/lpsolver-highs/cmake/FindCUDAConf.cmake +44 -0
- data/ext/lpsolver-highs/cmake/FindHipoDeps.cmake +351 -0
- data/ext/lpsolver-highs/cmake/README.md +243 -0
- data/ext/lpsolver-highs/cmake/cpp-highs.cmake +243 -0
- data/ext/lpsolver-highs/cmake/dotnet.cmake +94 -0
- data/ext/lpsolver-highs/cmake/highs-config.cmake.in +22 -0
- data/ext/lpsolver-highs/cmake/python-highs.cmake +74 -0
- data/ext/lpsolver-highs/cmake/set-version.cmake +26 -0
- data/ext/lpsolver-highs/cmake/sources-python.cmake +461 -0
- data/ext/lpsolver-highs/cmake/sources.cmake +618 -0
- data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeader.pl +78 -0
- data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeaderUpdateAll +32 -0
- data/ext/lpsolver-highs/docs/Project.toml +7 -0
- data/ext/lpsolver-highs/docs/README.md +27 -0
- data/ext/lpsolver-highs/docs/c_api_gen/HConfig.h +1 -0
- data/ext/lpsolver-highs/docs/c_api_gen/build.jl +48 -0
- data/ext/lpsolver-highs/docs/make.jl +115 -0
- data/ext/lpsolver-highs/docs/src/assets/logo.png +0 -0
- data/ext/lpsolver-highs/docs/src/callbacks.md +171 -0
- data/ext/lpsolver-highs/docs/src/executable.md +88 -0
- data/ext/lpsolver-highs/docs/src/guide/advanced.md +66 -0
- data/ext/lpsolver-highs/docs/src/guide/basic.md +116 -0
- data/ext/lpsolver-highs/docs/src/guide/further.md +193 -0
- data/ext/lpsolver-highs/docs/src/guide/gpu.md +58 -0
- data/ext/lpsolver-highs/docs/src/guide/index.md +18 -0
- data/ext/lpsolver-highs/docs/src/guide/kkt.md +219 -0
- data/ext/lpsolver-highs/docs/src/guide/numerics.md +55 -0
- data/ext/lpsolver-highs/docs/src/index.md +86 -0
- data/ext/lpsolver-highs/docs/src/installation.md +130 -0
- data/ext/lpsolver-highs/docs/src/interfaces/c_api.md +6 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/examples.md +1 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/index.md +29 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/library.md +107 -0
- data/ext/lpsolver-highs/docs/src/interfaces/csharp.md +55 -0
- data/ext/lpsolver-highs/docs/src/interfaces/fortran.md +11 -0
- data/ext/lpsolver-highs/docs/src/interfaces/julia/index.md +130 -0
- data/ext/lpsolver-highs/docs/src/interfaces/other.md +41 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/example-py.md +275 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/index.md +91 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/model-py.md +90 -0
- data/ext/lpsolver-highs/docs/src/options/definitions.md +529 -0
- data/ext/lpsolver-highs/docs/src/options/intro.md +46 -0
- data/ext/lpsolver-highs/docs/src/parallel.md +88 -0
- data/ext/lpsolver-highs/docs/src/solvers.md +168 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsHessian.md +9 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsIis.md +16 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsLp.md +19 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsModel.md +6 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsSparseMatrix.md +10 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/index.md +11 -0
- data/ext/lpsolver-highs/docs/src/structures/enums.md +114 -0
- data/ext/lpsolver-highs/docs/src/structures/index.md +12 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsBasis.md +8 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsInfo.md +148 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsLinearObjective.md +11 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsSolution.md +10 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/index.md +10 -0
- data/ext/lpsolver-highs/docs/src/terminology.md +163 -0
- data/ext/lpsolver-highs/examples/CMakeLists.txt +26 -0
- data/ext/lpsolver-highs/examples/Docs.py +104 -0
- data/ext/lpsolver-highs/examples/branch-and-price.py +465 -0
- data/ext/lpsolver-highs/examples/call_highs_from_c.c +685 -0
- data/ext/lpsolver-highs/examples/call_highs_from_c_minimal.c +659 -0
- data/ext/lpsolver-highs/examples/call_highs_from_cpp.cpp +178 -0
- data/ext/lpsolver-highs/examples/call_highs_from_csharp.cs +83 -0
- data/ext/lpsolver-highs/examples/call_highs_from_fortran.f90 +579 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python.py +448 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python_highspy.py +71 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python_mps.py +59 -0
- data/ext/lpsolver-highs/examples/callback_gap.py +71 -0
- data/ext/lpsolver-highs/examples/chip.py +43 -0
- data/ext/lpsolver-highs/examples/chip0.py +29 -0
- data/ext/lpsolver-highs/examples/distillation.py +77 -0
- data/ext/lpsolver-highs/examples/knapsack.py +43 -0
- data/ext/lpsolver-highs/examples/minimal.py +11 -0
- data/ext/lpsolver-highs/examples/multi_objective.py +139 -0
- data/ext/lpsolver-highs/examples/multiple_objective.py +120 -0
- data/ext/lpsolver-highs/examples/network_flow.py +37 -0
- data/ext/lpsolver-highs/examples/nqueens.py +29 -0
- data/ext/lpsolver-highs/examples/plot_highs_log.py +134 -0
- data/ext/lpsolver-highs/extern/CLI11.hpp +11546 -0
- data/ext/lpsolver-highs/extern/LICENCE_1_0.txt +23 -0
- data/ext/lpsolver-highs/extern/amd/License.txt +35 -0
- data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.c +54 -0
- data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.h +56 -0
- data/ext/lpsolver-highs/extern/amd/amd.h +357 -0
- data/ext/lpsolver-highs/extern/amd/amd_1.c +172 -0
- data/ext/lpsolver-highs/extern/amd/amd_2.c +1761 -0
- data/ext/lpsolver-highs/extern/amd/amd_aat.c +179 -0
- data/ext/lpsolver-highs/extern/amd/amd_control.c +65 -0
- data/ext/lpsolver-highs/extern/amd/amd_defaults.c +37 -0
- data/ext/lpsolver-highs/extern/amd/amd_info.c +120 -0
- data/ext/lpsolver-highs/extern/amd/amd_internal.h +137 -0
- data/ext/lpsolver-highs/extern/amd/amd_order.c +195 -0
- data/ext/lpsolver-highs/extern/amd/amd_post_tree.c +105 -0
- data/ext/lpsolver-highs/extern/amd/amd_postorder.c +140 -0
- data/ext/lpsolver-highs/extern/amd/amd_preprocess.c +107 -0
- data/ext/lpsolver-highs/extern/amd/amd_valid.c +93 -0
- data/ext/lpsolver-highs/extern/amd/changes.txt +8 -0
- data/ext/lpsolver-highs/extern/catch.hpp +18861 -0
- data/ext/lpsolver-highs/extern/metis/Changes.txt +31 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/GKlib.h +62 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/error.c +21 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_arch.h +64 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_defs.h +19 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_macros.h +50 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkblas.h +51 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkmemory.h +80 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkpqueue.h +329 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkrandom.h +89 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mksort.h +271 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_inttypes.h +41 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stat.h +22 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stdint.h +41 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_proto.h +50 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_struct.h +66 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_types.h +15 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/mcore.c +176 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/memory.c +23 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/random.c +37 -0
- data/ext/lpsolver-highs/extern/metis/LICENSE.txt +18 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/auxapi.c +27 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/balance.c +491 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/bucketsort.c +44 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/coarsen.c +895 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/compress.c +231 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/contig.c +83 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/defs.h +39 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/fm.c +527 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/gklib.c +55 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/gklib_defs.h +33 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/graph.c +268 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/initpart.c +385 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/macros.h +59 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/mcutil.c +162 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/metislib.h +35 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/mmd.c +598 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/ometis.c +661 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/options.c +260 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/proto.h +172 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/refine.c +99 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/separator.c +57 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/sfm.c +581 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/srefine.c +152 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/stdheaders.h +29 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/struct.h +117 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/util.c +59 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/wspace.c +91 -0
- data/ext/lpsolver-highs/extern/metis/metis.h +271 -0
- data/ext/lpsolver-highs/extern/pdqsort/license.txt +16 -0
- data/ext/lpsolver-highs/extern/pdqsort/pdqsort.h +532 -0
- data/ext/lpsolver-highs/extern/rcm/LICENSE +19 -0
- data/ext/lpsolver-highs/extern/rcm/rcm.cpp +873 -0
- data/ext/lpsolver-highs/extern/rcm/rcm.h +22 -0
- data/ext/lpsolver-highs/extern/zstr/LICENSE +21 -0
- data/ext/lpsolver-highs/extern/zstr/strict_fstream.hpp +237 -0
- data/ext/lpsolver-highs/extern/zstr/zstr.hpp +473 -0
- data/ext/lpsolver-highs/flake.lock +61 -0
- data/ext/lpsolver-highs/flake.nix +73 -0
- data/ext/lpsolver-highs/highs/CMakeLists.txt +499 -0
- data/ext/lpsolver-highs/highs/HConfig.h.bazel.in +25 -0
- data/ext/lpsolver-highs/highs/HConfig.h.in +22 -0
- data/ext/lpsolver-highs/highs/HConfig.h.meson.in +17 -0
- data/ext/lpsolver-highs/highs/Highs.h +1812 -0
- data/ext/lpsolver-highs/highs/HighsRun.md +143 -0
- data/ext/lpsolver-highs/highs/highs_bindings.cpp +1826 -0
- data/ext/lpsolver-highs/highs/highspy/__init__.py +93 -0
- data/ext/lpsolver-highs/highs/highspy/__init__.pyi +91 -0
- data/ext/lpsolver-highs/highs/highspy/_core/__init__.pyi +1058 -0
- data/ext/lpsolver-highs/highs/highspy/_core/cb.pyi +118 -0
- data/ext/lpsolver-highs/highs/highspy/_core/simplex_constants.pyi +472 -0
- data/ext/lpsolver-highs/highs/highspy/highs.py +2430 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_c_api.cpp +1812 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_c_api.h +2651 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_csharp_api.cs +1142 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_fortran_api.f90 +873 -0
- data/ext/lpsolver-highs/highs/io/Filereader.cpp +87 -0
- data/ext/lpsolver-highs/highs/io/Filereader.h +45 -0
- data/ext/lpsolver-highs/highs/io/FilereaderLp.cpp +539 -0
- data/ext/lpsolver-highs/highs/io/FilereaderLp.h +49 -0
- data/ext/lpsolver-highs/highs/io/FilereaderMps.cpp +86 -0
- data/ext/lpsolver-highs/highs/io/FilereaderMps.h +27 -0
- data/ext/lpsolver-highs/highs/io/HMPSIO.cpp +1001 -0
- data/ext/lpsolver-highs/highs/io/HMPSIO.h +78 -0
- data/ext/lpsolver-highs/highs/io/HMpsFF.cpp +2113 -0
- data/ext/lpsolver-highs/highs/io/HMpsFF.h +245 -0
- data/ext/lpsolver-highs/highs/io/HighsIO.cpp +371 -0
- data/ext/lpsolver-highs/highs/io/HighsIO.h +118 -0
- data/ext/lpsolver-highs/highs/io/LoadOptions.cpp +60 -0
- data/ext/lpsolver-highs/highs/io/LoadOptions.h +24 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/LICENSE +19 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/builder.hpp +25 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/def.hpp +19 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/model.hpp +68 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/reader.cpp +1375 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/reader.hpp +10 -0
- data/ext/lpsolver-highs/highs/ipm/IpxSolution.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/IpxWrapper.cpp +1526 -0
- data/ext/lpsolver-highs/highs/ipm/IpxWrapper.h +106 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu.h +161 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.c +132 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.c +148 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.c +24 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.c +325 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.h +30 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.c +46 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.c +79 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.c +63 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.c +44 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.h +125 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_build_factors.c +441 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_condest.c +124 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_def.h +39 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_dfs.c +141 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_factorize_bump.c +56 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.c +184 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.h +21 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_garbage_perm.c +53 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_initialize.c +56 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.c +352 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.h +220 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_list.h +173 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_markowitz.c +188 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_matrix_norm.c +51 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_pivot.c +1247 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_residual_test.c +155 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_setup_bump.c +198 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_singletons.c +511 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_dense.c +129 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_for_update.c +360 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_sparse.c +284 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_symbolic.c +48 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_triangular.c +140 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_update.c +908 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.cpp +301 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.h +104 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/IntConfig.h +27 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.cpp +193 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.h +30 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.cpp +60 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.h +62 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/OrderingPrint.h +10 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.cpp +117 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.h +59 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/mycblas.h +85 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.cpp +1367 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.h +122 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.cpp +114 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.cpp +82 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.h +83 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.cpp +326 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.h +86 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFact.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactHybrid.cpp +279 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactKernel.cpp +284 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.cpp +38 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.cpp +57 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.h +112 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.cpp +405 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.h +85 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.cpp +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.h +95 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp +238 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.h +31 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp +272 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.h +26 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.cpp +83 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.h +45 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.cpp +54 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/ReturnValues.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.cpp +10 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.cpp +70 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.cpp +101 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.h +220 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Timing.h +114 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.cpp +38 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.h +41 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp +887 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.h +92 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Info.h +58 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.cpp +8 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.h +37 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.cpp +640 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.h +172 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LinearSolver.h +81 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.cpp +71 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.h +33 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.cpp +403 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.h +136 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Options.h +35 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Parameters.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.cpp +646 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.h +94 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Refine.cpp +214 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.cpp +1346 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.h +338 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Status.h +88 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.cc +71 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.h +20 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.cc +299 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basis.cc +966 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basis.h +350 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.cc +217 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.h +74 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/control.cc +151 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/control.h +167 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/crossover.cc +479 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/crossover.h +157 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.cc +70 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.h +45 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.cc +360 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.h +102 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.cc +233 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.h +21 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.cc +30 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.h +113 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/info.cc +124 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/info.h +27 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipm.cc +897 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipm.h +94 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.cc +83 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.h +47 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_config.h +9 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_info.h +111 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_internal.h +89 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_parameters.h +76 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_status.h +57 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/iterate.cc +683 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/iterate.h +331 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.cc +23 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.h +70 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.cc +387 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.cc +120 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.cc +10 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.h +26 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.cc +686 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.h +204 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.cc +131 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.h +79 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.cc +62 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.h +129 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.cc +337 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.h +54 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/model.cc +1528 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/model.h +413 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/multistream.h +52 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.cc +126 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.h +44 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/power_method.h +44 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.cc +382 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.h +195 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.cc +92 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.h +58 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.cc +117 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.cc +182 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.h +39 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.cc +183 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.h +29 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/timer.cc +16 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/timer.h +25 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/utils.cc +95 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/utils.h +37 -0
- data/ext/lpsolver-highs/highs/lp_data/HConst.h +430 -0
- data/ext/lpsolver-highs/highs/lp_data/HStruct.h +213 -0
- data/ext/lpsolver-highs/highs/lp_data/Highs.cpp +4949 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsAnalysis.h +23 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallback.cpp +323 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallback.h +104 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallbackStruct.h +70 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDebug.cpp +54 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDebug.h +34 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDeprecated.cpp +181 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsIis.cpp +1290 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsIis.h +139 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfo.cpp +426 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfo.h +421 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.cpp +175 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.h +27 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInterface.cpp +4344 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLp.cpp +564 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLp.h +97 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpSolverObject.h +47 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.cpp +3794 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.h +330 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.cpp +1650 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.h +129 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsOptions.cpp +1176 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsOptions.h +1715 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsRanging.cpp +733 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsRanging.h +43 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolution.cpp +2194 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolution.h +179 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.cpp +490 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.h +87 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolve.cpp +747 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolve.h +29 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsStatus.cpp +48 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsStatus.h +29 -0
- data/ext/lpsolver-highs/highs/lp_data/Iis.md +113 -0
- data/ext/lpsolver-highs/highs/meson.build +433 -0
- data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.cpp +2236 -0
- data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.h +329 -0
- data/ext/lpsolver-highs/highs/mip/HighsConflictPool.cpp +201 -0
- data/ext/lpsolver-highs/highs/mip/HighsConflictPool.h +109 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.cpp +1491 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.h +108 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutPool.cpp +526 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutPool.h +168 -0
- data/ext/lpsolver-highs/highs/mip/HighsDebugSol.cpp +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsDebugSol.h +133 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomain.cpp +3861 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomain.h +657 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomainChange.h +48 -0
- data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.cpp +199 -0
- data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.h +104 -0
- data/ext/lpsolver-highs/highs/mip/HighsFeasibilityJump.cpp +139 -0
- data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.cpp +106 -0
- data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.h +439 -0
- data/ext/lpsolver-highs/highs/mip/HighsImplications.cpp +915 -0
- data/ext/lpsolver-highs/highs/mip/HighsImplications.h +194 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.cpp +56 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.h +50 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.cpp +1609 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.h +361 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.cpp +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.h +71 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolver.cpp +1002 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolver.h +159 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.cpp +2936 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.h +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.cpp +267 -0
- data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.h +60 -0
- data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.cpp +443 -0
- data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.h +312 -0
- data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.cpp +124 -0
- data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.h +71 -0
- data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.cpp +549 -0
- data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.h +39 -0
- data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.cpp +1673 -0
- data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.h +75 -0
- data/ext/lpsolver-highs/highs/mip/HighsPseudocost.cpp +129 -0
- data/ext/lpsolver-highs/highs/mip/HighsPseudocost.h +366 -0
- data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.cpp +316 -0
- data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.h +42 -0
- data/ext/lpsolver-highs/highs/mip/HighsSearch.cpp +1881 -0
- data/ext/lpsolver-highs/highs/mip/HighsSearch.h +241 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparation.cpp +186 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparation.h +41 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparator.cpp +39 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparator.h +60 -0
- data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.cpp +244 -0
- data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.h +34 -0
- data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.cpp +563 -0
- data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.h +63 -0
- data/ext/lpsolver-highs/highs/mip/MipTimer.h +544 -0
- data/ext/lpsolver-highs/highs/mip/feasibilityjump.hh +800 -0
- data/ext/lpsolver-highs/highs/model/HighsHessian.cpp +263 -0
- data/ext/lpsolver-highs/highs/model/HighsHessian.h +54 -0
- data/ext/lpsolver-highs/highs/model/HighsHessianUtils.cpp +584 -0
- data/ext/lpsolver-highs/highs/model/HighsHessianUtils.h +47 -0
- data/ext/lpsolver-highs/highs/model/HighsModel.cpp +46 -0
- data/ext/lpsolver-highs/highs/model/HighsModel.h +42 -0
- data/ext/lpsolver-highs/highs/parallel/HighsBinarySemaphore.h +108 -0
- data/ext/lpsolver-highs/highs/parallel/HighsCacheAlign.h +82 -0
- data/ext/lpsolver-highs/highs/parallel/HighsCombinable.h +116 -0
- data/ext/lpsolver-highs/highs/parallel/HighsMutex.h +124 -0
- data/ext/lpsolver-highs/highs/parallel/HighsParallel.h +128 -0
- data/ext/lpsolver-highs/highs/parallel/HighsRaceTimer.h +38 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSchedulerConstants.h +19 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSpinMutex.h +48 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSplitDeque.h +606 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTask.h +170 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.cpp +43 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.h +217 -0
- data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.cpp +848 -0
- data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.h +108 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpTimer.h +155 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.cpp +141 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.h +26 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Diff +12 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Meld +7 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Merge +2 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/README.md +95 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/CMakeLists.txt +58 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu +338 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh +319 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu +386 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh +149 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cublas.c +154 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cuda_linalg.c +79 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp.h +16 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.c +214 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.c +802 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.c +148 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.c +124 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.c +425 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.c +1498 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.c +478 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.h +212 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/glbopts.h +342 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/defs.hpp +222 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.cc +231 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.hpp +61 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.cc +225 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.hpp +80 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cc +2798 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cu +497 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.hpp +358 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg_kernels.hpp +77 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdlp_gpu_debug.hpp +62 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.cc +132 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.hpp +96 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.cc +307 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.hpp +74 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/solver_results.hpp +65 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolve.cpp +8511 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolve.h +505 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.cpp +239 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.h +52 -0
- data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.cpp +1368 -0
- data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.h +943 -0
- data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.cpp +1921 -0
- data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.h +284 -0
- data/ext/lpsolver-highs/highs/presolve/ICrash.cpp +474 -0
- data/ext/lpsolver-highs/highs/presolve/ICrash.h +124 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashUtil.cpp +267 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashUtil.h +62 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashX.cpp +173 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashX.h +23 -0
- data/ext/lpsolver-highs/highs/presolve/PresolveComponent.cpp +45 -0
- data/ext/lpsolver-highs/highs/presolve/PresolveComponent.h +90 -0
- data/ext/lpsolver-highs/highs/qpsolver/README.md +185 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_asm.cpp +139 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_asm.hpp +77 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_quass.cpp +194 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_quass.hpp +22 -0
- data/ext/lpsolver-highs/highs/qpsolver/basis.cpp +443 -0
- data/ext/lpsolver-highs/highs/qpsolver/basis.hpp +159 -0
- data/ext/lpsolver-highs/highs/qpsolver/crashsolution.hpp +20 -0
- data/ext/lpsolver-highs/highs/qpsolver/dantzigpricing.hpp +80 -0
- data/ext/lpsolver-highs/highs/qpsolver/devexharrispricing.hpp +98 -0
- data/ext/lpsolver-highs/highs/qpsolver/devexpricing.hpp +108 -0
- data/ext/lpsolver-highs/highs/qpsolver/eventhandler.hpp +30 -0
- data/ext/lpsolver-highs/highs/qpsolver/factor.hpp +408 -0
- data/ext/lpsolver-highs/highs/qpsolver/feasibility_bounded.hpp +114 -0
- data/ext/lpsolver-highs/highs/qpsolver/feasibility_highs.hpp +301 -0
- data/ext/lpsolver-highs/highs/qpsolver/gradient.hpp +46 -0
- data/ext/lpsolver-highs/highs/qpsolver/instance.hpp +70 -0
- data/ext/lpsolver-highs/highs/qpsolver/matrix.hpp +342 -0
- data/ext/lpsolver-highs/highs/qpsolver/perturbation.cpp +41 -0
- data/ext/lpsolver-highs/highs/qpsolver/perturbation.hpp +15 -0
- data/ext/lpsolver-highs/highs/qpsolver/pricing.hpp +22 -0
- data/ext/lpsolver-highs/highs/qpsolver/qpconst.hpp +34 -0
- data/ext/lpsolver-highs/highs/qpsolver/qpvector.hpp +242 -0
- data/ext/lpsolver-highs/highs/qpsolver/quass.cpp +551 -0
- data/ext/lpsolver-highs/highs/qpsolver/quass.hpp +27 -0
- data/ext/lpsolver-highs/highs/qpsolver/ratiotest.cpp +146 -0
- data/ext/lpsolver-highs/highs/qpsolver/ratiotest.hpp +26 -0
- data/ext/lpsolver-highs/highs/qpsolver/reducedcosts.hpp +46 -0
- data/ext/lpsolver-highs/highs/qpsolver/reducedgradient.hpp +95 -0
- data/ext/lpsolver-highs/highs/qpsolver/runtime.hpp +45 -0
- data/ext/lpsolver-highs/highs/qpsolver/scaling.cpp +123 -0
- data/ext/lpsolver-highs/highs/qpsolver/scaling.hpp +15 -0
- data/ext/lpsolver-highs/highs/qpsolver/settings.hpp +84 -0
- data/ext/lpsolver-highs/highs/qpsolver/snippets.hpp +36 -0
- data/ext/lpsolver-highs/highs/qpsolver/statistics.hpp +30 -0
- data/ext/lpsolver-highs/highs/qpsolver/steepestedgepricing.hpp +173 -0
- data/ext/lpsolver-highs/highs/simplex/HApp.h +550 -0
- data/ext/lpsolver-highs/highs/simplex/HEkk.cpp +4404 -0
- data/ext/lpsolver-highs/highs/simplex/HEkk.h +419 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkControl.cpp +146 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDebug.cpp +1722 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDual.cpp +3003 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDual.h +513 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualMulti.cpp +1020 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.cpp +535 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.h +134 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.cpp +697 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.h +201 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkInterface.cpp +26 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.cpp +2984 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.h +191 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplex.cpp +330 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplex.h +42 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.cpp +145 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.h +48 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNla.cpp +517 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNla.h +158 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaDebug.cpp +373 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaFreeze.cpp +28 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaProductForm.cpp +113 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexReport.cpp +77 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexReport.h +21 -0
- data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.cpp +1495 -0
- data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.h +500 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexConst.h +273 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexStruct.h +263 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexTimer.h +414 -0
- data/ext/lpsolver-highs/highs/test_kkt/DevKkt.cpp +469 -0
- data/ext/lpsolver-highs/highs/test_kkt/DevKkt.h +143 -0
- data/ext/lpsolver-highs/highs/test_kkt/KktCh2.cpp +305 -0
- data/ext/lpsolver-highs/highs/test_kkt/KktCh2.h +79 -0
- data/ext/lpsolver-highs/highs/util/FactorTimer.h +199 -0
- data/ext/lpsolver-highs/highs/util/HFactor.cpp +2597 -0
- data/ext/lpsolver-highs/highs/util/HFactor.h +587 -0
- data/ext/lpsolver-highs/highs/util/HFactorConst.h +81 -0
- data/ext/lpsolver-highs/highs/util/HFactorDebug.cpp +231 -0
- data/ext/lpsolver-highs/highs/util/HFactorDebug.h +55 -0
- data/ext/lpsolver-highs/highs/util/HFactorExtend.cpp +229 -0
- data/ext/lpsolver-highs/highs/util/HFactorRefactor.cpp +304 -0
- data/ext/lpsolver-highs/highs/util/HFactorUtils.cpp +122 -0
- data/ext/lpsolver-highs/highs/util/HSet.cpp +197 -0
- data/ext/lpsolver-highs/highs/util/HSet.h +89 -0
- data/ext/lpsolver-highs/highs/util/HVector.h +22 -0
- data/ext/lpsolver-highs/highs/util/HVectorBase.cpp +271 -0
- data/ext/lpsolver-highs/highs/util/HVectorBase.h +102 -0
- data/ext/lpsolver-highs/highs/util/HighsCDouble.h +323 -0
- data/ext/lpsolver-highs/highs/util/HighsComponent.h +53 -0
- data/ext/lpsolver-highs/highs/util/HighsDataStack.h +83 -0
- data/ext/lpsolver-highs/highs/util/HighsDisjointSets.h +107 -0
- data/ext/lpsolver-highs/highs/util/HighsHash.cpp +10 -0
- data/ext/lpsolver-highs/highs/util/HighsHash.h +1274 -0
- data/ext/lpsolver-highs/highs/util/HighsHashTree.h +1461 -0
- data/ext/lpsolver-highs/highs/util/HighsInt.h +36 -0
- data/ext/lpsolver-highs/highs/util/HighsIntegers.h +212 -0
- data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.cpp +267 -0
- data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.h +203 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixPic.cpp +146 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixPic.h +37 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixSlice.h +561 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.cpp +407 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.h +57 -0
- data/ext/lpsolver-highs/highs/util/HighsMemoryAllocation.h +63 -0
- data/ext/lpsolver-highs/highs/util/HighsRandom.h +242 -0
- data/ext/lpsolver-highs/highs/util/HighsRbTree.h +452 -0
- data/ext/lpsolver-highs/highs/util/HighsSort.cpp +364 -0
- data/ext/lpsolver-highs/highs/util/HighsSort.h +131 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.cpp +1746 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.h +151 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseVectorSum.h +95 -0
- data/ext/lpsolver-highs/highs/util/HighsSplay.h +135 -0
- data/ext/lpsolver-highs/highs/util/HighsTimer.h +385 -0
- data/ext/lpsolver-highs/highs/util/HighsUtils.cpp +1259 -0
- data/ext/lpsolver-highs/highs/util/HighsUtils.h +272 -0
- data/ext/lpsolver-highs/highs/util/stringutil.cpp +131 -0
- data/ext/lpsolver-highs/highs/util/stringutil.h +46 -0
- data/ext/lpsolver-highs/highs.pc.in +12 -0
- data/ext/lpsolver-highs/meson.build +198 -0
- data/ext/lpsolver-highs/meson_options.txt +31 -0
- data/ext/lpsolver-highs/nuget/HiGHS_Logo.png +0 -0
- data/ext/lpsolver-highs/nuget/Highs.csproj +25 -0
- data/ext/lpsolver-highs/nuget/Highs.csproj.in +36 -0
- data/ext/lpsolver-highs/nuget/HowToAlternative.md +77 -0
- data/ext/lpsolver-highs/nuget/README.md +38 -0
- data/ext/lpsolver-highs/nuget/arm-toolchain.cmake +15 -0
- data/ext/lpsolver-highs/nuget/build_linux-arm.sh +13 -0
- data/ext/lpsolver-highs/nuget/build_linux.sh +10 -0
- data/ext/lpsolver-highs/nuget/build_windows.ps1 +27 -0
- data/ext/lpsolver-highs/nuget/generatePackage.ps1 +28 -0
- data/ext/lpsolver-highs/pyproject.toml +221 -0
- data/ext/lpsolver-highs/subprojects/pybind11.wrap +13 -0
- data/ext/lpsolver-highs/tests/test_highspy.py +2310 -0
- data/ext/lpsolver-highs/version.rc.in +50 -0
- data/lib/lpsolver/highs +0 -0
- data/lib/lpsolver/model.rb +28 -4
- data/lib/lpsolver/native.so +0 -0
- data/lib/lpsolver/native_model.rb +261 -0
- data/lib/lpsolver/solution.rb +72 -7
- data/lib/lpsolver/version.rb +1 -1
- data/lpsolver.gemspec +4 -1
- metadata +1176 -4
|
@@ -0,0 +1,897 @@
|
|
|
1
|
+
#include "ipm/ipx/ipm.h"
|
|
2
|
+
#include <algorithm>
|
|
3
|
+
#include <cmath>
|
|
4
|
+
#include <cassert>
|
|
5
|
+
#include <limits>
|
|
6
|
+
#include "ipm/ipx/timer.h"
|
|
7
|
+
#include "ipm/ipx/utils.h"
|
|
8
|
+
|
|
9
|
+
namespace ipx {
|
|
10
|
+
|
|
11
|
+
struct IPM::Step {
|
|
12
|
+
Step(Int m, Int n) : x(n+m), xl(n+m), xu(n+m), y(m), zl(n+m), zu(n+m) {}
|
|
13
|
+
Vector x, xl, xu, y, zl, zu;
|
|
14
|
+
Step& operator+=(const Step& rhs) {
|
|
15
|
+
x += rhs.x; xl += rhs.xl; xu += rhs.xu;
|
|
16
|
+
y += rhs.y; zl += rhs.zl; zu += rhs.zu;
|
|
17
|
+
return *this;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
IPM::IPM(const Control& control) : control_(control) {}
|
|
22
|
+
|
|
23
|
+
void IPM::StartingPoint(KKTSolver* kkt, Iterate* iterate, Info* info) {
|
|
24
|
+
kkt_ = kkt;
|
|
25
|
+
iterate_ = iterate;
|
|
26
|
+
info_ = info;
|
|
27
|
+
PrintHeader();
|
|
28
|
+
ComputeStartingPoint();
|
|
29
|
+
if (info->errflag == 0)
|
|
30
|
+
PrintOutput();
|
|
31
|
+
// Set status_ipm.
|
|
32
|
+
if (info->errflag == IPX_ERROR_user_interrupt) {
|
|
33
|
+
info->errflag = 0;
|
|
34
|
+
info->status_ipm = IPX_STATUS_user_interrupt;
|
|
35
|
+
} else if (info->errflag == IPX_ERROR_time_interrupt) {
|
|
36
|
+
info->errflag = 0;
|
|
37
|
+
info->status_ipm = IPX_STATUS_time_limit;
|
|
38
|
+
} else if (info->errflag) {
|
|
39
|
+
info->status_ipm = IPX_STATUS_failed;
|
|
40
|
+
} else {
|
|
41
|
+
info->status_ipm = IPX_STATUS_not_run;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
void IPM::Driver(KKTSolver* kkt, Iterate* iterate, Info* info) {
|
|
46
|
+
const Model& model = iterate->model();
|
|
47
|
+
const Int m = model.rows();
|
|
48
|
+
const Int n = model.cols();
|
|
49
|
+
Step step(m, n);
|
|
50
|
+
kkt_ = kkt;
|
|
51
|
+
iterate_ = iterate;
|
|
52
|
+
info_ = info;
|
|
53
|
+
num_bad_iter_ = 0;
|
|
54
|
+
|
|
55
|
+
while (true) {
|
|
56
|
+
if (iterate->term_crit_reached()) {
|
|
57
|
+
info->status_ipm = IPX_STATUS_optimal;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
if (num_bad_iter_ >= 5 ||
|
|
61
|
+
(best_complementarity_ > 0.0 &&
|
|
62
|
+
iterate_->complementarity() > kDivergeTol * best_complementarity_)) {
|
|
63
|
+
// No progress in reducing the complementarity gap.
|
|
64
|
+
// Check if model seems to be primal or dual infeasible.
|
|
65
|
+
bool dualized = iterate_->model().dualized();
|
|
66
|
+
double pobjective = iterate_->pobjective_after_postproc();
|
|
67
|
+
double dobjective = iterate_->dobjective_after_postproc();
|
|
68
|
+
if (dobjective > std::max(10.0 * std::abs(pobjective), 1.0)) {
|
|
69
|
+
// Dual objective tends to positive infinity. Looks like the
|
|
70
|
+
// model is dual unbounded, i.e. primal infeasible.
|
|
71
|
+
info->status_ipm = dualized ?
|
|
72
|
+
IPX_STATUS_dual_infeas : IPX_STATUS_primal_infeas;
|
|
73
|
+
} else if (pobjective < -std::max(10.0 * std::abs(dobjective), 1.0)) {
|
|
74
|
+
// Primal objective tends to negative infinity. Looks like the
|
|
75
|
+
// model is primal unbounded, i.e. dual infeasible.
|
|
76
|
+
info->status_ipm = dualized ?
|
|
77
|
+
IPX_STATUS_primal_infeas : IPX_STATUS_dual_infeas;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
info->status_ipm = IPX_STATUS_no_progress;
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
if (info->iter >= maxiter_) {
|
|
85
|
+
info->status_ipm = IPX_STATUS_iter_limit;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if ((info->errflag = control_.InterruptCheck(info->iter)) != 0)
|
|
89
|
+
break;
|
|
90
|
+
kkt->Factorize(iterate, info);
|
|
91
|
+
if (info->errflag)
|
|
92
|
+
break;
|
|
93
|
+
Predictor(step);
|
|
94
|
+
if (info->errflag)
|
|
95
|
+
break;
|
|
96
|
+
AddCorrector(step);
|
|
97
|
+
if (info->errflag)
|
|
98
|
+
break;
|
|
99
|
+
MakeStep(step);
|
|
100
|
+
info->iter++;
|
|
101
|
+
PrintOutput();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Set status_ipm if errflag terminated IPM.
|
|
105
|
+
if (info->errflag) {
|
|
106
|
+
if (info->errflag == IPX_ERROR_user_interrupt) {
|
|
107
|
+
info->errflag = 0;
|
|
108
|
+
info->status_ipm = IPX_STATUS_user_interrupt;
|
|
109
|
+
} else if (info->errflag == IPX_ERROR_time_interrupt) {
|
|
110
|
+
info->errflag = 0;
|
|
111
|
+
info->status_ipm = IPX_STATUS_time_limit;
|
|
112
|
+
} else {
|
|
113
|
+
info->status_ipm = IPX_STATUS_failed;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (control_.runCentring() &&
|
|
118
|
+
info->status_ipm == IPX_STATUS_optimal && !info->centring_tried) {
|
|
119
|
+
// Centrality of a point is evaluated by the quantities
|
|
120
|
+
// min (xj * zj) / mu
|
|
121
|
+
// max (xj * zj) / mu
|
|
122
|
+
// Ideally, they are in the interval [0.1,10.0].
|
|
123
|
+
// As soon as the ratio
|
|
124
|
+
// max (xj * zj) / min (xj * zj)
|
|
125
|
+
// is below centringRatioTolerance, the point is considered centred.
|
|
126
|
+
// If the new point after centring has a ratio that is lower than the
|
|
127
|
+
// previous ratio times centringRatioReduction, then the step is
|
|
128
|
+
// accepted. Otherwise, the step is rejected and no more centring steps are
|
|
129
|
+
// performed.
|
|
130
|
+
//
|
|
131
|
+
// If IPM is optimal and centring has not yet run, run centring
|
|
132
|
+
// (to avoid running it twice during initial IPM and main IPM).
|
|
133
|
+
control_.hLog("Performing centring steps...\n");
|
|
134
|
+
|
|
135
|
+
// freeze mu to its current value
|
|
136
|
+
const double mu_frozen = iterate_->mu();
|
|
137
|
+
|
|
138
|
+
// assess and print centrality of current point
|
|
139
|
+
AssessCentrality(iterate_->xl(), iterate_->xu(), iterate_->zl(),
|
|
140
|
+
iterate_->zu(), iterate_->mu());
|
|
141
|
+
double prev_ratio = centring_ratio;
|
|
142
|
+
Int prev_bad_products = bad_products;
|
|
143
|
+
|
|
144
|
+
info->centring_success = false;
|
|
145
|
+
// if ratio is below tolerance, point is centred
|
|
146
|
+
if (prev_ratio < control_.centringRatioTolerance()) {
|
|
147
|
+
control_.hLog("\tPoint is now centred\n");
|
|
148
|
+
info->centring_success = true;
|
|
149
|
+
} else {
|
|
150
|
+
// perform centring steps
|
|
151
|
+
bool centring_complete = false;
|
|
152
|
+
for (int ii = 0; ii < control_.maxCentringSteps(); ++ii) {
|
|
153
|
+
// compute centring step
|
|
154
|
+
Centring(step, mu_frozen);
|
|
155
|
+
|
|
156
|
+
// assess whether to take the step
|
|
157
|
+
bool accept = EvaluateCentringStep(step, prev_ratio, prev_bad_products);
|
|
158
|
+
if (!accept) {
|
|
159
|
+
control_.hLog("\tPoint cannot be centred further\n");
|
|
160
|
+
centring_complete = true;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// take the step and print output
|
|
165
|
+
MakeStep(step, true);
|
|
166
|
+
info->iter++;
|
|
167
|
+
PrintOutput();
|
|
168
|
+
AssessCentrality(iterate_->xl(), iterate_->xu(), iterate_->zl(),
|
|
169
|
+
iterate_->zu(), iterate_->mu());
|
|
170
|
+
prev_ratio = centring_ratio;
|
|
171
|
+
prev_bad_products = bad_products;
|
|
172
|
+
|
|
173
|
+
// if ratio is below tolerance, point is centred
|
|
174
|
+
if (prev_ratio < control_.centringRatioTolerance()) {
|
|
175
|
+
control_.hLog("\tPoint is now centred\n");
|
|
176
|
+
info->centring_success = true;
|
|
177
|
+
centring_complete = true;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (!centring_complete) {
|
|
182
|
+
std::stringstream h_logging_stream;
|
|
183
|
+
h_logging_stream.str(std::string());
|
|
184
|
+
h_logging_stream << "\tPoint could not be centred within "
|
|
185
|
+
<< control_.maxCentringSteps() << " iterations\n";
|
|
186
|
+
control_.hLog(h_logging_stream);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
info->centring_tried = true;
|
|
190
|
+
} // if (control_.runCentring() && info->status_ipm ==
|
|
191
|
+
// IPX_STATUS_optimal && !info->centring_tried)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
void IPM::ComputeStartingPoint() {
|
|
195
|
+
const Model& model = iterate_->model();
|
|
196
|
+
const Int m = model.rows();
|
|
197
|
+
const Int n = model.cols();
|
|
198
|
+
const SparseMatrix& AI = model.AI();
|
|
199
|
+
const Vector& b = model.b();
|
|
200
|
+
const Vector& c = model.c();
|
|
201
|
+
const Vector& lb = model.lb();
|
|
202
|
+
const Vector& ub = model.ub();
|
|
203
|
+
Vector x(n+m), xl(n+m), xu(n+m), y(m), zl(n+m), zu(n+m);
|
|
204
|
+
Vector rb(m); // workspace
|
|
205
|
+
|
|
206
|
+
// Factorize the KKT matrix with the identity matrix in the (1,1) block.
|
|
207
|
+
kkt_->Factorize(nullptr, info_);
|
|
208
|
+
if (info_->errflag)
|
|
209
|
+
return;
|
|
210
|
+
|
|
211
|
+
// Set x within its bounds and compute the minimum norm solution dx to
|
|
212
|
+
// AI*dx = (b-AI*x). Then update x := x + dx to obtain a feasible point.
|
|
213
|
+
rb = b;
|
|
214
|
+
for (Int j = 0; j < n+m; j++) {
|
|
215
|
+
double xj = 0.0;
|
|
216
|
+
if (xj < lb[j])
|
|
217
|
+
xj = lb[j];
|
|
218
|
+
if (xj > ub[j])
|
|
219
|
+
xj = ub[j];
|
|
220
|
+
x[j] = xj;
|
|
221
|
+
if (xj != 0.0)
|
|
222
|
+
ScatterColumn(AI, j, -xj, rb);
|
|
223
|
+
}
|
|
224
|
+
double tol = 0.1 * Infnorm(rb);
|
|
225
|
+
zl = 0.0;
|
|
226
|
+
kkt_->Solve(zl, rb, tol, xl, y, info_);
|
|
227
|
+
if (info_->errflag)
|
|
228
|
+
return;
|
|
229
|
+
x += xl;
|
|
230
|
+
|
|
231
|
+
// Compute xl, xu and shift to become positive.
|
|
232
|
+
double xinfeas = 0.0;
|
|
233
|
+
for (Int j = 0; j < n+m; j++) {
|
|
234
|
+
xl[j] = x[j]-lb[j];
|
|
235
|
+
xinfeas = std::max(xinfeas, -xl[j]);
|
|
236
|
+
xu[j] = ub[j]-x[j];
|
|
237
|
+
xinfeas = std::max(xinfeas, -xu[j]);
|
|
238
|
+
}
|
|
239
|
+
double xshift1 = 1.0 + 1.5*xinfeas;
|
|
240
|
+
xl += xshift1;
|
|
241
|
+
xu += xshift1;
|
|
242
|
+
|
|
243
|
+
const double cnorm = Twonorm(c);
|
|
244
|
+
if (cnorm == 0.0) {
|
|
245
|
+
// Special treatment for zero objective.
|
|
246
|
+
for (Int j = 0; j < n+m; j++) {
|
|
247
|
+
zl[j] = std::isfinite(lb[j]) ? 1.0 : 0.0;
|
|
248
|
+
zu[j] = std::isfinite(ub[j]) ? 1.0 : 0.0;
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
// Compute y as the least-squares solution to AI'*y=c.
|
|
252
|
+
// Recompute zl = c-AI'*y because the KKT system is solved
|
|
253
|
+
// approximately with a residual in the first block equation.
|
|
254
|
+
rb = 0.0;
|
|
255
|
+
double tol = 0.1 * Infnorm(c);
|
|
256
|
+
kkt_->Solve(c, rb, tol, zl, y, info_);
|
|
257
|
+
if (info_->errflag)
|
|
258
|
+
return;
|
|
259
|
+
zl = c;
|
|
260
|
+
MultiplyAdd(AI, y, -1.0, zl, 'T');
|
|
261
|
+
|
|
262
|
+
// When c lies in range(AI'), then the dual slack variables are (close
|
|
263
|
+
// to) zero, and the initial point would be almost complementary but
|
|
264
|
+
// usually not primal feasible. To prevent this from happening, add
|
|
265
|
+
// a fraction of the objective to zl and adjust y. In exact computation
|
|
266
|
+
// this does not affect dual feasibility.
|
|
267
|
+
const double znorm = Twonorm(zl);
|
|
268
|
+
const double rho = 0.05;
|
|
269
|
+
if (znorm < rho*cnorm) {
|
|
270
|
+
zl += rho * c;
|
|
271
|
+
y *= (1.0-rho);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Split dual slack solution into zl, zu and shift to become positive.
|
|
275
|
+
double zinfeas = 0.0;
|
|
276
|
+
for (Int j = 0; j < n+m; j++) {
|
|
277
|
+
double zval = zl[j];
|
|
278
|
+
zl[j] = 0.0;
|
|
279
|
+
zu[j] = 0.0;
|
|
280
|
+
if (std::isfinite(lb[j]) && std::isfinite(ub[j])) {
|
|
281
|
+
zl[j] = 0.5*zval;
|
|
282
|
+
zu[j] = -0.5*zval;
|
|
283
|
+
}
|
|
284
|
+
else if (std::isfinite(lb[j]))
|
|
285
|
+
zl[j] = zval;
|
|
286
|
+
else if (std::isfinite(ub[j]))
|
|
287
|
+
zu[j] = -zval;
|
|
288
|
+
zinfeas = std::max(zinfeas, -zl[j]);
|
|
289
|
+
zinfeas = std::max(zinfeas, -zu[j]);
|
|
290
|
+
}
|
|
291
|
+
double zshift1 = 1.0 + 1.5*zinfeas;
|
|
292
|
+
for (Int j = 0; j < n+m; j++) {
|
|
293
|
+
if (std::isfinite(lb[j]))
|
|
294
|
+
zl[j] += zshift1;
|
|
295
|
+
if (std::isfinite(ub[j]))
|
|
296
|
+
zu[j] += zshift1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Level pairwise complementarity products.
|
|
301
|
+
double xsum = 1.0;
|
|
302
|
+
double zsum = 1.0;
|
|
303
|
+
double mu = 1.0;
|
|
304
|
+
for (Int j = 0; j < n+m; j++) {
|
|
305
|
+
if (std::isfinite(lb[j])) {
|
|
306
|
+
xsum += xl[j];
|
|
307
|
+
zsum += zl[j];
|
|
308
|
+
mu += xl[j]*zl[j];
|
|
309
|
+
}
|
|
310
|
+
if (std::isfinite(ub[j])) {
|
|
311
|
+
xsum += xu[j];
|
|
312
|
+
zsum += zu[j];
|
|
313
|
+
mu += xu[j]*zu[j];
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
double xshift2 = 0.5*mu/zsum;
|
|
317
|
+
double zshift2 = 0.5*mu/xsum;
|
|
318
|
+
xl += xshift2;
|
|
319
|
+
xu += xshift2;
|
|
320
|
+
for (Int j = 0; j < n+m; j++) {
|
|
321
|
+
if (std::isfinite(lb[j]))
|
|
322
|
+
zl[j] += zshift2;
|
|
323
|
+
if (std::isfinite(ub[j]))
|
|
324
|
+
zu[j] += zshift2;
|
|
325
|
+
}
|
|
326
|
+
iterate_->Initialize(x, xl, xu, y, zl, zu);
|
|
327
|
+
best_complementarity_ = iterate_->complementarity();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Computes maximum alpha such that x + alpha*dx >= 0.
|
|
331
|
+
// The blocking index is returned in blocking_index if not NULL.
|
|
332
|
+
static double StepToBoundary(const Vector& x, const Vector& dx,
|
|
333
|
+
Int* blocking_index, double alpha = 1.0) {
|
|
334
|
+
const Int n = x.size();
|
|
335
|
+
const double damp = 1.0 - std::numeric_limits<double>::epsilon();
|
|
336
|
+
assert(damp < 1.0);
|
|
337
|
+
|
|
338
|
+
Int iblock = -1;
|
|
339
|
+
for (Int i = 0; i < n; i++) {
|
|
340
|
+
assert(x[i] >= 0.0);
|
|
341
|
+
if (x[i]+alpha*dx[i] < 0.0) {
|
|
342
|
+
alpha = -(x[i]*damp) / dx[i];
|
|
343
|
+
assert(x[i]+alpha*dx[i] >= 0.0);
|
|
344
|
+
iblock = i;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
assert(alpha >= 0.0);
|
|
348
|
+
if (blocking_index)
|
|
349
|
+
*blocking_index = iblock;
|
|
350
|
+
return alpha;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
void IPM::Predictor(Step& step) {
|
|
354
|
+
const Model& model = iterate_->model();
|
|
355
|
+
const Int m = model.rows();
|
|
356
|
+
const Int n = model.cols();
|
|
357
|
+
const Vector& xl = iterate_->xl();
|
|
358
|
+
const Vector& xu = iterate_->xu();
|
|
359
|
+
const Vector& zl = iterate_->zl();
|
|
360
|
+
const Vector& zu = iterate_->zu();
|
|
361
|
+
|
|
362
|
+
// sl = -xl.*zl
|
|
363
|
+
Vector sl(n+m);
|
|
364
|
+
for (Int j = 0; j < n+m; j++)
|
|
365
|
+
if (iterate_->has_barrier_lb(j))
|
|
366
|
+
sl[j] = -xl[j]*zl[j];
|
|
367
|
+
else
|
|
368
|
+
sl[j] = 0.0;
|
|
369
|
+
assert(AllFinite(sl));
|
|
370
|
+
|
|
371
|
+
// su = -xu.*zu
|
|
372
|
+
Vector su(n+m);
|
|
373
|
+
for (Int j = 0; j < n+m; j++)
|
|
374
|
+
if (iterate_->has_barrier_ub(j))
|
|
375
|
+
su[j] = -xu[j]*zu[j];
|
|
376
|
+
else
|
|
377
|
+
su[j] = 0.0;
|
|
378
|
+
assert(AllFinite(su));
|
|
379
|
+
|
|
380
|
+
SolveNewtonSystem(&iterate_->rb()[0], &iterate_->rc()[0],
|
|
381
|
+
&iterate_->rl()[0], &iterate_->ru()[0], &sl[0], &su[0],
|
|
382
|
+
step);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
void IPM::AddCorrector(Step& step) {
|
|
386
|
+
const Model& model = iterate_->model();
|
|
387
|
+
const Int m = model.rows();
|
|
388
|
+
const Int n = model.cols();
|
|
389
|
+
const Vector& xl = iterate_->xl();
|
|
390
|
+
const Vector& xu = iterate_->xu();
|
|
391
|
+
const Vector& zl = iterate_->zl();
|
|
392
|
+
const Vector& zu = iterate_->zu();
|
|
393
|
+
const Vector& dxl = step.xl;
|
|
394
|
+
const Vector& dxu = step.xu;
|
|
395
|
+
const Vector& dzl = step.zl;
|
|
396
|
+
const Vector& dzu = step.zu;
|
|
397
|
+
const double mu = iterate_->mu();
|
|
398
|
+
|
|
399
|
+
// Choose centering parameter.
|
|
400
|
+
double step_xl = StepToBoundary(xl, dxl, nullptr);
|
|
401
|
+
double step_xu = StepToBoundary(xu, dxu, nullptr);
|
|
402
|
+
double step_zl = StepToBoundary(zl, dzl, nullptr);
|
|
403
|
+
double step_zu = StepToBoundary(zu, dzu, nullptr);
|
|
404
|
+
double maxp = std::min(step_xl, step_xu);
|
|
405
|
+
double maxd = std::min(step_zl, step_zu);
|
|
406
|
+
double muaff = 0.0;
|
|
407
|
+
Int num_finite = 0;
|
|
408
|
+
for (Int j = 0; j < n+m; j++) {
|
|
409
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
410
|
+
assert(std::isfinite(xl[j]));
|
|
411
|
+
assert(xl[j] != 0.0);
|
|
412
|
+
muaff += (xl[j]+maxp*dxl[j]) * (zl[j]+maxd*dzl[j]);
|
|
413
|
+
num_finite++;
|
|
414
|
+
}
|
|
415
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
416
|
+
assert(std::isfinite(xu[j]));
|
|
417
|
+
assert(xu[j] != 0.0);
|
|
418
|
+
muaff += (xu[j]+maxp*dxu[j]) * (zu[j]+maxd*dzu[j]);
|
|
419
|
+
num_finite++;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
assert(std::isfinite(muaff));
|
|
423
|
+
muaff /= num_finite;
|
|
424
|
+
double ratio = muaff / mu;
|
|
425
|
+
double sigma = ratio * ratio * ratio;
|
|
426
|
+
|
|
427
|
+
// sl = -xl.*zl + sigma*mu - dxl.*dzl
|
|
428
|
+
Vector sl(n+m);
|
|
429
|
+
for (Int j = 0; j < n+m; j++)
|
|
430
|
+
if (iterate_->has_barrier_lb(j))
|
|
431
|
+
sl[j] = -xl[j]*zl[j] + sigma*mu - dxl[j]*dzl[j];
|
|
432
|
+
else
|
|
433
|
+
sl[j] = 0.0;
|
|
434
|
+
assert(AllFinite(sl));
|
|
435
|
+
|
|
436
|
+
// su = -xu.*zu + sigma*mu - dxu.*dzu
|
|
437
|
+
Vector su(n+m);
|
|
438
|
+
for (Int j = 0; j < n+m; j++)
|
|
439
|
+
if (iterate_->has_barrier_ub(j))
|
|
440
|
+
su[j] = -xu[j]*zu[j] + sigma*mu - dxu[j]*dzu[j];
|
|
441
|
+
else
|
|
442
|
+
su[j] = 0.0;
|
|
443
|
+
assert(AllFinite(su));
|
|
444
|
+
|
|
445
|
+
SolveNewtonSystem(&iterate_->rb()[0], &iterate_->rc()[0],
|
|
446
|
+
&iterate_->rl()[0], &iterate_->ru()[0], &sl[0], &su[0],
|
|
447
|
+
step);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
void IPM::Centring(Step& step, double mu) {
|
|
451
|
+
const Model& model = iterate_->model();
|
|
452
|
+
const Int m = model.rows();
|
|
453
|
+
const Int n = model.cols();
|
|
454
|
+
const Vector& xl = iterate_->xl();
|
|
455
|
+
const Vector& xu = iterate_->xu();
|
|
456
|
+
const Vector& zl = iterate_->zl();
|
|
457
|
+
const Vector& zu = iterate_->zu();
|
|
458
|
+
|
|
459
|
+
Vector sl(n + m);
|
|
460
|
+
Vector su(n + m);
|
|
461
|
+
|
|
462
|
+
// Set sigma to 1 for pure centring
|
|
463
|
+
const double sigma = 1.0;
|
|
464
|
+
|
|
465
|
+
// sl = -xl.*zl + sigma*mu
|
|
466
|
+
for (Int j = 0; j < n + m; j++) {
|
|
467
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
468
|
+
sl[j] = -xl[j] * zl[j] + sigma * mu;
|
|
469
|
+
} else {
|
|
470
|
+
sl[j] = 0.0;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
assert(AllFinite(sl));
|
|
474
|
+
|
|
475
|
+
// su = -xu.*zu + sigma*mu
|
|
476
|
+
for (Int j = 0; j < n + m; j++) {
|
|
477
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
478
|
+
su[j] = -xu[j] * zu[j] + sigma * mu;
|
|
479
|
+
} else {
|
|
480
|
+
su[j] = 0.0;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
assert(AllFinite(su));
|
|
484
|
+
|
|
485
|
+
SolveNewtonSystem(&iterate_->rb()[0], &iterate_->rc()[0], &iterate_->rl()[0],
|
|
486
|
+
&iterate_->ru()[0], &sl[0], &su[0], step);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
void IPM::AssessCentrality(const Vector& xl, const Vector& xu,
|
|
490
|
+
const Vector& zl, const Vector& zu, double mu,
|
|
491
|
+
bool print) {
|
|
492
|
+
// The function computes the ratio
|
|
493
|
+
// min(x_j * z_j) / max(x_j * z_j)
|
|
494
|
+
// and the number of products x_j * z_j that are not in the interval
|
|
495
|
+
// [0.1 * mu, 10 * mu]
|
|
496
|
+
// and prints information to screen if print is on.
|
|
497
|
+
|
|
498
|
+
const Int m = iterate_->model().rows();
|
|
499
|
+
const Int n = iterate_->model().cols();
|
|
500
|
+
|
|
501
|
+
double minxz = kHighsInf;
|
|
502
|
+
double maxxz = 0.0;
|
|
503
|
+
|
|
504
|
+
const double gamma = 0.1;
|
|
505
|
+
bad_products = 0;
|
|
506
|
+
|
|
507
|
+
for (Int j = 0; j < n + m; j++) {
|
|
508
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
509
|
+
const double product = xl[j] * zl[j];
|
|
510
|
+
if (product < gamma * mu || product > mu / gamma){
|
|
511
|
+
++bad_products;
|
|
512
|
+
}
|
|
513
|
+
minxz = std::min(minxz, product);
|
|
514
|
+
maxxz = std::max(maxxz, product);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
for (Int j = 0; j < n + m; j++) {
|
|
519
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
520
|
+
const double product = xu[j] * zu[j];
|
|
521
|
+
if (product < gamma * mu || product > mu / gamma){
|
|
522
|
+
++bad_products;
|
|
523
|
+
}
|
|
524
|
+
minxz = std::min(minxz, product);
|
|
525
|
+
maxxz = std::max(maxxz, product);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
maxxz = std::max(maxxz, mu);
|
|
530
|
+
minxz = std::min(minxz, mu);
|
|
531
|
+
|
|
532
|
+
centring_ratio = maxxz / minxz;
|
|
533
|
+
|
|
534
|
+
if (print) {
|
|
535
|
+
std::stringstream h_logging_stream;
|
|
536
|
+
h_logging_stream.str(std::string());
|
|
537
|
+
h_logging_stream << "\txj*zj in [ "
|
|
538
|
+
<< Scientific(minxz / mu, 8, 2) << ", "
|
|
539
|
+
<< Scientific(maxxz / mu, 8, 2) << "]; Ratio = "
|
|
540
|
+
<< Scientific(centring_ratio, 8, 2) << "; (xj*zj / mu) not_in [0.1, 10]: "
|
|
541
|
+
<< bad_products << "\n";
|
|
542
|
+
control_.hLog(h_logging_stream);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
bool IPM::EvaluateCentringStep(const Step& step, double prev_ratio, Int prev_bad) {
|
|
547
|
+
// The function returns true is the step is to be accepted.
|
|
548
|
+
// The step is accepted if the ratio of the new point is not worse
|
|
549
|
+
// than the previous one times centringRatioReduction or if the
|
|
550
|
+
// number of outliers products is reduced.
|
|
551
|
+
|
|
552
|
+
StepSizes(step, true);
|
|
553
|
+
|
|
554
|
+
const Int n = iterate_->model().cols();
|
|
555
|
+
const Int m = iterate_->model().rows();
|
|
556
|
+
|
|
557
|
+
Vector xl_temp = iterate_->xl();
|
|
558
|
+
Vector xu_temp = iterate_->xu();
|
|
559
|
+
Vector zl_temp = iterate_->zl();
|
|
560
|
+
Vector zu_temp = iterate_->zu();
|
|
561
|
+
|
|
562
|
+
// perform temporary step
|
|
563
|
+
for (Int j = 0; j < n + m; j++) {
|
|
564
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
565
|
+
xl_temp[j] += step_primal_ * step.xl[j];
|
|
566
|
+
}
|
|
567
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
568
|
+
xu_temp[j] += step_primal_ * step.xu[j];
|
|
569
|
+
}
|
|
570
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
571
|
+
zl_temp[j] += step_dual_ * step.zl[j];
|
|
572
|
+
}
|
|
573
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
574
|
+
zu_temp[j] += step_dual_ * step.zu[j];
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// compute temporary mu
|
|
579
|
+
double mu_temp = 0.0;
|
|
580
|
+
Int num_finite = 0;
|
|
581
|
+
for (Int j = 0; j < n + m; j++) {
|
|
582
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
583
|
+
mu_temp += xl_temp[j] * zl_temp[j];
|
|
584
|
+
++num_finite;
|
|
585
|
+
}
|
|
586
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
587
|
+
mu_temp += xu_temp[j] * zu_temp[j];
|
|
588
|
+
++num_finite;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
mu_temp /= num_finite;
|
|
592
|
+
|
|
593
|
+
// assess quality of temporary point
|
|
594
|
+
AssessCentrality(xl_temp, xu_temp, zl_temp, zu_temp, mu_temp, false);
|
|
595
|
+
|
|
596
|
+
// accept the step if the new ratio is not more than centringRatioReduction
|
|
597
|
+
// times the previous one, or if the new point has fewer outliers
|
|
598
|
+
return (centring_ratio < control_.centringRatioReduction() * prev_ratio ||
|
|
599
|
+
bad_products < prev_bad);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
void IPM::StepSizes(const Step& step, bool isCentring) {
|
|
603
|
+
const Model& model = iterate_->model();
|
|
604
|
+
const Int m = model.rows();
|
|
605
|
+
const Int n = model.cols();
|
|
606
|
+
const Vector& xl = iterate_->xl();
|
|
607
|
+
const Vector& xu = iterate_->xu();
|
|
608
|
+
const Vector& zl = iterate_->zl();
|
|
609
|
+
const Vector& zu = iterate_->zu();
|
|
610
|
+
const Vector& dxl = step.xl;
|
|
611
|
+
const Vector& dxu = step.xu;
|
|
612
|
+
const Vector& dzl = step.zl;
|
|
613
|
+
const Vector& dzu = step.zu;
|
|
614
|
+
const double gammaf = 0.9;
|
|
615
|
+
const double gammaa = 1.0 / (1.0-gammaf);
|
|
616
|
+
|
|
617
|
+
Int block_xl, block_xu, block_zl, block_zu;
|
|
618
|
+
double step_xl = StepToBoundary(xl, dxl, &block_xl);
|
|
619
|
+
double step_xu = StepToBoundary(xu, dxu, &block_xu);
|
|
620
|
+
double step_zl = StepToBoundary(zl, dzl, &block_zl);
|
|
621
|
+
double step_zu = StepToBoundary(zu, dzu, &block_zu);
|
|
622
|
+
double maxp = std::fmin(step_xl, step_xu);
|
|
623
|
+
double maxd = std::fmin(step_zl, step_zu);
|
|
624
|
+
double mufull = 0.0;
|
|
625
|
+
Int num_finite = 0;
|
|
626
|
+
for (Int j = 0; j < n+m; j++) {
|
|
627
|
+
if (iterate_->has_barrier_lb(j)) {
|
|
628
|
+
assert(std::isfinite(xl[j]));
|
|
629
|
+
assert(xl[j] != 0.0);
|
|
630
|
+
mufull += (xl[j]+maxp*dxl[j]) * (zl[j]+maxd*dzl[j]);
|
|
631
|
+
num_finite++;
|
|
632
|
+
}
|
|
633
|
+
if (iterate_->has_barrier_ub(j)) {
|
|
634
|
+
assert(std::isfinite(xu[j]));
|
|
635
|
+
assert(xu[j] != 0.0);
|
|
636
|
+
mufull += (xu[j]+maxp*dxu[j]) * (zu[j]+maxd*dzu[j]);
|
|
637
|
+
num_finite++;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
assert(std::isfinite(mufull));
|
|
641
|
+
mufull /= num_finite;
|
|
642
|
+
mufull /= gammaa;
|
|
643
|
+
|
|
644
|
+
double alphap = 1.0;
|
|
645
|
+
double alphad = 1.0;
|
|
646
|
+
Int blockp = -1;
|
|
647
|
+
Int blockd = -1;
|
|
648
|
+
if (maxp < 1.0) {
|
|
649
|
+
if (step_xl <= step_xu) {
|
|
650
|
+
double buffer;
|
|
651
|
+
blockp = block_xl;
|
|
652
|
+
buffer = mufull / (zl[blockp] + maxd*dzl[blockp]);
|
|
653
|
+
alphap = (xl[blockp]-buffer) / (-dxl[blockp]);
|
|
654
|
+
} else {
|
|
655
|
+
double buffer;
|
|
656
|
+
blockp = block_xu;
|
|
657
|
+
buffer = mufull / (zu[blockp] + maxd*dzu[blockp]);
|
|
658
|
+
alphap = (xu[blockp]-buffer) / (-dxu[blockp]);
|
|
659
|
+
}
|
|
660
|
+
alphap = std::max(alphap, gammaf*maxp);
|
|
661
|
+
alphap = std::min(alphap, 1.0);
|
|
662
|
+
assert(blockp >= 0.0);
|
|
663
|
+
}
|
|
664
|
+
if (maxd < 1.0) {
|
|
665
|
+
if (step_zl <= step_zu) {
|
|
666
|
+
double buffer;
|
|
667
|
+
blockd = block_zl;
|
|
668
|
+
buffer = mufull / (xl[blockd] + maxp*dxl[blockd]);
|
|
669
|
+
alphad = (zl[blockd]-buffer) / (-dzl[blockd]);
|
|
670
|
+
} else {
|
|
671
|
+
double buffer;
|
|
672
|
+
blockd = block_zu;
|
|
673
|
+
buffer = mufull / (xu[blockd] + maxp*dxu[blockd]);
|
|
674
|
+
alphad = (zu[blockd]-buffer) / (-dzu[blockd]);
|
|
675
|
+
}
|
|
676
|
+
alphad = std::max(alphad, gammaf*maxd);
|
|
677
|
+
alphad = std::min(alphad, 1.0);
|
|
678
|
+
assert(blockd >= 0.0);
|
|
679
|
+
}
|
|
680
|
+
step_primal_ = std::min(alphap, 1.0-1e-6);
|
|
681
|
+
step_dual_ = std::min(alphad, 1.0-1e-6);
|
|
682
|
+
|
|
683
|
+
if (isCentring){
|
|
684
|
+
// When computing stepsizes for a centring step, reduce them
|
|
685
|
+
// by centringAlphaScaling. This ensures that the point is
|
|
686
|
+
// well centred and does not get too close to the boundary.
|
|
687
|
+
step_primal_ = alphap * control_.centringAlphaScaling();
|
|
688
|
+
step_dual_ = alphad * control_.centringAlphaScaling();
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
void IPM::MakeStep(const Step& step, bool isCentring) {
|
|
693
|
+
StepSizes(step, isCentring);
|
|
694
|
+
iterate_->Update(step_primal_, &step.x[0], &step.xl[0], &step.xu[0],
|
|
695
|
+
step_dual_, &step.y[0], &step.zl[0], &step.zu[0]);
|
|
696
|
+
if (!isCentring){
|
|
697
|
+
if (std::min(step_primal_, step_dual_) < 0.05)
|
|
698
|
+
num_bad_iter_++;
|
|
699
|
+
else
|
|
700
|
+
num_bad_iter_ = 0;
|
|
701
|
+
best_complementarity_ =
|
|
702
|
+
std::min(best_complementarity_, iterate_->complementarity());
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
void IPM::SolveNewtonSystem(const double* rb, const double* rc,
|
|
707
|
+
const double* rl, const double* ru,
|
|
708
|
+
const double* sl, const double* su,
|
|
709
|
+
Step& step) {
|
|
710
|
+
const Model& model = iterate_->model();
|
|
711
|
+
const Int m = model.rows();
|
|
712
|
+
const Int n = model.cols();
|
|
713
|
+
const SparseMatrix& AI = model.AI();
|
|
714
|
+
const Vector& xl = iterate_->xl();
|
|
715
|
+
const Vector& xu = iterate_->xu();
|
|
716
|
+
const Vector& zl = iterate_->zl();
|
|
717
|
+
const Vector& zu = iterate_->zu();
|
|
718
|
+
Vector& dx = step.x;
|
|
719
|
+
Vector& dxl = step.xl;
|
|
720
|
+
Vector& dxu = step.xu;
|
|
721
|
+
Vector& dy = step.y;
|
|
722
|
+
Vector& dzl = step.zl;
|
|
723
|
+
Vector& dzu = step.zu;
|
|
724
|
+
|
|
725
|
+
// Build RHS for KKT system.
|
|
726
|
+
Vector rhs1(n+m), rhs2(m);
|
|
727
|
+
if (rc) {
|
|
728
|
+
for (Int j = 0; j < n+m; j++)
|
|
729
|
+
rhs1[j] = -rc[j];
|
|
730
|
+
}
|
|
731
|
+
for (Int j = 0; j < n+m; j++) {
|
|
732
|
+
double rlj = rl ? rl[j] : 0.0;
|
|
733
|
+
double ruj = ru ? ru[j] : 0.0;
|
|
734
|
+
if (iterate_->has_barrier_lb(j))
|
|
735
|
+
rhs1[j] += (sl[j] + zl[j]*rlj) / xl[j];
|
|
736
|
+
if (iterate_->has_barrier_ub(j))
|
|
737
|
+
rhs1[j] -= (su[j] - zu[j]*ruj) / xu[j];
|
|
738
|
+
if (iterate_->StateOf(j) == Iterate::State::fixed)
|
|
739
|
+
rhs1[j] = 0.0;
|
|
740
|
+
}
|
|
741
|
+
assert(AllFinite(rhs1));
|
|
742
|
+
if (rb)
|
|
743
|
+
std::copy(rb, rb+m, std::begin(rhs2));
|
|
744
|
+
|
|
745
|
+
// Solve KKT system.
|
|
746
|
+
double tol = control_.kkt_tol() * std::sqrt(iterate_->mu());
|
|
747
|
+
kkt_->Solve(rhs1, rhs2, tol, dx, dy, info_);
|
|
748
|
+
if (info_->errflag)
|
|
749
|
+
return;
|
|
750
|
+
|
|
751
|
+
// Recover solution to Newton system.
|
|
752
|
+
dy *= -1.0;
|
|
753
|
+
for (Int j = 0; j < n+m; j++) {
|
|
754
|
+
if (iterate_->StateOf(j) == Iterate::State::fixed) {
|
|
755
|
+
assert(dx[j] == 0.0);
|
|
756
|
+
dxl[j] = 0.0;
|
|
757
|
+
dzl[j] = 0.0;
|
|
758
|
+
} else if (iterate_->StateOf(j) == Iterate::State::free) {
|
|
759
|
+
assert(!rl || rl[j] == 0.0);
|
|
760
|
+
dxl[j] = 0.0;
|
|
761
|
+
dzl[j] = 0.0;
|
|
762
|
+
} else {
|
|
763
|
+
double rlj = rl ? rl[j] : 0.0;
|
|
764
|
+
dxl[j] = dx[j] - rlj;
|
|
765
|
+
dzl[j] = (sl[j] - zl[j]*dxl[j]) / xl[j];
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
for (Int j = 0; j < n+m; j++) {
|
|
769
|
+
if (iterate_->StateOf(j) == Iterate::State::fixed) {
|
|
770
|
+
assert(dx[j] == 0.0);
|
|
771
|
+
dxu[j] = 0.0;
|
|
772
|
+
dzu[j] = 0.0;
|
|
773
|
+
} else if (iterate_->StateOf(j) == Iterate::State::free) {
|
|
774
|
+
assert(!ru || ru[j] == 0.0);
|
|
775
|
+
dxu[j] = 0.0;
|
|
776
|
+
dzu[j] = 0.0;
|
|
777
|
+
} else {
|
|
778
|
+
double ruj = ru ? ru[j] : 0.0;
|
|
779
|
+
dxu[j] = ruj - dx[j];
|
|
780
|
+
dzu[j] = (su[j] - zu[j]*dxu[j]) / xu[j];
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
assert(AllFinite(dxl));
|
|
784
|
+
assert(AllFinite(dxu));
|
|
785
|
+
assert(AllFinite(dzl));
|
|
786
|
+
assert(AllFinite(dzu));
|
|
787
|
+
|
|
788
|
+
// Shift residual to the last two block equations.
|
|
789
|
+
for (Int j = 0; j < n+m; j++) {
|
|
790
|
+
if (iterate_->StateOf(j) == Iterate::State::barrier) {
|
|
791
|
+
assert(std::isfinite(xl[j]) || std::isfinite(xu[j]));
|
|
792
|
+
double atdy = DotColumn(AI, j, dy);
|
|
793
|
+
double rcj = rc ? rc[j] : 0.0;
|
|
794
|
+
if (std::isfinite(xl[j]) && std::isfinite(xu[j])) {
|
|
795
|
+
if (zl[j]*xu[j] >= zu[j]*xl[j])
|
|
796
|
+
dzl[j] = rcj + dzu[j] - atdy;
|
|
797
|
+
else
|
|
798
|
+
dzu[j] = -rcj + dzl[j] + atdy;
|
|
799
|
+
} else if (std::isfinite(xl[j])) {
|
|
800
|
+
dzl[j] = rcj + dzu[j] - atdy;
|
|
801
|
+
} else {
|
|
802
|
+
dzu[j] = -rcj + dzl[j] + atdy;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
#ifndef NDEBUG
|
|
808
|
+
// Check solution for free and fixed variables.
|
|
809
|
+
for (Int j = 0; j < n+m; j++) {
|
|
810
|
+
if (iterate_->StateOf(j) == Iterate::State::fixed) {
|
|
811
|
+
assert(dx[j] == 0.0);
|
|
812
|
+
assert(dxl[j] == 0.0 && dxu[j] == 0.0);
|
|
813
|
+
assert(dzl[j] == 0.0 && dzu[j] == 0.0);
|
|
814
|
+
}
|
|
815
|
+
if (iterate_->StateOf(j) == Iterate::State::free)
|
|
816
|
+
assert(dzl[j] == 0.0 && dzu[j] == 0.0);
|
|
817
|
+
}
|
|
818
|
+
#endif
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
void IPM::PrintHeader() {
|
|
822
|
+
std::stringstream h_logging_stream;
|
|
823
|
+
h_logging_stream.str(std::string());
|
|
824
|
+
h_logging_stream
|
|
825
|
+
<< " " << Format("Iter", 4)
|
|
826
|
+
<< " " << Format("primal obj", 15)
|
|
827
|
+
<< " " << Format("dual obj", 15)
|
|
828
|
+
<< " " << Format("pinf", 9)
|
|
829
|
+
<< " " << Format("dinf", 9)
|
|
830
|
+
<< " " << Format("gap", 8);
|
|
831
|
+
if (!control_.timelessLog())
|
|
832
|
+
h_logging_stream << " " << Format("time", 7);
|
|
833
|
+
control_.hLog(h_logging_stream);
|
|
834
|
+
control_.Debug()
|
|
835
|
+
<< " " << Format("stepsizes", 9)
|
|
836
|
+
<< " " << Format("pivots", 7) << " " << Format("kktiter", 7)
|
|
837
|
+
<< " " << Format("P.fixed", 7) << " " << Format("D.fixed", 7);
|
|
838
|
+
control_.Debug(4) << " " << Format("svdmin(B)", 9);
|
|
839
|
+
control_.Debug(4) << " " << Format("density", 8);
|
|
840
|
+
control_.hLog("\n");
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
void IPM::PrintOutput() {
|
|
844
|
+
const bool ipm_optimal = iterate_->feasible() && iterate_->optimal();
|
|
845
|
+
|
|
846
|
+
double logging_pobj = iterate_->pobjective_after_postproc();
|
|
847
|
+
double logging_dobj = iterate_->dobjective_after_postproc();
|
|
848
|
+
double logging_presidual = iterate_->presidual();
|
|
849
|
+
double logging_dresidual = iterate_->dresidual();
|
|
850
|
+
|
|
851
|
+
// Now logging relative primal and dual infeasibility, and also
|
|
852
|
+
// the relative primal dual objective gap
|
|
853
|
+
logging_presidual /= iterate_->bounds_measure_;
|
|
854
|
+
logging_dresidual /= iterate_->costs_measure_;
|
|
855
|
+
double logging_gap = std::abs(logging_pobj - logging_dobj) /
|
|
856
|
+
(1.0+0.5 *std::fabs(logging_pobj + logging_dobj));
|
|
857
|
+
|
|
858
|
+
std::stringstream h_logging_stream;
|
|
859
|
+
h_logging_stream.str(std::string());
|
|
860
|
+
h_logging_stream
|
|
861
|
+
<< " " << Format(info_->iter, 3)
|
|
862
|
+
<< (ipm_optimal ? "*" : " ")
|
|
863
|
+
<< " " << Scientific(logging_pobj, 15, 8)
|
|
864
|
+
<< " " << Scientific(logging_dobj, 15, 8)
|
|
865
|
+
<< " " << Scientific(logging_presidual, 9, 2)
|
|
866
|
+
<< " " << Scientific(logging_dresidual, 9, 2)
|
|
867
|
+
<< " " << Scientific(logging_gap, 8, 2);
|
|
868
|
+
// h_logging_stream << " " << Scientific(iterate_->mu(), 8, 2);
|
|
869
|
+
if (!control_.timelessLog())
|
|
870
|
+
h_logging_stream << " " << time(control_.Elapsed());
|
|
871
|
+
control_.hLog(h_logging_stream);
|
|
872
|
+
control_.Debug()
|
|
873
|
+
<< " " << Fixed(step_primal_, 4, 2) << " " << Fixed(step_dual_, 4, 2)
|
|
874
|
+
<< " " << Format(kkt_->basis_changes(), 7)
|
|
875
|
+
<< " " << Format(kkt_->iter(), 7);
|
|
876
|
+
control_.Debug()
|
|
877
|
+
<< " " << Format(info_->dual_dropped, 7)
|
|
878
|
+
<< " " << Format(info_->primal_dropped, 7);
|
|
879
|
+
|
|
880
|
+
const Basis* basis = kkt_->basis();
|
|
881
|
+
if (basis) {
|
|
882
|
+
if (control_.Debug(4)) {
|
|
883
|
+
control_.Debug(4) << " "
|
|
884
|
+
<< Scientific(basis->MinSingularValue(), 9, 2);
|
|
885
|
+
Timer timer;
|
|
886
|
+
double density = basis->DensityInverse();
|
|
887
|
+
info_->time_symb_invert += timer.Elapsed();
|
|
888
|
+
control_.Debug(4) << " " << Scientific(density, 8, 2);
|
|
889
|
+
}
|
|
890
|
+
} else {
|
|
891
|
+
control_.Debug(4) << " " << Format("-", 9);
|
|
892
|
+
control_.Debug(4) << " " << Format("-", 8);
|
|
893
|
+
}
|
|
894
|
+
control_.hLog("\n");
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
} // namespace ipx
|