lpsolver 0.1.0 → 0.2.1
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 +104 -26
- data/ext/lpsolver/Makefile +269 -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 +35 -7
- data/lib/lpsolver/native.so +0 -0
- data/lib/lpsolver/native_model.rb +261 -0
- data/lib/lpsolver/solution.rb +93 -8
- data/lib/lpsolver/version.rb +1 -1
- data/lpsolver.gemspec +4 -1
- metadata +1176 -4
|
@@ -0,0 +1,1290 @@
|
|
|
1
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
2
|
+
/* */
|
|
3
|
+
/* This file is part of the HiGHS linear optimization suite */
|
|
4
|
+
/* */
|
|
5
|
+
/* Available as open-source under the MIT License */
|
|
6
|
+
/* */
|
|
7
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
8
|
+
/**@file lp_data/HighsIis.cpp
|
|
9
|
+
* @brief IIS utilities for HiGHS
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#include "Highs.h"
|
|
13
|
+
|
|
14
|
+
void HighsIis::clearData() {
|
|
15
|
+
this->valid_ = false;
|
|
16
|
+
this->status_ = kIisModelStatusUnknown;
|
|
17
|
+
this->strategy_ = kIisStrategyMin;
|
|
18
|
+
this->col_index_.clear();
|
|
19
|
+
this->row_index_.clear();
|
|
20
|
+
this->col_bound_.clear();
|
|
21
|
+
this->row_bound_.clear();
|
|
22
|
+
this->col_status_.clear();
|
|
23
|
+
this->row_status_.clear();
|
|
24
|
+
this->model_.clear();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
void HighsIis::clear() {
|
|
28
|
+
this->clearData();
|
|
29
|
+
this->info_.clear();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
void HighsIis::clearLogInfo() {
|
|
33
|
+
this->info_.iis_last_disptime = -kHighsInf;
|
|
34
|
+
this->info_.iis_num_disp_lines = 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
void HighsIis::invalid(const HighsLp& lp) {
|
|
38
|
+
this->clear();
|
|
39
|
+
this->col_status_.assign(lp.num_col_, kIisStatusMaybeInConflict);
|
|
40
|
+
this->row_status_.assign(lp.num_row_, kIisStatusMaybeInConflict);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
std::string HighsIis::iisBoundStatusToString(HighsInt bound_status) const {
|
|
44
|
+
if (bound_status == kIisBoundStatusDropped) return "Dropped";
|
|
45
|
+
if (bound_status == kIisBoundStatusNull) return " Null";
|
|
46
|
+
if (bound_status == kIisBoundStatusFree) return " Free";
|
|
47
|
+
if (bound_status == kIisBoundStatusLower) return " Lower";
|
|
48
|
+
if (bound_status == kIisBoundStatusUpper) return " Upper";
|
|
49
|
+
if (bound_status == kIisBoundStatusBoxed) return " Boxed";
|
|
50
|
+
return "*****";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
std::string HighsIis::iisModelStatusToString(HighsInt model_status) const {
|
|
54
|
+
if (model_status == kIisModelStatusFeasible) return "Feasible";
|
|
55
|
+
if (model_status == kIisModelStatusUnknown) return "Unknown";
|
|
56
|
+
if (model_status == kIisModelStatusTimeLimit) return "Time limit reached";
|
|
57
|
+
if (model_status == kIisModelStatusReducible) return "Reducible";
|
|
58
|
+
if (model_status == kIisModelStatusIrreducible) return "Irreducible";
|
|
59
|
+
return "*****";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
void HighsIis::report(const std::string& message, const HighsLp& lp) const {
|
|
63
|
+
HighsInt num_iis_col = this->col_index_.size();
|
|
64
|
+
HighsInt num_iis_row = this->row_index_.size();
|
|
65
|
+
if (num_iis_col > 10 || num_iis_row > 10) return;
|
|
66
|
+
printf("\nIIS %s\n===\n", message.c_str());
|
|
67
|
+
printf("Column: ");
|
|
68
|
+
for (HighsInt iCol = 0; iCol < num_iis_col; iCol++) printf("%9d ", int(iCol));
|
|
69
|
+
printf("\nStatus: ");
|
|
70
|
+
for (HighsInt iCol = 0; iCol < num_iis_col; iCol++)
|
|
71
|
+
printf("%9s ", iisBoundStatusToString(this->col_bound_[iCol]).c_str());
|
|
72
|
+
printf("\nLower: ");
|
|
73
|
+
for (HighsInt iCol = 0; iCol < num_iis_col; iCol++)
|
|
74
|
+
printf("%9.2g ", lp.col_lower_[iCol]);
|
|
75
|
+
printf("\nUpper: ");
|
|
76
|
+
for (HighsInt iCol = 0; iCol < num_iis_col; iCol++)
|
|
77
|
+
printf("%9.2g ", lp.col_upper_[iCol]);
|
|
78
|
+
printf("\n");
|
|
79
|
+
printf("Row: Status Lower Upper\n");
|
|
80
|
+
for (HighsInt iRow = 0; iRow < num_iis_row; iRow++)
|
|
81
|
+
printf("%2d %9s %9.2g %9.2g\n", int(iRow),
|
|
82
|
+
iisBoundStatusToString(this->row_bound_[iRow]).c_str(),
|
|
83
|
+
lp.row_lower_[iRow], lp.row_upper_[iRow]);
|
|
84
|
+
printf("\n");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
void HighsIis::reportIteration(const HighsOptions& options, const HighsInt iter,
|
|
88
|
+
const HighsInt num_rows_remaining,
|
|
89
|
+
const bool force) {
|
|
90
|
+
const bool output_flag = *options.log_options.output_flag;
|
|
91
|
+
if (!output_flag) return;
|
|
92
|
+
const double min_interval = 5.0;
|
|
93
|
+
const double runtime = info_.sum_simplex_times;
|
|
94
|
+
if (!force && info_.iis_last_disptime > -0.5 * kHighsInf &&
|
|
95
|
+
runtime - info_.iis_last_disptime < min_interval)
|
|
96
|
+
return;
|
|
97
|
+
// Update last time only when we actually print a line
|
|
98
|
+
info_.iis_last_disptime = runtime;
|
|
99
|
+
const int gap = 17;
|
|
100
|
+
const int w_iter = int(strlen("Iteration")) + 2;
|
|
101
|
+
const int w_rows = int(strlen("Rows")) + gap;
|
|
102
|
+
const int w_time = int(strlen("Runtime")) + gap;
|
|
103
|
+
|
|
104
|
+
// Print header every 20 lines (and on first line)
|
|
105
|
+
if (info_.iis_num_disp_lines % 20 == 0) {
|
|
106
|
+
highsLogUser(options.log_options, HighsLogType::kInfo, "%*s%*s%*s\n",
|
|
107
|
+
w_iter, "Iteration", w_rows, "Rows", w_time, "Runtime");
|
|
108
|
+
}
|
|
109
|
+
++info_.iis_num_disp_lines;
|
|
110
|
+
const std::string time_string = highsFormatToString("%.2fs", runtime);
|
|
111
|
+
highsLogUser(options.log_options, HighsLogType::kInfo, "%*d%*d%*s\n", w_iter,
|
|
112
|
+
int(iter), w_rows, int(num_rows_remaining), w_time,
|
|
113
|
+
time_string.c_str());
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
void HighsIis::reportFinal(const HighsOptions& options) const {
|
|
117
|
+
const bool output_flag = *options.log_options.output_flag;
|
|
118
|
+
if (!output_flag) return;
|
|
119
|
+
const HighsLogOptions& log_options = options.log_options;
|
|
120
|
+
// Align colons by padding labels to the same width
|
|
121
|
+
const int kLabelWidth = 19;
|
|
122
|
+
highsLogUser(log_options, HighsLogType::kInfo, "\n");
|
|
123
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%-*s : %s\n", kLabelWidth,
|
|
124
|
+
"IIS status", iisModelStatusToString(status_).c_str());
|
|
125
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%-*s : %d\n", kLabelWidth,
|
|
126
|
+
"Rows", int(row_index_.size()));
|
|
127
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%-*s : %d\n", kLabelWidth,
|
|
128
|
+
"Columns", int(col_index_.size()));
|
|
129
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%-*s : %.2fs\n", kLabelWidth,
|
|
130
|
+
"HiGHS run time", info_.sum_simplex_times);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
void HighsIis::addCol(const HighsInt col, const HighsInt status) {
|
|
134
|
+
this->col_index_.push_back(col);
|
|
135
|
+
this->col_bound_.push_back(status);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
void HighsIis::addRow(const HighsInt row, const HighsInt status) {
|
|
139
|
+
this->row_index_.push_back(row);
|
|
140
|
+
this->row_bound_.push_back(status);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
void HighsIis::removeCol(const HighsInt col) {
|
|
144
|
+
HighsInt num_col = this->col_index_.size();
|
|
145
|
+
assert(col < num_col);
|
|
146
|
+
this->col_index_[col] = this->col_index_[num_col - 1];
|
|
147
|
+
this->col_index_.resize(num_col - 1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
void HighsIis::removeRow(const HighsInt row) {
|
|
151
|
+
HighsInt num_row = this->row_index_.size();
|
|
152
|
+
assert(row < num_row);
|
|
153
|
+
this->row_index_[row] = this->row_index_[num_row - 1];
|
|
154
|
+
this->row_index_.resize(num_row - 1);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
bool HighsIis::trivial(const HighsLp& lp, const HighsOptions& options) {
|
|
158
|
+
this->clear();
|
|
159
|
+
const bool col_priority = kIisStrategyColPriority & options.iis_strategy;
|
|
160
|
+
for (HighsInt k = 0; k < 2; k++) {
|
|
161
|
+
if ((col_priority && k == 0) || (!col_priority && k == 1)) {
|
|
162
|
+
// Loop over columns first
|
|
163
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
164
|
+
if (lp.col_lower_[iCol] - lp.col_upper_[iCol] >
|
|
165
|
+
2 * options.primal_feasibility_tolerance) {
|
|
166
|
+
this->addCol(iCol, kIisBoundStatusBoxed);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (this->col_index_.size() > 0) break;
|
|
171
|
+
} else {
|
|
172
|
+
// Loop over rows first
|
|
173
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
174
|
+
if (lp.row_lower_[iRow] - lp.row_upper_[iRow] >
|
|
175
|
+
2 * options.primal_feasibility_tolerance) {
|
|
176
|
+
this->addRow(iRow, kIisBoundStatusBoxed);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (this->row_index_.size() > 0) break;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
HighsInt num_iis_col = this->col_index_.size();
|
|
184
|
+
HighsInt num_iis_row = this->row_index_.size();
|
|
185
|
+
// If one is found then we've found an IIS
|
|
186
|
+
if (num_iis_col + num_iis_row > 0) {
|
|
187
|
+
// Should have found exactly 1
|
|
188
|
+
assert(num_iis_col + num_iis_row == 1);
|
|
189
|
+
this->valid_ = true;
|
|
190
|
+
this->status_ = kIisModelStatusIrreducible;
|
|
191
|
+
this->strategy_ = options.iis_strategy;
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
// Now look for empty rows that cannot have zero activity
|
|
195
|
+
std::vector<HighsInt> count;
|
|
196
|
+
// Get the row counts
|
|
197
|
+
if (lp.a_matrix_.isColwise()) {
|
|
198
|
+
count.assign(lp.num_row_, 0);
|
|
199
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
200
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
201
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++)
|
|
202
|
+
count[lp.a_matrix_.index_[iEl]]++;
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++)
|
|
206
|
+
count.push_back(lp.a_matrix_.start_[iRow + 1] -
|
|
207
|
+
lp.a_matrix_.start_[iRow]);
|
|
208
|
+
}
|
|
209
|
+
assert(this->row_index_.size() == 0);
|
|
210
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
211
|
+
if (count[iRow] > 0) continue;
|
|
212
|
+
if (lp.row_lower_[iRow] > options.primal_feasibility_tolerance) {
|
|
213
|
+
this->addRow(iRow, kIisBoundStatusLower);
|
|
214
|
+
} else if (lp.row_upper_[iRow] < -options.primal_feasibility_tolerance) {
|
|
215
|
+
this->addRow(iRow, kIisBoundStatusUpper);
|
|
216
|
+
}
|
|
217
|
+
if (this->row_index_.size() > 0) {
|
|
218
|
+
// If one is found then we've found an IIS
|
|
219
|
+
this->valid_ = true;
|
|
220
|
+
this->status_ = kIisModelStatusIrreducible;
|
|
221
|
+
this->strategy_ = options.iis_strategy;
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
bool HighsIis::rowValueBounds(const HighsLp& lp, const HighsOptions& options) {
|
|
229
|
+
// Look for infeasible rows based on row value bounds
|
|
230
|
+
this->clear();
|
|
231
|
+
std::vector<double> lower_value;
|
|
232
|
+
std::vector<double> upper_value;
|
|
233
|
+
if (lp.a_matrix_.isColwise()) {
|
|
234
|
+
lower_value.assign(lp.num_row_, 0);
|
|
235
|
+
upper_value.assign(lp.num_row_, 0);
|
|
236
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
237
|
+
const double lower = lp.col_lower_[iCol];
|
|
238
|
+
const double upper = lp.col_upper_[iCol];
|
|
239
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
240
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
241
|
+
HighsInt iRow = lp.a_matrix_.index_[iEl];
|
|
242
|
+
double value = lp.a_matrix_.value_[iEl];
|
|
243
|
+
if (value > 0) {
|
|
244
|
+
lower_value[iRow] += value * lower;
|
|
245
|
+
upper_value[iRow] += value * upper;
|
|
246
|
+
} else {
|
|
247
|
+
lower_value[iRow] += value * upper;
|
|
248
|
+
upper_value[iRow] += value * lower;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
254
|
+
double lower_row_value = 0;
|
|
255
|
+
double upper_row_value = 0;
|
|
256
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iRow];
|
|
257
|
+
iEl < lp.a_matrix_.start_[iRow + 1]; iEl++) {
|
|
258
|
+
HighsInt iCol = lp.a_matrix_.index_[iEl];
|
|
259
|
+
const double lower = lp.col_lower_[iCol];
|
|
260
|
+
const double upper = lp.col_upper_[iCol];
|
|
261
|
+
double value = lp.a_matrix_.value_[iEl];
|
|
262
|
+
if (value > 0) {
|
|
263
|
+
lower_row_value += value * lower;
|
|
264
|
+
upper_row_value += value * upper;
|
|
265
|
+
} else {
|
|
266
|
+
lower_row_value += value * upper;
|
|
267
|
+
upper_row_value += value * lower;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
lower_value.push_back(lower_row_value);
|
|
271
|
+
upper_value.push_back(upper_row_value);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
bool below_lower = false;
|
|
275
|
+
bool above_upper;
|
|
276
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
277
|
+
below_lower = upper_value[iRow] <
|
|
278
|
+
lp.row_lower_[iRow] - options.primal_feasibility_tolerance;
|
|
279
|
+
above_upper = lower_value[iRow] >
|
|
280
|
+
lp.row_upper_[iRow] + options.primal_feasibility_tolerance;
|
|
281
|
+
if (below_lower || above_upper) {
|
|
282
|
+
this->row_index_.push_back(iRow);
|
|
283
|
+
if (below_lower) {
|
|
284
|
+
this->row_bound_.push_back(kIisBoundStatusLower);
|
|
285
|
+
} else {
|
|
286
|
+
this->row_bound_.push_back(kIisBoundStatusUpper);
|
|
287
|
+
}
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (this->row_index_.size() == 0) {
|
|
292
|
+
// Nothing found, but IIS data still valid
|
|
293
|
+
this->clear();
|
|
294
|
+
this->valid_ = true;
|
|
295
|
+
this->status_ = kIisModelStatusUnknown;
|
|
296
|
+
this->strategy_ = options.iis_strategy;
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
assert(below_lower || above_upper);
|
|
300
|
+
assert(!(below_lower && above_upper));
|
|
301
|
+
// Found an infeasible row
|
|
302
|
+
const HighsInt iRow = this->row_index_[0];
|
|
303
|
+
const std::string row_name_string =
|
|
304
|
+
lp.row_names_.size() > 0 ? "(" + lp.row_names_[iRow] + ")" : "";
|
|
305
|
+
if (below_lower) {
|
|
306
|
+
highsLogUser(
|
|
307
|
+
options.log_options, HighsLogType::kInfo,
|
|
308
|
+
"LP row %d %shas maximum row value of %g, below lower bound of %g\n",
|
|
309
|
+
int(iRow), row_name_string.c_str(), upper_value[iRow],
|
|
310
|
+
lp.row_lower_[iRow]);
|
|
311
|
+
} else {
|
|
312
|
+
highsLogUser(
|
|
313
|
+
options.log_options, HighsLogType::kInfo,
|
|
314
|
+
"LP row %d %shas minimum row value of %g, above upper bound of %g\n",
|
|
315
|
+
int(iRow), row_name_string.c_str(), lower_value[iRow],
|
|
316
|
+
lp.row_upper_[iRow]);
|
|
317
|
+
}
|
|
318
|
+
double value;
|
|
319
|
+
auto setColBound = [&]() {
|
|
320
|
+
if (below_lower) {
|
|
321
|
+
if (value > 0) {
|
|
322
|
+
this->col_bound_.push_back(kIisBoundStatusUpper);
|
|
323
|
+
} else {
|
|
324
|
+
this->col_bound_.push_back(kIisBoundStatusLower);
|
|
325
|
+
}
|
|
326
|
+
} else {
|
|
327
|
+
if (value > 0) {
|
|
328
|
+
this->col_bound_.push_back(kIisBoundStatusLower);
|
|
329
|
+
} else {
|
|
330
|
+
this->col_bound_.push_back(kIisBoundStatusUpper);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
if (lp.a_matrix_.isColwise()) {
|
|
336
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
337
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
338
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
339
|
+
value = lp.a_matrix_.value_[iEl];
|
|
340
|
+
if (lp.a_matrix_.index_[iEl] == iRow && value != 0) {
|
|
341
|
+
this->col_index_.push_back(iCol);
|
|
342
|
+
setColBound();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
} else {
|
|
347
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iRow];
|
|
348
|
+
iEl < lp.a_matrix_.start_[iRow + 1]; iEl++) {
|
|
349
|
+
HighsInt iCol = lp.a_matrix_.index_[iEl];
|
|
350
|
+
value = lp.a_matrix_.value_[iEl];
|
|
351
|
+
if (value != 0) {
|
|
352
|
+
this->col_index_.push_back(iCol);
|
|
353
|
+
setColBound();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// There must be at least one column in the IIS
|
|
359
|
+
assert(this->col_index_.size() > 0);
|
|
360
|
+
assert(this->col_index_.size() == this->col_bound_.size());
|
|
361
|
+
assert(this->row_index_.size() == this->row_bound_.size());
|
|
362
|
+
this->valid_ = true;
|
|
363
|
+
this->status_ = kIisModelStatusIrreducible;
|
|
364
|
+
this->strategy_ = options.iis_strategy;
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
HighsStatus HighsIis::deduce(const HighsLp& lp, const HighsOptions& options,
|
|
369
|
+
const HighsCallback& callback,
|
|
370
|
+
const HighsBasis& basis) {
|
|
371
|
+
// The number of infeasible rows must be positive
|
|
372
|
+
assert(this->row_index_.size() > 0);
|
|
373
|
+
// Identify the LP corresponding to the set of infeasible rows
|
|
374
|
+
std::vector<HighsInt> from_row = this->row_index_;
|
|
375
|
+
std::vector<HighsInt> from_col;
|
|
376
|
+
std::vector<HighsInt> to_row;
|
|
377
|
+
to_row.assign(lp.num_row_, -1);
|
|
378
|
+
// Only uses this->row_index_ to initialise from_row, so can clear
|
|
379
|
+
this->clearData();
|
|
380
|
+
// ToDo Exploit the known col_index_ and row_bound_ HighsIis
|
|
381
|
+
// information
|
|
382
|
+
//
|
|
383
|
+
// To get the IIS data needs the matrix to be column-wise
|
|
384
|
+
assert(lp.a_matrix_.isColwise());
|
|
385
|
+
// Determine how to detect whether a row is in from_row and (then)
|
|
386
|
+
// gather information about it
|
|
387
|
+
for (HighsInt iX = 0; iX < HighsInt(from_row.size()); iX++)
|
|
388
|
+
to_row[from_row[iX]] = iX;
|
|
389
|
+
// Identify the columns (from_col) with nonzeros in the infeasible
|
|
390
|
+
// rows
|
|
391
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
392
|
+
bool use_col = false;
|
|
393
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
394
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++)
|
|
395
|
+
use_col = use_col || to_row[lp.a_matrix_.index_[iEl]] >= 0;
|
|
396
|
+
if (use_col) from_col.push_back(iCol);
|
|
397
|
+
}
|
|
398
|
+
HighsInt to_num_col = from_col.size();
|
|
399
|
+
HighsInt to_num_row = from_row.size();
|
|
400
|
+
HighsLp to_lp;
|
|
401
|
+
to_lp.num_col_ = to_num_col;
|
|
402
|
+
to_lp.num_row_ = to_num_row;
|
|
403
|
+
to_lp.a_matrix_.num_col_ = to_lp.num_col_;
|
|
404
|
+
to_lp.a_matrix_.num_row_ = to_lp.num_row_;
|
|
405
|
+
const bool has_col_names = lp.col_names_.size() > 0;
|
|
406
|
+
for (HighsInt iCol = 0; iCol < to_num_col; iCol++) {
|
|
407
|
+
to_lp.col_cost_.push_back(0);
|
|
408
|
+
to_lp.col_lower_.push_back(lp.col_lower_[from_col[iCol]]);
|
|
409
|
+
to_lp.col_upper_.push_back(lp.col_upper_[from_col[iCol]]);
|
|
410
|
+
if (has_col_names)
|
|
411
|
+
to_lp.col_names_.push_back(lp.col_names_[from_col[iCol]]);
|
|
412
|
+
for (HighsInt iEl = lp.a_matrix_.start_[from_col[iCol]];
|
|
413
|
+
iEl < lp.a_matrix_.start_[from_col[iCol] + 1]; iEl++) {
|
|
414
|
+
HighsInt iRow = lp.a_matrix_.index_[iEl];
|
|
415
|
+
if (to_row[iRow] >= 0) {
|
|
416
|
+
to_lp.a_matrix_.index_.push_back(to_row[iRow]);
|
|
417
|
+
to_lp.a_matrix_.value_.push_back(lp.a_matrix_.value_[iEl]);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
to_lp.a_matrix_.start_.push_back(to_lp.a_matrix_.index_.size());
|
|
421
|
+
}
|
|
422
|
+
const bool has_row_names = lp.row_names_.size() > 0;
|
|
423
|
+
for (HighsInt iRow = 0; iRow < to_num_row; iRow++) {
|
|
424
|
+
to_lp.row_lower_.push_back(lp.row_lower_[from_row[iRow]]);
|
|
425
|
+
to_lp.row_upper_.push_back(lp.row_upper_[from_row[iRow]]);
|
|
426
|
+
if (has_row_names)
|
|
427
|
+
to_lp.row_names_.push_back(lp.row_names_[from_row[iRow]]);
|
|
428
|
+
}
|
|
429
|
+
HighsStatus return_status = this->compute(to_lp, options, callback);
|
|
430
|
+
// Indirect the values into the original LP
|
|
431
|
+
for (HighsInt& colindex : this->col_index_) colindex = from_col[colindex];
|
|
432
|
+
for (HighsInt& rowindex : this->row_index_) rowindex = from_row[rowindex];
|
|
433
|
+
if (kIisDevReport) this->report("On exit", lp);
|
|
434
|
+
return return_status;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
void HighsIis::setLp(const HighsLp& lp) {
|
|
438
|
+
HighsLp& iis_lp = this->model_.lp_;
|
|
439
|
+
iis_lp.clear();
|
|
440
|
+
HighsInt iis_num_col = this->col_index_.size();
|
|
441
|
+
HighsInt iis_num_row = this->row_index_.size();
|
|
442
|
+
const bool colwise = lp.a_matrix_.isColwise();
|
|
443
|
+
// Scatter the IIS rows (cols) into a full-length vector to identify
|
|
444
|
+
// IIS rows (cols) with LP rows (cols) according to whether the
|
|
445
|
+
// incumbent matrix is col-wise or row-wise
|
|
446
|
+
std::vector<HighsInt> iis_row;
|
|
447
|
+
std::vector<HighsInt> iis_col;
|
|
448
|
+
if (colwise) {
|
|
449
|
+
iis_row.assign(lp.num_row_, -1);
|
|
450
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++)
|
|
451
|
+
iis_row[this->row_index_[iisRow]] = iisRow;
|
|
452
|
+
} else {
|
|
453
|
+
iis_col.assign(lp.num_col_, -1);
|
|
454
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++)
|
|
455
|
+
iis_col[this->col_index_[iisCol]] = iisCol;
|
|
456
|
+
}
|
|
457
|
+
double bound;
|
|
458
|
+
|
|
459
|
+
const bool has_row_name = lp.row_names_.size() > 0;
|
|
460
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++) {
|
|
461
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
462
|
+
if (has_row_name) iis_lp.row_names_.push_back(lp.row_names_[iRow]);
|
|
463
|
+
HighsInt row_bound = this->row_bound_[iisRow];
|
|
464
|
+
assert(row_bound == kIisBoundStatusLower ||
|
|
465
|
+
row_bound == kIisBoundStatusUpper ||
|
|
466
|
+
row_bound == kIisBoundStatusBoxed);
|
|
467
|
+
bound =
|
|
468
|
+
row_bound == kIisBoundStatusLower || row_bound == kIisBoundStatusBoxed
|
|
469
|
+
? lp.row_lower_[iRow]
|
|
470
|
+
: -kHighsInf;
|
|
471
|
+
iis_lp.row_lower_.push_back(bound);
|
|
472
|
+
bound =
|
|
473
|
+
row_bound == kIisBoundStatusUpper || row_bound == kIisBoundStatusBoxed
|
|
474
|
+
? lp.row_upper_[iRow]
|
|
475
|
+
: kHighsInf;
|
|
476
|
+
iis_lp.row_upper_.push_back(bound);
|
|
477
|
+
if (!colwise) {
|
|
478
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iRow];
|
|
479
|
+
iEl < lp.a_matrix_.start_[iRow + 1]; iEl++) {
|
|
480
|
+
HighsInt iCol = lp.a_matrix_.index_[iEl];
|
|
481
|
+
HighsInt iisCol = iis_col[iCol];
|
|
482
|
+
if (iisCol >= 0) {
|
|
483
|
+
iis_lp.a_matrix_.index_.push_back(iisCol);
|
|
484
|
+
iis_lp.a_matrix_.value_.push_back(lp.a_matrix_.value_[iEl]);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const bool has_col_name = lp.col_names_.size() > 0;
|
|
491
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++) {
|
|
492
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
493
|
+
// Costs in the IIS LP are zero since they play no role in IIS,
|
|
494
|
+
// and when dropping bounds, optimality is the only valid model
|
|
495
|
+
// status
|
|
496
|
+
iis_lp.col_cost_.push_back(0);
|
|
497
|
+
if (has_col_name) iis_lp.col_names_.push_back(lp.col_names_[iCol]);
|
|
498
|
+
HighsInt col_bound = this->col_bound_[iisCol];
|
|
499
|
+
assert(col_bound == kIisBoundStatusLower ||
|
|
500
|
+
col_bound == kIisBoundStatusUpper ||
|
|
501
|
+
col_bound == kIisBoundStatusBoxed ||
|
|
502
|
+
col_bound == kIisBoundStatusFree);
|
|
503
|
+
bound =
|
|
504
|
+
col_bound == kIisBoundStatusLower || col_bound == kIisBoundStatusBoxed
|
|
505
|
+
? lp.col_lower_[iCol]
|
|
506
|
+
: -kHighsInf;
|
|
507
|
+
iis_lp.col_lower_.push_back(bound);
|
|
508
|
+
bound =
|
|
509
|
+
col_bound == kIisBoundStatusUpper || col_bound == kIisBoundStatusBoxed
|
|
510
|
+
? lp.col_upper_[iCol]
|
|
511
|
+
: kHighsInf;
|
|
512
|
+
iis_lp.col_upper_.push_back(bound);
|
|
513
|
+
if (colwise) {
|
|
514
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
515
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
516
|
+
HighsInt iRow = lp.a_matrix_.index_[iEl];
|
|
517
|
+
HighsInt iisRow = iis_row[iRow];
|
|
518
|
+
if (iisRow >= 0) {
|
|
519
|
+
iis_lp.a_matrix_.index_.push_back(iisRow);
|
|
520
|
+
iis_lp.a_matrix_.value_.push_back(lp.a_matrix_.value_[iEl]);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
iis_lp.a_matrix_.start_.push_back(iis_lp.a_matrix_.index_.size());
|
|
525
|
+
}
|
|
526
|
+
iis_lp.num_col_ = iis_lp.col_cost_.size();
|
|
527
|
+
iis_lp.num_row_ = iis_lp.row_lower_.size();
|
|
528
|
+
// The IIS LP matrix will have the same format as the incumbent LP
|
|
529
|
+
iis_lp.a_matrix_.format_ = lp.a_matrix_.format_;
|
|
530
|
+
iis_lp.a_matrix_.num_col_ = iis_lp.num_col_;
|
|
531
|
+
iis_lp.a_matrix_.num_row_ = iis_lp.num_row_;
|
|
532
|
+
iis_lp.model_name_ = lp.model_name_ + "_IIS";
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
HighsInt HighsIis::nonIsStatus() const {
|
|
536
|
+
const bool is_feasible = this->status_ == kIisModelStatusFeasible;
|
|
537
|
+
const bool has_is = this->col_index_.size() || this->row_index_.size();
|
|
538
|
+
// If the model is known to be feasible, then there should be no IS,
|
|
539
|
+
// and all columns and rows are kIisStatusNotInConflict
|
|
540
|
+
if (is_feasible) assert(!has_is);
|
|
541
|
+
if (has_is) assert(this->status_ >= kIisModelStatusTimeLimit);
|
|
542
|
+
// If there is an IS, then all columns and rows not in the IS are
|
|
543
|
+
// kIisStatusNotInConflict
|
|
544
|
+
const HighsInt default_iis_status = is_feasible || has_is
|
|
545
|
+
? kIisStatusNotInConflict
|
|
546
|
+
: kIisStatusMaybeInConflict;
|
|
547
|
+
return default_iis_status;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
void HighsIis::setStatus(const HighsLp& lp) {
|
|
551
|
+
if (!this->valid_) return;
|
|
552
|
+
const HighsInt non_is_status = nonIsStatus();
|
|
553
|
+
const HighsInt in_is_status = this->status_ == kIisModelStatusIrreducible
|
|
554
|
+
? kIisStatusInConflict
|
|
555
|
+
: kIisStatusMaybeInConflict;
|
|
556
|
+
this->col_status_.assign(lp.num_col_, non_is_status);
|
|
557
|
+
this->row_status_.assign(lp.num_row_, non_is_status);
|
|
558
|
+
const HighsInt iis_num_col = this->col_index_.size();
|
|
559
|
+
const HighsInt iis_num_row = this->row_index_.size();
|
|
560
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++)
|
|
561
|
+
this->col_status_[this->col_index_[iisCol]] = in_is_status;
|
|
562
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++)
|
|
563
|
+
this->row_status_[this->row_index_[iisRow]] = in_is_status;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
HighsInt HighsIis::determineBoundStatus(const double lower, const double upper,
|
|
567
|
+
const bool is_row) const {
|
|
568
|
+
HighsInt iss_bound_status = kIisBoundStatusNull;
|
|
569
|
+
if (lower <= -kHighsInf) {
|
|
570
|
+
if (upper >= kHighsInf) {
|
|
571
|
+
if (is_row) {
|
|
572
|
+
// Free rows can be dropped
|
|
573
|
+
iss_bound_status = kIisBoundStatusDropped;
|
|
574
|
+
} else {
|
|
575
|
+
// Free columns can only be dropped if they are empty
|
|
576
|
+
iss_bound_status = kIisBoundStatusFree;
|
|
577
|
+
}
|
|
578
|
+
} else {
|
|
579
|
+
iss_bound_status = kIisBoundStatusUpper;
|
|
580
|
+
}
|
|
581
|
+
} else {
|
|
582
|
+
if (upper >= kHighsInf) {
|
|
583
|
+
iss_bound_status = kIisBoundStatusLower;
|
|
584
|
+
} else {
|
|
585
|
+
// FX or BX
|
|
586
|
+
iss_bound_status = kIisBoundStatusBoxed;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
assert(iss_bound_status != kIisBoundStatusNull);
|
|
590
|
+
return iss_bound_status;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options,
|
|
594
|
+
const HighsCallback& callback,
|
|
595
|
+
const HighsBasis* basis) {
|
|
596
|
+
const HighsLogOptions& log_options = options.log_options;
|
|
597
|
+
const bool col_priority = kIisStrategyColPriority & options.iis_strategy;
|
|
598
|
+
const bool row_priority = !col_priority;
|
|
599
|
+
// Initially all columns and rows are candidates for the IIS
|
|
600
|
+
HighsInt num_rows = 0;
|
|
601
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
602
|
+
HighsInt col_status = this->determineBoundStatus(
|
|
603
|
+
lp.col_lower_[iCol], lp.col_upper_[iCol], false);
|
|
604
|
+
this->addCol(iCol, col_status);
|
|
605
|
+
}
|
|
606
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
607
|
+
HighsInt row_status = this->determineBoundStatus(lp.row_lower_[iRow],
|
|
608
|
+
lp.row_upper_[iRow], true);
|
|
609
|
+
this->addRow(iRow, row_status);
|
|
610
|
+
if (row_status != kIisBoundStatusDropped) num_rows++;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
Highs highs;
|
|
614
|
+
highs.passOptions(options);
|
|
615
|
+
highs.setOptionValue("output_flag", kIisDevReport);
|
|
616
|
+
highs.setOptionValue("presolve", kHighsOffString);
|
|
617
|
+
highs.setOptionValue(
|
|
618
|
+
"time_limit",
|
|
619
|
+
std::max(options.iis_time_limit - this->info_.sum_simplex_times, 0.0));
|
|
620
|
+
// Handle the callback propagation after setting output_flag false,
|
|
621
|
+
// otherwise deprecation message for setLogCallback is echoed
|
|
622
|
+
if (log_options.user_log_callback || callback.active[kCallbackLogging] ||
|
|
623
|
+
callback.active[kCallbackSimplexInterrupt]) {
|
|
624
|
+
// Setting the logging callbacks currently serves no purpose since
|
|
625
|
+
// output_flag is set to kIisDevReport which is false (unless
|
|
626
|
+
// developing) so that solves with this Highs instance are silent
|
|
627
|
+
/*
|
|
628
|
+
if (log_options.user_log_callback)
|
|
629
|
+
highs.setLogCallback(log_options.user_log_callback);
|
|
630
|
+
*/
|
|
631
|
+
highs.setCallback(callback.user_callback, callback.user_callback_data);
|
|
632
|
+
if (callback.active[kCallbackLogging])
|
|
633
|
+
highs.startCallback(kCallbackLogging);
|
|
634
|
+
if (callback.active[kCallbackSimplexInterrupt])
|
|
635
|
+
highs.startCallback(kCallbackSimplexInterrupt);
|
|
636
|
+
}
|
|
637
|
+
const HighsLp& incumbent_lp = highs.getLp();
|
|
638
|
+
const HighsBasis& incumbent_basis = highs.getBasis();
|
|
639
|
+
const HighsSolution& solution = highs.getSolution();
|
|
640
|
+
const HighsInfo& info = highs.getInfo();
|
|
641
|
+
HighsStatus run_status = highs.passModel(lp);
|
|
642
|
+
assert(run_status == HighsStatus::kOk);
|
|
643
|
+
if (basis) highs.setBasis(*basis);
|
|
644
|
+
|
|
645
|
+
// Initial logging
|
|
646
|
+
this->clearLogInfo();
|
|
647
|
+
HighsInt iter = 0;
|
|
648
|
+
highsLogUser(log_options, HighsLogType::kInfo,
|
|
649
|
+
"\nRunning deletion filter to identify an IIS\n");
|
|
650
|
+
this->reportIteration(options, iter, num_rows, true);
|
|
651
|
+
// Zero the objective
|
|
652
|
+
std::vector<double> cost;
|
|
653
|
+
cost.assign(lp.num_col_, 0);
|
|
654
|
+
run_status = highs.changeColsCost(0, lp.num_col_ - 1, cost.data());
|
|
655
|
+
assert(run_status == HighsStatus::kOk);
|
|
656
|
+
// Solve the LP
|
|
657
|
+
if (basis) highs.setBasis(*basis);
|
|
658
|
+
const bool use_sensitivity_filter = false;
|
|
659
|
+
std::vector<double> primal_phase1_dual;
|
|
660
|
+
bool row_deletion = false;
|
|
661
|
+
HighsInt iX = -1;
|
|
662
|
+
bool drop_lower = false;
|
|
663
|
+
// Lambda for gathering data when solving an LP
|
|
664
|
+
auto solveLp = [&]() -> HighsStatus {
|
|
665
|
+
double simplex_time = -highs.getRunTime();
|
|
666
|
+
HighsInt simplex_iterations = -info.simplex_iteration_count;
|
|
667
|
+
run_status = highs.optimizeModel();
|
|
668
|
+
simplex_time += highs.getRunTime();
|
|
669
|
+
simplex_iterations += info.simplex_iteration_count;
|
|
670
|
+
this->info_.update(simplex_time, simplex_iterations);
|
|
671
|
+
if (run_status != HighsStatus::kOk) return run_status;
|
|
672
|
+
HighsModelStatus model_status = highs.getModelStatus();
|
|
673
|
+
if (use_sensitivity_filter &&
|
|
674
|
+
model_status == HighsModelStatus::kInfeasible) {
|
|
675
|
+
printf("\nHighsIis::compute %s deletion for %d and %s bound\n",
|
|
676
|
+
row_deletion ? "Row" : "Col", int(iX),
|
|
677
|
+
drop_lower ? "Lower" : "Upper");
|
|
678
|
+
bool output_flag;
|
|
679
|
+
highs.getOptionValue("output_flag", output_flag);
|
|
680
|
+
highs.setOptionValue("output_flag", true);
|
|
681
|
+
HighsInt simplex_strategy;
|
|
682
|
+
highs.getOptionValue("simplex_strategy", simplex_strategy);
|
|
683
|
+
highs.setOptionValue("simplex_strategy", kSimplexStrategyPrimal);
|
|
684
|
+
// Solve the LP
|
|
685
|
+
run_status = highs.optimizeModel();
|
|
686
|
+
if (run_status != HighsStatus::kOk) return run_status;
|
|
687
|
+
highs.writeSolution("", kSolutionStylePretty);
|
|
688
|
+
const HighsInt* basic_index = highs.getBasicVariablesArray();
|
|
689
|
+
std::vector<double> rhs;
|
|
690
|
+
rhs.assign(lp.num_row_, 0);
|
|
691
|
+
// Get duals for nonbasic rows, and initialise duals so that basic duals
|
|
692
|
+
// are zero
|
|
693
|
+
assert(101 == 202);
|
|
694
|
+
|
|
695
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
696
|
+
HighsInt iVar = basic_index[iRow];
|
|
697
|
+
const double lower = iVar < lp.num_col_
|
|
698
|
+
? lp.col_lower_[iVar]
|
|
699
|
+
: lp.row_lower_[iVar - lp.num_col_];
|
|
700
|
+
const double upper = iVar < lp.num_col_
|
|
701
|
+
? lp.col_upper_[iVar]
|
|
702
|
+
: lp.row_upper_[iVar - lp.num_col_];
|
|
703
|
+
const double value = iVar < lp.num_col_
|
|
704
|
+
? solution.col_value[iVar]
|
|
705
|
+
: solution.row_value[iVar - lp.num_col_];
|
|
706
|
+
if (value < lower - options.primal_feasibility_tolerance) {
|
|
707
|
+
rhs[iRow] = -1;
|
|
708
|
+
} else if (value > upper + options.primal_feasibility_tolerance) {
|
|
709
|
+
rhs[iRow] = 1;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
HVector pi;
|
|
713
|
+
pi.setup(lp.num_row_);
|
|
714
|
+
highs.getBasisTransposeSolve(rhs.data(), &pi.array[0], NULL, NULL);
|
|
715
|
+
pi.count = lp.num_row_;
|
|
716
|
+
std::vector<double> reduced_costs_value;
|
|
717
|
+
std::vector<HighsInt> reduced_costs_index;
|
|
718
|
+
lp.a_matrix_.productTransposeQuad(reduced_costs_value,
|
|
719
|
+
reduced_costs_index, pi);
|
|
720
|
+
|
|
721
|
+
primal_phase1_dual = highs.getPrimalPhase1Dual();
|
|
722
|
+
HighsInt num_zero_dual = 0;
|
|
723
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
724
|
+
const HighsBasisStatus status = incumbent_basis.col_status[iCol];
|
|
725
|
+
const double dual = primal_phase1_dual[iCol];
|
|
726
|
+
const double lower = lp.col_lower_[iCol];
|
|
727
|
+
const double upper = lp.col_upper_[iCol];
|
|
728
|
+
const double value = solution.col_value[iCol];
|
|
729
|
+
if (status != HighsBasisStatus::kBasic &&
|
|
730
|
+
std::fabs(dual) < options.dual_feasibility_tolerance) {
|
|
731
|
+
num_zero_dual++;
|
|
732
|
+
// Small dual for nonbasic variable
|
|
733
|
+
printf(
|
|
734
|
+
"HighsIis::compute Column %d [%g, %g, %g] with status %s has "
|
|
735
|
+
"dual %g\n",
|
|
736
|
+
int(iCol), lower, value, upper,
|
|
737
|
+
highs.basisStatusToString(status).c_str(), dual);
|
|
738
|
+
// assert(123 == 456);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
742
|
+
const HighsBasisStatus status = incumbent_basis.row_status[iRow];
|
|
743
|
+
const double dual = primal_phase1_dual[lp.num_col_ + iRow];
|
|
744
|
+
const double lower = lp.row_lower_[iRow];
|
|
745
|
+
const double upper = lp.row_upper_[iRow];
|
|
746
|
+
const double value = solution.row_value[iRow];
|
|
747
|
+
if (status != HighsBasisStatus::kBasic &&
|
|
748
|
+
std::fabs(dual) < options.dual_feasibility_tolerance) {
|
|
749
|
+
num_zero_dual++;
|
|
750
|
+
// Small dual for nonbasic variable
|
|
751
|
+
printf(
|
|
752
|
+
"HighsIis::compute Row %d [%g, %g, %g] with status %s has "
|
|
753
|
+
"dual %g\n",
|
|
754
|
+
int(iRow), lower, value, upper,
|
|
755
|
+
highs.basisStatusToString(status).c_str(), dual);
|
|
756
|
+
// assert(123 == 456);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
highs.setOptionValue("output_flag", output_flag);
|
|
760
|
+
highs.setOptionValue("simplex_strategy", simplex_strategy);
|
|
761
|
+
assert(!num_zero_dual);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
return run_status;
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
run_status = solveLp();
|
|
768
|
+
// If we fail to establish infeasibility, return the initial subset
|
|
769
|
+
if (run_status != HighsStatus::kOk) {
|
|
770
|
+
this->valid_ = true;
|
|
771
|
+
this->strategy_ = options.iis_strategy;
|
|
772
|
+
if (highs.getModelStatus() == HighsModelStatus::kTimeLimit) {
|
|
773
|
+
this->status_ = IisModelStatus::kIisModelStatusTimeLimit;
|
|
774
|
+
} else {
|
|
775
|
+
this->status_ = IisModelStatus::kIisModelStatusReducible;
|
|
776
|
+
}
|
|
777
|
+
return HighsStatus::kWarning;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
assert(highs.getModelStatus() == HighsModelStatus::kInfeasible);
|
|
781
|
+
IisModelStatus iis_status = kIisModelStatusIrreducible;
|
|
782
|
+
HighsStatus search_return_status = HighsStatus::kOk;
|
|
783
|
+
|
|
784
|
+
// Pass twice: rows before columns, or columns before rows, according to
|
|
785
|
+
// row_priority
|
|
786
|
+
for (HighsInt k = 0; k < 2; k++) {
|
|
787
|
+
row_deletion = (row_priority && k == 0) || (!row_priority && k == 1);
|
|
788
|
+
std::string type = row_deletion ? "Row" : "Col";
|
|
789
|
+
// Perform deletion pass
|
|
790
|
+
HighsInt num_index = row_deletion ? lp.num_row_ : lp.num_col_;
|
|
791
|
+
for (iX = 0; iX < num_index; iX++) {
|
|
792
|
+
// Get logging info
|
|
793
|
+
iter++;
|
|
794
|
+
const bool force = row_deletion && (iX == (num_index - 1));
|
|
795
|
+
// Get status
|
|
796
|
+
const HighsInt ix_status =
|
|
797
|
+
row_deletion ? this->row_bound_[iX] : this->col_bound_[iX];
|
|
798
|
+
// Skip if status is already free or dropped
|
|
799
|
+
if (ix_status == kIisBoundStatusDropped ||
|
|
800
|
+
ix_status == kIisBoundStatusFree) {
|
|
801
|
+
// Possibly report
|
|
802
|
+
this->reportIteration(options, iter, num_rows, force);
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
double lower = row_deletion ? lp.row_lower_[iX] : lp.col_lower_[iX];
|
|
807
|
+
double upper = row_deletion ? lp.row_upper_[iX] : lp.col_upper_[iX];
|
|
808
|
+
// Record whether the upper bound has been dropped due to the lower
|
|
809
|
+
// bound being kept
|
|
810
|
+
if (lower > -kHighsInf && iis_status != kIisModelStatusTimeLimit) {
|
|
811
|
+
// Drop the lower bound temporarily
|
|
812
|
+
bool drop_lower = true;
|
|
813
|
+
run_status = row_deletion
|
|
814
|
+
? highs.changeRowBounds(iX, -kHighsInf, upper)
|
|
815
|
+
: highs.changeColBounds(iX, -kHighsInf, upper);
|
|
816
|
+
assert(run_status == HighsStatus::kOk);
|
|
817
|
+
// Solve the LP
|
|
818
|
+
run_status = solveLp();
|
|
819
|
+
this->processBoundRelaxation(highs, row_deletion, true, iX, lower,
|
|
820
|
+
upper, iis_status, search_return_status);
|
|
821
|
+
}
|
|
822
|
+
if (upper < kHighsInf && iis_status != kIisModelStatusTimeLimit) {
|
|
823
|
+
// Drop the upper bound temporarily
|
|
824
|
+
run_status = row_deletion ? highs.changeRowBounds(iX, lower, kHighsInf)
|
|
825
|
+
: highs.changeColBounds(iX, lower, kHighsInf);
|
|
826
|
+
assert(run_status == HighsStatus::kOk);
|
|
827
|
+
// Solve the LP
|
|
828
|
+
run_status = solveLp();
|
|
829
|
+
this->processBoundRelaxation(highs, row_deletion, false, iX, lower,
|
|
830
|
+
upper, iis_status, search_return_status);
|
|
831
|
+
}
|
|
832
|
+
const bool debug_bound_change = true;
|
|
833
|
+
if (debug_bound_change) {
|
|
834
|
+
// Check bounds have been changed correctly
|
|
835
|
+
double check_lower;
|
|
836
|
+
double check_upper;
|
|
837
|
+
double check_cost;
|
|
838
|
+
HighsInt check_num_ix;
|
|
839
|
+
HighsInt check_num_nz;
|
|
840
|
+
run_status =
|
|
841
|
+
row_deletion
|
|
842
|
+
? highs.getRows(iX, iX, check_num_ix, &check_lower,
|
|
843
|
+
&check_upper, check_num_nz, nullptr, nullptr,
|
|
844
|
+
nullptr)
|
|
845
|
+
: highs.getCols(iX, iX, check_num_ix, &check_cost, &check_lower,
|
|
846
|
+
&check_upper, check_num_nz, nullptr, nullptr,
|
|
847
|
+
nullptr);
|
|
848
|
+
assert(run_status == HighsStatus::kOk);
|
|
849
|
+
assert(check_lower == lower);
|
|
850
|
+
assert(check_upper == upper);
|
|
851
|
+
}
|
|
852
|
+
HighsInt iss_bound_status =
|
|
853
|
+
this->determineBoundStatus(lower, upper, row_deletion);
|
|
854
|
+
if (row_deletion) {
|
|
855
|
+
this->row_bound_[iX] = iss_bound_status;
|
|
856
|
+
if (iss_bound_status == kIisBoundStatusDropped) num_rows--;
|
|
857
|
+
} else {
|
|
858
|
+
this->col_bound_[iX] = iss_bound_status;
|
|
859
|
+
}
|
|
860
|
+
// Possibly report on iteration
|
|
861
|
+
this->reportIteration(options, iter, num_rows, force);
|
|
862
|
+
if (kIisDevReport) {
|
|
863
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s %d has status %s\n",
|
|
864
|
+
type.c_str(), int(iX),
|
|
865
|
+
iisBoundStatusToString(iss_bound_status).c_str());
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
if (k == 1) continue;
|
|
869
|
+
// End of first pass: look to simplify second pass
|
|
870
|
+
if (kIisDevReport) this->report("End of deletion", incumbent_lp);
|
|
871
|
+
if (row_deletion) {
|
|
872
|
+
// Mark empty columns as dropped
|
|
873
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
874
|
+
bool empty_col = true;
|
|
875
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
876
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
877
|
+
if (this->row_bound_[lp.a_matrix_.index_[iEl]] !=
|
|
878
|
+
kIisBoundStatusDropped) {
|
|
879
|
+
empty_col = false;
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
if (empty_col) {
|
|
884
|
+
if (kIisDevReport) {
|
|
885
|
+
highsLogUser(log_options, HighsLogType::kInfo,
|
|
886
|
+
"Col %d has status Dropped: Empty\n", int(iCol));
|
|
887
|
+
}
|
|
888
|
+
this->col_bound_[iCol] = kIisBoundStatusDropped;
|
|
889
|
+
run_status = highs.changeColBounds(iCol, -kHighsInf, kHighsInf);
|
|
890
|
+
assert(run_status == HighsStatus::kOk);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
if (kIisDevReport) this->report("End of pass 1", incumbent_lp);
|
|
895
|
+
}
|
|
896
|
+
if (kIisDevReport) this->report("End of pass 2", incumbent_lp);
|
|
897
|
+
HighsInt iss_num_col = 0;
|
|
898
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
899
|
+
if (this->col_bound_[iCol] != kIisBoundStatusDropped) {
|
|
900
|
+
this->col_index_[iss_num_col] = this->col_index_[iCol];
|
|
901
|
+
this->col_bound_[iss_num_col] = this->col_bound_[iCol];
|
|
902
|
+
iss_num_col++;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
HighsInt iss_num_row = 0;
|
|
906
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
907
|
+
if (this->row_bound_[iRow] != kIisBoundStatusDropped) {
|
|
908
|
+
this->row_index_[iss_num_row] = this->row_index_[iRow];
|
|
909
|
+
this->row_bound_[iss_num_row] = this->row_bound_[iRow];
|
|
910
|
+
iss_num_row++;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
// Return final result
|
|
914
|
+
this->valid_ = true;
|
|
915
|
+
this->status_ = iis_status;
|
|
916
|
+
this->strategy_ = options.iis_strategy;
|
|
917
|
+
this->col_index_.resize(iss_num_col);
|
|
918
|
+
this->col_bound_.resize(iss_num_col);
|
|
919
|
+
this->row_index_.resize(iss_num_row);
|
|
920
|
+
this->row_bound_.resize(iss_num_row);
|
|
921
|
+
return search_return_status;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
void HighsIis::processBoundRelaxation(Highs& highs, const bool row_deletion,
|
|
925
|
+
const bool drop_lower, const HighsInt iX,
|
|
926
|
+
double& lower, double& upper,
|
|
927
|
+
IisModelStatus& iis_status,
|
|
928
|
+
HighsStatus& search_return_status) {
|
|
929
|
+
// Declare run_status
|
|
930
|
+
HighsStatus run_status;
|
|
931
|
+
// Get model status
|
|
932
|
+
HighsModelStatus model_status = highs.getModelStatus();
|
|
933
|
+
if (model_status == HighsModelStatus::kOptimal) {
|
|
934
|
+
// Now feasible, so restore the bound
|
|
935
|
+
run_status = row_deletion ? highs.changeRowBounds(iX, lower, upper)
|
|
936
|
+
: highs.changeColBounds(iX, lower, upper);
|
|
937
|
+
assert(run_status == HighsStatus::kOk);
|
|
938
|
+
// If the lower bound must be kept, then any finite upper bound
|
|
939
|
+
// must be dropped
|
|
940
|
+
const bool apply_reciprocal_rule = drop_lower && (upper < kHighsInf);
|
|
941
|
+
if (apply_reciprocal_rule) {
|
|
942
|
+
// Drop the upper bound permanently
|
|
943
|
+
upper = kHighsInf;
|
|
944
|
+
run_status = row_deletion ? highs.changeRowBounds(iX, lower, upper)
|
|
945
|
+
: highs.changeColBounds(iX, lower, upper);
|
|
946
|
+
assert(run_status == HighsStatus::kOk);
|
|
947
|
+
}
|
|
948
|
+
if (drop_lower) {
|
|
949
|
+
assert(upper >= kHighsInf);
|
|
950
|
+
}
|
|
951
|
+
// Since upper = kHighsInf, allow the loop to run so that
|
|
952
|
+
// bound status is set as if upper were set to kHighsInf
|
|
953
|
+
// by relaxing it and finding that the LP was still
|
|
954
|
+
// infeasible
|
|
955
|
+
} else if (model_status == HighsModelStatus::kInfeasible) {
|
|
956
|
+
// Bound can be dropped permanently
|
|
957
|
+
if (drop_lower) {
|
|
958
|
+
lower = -kHighsInf;
|
|
959
|
+
} else {
|
|
960
|
+
upper = kHighsInf;
|
|
961
|
+
}
|
|
962
|
+
} else if (model_status == HighsModelStatus::kTimeLimit) {
|
|
963
|
+
// Time limit reached, so restore the bound and set iis status to
|
|
964
|
+
// kIisModelStatusTimeLimit
|
|
965
|
+
run_status = row_deletion ? highs.changeRowBounds(iX, lower, upper)
|
|
966
|
+
: highs.changeColBounds(iX, lower, upper);
|
|
967
|
+
assert(run_status == HighsStatus::kOk);
|
|
968
|
+
iis_status = kIisModelStatusTimeLimit;
|
|
969
|
+
search_return_status = HighsStatus::kWarning;
|
|
970
|
+
} else {
|
|
971
|
+
// Unknown failure, so restore the bound and set iis status to
|
|
972
|
+
// kIisModelStatusReducible
|
|
973
|
+
run_status = row_deletion ? highs.changeRowBounds(iX, lower, upper)
|
|
974
|
+
: highs.changeColBounds(iX, lower, upper);
|
|
975
|
+
assert(run_status == HighsStatus::kOk);
|
|
976
|
+
iis_status = kIisModelStatusReducible;
|
|
977
|
+
search_return_status = HighsStatus::kWarning;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
bool HighsIis::indexStatusOk(const HighsLp& lp) const {
|
|
982
|
+
HighsInt num_col = lp.num_col_;
|
|
983
|
+
HighsInt num_row = lp.num_row_;
|
|
984
|
+
bool col_status_size_ok =
|
|
985
|
+
this->col_status_.size() == static_cast<size_t>(num_col);
|
|
986
|
+
bool row_status_size_ok =
|
|
987
|
+
this->row_status_.size() == static_cast<size_t>(num_row);
|
|
988
|
+
assert(col_status_size_ok);
|
|
989
|
+
assert(row_status_size_ok);
|
|
990
|
+
if (!col_status_size_ok) return indexStatusOkReturn(false);
|
|
991
|
+
if (!row_status_size_ok) return indexStatusOkReturn(false);
|
|
992
|
+
HighsInt num_iis_col = this->col_index_.size();
|
|
993
|
+
HighsInt num_iis_row = this->row_index_.size();
|
|
994
|
+
// Determine whether this is an IIS or just an IS
|
|
995
|
+
bool true_iis = false;
|
|
996
|
+
for (HighsInt iCol = 0; iCol < num_col; iCol++) {
|
|
997
|
+
if (this->col_status_[iCol] == kIisStatusInConflict) {
|
|
998
|
+
true_iis = true;
|
|
999
|
+
break;
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
if (!true_iis) {
|
|
1003
|
+
for (HighsInt iRow = 0; iRow < num_row; iRow++) {
|
|
1004
|
+
if (this->row_status_[iRow] == kIisStatusInConflict) {
|
|
1005
|
+
true_iis = true;
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
// Now check that cols and rows in the IIS are kIisStatusInConflict
|
|
1011
|
+
// or kIisStatusMaybeInConflict, according to true_iis, and that all
|
|
1012
|
+
// other cols and rows are kIisStatusNotConflict
|
|
1013
|
+
std::vector<HighsInt> col_status = col_status_;
|
|
1014
|
+
std::vector<HighsInt> row_status = row_status_;
|
|
1015
|
+
const HighsInt illegal_status = -99;
|
|
1016
|
+
for (HighsInt iX = 0; iX < num_iis_col; iX++) {
|
|
1017
|
+
HighsInt iCol = this->col_index_[iX];
|
|
1018
|
+
if (col_status_[iCol] !=
|
|
1019
|
+
(true_iis ? kIisStatusInConflict : kIisStatusMaybeInConflict))
|
|
1020
|
+
return indexStatusOkReturn(false);
|
|
1021
|
+
col_status[iCol] = illegal_status;
|
|
1022
|
+
}
|
|
1023
|
+
for (HighsInt iX = 0; iX < num_iis_row; iX++) {
|
|
1024
|
+
HighsInt iRow = this->row_index_[iX];
|
|
1025
|
+
if (row_status_[iRow] !=
|
|
1026
|
+
(true_iis ? kIisStatusInConflict : kIisStatusMaybeInConflict))
|
|
1027
|
+
return indexStatusOkReturn(false);
|
|
1028
|
+
row_status[iRow] = illegal_status;
|
|
1029
|
+
}
|
|
1030
|
+
const HighsInt non_is_status = nonIsStatus();
|
|
1031
|
+
for (HighsInt iCol = 0; iCol < num_col; iCol++) {
|
|
1032
|
+
if (col_status[iCol] > illegal_status && col_status[iCol] != non_is_status)
|
|
1033
|
+
return indexStatusOkReturn(false);
|
|
1034
|
+
}
|
|
1035
|
+
for (HighsInt iRow = 0; iRow < num_row; iRow++) {
|
|
1036
|
+
if (row_status[iRow] > illegal_status && row_status[iRow] != non_is_status)
|
|
1037
|
+
return indexStatusOkReturn(false);
|
|
1038
|
+
}
|
|
1039
|
+
return indexStatusOkReturn(true);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
bool HighsIis::lpDataOk(const HighsLp& lp, const HighsOptions& options) const {
|
|
1043
|
+
const HighsLp& iis_lp = this->model_.lp_;
|
|
1044
|
+
HighsInt iis_num_col = this->col_index_.size();
|
|
1045
|
+
HighsInt iis_num_row = this->row_index_.size();
|
|
1046
|
+
if (!(iis_lp.num_col_ == iis_num_col)) return lpDataOkReturn(false);
|
|
1047
|
+
if (!(iis_lp.num_row_ == iis_num_row)) return lpDataOkReturn(false);
|
|
1048
|
+
|
|
1049
|
+
const bool colwise = lp.a_matrix_.isColwise();
|
|
1050
|
+
|
|
1051
|
+
const HighsInt illegal_index = -1;
|
|
1052
|
+
const double illegal_value = kHighsInf;
|
|
1053
|
+
// iis_row/col give the row/col in the IIS for each row/col in the
|
|
1054
|
+
// LP, or an illegal index if the LP row/col isn't in the IIS
|
|
1055
|
+
std::vector<HighsInt> iis_row;
|
|
1056
|
+
iis_row.assign(lp.num_row_, illegal_index);
|
|
1057
|
+
std::vector<HighsInt> iis_col;
|
|
1058
|
+
iis_col.assign(lp.num_col_, illegal_index);
|
|
1059
|
+
double bound;
|
|
1060
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++) {
|
|
1061
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1062
|
+
iis_row[iRow] = iisRow;
|
|
1063
|
+
HighsInt row_bound = this->row_bound_[iisRow];
|
|
1064
|
+
bound =
|
|
1065
|
+
row_bound == kIisBoundStatusLower || row_bound == kIisBoundStatusBoxed
|
|
1066
|
+
? lp.row_lower_[iRow]
|
|
1067
|
+
: -kHighsInf;
|
|
1068
|
+
if (iis_lp.row_lower_[iisRow] != bound) return lpDataOkReturn(false);
|
|
1069
|
+
bound =
|
|
1070
|
+
row_bound == kIisBoundStatusUpper || row_bound == kIisBoundStatusBoxed
|
|
1071
|
+
? lp.row_upper_[iRow]
|
|
1072
|
+
: kHighsInf;
|
|
1073
|
+
if (iis_lp.row_upper_[iisRow] != bound) return lpDataOkReturn(false);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// Work through the LP columns checking the zero costs and bounds
|
|
1077
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++) {
|
|
1078
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1079
|
+
iis_col[iCol] = iisCol;
|
|
1080
|
+
if (iis_lp.col_cost_[iisCol]) return lpDataOkReturn(false);
|
|
1081
|
+
HighsInt col_bound = this->col_bound_[iisCol];
|
|
1082
|
+
bound =
|
|
1083
|
+
col_bound == kIisBoundStatusLower || col_bound == kIisBoundStatusBoxed
|
|
1084
|
+
? lp.col_lower_[iCol]
|
|
1085
|
+
: -kHighsInf;
|
|
1086
|
+
if (iis_lp.col_lower_[iisCol] != bound) return lpDataOkReturn(false);
|
|
1087
|
+
bound =
|
|
1088
|
+
col_bound == kIisBoundStatusUpper || col_bound == kIisBoundStatusBoxed
|
|
1089
|
+
? lp.col_upper_[iCol]
|
|
1090
|
+
: kHighsInf;
|
|
1091
|
+
if (iis_lp.col_upper_[iisCol] != bound) return lpDataOkReturn(false);
|
|
1092
|
+
}
|
|
1093
|
+
std::vector<HighsInt> index;
|
|
1094
|
+
std::vector<double> value;
|
|
1095
|
+
// Work through the LP matrix, checking the matrix index/value
|
|
1096
|
+
if (colwise) {
|
|
1097
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++) {
|
|
1098
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1099
|
+
// Use index/value to scatter the IIS matrix column
|
|
1100
|
+
index.assign(iis_num_row, illegal_index);
|
|
1101
|
+
value.assign(iis_num_row, illegal_value);
|
|
1102
|
+
for (HighsInt iEl = iis_lp.a_matrix_.start_[iisCol];
|
|
1103
|
+
iEl < iis_lp.a_matrix_.start_[iisCol + 1]; iEl++) {
|
|
1104
|
+
HighsInt iisRow = iis_lp.a_matrix_.index_[iEl];
|
|
1105
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1106
|
+
index[iisRow] = iRow;
|
|
1107
|
+
value[iisRow] = iis_lp.a_matrix_.value_[iEl];
|
|
1108
|
+
}
|
|
1109
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
1110
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
1111
|
+
HighsInt iRow = lp.a_matrix_.index_[iEl];
|
|
1112
|
+
HighsInt iisRow = iis_row[iRow];
|
|
1113
|
+
if (iisRow >= 0) {
|
|
1114
|
+
if (index[iisRow] != iRow) return lpDataOkReturn(false);
|
|
1115
|
+
if (value[iisRow] != lp.a_matrix_.value_[iEl])
|
|
1116
|
+
return lpDataOkReturn(false);
|
|
1117
|
+
index[iisRow] = illegal_index;
|
|
1118
|
+
value[iisRow] = illegal_value;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
} else {
|
|
1123
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++) {
|
|
1124
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1125
|
+
// Use index/value to scatter the IIS matrix row
|
|
1126
|
+
index.assign(iis_num_col, illegal_index);
|
|
1127
|
+
value.assign(iis_num_col, illegal_value);
|
|
1128
|
+
for (HighsInt iEl = iis_lp.a_matrix_.start_[iisRow];
|
|
1129
|
+
iEl < iis_lp.a_matrix_.start_[iisRow + 1]; iEl++) {
|
|
1130
|
+
HighsInt iisCol = iis_lp.a_matrix_.index_[iEl];
|
|
1131
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1132
|
+
index[iisCol] = iCol;
|
|
1133
|
+
value[iisCol] = iis_lp.a_matrix_.value_[iEl];
|
|
1134
|
+
}
|
|
1135
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iRow];
|
|
1136
|
+
iEl < lp.a_matrix_.start_[iRow + 1]; iEl++) {
|
|
1137
|
+
HighsInt iCol = lp.a_matrix_.index_[iEl];
|
|
1138
|
+
HighsInt iisCol = iis_col[iCol];
|
|
1139
|
+
if (iisCol >= 0) {
|
|
1140
|
+
if (index[iisCol] != iCol) return lpDataOkReturn(false);
|
|
1141
|
+
if (value[iisCol] != lp.a_matrix_.value_[iEl])
|
|
1142
|
+
return lpDataOkReturn(false);
|
|
1143
|
+
index[iisCol] = illegal_index;
|
|
1144
|
+
value[iisCol] = illegal_value;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
// Work through the IIS LP matrix, making sure that the index/value
|
|
1150
|
+
// are correct
|
|
1151
|
+
if (colwise) {
|
|
1152
|
+
for (HighsInt iisCol = 0; iisCol < iis_num_col; iisCol++) {
|
|
1153
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1154
|
+
// Use index/value to scatter the LP matrix column
|
|
1155
|
+
index.assign(lp.num_row_, illegal_index);
|
|
1156
|
+
value.assign(lp.num_row_, illegal_value);
|
|
1157
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
|
|
1158
|
+
iEl < lp.a_matrix_.start_[iCol + 1]; iEl++) {
|
|
1159
|
+
HighsInt iRow = lp.a_matrix_.index_[iEl];
|
|
1160
|
+
HighsInt iisRow = iis_row[iRow];
|
|
1161
|
+
index[iRow] = iisRow;
|
|
1162
|
+
value[iRow] = lp.a_matrix_.value_[iEl];
|
|
1163
|
+
}
|
|
1164
|
+
for (HighsInt iEl = iis_lp.a_matrix_.start_[iisCol];
|
|
1165
|
+
iEl < iis_lp.a_matrix_.start_[iisCol + 1]; iEl++) {
|
|
1166
|
+
HighsInt iisRow = iis_lp.a_matrix_.index_[iEl];
|
|
1167
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1168
|
+
if (index[iRow] != iisRow) return lpDataOkReturn(false);
|
|
1169
|
+
if (value[iRow] != iis_lp.a_matrix_.value_[iEl])
|
|
1170
|
+
return lpDataOkReturn(false);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
} else {
|
|
1174
|
+
for (HighsInt iisRow = 0; iisRow < iis_num_row; iisRow++) {
|
|
1175
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1176
|
+
// Use index/value to scatter the LP matrix row
|
|
1177
|
+
index.assign(lp.num_col_, illegal_index);
|
|
1178
|
+
value.assign(lp.num_col_, illegal_value);
|
|
1179
|
+
for (HighsInt iEl = lp.a_matrix_.start_[iRow];
|
|
1180
|
+
iEl < lp.a_matrix_.start_[iRow + 1]; iEl++) {
|
|
1181
|
+
HighsInt iCol = lp.a_matrix_.index_[iEl];
|
|
1182
|
+
HighsInt iisCol = iis_col[iCol];
|
|
1183
|
+
index[iCol] = iisCol;
|
|
1184
|
+
value[iCol] = lp.a_matrix_.value_[iEl];
|
|
1185
|
+
}
|
|
1186
|
+
for (HighsInt iEl = iis_lp.a_matrix_.start_[iisRow];
|
|
1187
|
+
iEl < iis_lp.a_matrix_.start_[iisRow + 1]; iEl++) {
|
|
1188
|
+
HighsInt iisCol = iis_lp.a_matrix_.index_[iEl];
|
|
1189
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1190
|
+
if (index[iCol] != iisCol) return lpDataOkReturn(false);
|
|
1191
|
+
if (value[iCol] != iis_lp.a_matrix_.value_[iEl])
|
|
1192
|
+
return lpDataOkReturn(false);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
return lpDataOkReturn(true);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
bool HighsIis::lpOk(const HighsOptions& options) const {
|
|
1200
|
+
// Check that the IIS LP is OK (infeasible and optimal if
|
|
1201
|
+
// any bound is relaxed)
|
|
1202
|
+
if (!this->valid_) return lpOkReturn(true);
|
|
1203
|
+
HighsInt num_iis_col = this->col_index_.size();
|
|
1204
|
+
HighsInt num_iis_row = this->row_index_.size();
|
|
1205
|
+
// If an LP has a row with inconsistent bounds, or an empty row with
|
|
1206
|
+
// a positive lower bound or negative upper bound, then it is
|
|
1207
|
+
// infeasible, but the IIS contains no columns
|
|
1208
|
+
if (num_iis_col == 0) return true;
|
|
1209
|
+
const HighsLogOptions& log_options = options.log_options;
|
|
1210
|
+
const HighsLp& iis_lp = this->model_.lp_;
|
|
1211
|
+
assert(iis_lp.num_col_ == num_iis_col);
|
|
1212
|
+
assert(iis_lp.num_row_ == num_iis_row);
|
|
1213
|
+
Highs h;
|
|
1214
|
+
h.passOptions(options);
|
|
1215
|
+
h.setOptionValue("output_flag", false);
|
|
1216
|
+
h.passModel(iis_lp);
|
|
1217
|
+
h.writeModel("");
|
|
1218
|
+
HighsStatus status = h.optimizeModel();
|
|
1219
|
+
if (status != HighsStatus::kOk ||
|
|
1220
|
+
h.getModelStatus() != HighsModelStatus::kInfeasible) {
|
|
1221
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
1222
|
+
"HighsIis: Failed to prove infeasibility for IIS LP\n");
|
|
1223
|
+
return lpOkReturn(false);
|
|
1224
|
+
}
|
|
1225
|
+
if (!(this->status_ == kIisModelStatusIrreducible)) return lpOkReturn(true);
|
|
1226
|
+
auto optimal = [&]() -> bool {
|
|
1227
|
+
if (options.log_dev_level > 0) h.writeModel("");
|
|
1228
|
+
h.optimizeModel();
|
|
1229
|
+
return h.getModelStatus() == HighsModelStatus::kOptimal;
|
|
1230
|
+
};
|
|
1231
|
+
for (HighsInt iisCol = 0; iisCol < num_iis_col; iisCol++) {
|
|
1232
|
+
HighsInt iCol = this->col_index_[iisCol];
|
|
1233
|
+
if (this->col_bound_[iisCol] == kIisBoundStatusLower) {
|
|
1234
|
+
h.changeColBounds(iisCol, -kHighsInf, iis_lp.col_upper_[iisCol]);
|
|
1235
|
+
if (!optimal()) {
|
|
1236
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
1237
|
+
"HighsIis: IIS column %d (LP column %d): relaxing lower "
|
|
1238
|
+
"bound of %g yield IIS LP with status %s\n",
|
|
1239
|
+
int(iisCol), int(iCol), iis_lp.col_lower_[iisCol],
|
|
1240
|
+
h.modelStatusToString(h.getModelStatus()).c_str());
|
|
1241
|
+
return lpOkReturn(false);
|
|
1242
|
+
}
|
|
1243
|
+
h.changeColBounds(iisCol, iis_lp.col_lower_[iisCol],
|
|
1244
|
+
iis_lp.col_upper_[iisCol]);
|
|
1245
|
+
}
|
|
1246
|
+
if (this->col_bound_[iisCol] == kIisBoundStatusUpper) {
|
|
1247
|
+
h.changeColBounds(iisCol, iis_lp.col_lower_[iisCol], kHighsInf);
|
|
1248
|
+
if (!optimal()) {
|
|
1249
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
1250
|
+
"HighsIis: IIS column %d (LP column %d): relaxing upper "
|
|
1251
|
+
"bound of %g yield IIS LP with status %s\n",
|
|
1252
|
+
int(iisCol), int(iCol), iis_lp.col_upper_[iisCol],
|
|
1253
|
+
h.modelStatusToString(h.getModelStatus()).c_str());
|
|
1254
|
+
return lpOkReturn(false);
|
|
1255
|
+
}
|
|
1256
|
+
h.changeColBounds(iisCol, iis_lp.col_lower_[iisCol],
|
|
1257
|
+
iis_lp.col_upper_[iisCol]);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
for (HighsInt iisRow = 0; iisRow < num_iis_row; iisRow++) {
|
|
1261
|
+
HighsInt iRow = this->row_index_[iisRow];
|
|
1262
|
+
if (this->row_bound_[iisRow] == kIisBoundStatusLower) {
|
|
1263
|
+
h.changeRowBounds(iisRow, -kHighsInf, iis_lp.row_upper_[iisRow]);
|
|
1264
|
+
if (!optimal()) {
|
|
1265
|
+
highsLogUser(log_options, HighsLogType::kError,
|
|
1266
|
+
"HighsIis: IIS row %d (LP row %d): relaxing lower bound "
|
|
1267
|
+
"of %g yield IIS LP with status %s\n",
|
|
1268
|
+
int(iisRow), int(iRow), iis_lp.row_lower_[iisRow],
|
|
1269
|
+
h.modelStatusToString(h.getModelStatus()).c_str());
|
|
1270
|
+
return lpOkReturn(false);
|
|
1271
|
+
}
|
|
1272
|
+
h.changeRowBounds(iisRow, iis_lp.row_lower_[iisRow],
|
|
1273
|
+
iis_lp.row_upper_[iisRow]);
|
|
1274
|
+
}
|
|
1275
|
+
if (this->row_bound_[iisRow] == kIisBoundStatusUpper) {
|
|
1276
|
+
h.changeRowBounds(iisRow, iis_lp.row_lower_[iisRow], kHighsInf);
|
|
1277
|
+
if (!optimal()) {
|
|
1278
|
+
highsLogUser(log_options, HighsLogType::kError,
|
|
1279
|
+
"HighsIis: IIS row %d (LP row %d): relaxing upper "
|
|
1280
|
+
"bound of %g yield IIS LP with status %s\n",
|
|
1281
|
+
int(iisRow), int(iRow), iis_lp.row_upper_[iisRow],
|
|
1282
|
+
h.modelStatusToString(h.getModelStatus()).c_str());
|
|
1283
|
+
return lpOkReturn(false);
|
|
1284
|
+
}
|
|
1285
|
+
h.changeRowBounds(iisRow, iis_lp.row_lower_[iisRow],
|
|
1286
|
+
iis_lp.row_upper_[iisRow]);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
return lpOkReturn(true);
|
|
1290
|
+
}
|