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,1495 @@
|
|
|
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 simplex/HighsSimplexAnalysis.cpp
|
|
9
|
+
* @brief
|
|
10
|
+
*/
|
|
11
|
+
#include <cmath>
|
|
12
|
+
// #include <cstdio>
|
|
13
|
+
#include <iomanip>
|
|
14
|
+
|
|
15
|
+
#include "parallel/HighsParallel.h"
|
|
16
|
+
#include "simplex/HighsSimplexAnalysis.h"
|
|
17
|
+
#include "simplex/SimplexTimer.h"
|
|
18
|
+
#include "util/FactorTimer.h"
|
|
19
|
+
|
|
20
|
+
void HighsSimplexAnalysis::setup(const std::string lp_name, const HighsLp& lp,
|
|
21
|
+
const HighsOptions& options,
|
|
22
|
+
const HighsInt simplex_iteration_count_) {
|
|
23
|
+
// Copy Problem size
|
|
24
|
+
numRow = lp.num_row_;
|
|
25
|
+
numCol = lp.num_col_;
|
|
26
|
+
numTot = numRow + numCol;
|
|
27
|
+
model_name_ = lp.model_name_;
|
|
28
|
+
lp_name_ = lp_name;
|
|
29
|
+
// Set up analysis logic short-cuts
|
|
30
|
+
analyse_lp_data = kHighsAnalysisLevelModelData & options.highs_analysis_level;
|
|
31
|
+
analyse_simplex_summary_data =
|
|
32
|
+
kHighsAnalysisLevelSolverSummaryData & options.highs_analysis_level;
|
|
33
|
+
analyse_simplex_runtime_data =
|
|
34
|
+
kHighsAnalysisLevelSolverRuntimeData & options.highs_analysis_level;
|
|
35
|
+
analyse_factor_data =
|
|
36
|
+
kHighsAnalysisLevelNlaData & options.highs_analysis_level;
|
|
37
|
+
analyse_simplex_data =
|
|
38
|
+
analyse_simplex_summary_data || analyse_simplex_runtime_data;
|
|
39
|
+
highs_run_time = 0;
|
|
40
|
+
last_user_log_time = -kHighsInf;
|
|
41
|
+
delta_user_log_time = 5e0;
|
|
42
|
+
|
|
43
|
+
setupSimplexTime(options);
|
|
44
|
+
setupFactorTime(options);
|
|
45
|
+
|
|
46
|
+
// Copy tolerances from options
|
|
47
|
+
// allow_dual_steepest_edge_to_devex_switch =
|
|
48
|
+
// options.simplex_dual_edge_weight_strategy ==
|
|
49
|
+
// kSimplexEdgeWeightStrategyChoose;
|
|
50
|
+
// dual_steepest_edge_weight_log_error_threshold =
|
|
51
|
+
// options.dual_steepest_edge_weight_log_error_threshold;
|
|
52
|
+
//
|
|
53
|
+
AnIterIt0 = simplex_iteration_count_;
|
|
54
|
+
// AnIterCostlyDseFq = 0;
|
|
55
|
+
// AnIterNumCostlyDseIt = 0;
|
|
56
|
+
// Copy messaging parameter from options
|
|
57
|
+
messaging(options.log_options);
|
|
58
|
+
timeless_log = options.timeless_log;
|
|
59
|
+
// Initialise the densities
|
|
60
|
+
col_aq_density = 0;
|
|
61
|
+
row_ep_density = 0;
|
|
62
|
+
row_ap_density = 0;
|
|
63
|
+
row_DSE_density = 0;
|
|
64
|
+
col_steepest_edge_density = 0;
|
|
65
|
+
col_basic_feasibility_change_density = 0;
|
|
66
|
+
row_basic_feasibility_change_density = 0;
|
|
67
|
+
col_BFRT_density = 0;
|
|
68
|
+
primal_col_density = 0;
|
|
69
|
+
// Set the row_dual_density to 1 since it's assumed all costs are at
|
|
70
|
+
// least perturbed from zero, if not initially nonzero
|
|
71
|
+
dual_col_density = 1;
|
|
72
|
+
// Set up the data structures for scatter data
|
|
73
|
+
tran_stage.resize(NUM_TRAN_STAGE_TYPE);
|
|
74
|
+
tran_stage[TRAN_STAGE_FTRAN_LOWER].name_ = "FTRAN lower";
|
|
75
|
+
tran_stage[TRAN_STAGE_FTRAN_UPPER_FT].name_ = "FTRAN upper FT";
|
|
76
|
+
tran_stage[TRAN_STAGE_FTRAN_UPPER].name_ = "FTRAN upper";
|
|
77
|
+
tran_stage[TRAN_STAGE_BTRAN_UPPER].name_ = "BTRAN upper";
|
|
78
|
+
tran_stage[TRAN_STAGE_BTRAN_UPPER_FT].name_ = "BTRAN upper FT";
|
|
79
|
+
tran_stage[TRAN_STAGE_BTRAN_LOWER].name_ = "BTRAN lower";
|
|
80
|
+
for (HighsInt tran_stage_type = 0; tran_stage_type < NUM_TRAN_STAGE_TYPE;
|
|
81
|
+
tran_stage_type++) {
|
|
82
|
+
TranStageAnalysis& stage = tran_stage[tran_stage_type];
|
|
83
|
+
initialiseScatterData(20, stage.rhs_density_);
|
|
84
|
+
stage.num_decision_ = 0;
|
|
85
|
+
stage.num_wrong_original_sparse_decision_ = 0;
|
|
86
|
+
stage.num_wrong_original_hyper_decision_ = 0;
|
|
87
|
+
stage.num_wrong_new_sparse_decision_ = 0;
|
|
88
|
+
stage.num_wrong_new_hyper_decision_ = 0;
|
|
89
|
+
}
|
|
90
|
+
original_start_density_tolerance.resize(NUM_TRAN_STAGE_TYPE);
|
|
91
|
+
new_start_density_tolerance.resize(NUM_TRAN_STAGE_TYPE);
|
|
92
|
+
historical_density_tolerance.resize(NUM_TRAN_STAGE_TYPE);
|
|
93
|
+
predicted_density_tolerance.resize(NUM_TRAN_STAGE_TYPE);
|
|
94
|
+
|
|
95
|
+
for (HighsInt tran_stage_type = 0; tran_stage_type < NUM_TRAN_STAGE_TYPE;
|
|
96
|
+
tran_stage_type++) {
|
|
97
|
+
original_start_density_tolerance[tran_stage_type] = 0.05;
|
|
98
|
+
new_start_density_tolerance[tran_stage_type] = 0.05;
|
|
99
|
+
}
|
|
100
|
+
historical_density_tolerance[TRAN_STAGE_FTRAN_LOWER] = 0.15;
|
|
101
|
+
historical_density_tolerance[TRAN_STAGE_FTRAN_UPPER] = 0.10;
|
|
102
|
+
historical_density_tolerance[TRAN_STAGE_BTRAN_UPPER] = 0.10;
|
|
103
|
+
historical_density_tolerance[TRAN_STAGE_BTRAN_LOWER] = 0.15;
|
|
104
|
+
predicted_density_tolerance[TRAN_STAGE_FTRAN_LOWER] = 0.10;
|
|
105
|
+
predicted_density_tolerance[TRAN_STAGE_FTRAN_UPPER] = 0.10;
|
|
106
|
+
predicted_density_tolerance[TRAN_STAGE_BTRAN_UPPER] = 0.10;
|
|
107
|
+
predicted_density_tolerance[TRAN_STAGE_BTRAN_LOWER] = 0.10;
|
|
108
|
+
|
|
109
|
+
// Initialise the measures used to analyse accuracy of steepest edge weights
|
|
110
|
+
//
|
|
111
|
+
const HighsInt dual_edge_weight_strategy =
|
|
112
|
+
options.simplex_dual_edge_weight_strategy;
|
|
113
|
+
if (dual_edge_weight_strategy == kSimplexEdgeWeightStrategyChoose ||
|
|
114
|
+
dual_edge_weight_strategy == kSimplexEdgeWeightStrategySteepestEdge) {
|
|
115
|
+
// Initialise the measures used to analyse accuracy of steepest edge weights
|
|
116
|
+
num_dual_steepest_edge_weight_check = 0;
|
|
117
|
+
num_dual_steepest_edge_weight_reject = 0;
|
|
118
|
+
num_wrong_low_dual_steepest_edge_weight = 0;
|
|
119
|
+
num_wrong_high_dual_steepest_edge_weight = 0;
|
|
120
|
+
average_frequency_low_dual_steepest_edge_weight = 0;
|
|
121
|
+
average_frequency_high_dual_steepest_edge_weight = 0;
|
|
122
|
+
average_log_low_dual_steepest_edge_weight_error = 0;
|
|
123
|
+
average_log_high_dual_steepest_edge_weight_error = 0;
|
|
124
|
+
max_average_frequency_low_dual_steepest_edge_weight = 0;
|
|
125
|
+
max_average_frequency_high_dual_steepest_edge_weight = 0;
|
|
126
|
+
max_sum_average_frequency_extreme_dual_steepest_edge_weight = 0;
|
|
127
|
+
max_average_log_low_dual_steepest_edge_weight_error = 0;
|
|
128
|
+
max_average_log_high_dual_steepest_edge_weight_error = 0;
|
|
129
|
+
max_sum_average_log_extreme_dual_steepest_edge_weight_error = 0;
|
|
130
|
+
}
|
|
131
|
+
num_devex_framework = 0;
|
|
132
|
+
|
|
133
|
+
num_iteration_report_since_last_header = -1;
|
|
134
|
+
num_invert_report_since_last_header = -1;
|
|
135
|
+
// Set values used to skip an iteration report when column (row)
|
|
136
|
+
// choice has found nothing in primal (dual) simplex
|
|
137
|
+
entering_variable = -1;
|
|
138
|
+
pivotal_row_index = -1;
|
|
139
|
+
|
|
140
|
+
// Set following averages to illegal values so that first average is
|
|
141
|
+
// set equal to first value
|
|
142
|
+
average_concurrency = -1;
|
|
143
|
+
average_fraction_of_possible_minor_iterations_performed = -1;
|
|
144
|
+
sum_multi_chosen = 0;
|
|
145
|
+
sum_multi_finished = 0;
|
|
146
|
+
|
|
147
|
+
if (analyse_simplex_summary_data) {
|
|
148
|
+
AnIterPrevIt = simplex_iteration_count_;
|
|
149
|
+
|
|
150
|
+
AnIterOpRec* AnIter;
|
|
151
|
+
AnIter = &AnIterOp[kSimplexNlaBtranFull];
|
|
152
|
+
AnIter->AnIterOpName = "BTRAN Full";
|
|
153
|
+
AnIter = &AnIterOp[kSimplexNlaPriceFull];
|
|
154
|
+
AnIter->AnIterOpName = "PRICE Full";
|
|
155
|
+
AnIter = &AnIterOp[kSimplexNlaBtranBasicFeasibilityChange];
|
|
156
|
+
AnIter->AnIterOpName = "BTRAN BcFsCg";
|
|
157
|
+
AnIter = &AnIterOp[kSimplexNlaPriceBasicFeasibilityChange];
|
|
158
|
+
AnIter->AnIterOpName = "PRICE BcFsCg";
|
|
159
|
+
AnIter = &AnIterOp[kSimplexNlaBtranEp];
|
|
160
|
+
AnIter->AnIterOpName = "BTRAN e_p";
|
|
161
|
+
AnIter = &AnIterOp[kSimplexNlaPriceAp];
|
|
162
|
+
AnIter->AnIterOpName = "PRICE a_p";
|
|
163
|
+
AnIter = &AnIterOp[kSimplexNlaFtran];
|
|
164
|
+
AnIter->AnIterOpName = "FTRAN";
|
|
165
|
+
AnIter = &AnIterOp[kSimplexNlaFtranBfrt];
|
|
166
|
+
AnIter->AnIterOpName = "FTRAN BFRT";
|
|
167
|
+
AnIter = &AnIterOp[kSimplexNlaFtranDse];
|
|
168
|
+
AnIter->AnIterOpName = "FTRAN DSE";
|
|
169
|
+
AnIter = &AnIterOp[kSimplexNlaBtranPse];
|
|
170
|
+
AnIter->AnIterOpName = "BTRAN PSE";
|
|
171
|
+
for (HighsInt k = 0; k < kNumSimplexNlaOperation; k++) {
|
|
172
|
+
AnIter = &AnIterOp[k];
|
|
173
|
+
if ((k == kSimplexNlaPriceAp) ||
|
|
174
|
+
(k == kSimplexNlaPriceBasicFeasibilityChange) ||
|
|
175
|
+
(k == kSimplexNlaPriceFull)) {
|
|
176
|
+
AnIter->AnIterOpHyperCANCEL = 1.0;
|
|
177
|
+
AnIter->AnIterOpHyperTRAN = 1.0;
|
|
178
|
+
AnIter->AnIterOpRsDim = numCol;
|
|
179
|
+
} else {
|
|
180
|
+
if ((k == kSimplexNlaBtranEp) ||
|
|
181
|
+
(k == kSimplexNlaBtranBasicFeasibilityChange) ||
|
|
182
|
+
(k == kSimplexNlaBtranFull)) {
|
|
183
|
+
AnIter->AnIterOpHyperCANCEL = kHyperCancel;
|
|
184
|
+
AnIter->AnIterOpHyperTRAN = kHyperBtranU;
|
|
185
|
+
} else {
|
|
186
|
+
AnIter->AnIterOpHyperCANCEL = kHyperCancel;
|
|
187
|
+
AnIter->AnIterOpHyperTRAN = kHyperFtranL;
|
|
188
|
+
}
|
|
189
|
+
AnIter->AnIterOpRsDim = numRow;
|
|
190
|
+
}
|
|
191
|
+
AnIter->AnIterOpNumCa = 0;
|
|
192
|
+
AnIter->AnIterOpNumHyperOp = 0;
|
|
193
|
+
AnIter->AnIterOpNumHyperRs = 0;
|
|
194
|
+
AnIter->AnIterOpSumLog10RsDensity = 0;
|
|
195
|
+
initialiseValueDistribution("", "density ", 1e-8, 1.0, 10.0,
|
|
196
|
+
AnIter->AnIterOp_density);
|
|
197
|
+
}
|
|
198
|
+
HighsInt last_rebuild_reason = kRebuildReasonCount - 1;
|
|
199
|
+
for (HighsInt k = 1; k <= last_rebuild_reason; k++) AnIterNumInvert[k] = 0;
|
|
200
|
+
num_col_price = 0;
|
|
201
|
+
num_row_price = 0;
|
|
202
|
+
num_row_price_with_switch = 0;
|
|
203
|
+
num_primal_cycling_detections = 0;
|
|
204
|
+
num_dual_cycling_detections = 0;
|
|
205
|
+
// Initialise the dual simplex flip/shift records
|
|
206
|
+
num_quad_chuzc = 0;
|
|
207
|
+
num_heap_chuzc = 0;
|
|
208
|
+
sum_quad_chuzc_size = 0;
|
|
209
|
+
sum_heap_chuzc_size = 0;
|
|
210
|
+
max_quad_chuzc_size = 0;
|
|
211
|
+
max_heap_chuzc_size = 0;
|
|
212
|
+
|
|
213
|
+
num_improve_choose_column_row_call = 0;
|
|
214
|
+
num_remove_pivot_from_pack = 0;
|
|
215
|
+
|
|
216
|
+
num_correct_dual_primal_flip = 0;
|
|
217
|
+
min_correct_dual_primal_flip_dual_infeasibility = kHighsInf;
|
|
218
|
+
max_correct_dual_primal_flip = 0;
|
|
219
|
+
num_correct_dual_cost_shift = 0;
|
|
220
|
+
max_correct_dual_cost_shift_dual_infeasibility = 0;
|
|
221
|
+
max_correct_dual_cost_shift = 0;
|
|
222
|
+
net_num_single_cost_shift = 0;
|
|
223
|
+
num_single_cost_shift = 0;
|
|
224
|
+
max_single_cost_shift = 0;
|
|
225
|
+
sum_single_cost_shift = 0;
|
|
226
|
+
HighsInt last_edge_weight_mode = (HighsInt)EdgeWeightMode::kSteepestEdge;
|
|
227
|
+
for (HighsInt k = 0; k <= last_edge_weight_mode; k++)
|
|
228
|
+
AnIterNumEdWtIt[k] = 0;
|
|
229
|
+
AnIterTraceNumRec = 0;
|
|
230
|
+
AnIterTraceIterDl = 1;
|
|
231
|
+
AnIterTraceRec* lcAnIter = &AnIterTrace[0];
|
|
232
|
+
lcAnIter->AnIterTraceIter = AnIterIt0;
|
|
233
|
+
lcAnIter->AnIterTraceTime = timer_->getWallTime();
|
|
234
|
+
initialiseValueDistribution("Primal step summary", "", 1e-16, 1e16, 10.0,
|
|
235
|
+
primal_step_distribution);
|
|
236
|
+
initialiseValueDistribution("Dual step summary", "", 1e-16, 1e16, 10.0,
|
|
237
|
+
dual_step_distribution);
|
|
238
|
+
initialiseValueDistribution("Simplex pivot summary", "", 1e-8, 1e16, 10.0,
|
|
239
|
+
simplex_pivot_distribution);
|
|
240
|
+
initialiseValueDistribution("Factor pivot threshold summary", "",
|
|
241
|
+
kMinPivotThreshold, kMaxPivotThreshold,
|
|
242
|
+
kPivotThresholdChangeFactor,
|
|
243
|
+
factor_pivot_threshold_distribution);
|
|
244
|
+
initialiseValueDistribution("Numerical trouble summary", "", 1e-16, 1.0,
|
|
245
|
+
10.0, numerical_trouble_distribution);
|
|
246
|
+
initialiseValueDistribution("Edge weight error summary", "", 1e-16, 1.0,
|
|
247
|
+
10.0, edge_weight_error_distribution);
|
|
248
|
+
initialiseValueDistribution("", "1 ", 1e-16, 1e16, 10.0,
|
|
249
|
+
cost_perturbation1_distribution);
|
|
250
|
+
initialiseValueDistribution("", "2 ", 1e-16, 1e16, 10.0,
|
|
251
|
+
cost_perturbation2_distribution);
|
|
252
|
+
initialiseValueDistribution("FTRAN upper sparse summary - before", "", 1e-8,
|
|
253
|
+
1.0, 10.0, before_ftran_upper_sparse_density);
|
|
254
|
+
initialiseValueDistribution("FTRAN upper sparse summary - after", "", 1e-8,
|
|
255
|
+
1.0, 10.0, before_ftran_upper_hyper_density);
|
|
256
|
+
initialiseValueDistribution("FTRAN upper hyper-sparse summary - before", "",
|
|
257
|
+
1e-8, 1.0, 10.0, ftran_upper_sparse_density);
|
|
258
|
+
initialiseValueDistribution("FTRAN upper hyper-sparse summary - after", "",
|
|
259
|
+
1e-8, 1.0, 10.0, ftran_upper_hyper_density);
|
|
260
|
+
initialiseValueDistribution("Cleanup dual change summary", "", 1e-16, 1e16,
|
|
261
|
+
10.0, cleanup_dual_change_distribution);
|
|
262
|
+
initialiseValueDistribution("Cleanup primal change summary", "", 1e-16,
|
|
263
|
+
1e16, 10.0, cleanup_primal_step_distribution);
|
|
264
|
+
initialiseValueDistribution("Cleanup primal step summary", "", 1e-16, 1e16,
|
|
265
|
+
10.0, cleanup_primal_change_distribution);
|
|
266
|
+
initialiseValueDistribution("Cleanup dual step summary", "", 1e-16, 1e16,
|
|
267
|
+
10.0, cleanup_dual_step_distribution);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
void HighsSimplexAnalysis::setupSimplexTime(const HighsOptions& options) {
|
|
272
|
+
analyse_simplex_time =
|
|
273
|
+
kHighsAnalysisLevelSolverTime & options.highs_analysis_level;
|
|
274
|
+
if (analyse_simplex_time) {
|
|
275
|
+
// Set up the thread clocks
|
|
276
|
+
HighsInt max_threads = highs::parallel::num_threads();
|
|
277
|
+
thread_simplex_clocks.clear();
|
|
278
|
+
for (HighsInt i = 0; i < max_threads; i++) {
|
|
279
|
+
HighsTimerClock clock;
|
|
280
|
+
clock.timer_pointer_ = timer_;
|
|
281
|
+
thread_simplex_clocks.push_back(clock);
|
|
282
|
+
}
|
|
283
|
+
SimplexTimer simplex_timer;
|
|
284
|
+
for (HighsTimerClock& clock : thread_simplex_clocks)
|
|
285
|
+
simplex_timer.initialiseSimplexClocks(clock);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
void HighsSimplexAnalysis::setupFactorTime(const HighsOptions& options) {
|
|
290
|
+
analyse_factor_time =
|
|
291
|
+
kHighsAnalysisLevelNlaTime & options.highs_analysis_level;
|
|
292
|
+
if (analyse_factor_time) {
|
|
293
|
+
// Set up the thread clocks
|
|
294
|
+
HighsInt max_threads = highs::parallel::num_threads();
|
|
295
|
+
thread_factor_clocks.clear();
|
|
296
|
+
for (HighsInt i = 0; i < max_threads; i++) {
|
|
297
|
+
HighsTimerClock clock;
|
|
298
|
+
clock.timer_pointer_ = timer_;
|
|
299
|
+
thread_factor_clocks.push_back(clock);
|
|
300
|
+
}
|
|
301
|
+
pointer_serial_factor_clocks = thread_factor_clocks.data();
|
|
302
|
+
FactorTimer factor_timer;
|
|
303
|
+
for (HighsTimerClock& clock : thread_factor_clocks)
|
|
304
|
+
factor_timer.initialiseFactorClocks(clock);
|
|
305
|
+
} else {
|
|
306
|
+
pointer_serial_factor_clocks = NULL;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
void HighsSimplexAnalysis::messaging(const HighsLogOptions& log_options_) {
|
|
311
|
+
log_options = log_options_;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
void HighsSimplexAnalysis::iterationReport() {
|
|
315
|
+
const bool simple_report = false;
|
|
316
|
+
if (simple_report) {
|
|
317
|
+
printf(
|
|
318
|
+
"Iter %5d: (%6d; %6d) delta_primal = %11.4g; dual_step = %11.4g; "
|
|
319
|
+
"primal_step = %11.4g\n",
|
|
320
|
+
(int)simplex_iteration_count, (int)leaving_variable,
|
|
321
|
+
(int)entering_variable, primal_delta, dual_step, primal_step);
|
|
322
|
+
}
|
|
323
|
+
if (*log_options.log_dev_level < (HighsInt)kIterationReportLogType) return;
|
|
324
|
+
const bool header = (num_iteration_report_since_last_header < 0) ||
|
|
325
|
+
(num_iteration_report_since_last_header > 49);
|
|
326
|
+
if (header) {
|
|
327
|
+
iterationReport(header);
|
|
328
|
+
num_iteration_report_since_last_header = 0;
|
|
329
|
+
}
|
|
330
|
+
iterationReport(false);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Called externally - from HEkkPrimal/Dual::reportRebuild
|
|
334
|
+
void HighsSimplexAnalysis::invertReport() {
|
|
335
|
+
if (*log_options.log_dev_level) {
|
|
336
|
+
const bool header = (num_invert_report_since_last_header < 0) ||
|
|
337
|
+
(num_invert_report_since_last_header > 49) ||
|
|
338
|
+
(num_iteration_report_since_last_header >= 0);
|
|
339
|
+
if (header) {
|
|
340
|
+
invertReport(header);
|
|
341
|
+
num_invert_report_since_last_header = 0;
|
|
342
|
+
}
|
|
343
|
+
invertReport(false);
|
|
344
|
+
// Force an iteration report header if this is an INVERT report without an
|
|
345
|
+
// rebuild_reason
|
|
346
|
+
if (!rebuild_reason) num_iteration_report_since_last_header = -1;
|
|
347
|
+
} else {
|
|
348
|
+
const bool force = false;
|
|
349
|
+
userInvertReport(force);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
void HighsSimplexAnalysis::invertReport(const bool header) {
|
|
354
|
+
analysis_log = std::unique_ptr<std::stringstream>(new std::stringstream());
|
|
355
|
+
reportAlgorithmPhase(header);
|
|
356
|
+
reportIterationObjective(header);
|
|
357
|
+
if (analyse_simplex_runtime_data) {
|
|
358
|
+
if (simplex_strategy == kSimplexStrategyDualMulti) {
|
|
359
|
+
// Report on threads and PAMI
|
|
360
|
+
reportThreads(header);
|
|
361
|
+
reportMulti(header);
|
|
362
|
+
}
|
|
363
|
+
reportDensity(header);
|
|
364
|
+
// reportCondition(header);
|
|
365
|
+
}
|
|
366
|
+
reportInfeasibility(header);
|
|
367
|
+
// if (analyse_simplex_runtime_data)
|
|
368
|
+
reportInvert(header);
|
|
369
|
+
highsLogDev(log_options, HighsLogType::kInfo, "%s\n",
|
|
370
|
+
analysis_log->str().c_str());
|
|
371
|
+
if (!header) num_invert_report_since_last_header++;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Called externally - from HEkk::returnFromSolve
|
|
375
|
+
void HighsSimplexAnalysis::userInvertReport(const bool force) {
|
|
376
|
+
if (last_user_log_time < 0) {
|
|
377
|
+
const bool header = true;
|
|
378
|
+
userInvertReport(header, force);
|
|
379
|
+
}
|
|
380
|
+
userInvertReport(false, force);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
void HighsSimplexAnalysis::userInvertReport(const bool header,
|
|
384
|
+
const bool force) {
|
|
385
|
+
highs_run_time = timeless_log ? highs_run_time + 1 : timer_->read();
|
|
386
|
+
if (!force && highs_run_time < last_user_log_time + delta_user_log_time)
|
|
387
|
+
return;
|
|
388
|
+
analysis_log = std::unique_ptr<std::stringstream>(new std::stringstream());
|
|
389
|
+
reportIterationObjective(header);
|
|
390
|
+
reportInfeasibility(header);
|
|
391
|
+
if (!timeless_log) reportRunTime(header, highs_run_time);
|
|
392
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s\n",
|
|
393
|
+
analysis_log->str().c_str());
|
|
394
|
+
if (!header) last_user_log_time = highs_run_time;
|
|
395
|
+
if (highs_run_time > 200 * delta_user_log_time) delta_user_log_time *= 10;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
void HighsSimplexAnalysis::dualSteepestEdgeWeightError(
|
|
399
|
+
const double computed_edge_weight, const double updated_edge_weight) {
|
|
400
|
+
const double kWeightErrorThreshold = 4.0;
|
|
401
|
+
const bool accept_weight =
|
|
402
|
+
updated_edge_weight >= kAcceptDseWeightThreshold * computed_edge_weight;
|
|
403
|
+
HighsInt low_weight_error = 0;
|
|
404
|
+
HighsInt high_weight_error = 0;
|
|
405
|
+
double weight_error;
|
|
406
|
+
string error_type = " OK";
|
|
407
|
+
num_dual_steepest_edge_weight_check++;
|
|
408
|
+
if (!accept_weight) num_dual_steepest_edge_weight_reject++;
|
|
409
|
+
if (updated_edge_weight < computed_edge_weight) {
|
|
410
|
+
// Updated weight is low
|
|
411
|
+
weight_error = computed_edge_weight / updated_edge_weight;
|
|
412
|
+
if (weight_error > kWeightErrorThreshold) {
|
|
413
|
+
low_weight_error = 1;
|
|
414
|
+
error_type = " Low";
|
|
415
|
+
}
|
|
416
|
+
average_log_low_dual_steepest_edge_weight_error =
|
|
417
|
+
0.99 * average_log_low_dual_steepest_edge_weight_error +
|
|
418
|
+
0.01 * log(weight_error);
|
|
419
|
+
} else {
|
|
420
|
+
// Updated weight is correct or high
|
|
421
|
+
weight_error = updated_edge_weight / computed_edge_weight;
|
|
422
|
+
if (weight_error > kWeightErrorThreshold) {
|
|
423
|
+
high_weight_error = 1;
|
|
424
|
+
error_type = "High";
|
|
425
|
+
}
|
|
426
|
+
average_log_high_dual_steepest_edge_weight_error =
|
|
427
|
+
0.99 * average_log_high_dual_steepest_edge_weight_error +
|
|
428
|
+
0.01 * log(weight_error);
|
|
429
|
+
}
|
|
430
|
+
average_frequency_low_dual_steepest_edge_weight =
|
|
431
|
+
0.99 * average_frequency_low_dual_steepest_edge_weight +
|
|
432
|
+
0.01 * low_weight_error;
|
|
433
|
+
average_frequency_high_dual_steepest_edge_weight =
|
|
434
|
+
0.99 * average_frequency_high_dual_steepest_edge_weight +
|
|
435
|
+
0.01 * high_weight_error;
|
|
436
|
+
max_average_frequency_low_dual_steepest_edge_weight =
|
|
437
|
+
max(max_average_frequency_low_dual_steepest_edge_weight,
|
|
438
|
+
average_frequency_low_dual_steepest_edge_weight);
|
|
439
|
+
max_average_frequency_high_dual_steepest_edge_weight =
|
|
440
|
+
max(max_average_frequency_high_dual_steepest_edge_weight,
|
|
441
|
+
average_frequency_high_dual_steepest_edge_weight);
|
|
442
|
+
max_sum_average_frequency_extreme_dual_steepest_edge_weight =
|
|
443
|
+
max(max_sum_average_frequency_extreme_dual_steepest_edge_weight,
|
|
444
|
+
average_frequency_low_dual_steepest_edge_weight +
|
|
445
|
+
average_frequency_high_dual_steepest_edge_weight);
|
|
446
|
+
max_average_log_low_dual_steepest_edge_weight_error =
|
|
447
|
+
max(max_average_log_low_dual_steepest_edge_weight_error,
|
|
448
|
+
average_log_low_dual_steepest_edge_weight_error);
|
|
449
|
+
max_average_log_high_dual_steepest_edge_weight_error =
|
|
450
|
+
max(max_average_log_high_dual_steepest_edge_weight_error,
|
|
451
|
+
average_log_high_dual_steepest_edge_weight_error);
|
|
452
|
+
max_sum_average_log_extreme_dual_steepest_edge_weight_error =
|
|
453
|
+
max(max_sum_average_log_extreme_dual_steepest_edge_weight_error,
|
|
454
|
+
average_log_low_dual_steepest_edge_weight_error +
|
|
455
|
+
average_log_high_dual_steepest_edge_weight_error);
|
|
456
|
+
if (analyse_simplex_runtime_data) {
|
|
457
|
+
const bool report_weight_error = false;
|
|
458
|
+
if (report_weight_error && weight_error > 0.5 * kWeightErrorThreshold) {
|
|
459
|
+
printf(
|
|
460
|
+
"DSE Wt Ck |%8" HIGHSINT_FORMAT "| OK = %1d (%4" HIGHSINT_FORMAT
|
|
461
|
+
" / %6" HIGHSINT_FORMAT
|
|
462
|
+
") (c %10.4g, u %10.4g, er %10.4g "
|
|
463
|
+
"- "
|
|
464
|
+
"%s): Low (Fq %10.4g, Er %10.4g); High (Fq%10.4g, Er%10.4g) | %10.4g "
|
|
465
|
+
"%10.4g %10.4g %10.4g %10.4g %10.4g\n",
|
|
466
|
+
simplex_iteration_count, accept_weight,
|
|
467
|
+
num_dual_steepest_edge_weight_check,
|
|
468
|
+
num_dual_steepest_edge_weight_reject, computed_edge_weight,
|
|
469
|
+
updated_edge_weight, weight_error, error_type.c_str(),
|
|
470
|
+
average_frequency_low_dual_steepest_edge_weight,
|
|
471
|
+
average_log_low_dual_steepest_edge_weight_error,
|
|
472
|
+
average_frequency_high_dual_steepest_edge_weight,
|
|
473
|
+
average_log_high_dual_steepest_edge_weight_error,
|
|
474
|
+
max_average_frequency_low_dual_steepest_edge_weight,
|
|
475
|
+
max_average_frequency_high_dual_steepest_edge_weight,
|
|
476
|
+
max_sum_average_frequency_extreme_dual_steepest_edge_weight,
|
|
477
|
+
max_average_log_low_dual_steepest_edge_weight_error,
|
|
478
|
+
max_average_log_high_dual_steepest_edge_weight_error,
|
|
479
|
+
max_sum_average_log_extreme_dual_steepest_edge_weight_error);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
bool HighsSimplexAnalysis::predictEndDensity(const HighsInt tran_stage_type,
|
|
485
|
+
const double start_density,
|
|
486
|
+
double& end_density) const {
|
|
487
|
+
return predictFromScatterData(tran_stage[tran_stage_type].rhs_density_,
|
|
488
|
+
start_density, end_density);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
void HighsSimplexAnalysis::afterTranStage(
|
|
492
|
+
const HighsInt tran_stage_type, const double start_density,
|
|
493
|
+
const double end_density, const double historical_density,
|
|
494
|
+
const double predicted_end_density,
|
|
495
|
+
const bool use_solve_sparse_original_HFactor_logic,
|
|
496
|
+
const bool use_solve_sparse_new_HFactor_logic) {
|
|
497
|
+
TranStageAnalysis& stage = tran_stage[tran_stage_type];
|
|
498
|
+
const double rp = false;
|
|
499
|
+
const double kMaxHyperDensity = 0.1;
|
|
500
|
+
|
|
501
|
+
if (predicted_end_density > 0) {
|
|
502
|
+
stage.num_decision_++;
|
|
503
|
+
if (end_density <= kMaxHyperDensity) {
|
|
504
|
+
// Should have done hyper-sparse TRAN
|
|
505
|
+
if (use_solve_sparse_original_HFactor_logic) {
|
|
506
|
+
// Original logic makes wrong decision to use sparse TRAN
|
|
507
|
+
if (rp) {
|
|
508
|
+
printf("Original: Wrong sparse: ");
|
|
509
|
+
const double start_density_tolerance =
|
|
510
|
+
original_start_density_tolerance[tran_stage_type];
|
|
511
|
+
const double this_historical_density_tolerance =
|
|
512
|
+
historical_density_tolerance[tran_stage_type];
|
|
513
|
+
if (start_density > start_density_tolerance) {
|
|
514
|
+
printf("(start = %10.4g > %4.2f) or ", start_density,
|
|
515
|
+
start_density_tolerance);
|
|
516
|
+
} else {
|
|
517
|
+
printf(" start = %10.4g ", start_density);
|
|
518
|
+
}
|
|
519
|
+
if (historical_density > this_historical_density_tolerance) {
|
|
520
|
+
printf("(historical = %10.4g > %4.2f); ", historical_density,
|
|
521
|
+
this_historical_density_tolerance);
|
|
522
|
+
} else {
|
|
523
|
+
printf(" historical = %10.4g ", historical_density);
|
|
524
|
+
}
|
|
525
|
+
printf("end = %10.4g", end_density);
|
|
526
|
+
if (end_density < 0.1 * historical_density) printf(" !! OG");
|
|
527
|
+
printf("\n");
|
|
528
|
+
}
|
|
529
|
+
stage.num_wrong_original_sparse_decision_++;
|
|
530
|
+
}
|
|
531
|
+
if (use_solve_sparse_new_HFactor_logic) {
|
|
532
|
+
// New logic makes wrong decision to use sparse TRAN
|
|
533
|
+
if (rp) {
|
|
534
|
+
printf("New : Wrong sparse: ");
|
|
535
|
+
const double start_density_tolerance =
|
|
536
|
+
original_start_density_tolerance[tran_stage_type];
|
|
537
|
+
const double end_density_tolerance =
|
|
538
|
+
predicted_density_tolerance[tran_stage_type];
|
|
539
|
+
if (start_density > start_density_tolerance) {
|
|
540
|
+
printf("(start = %10.4g > %4.2f) or ", start_density,
|
|
541
|
+
start_density_tolerance);
|
|
542
|
+
} else {
|
|
543
|
+
printf(" start = %10.4g ", start_density);
|
|
544
|
+
}
|
|
545
|
+
if (predicted_end_density > end_density_tolerance) {
|
|
546
|
+
printf("( predicted = %10.4g > %4.2f); ", predicted_end_density,
|
|
547
|
+
end_density_tolerance);
|
|
548
|
+
} else {
|
|
549
|
+
printf(" predicted = %10.4g ", predicted_end_density);
|
|
550
|
+
}
|
|
551
|
+
printf("end = %10.4g", end_density);
|
|
552
|
+
if (end_density < 0.1 * predicted_end_density) printf(" !! NW");
|
|
553
|
+
printf("\n");
|
|
554
|
+
}
|
|
555
|
+
stage.num_wrong_new_sparse_decision_++;
|
|
556
|
+
}
|
|
557
|
+
} else {
|
|
558
|
+
// Should have done sparse TRAN
|
|
559
|
+
if (!use_solve_sparse_original_HFactor_logic) {
|
|
560
|
+
// Original logic makes wrong decision to use hyper TRAN
|
|
561
|
+
if (rp) {
|
|
562
|
+
printf(
|
|
563
|
+
"Original: Wrong hyper: (start = %10.4g <= %4.2f) and "
|
|
564
|
+
"(historical = %10.4g <= %4.2f); end = %10.4g",
|
|
565
|
+
start_density, original_start_density_tolerance[tran_stage_type],
|
|
566
|
+
historical_density, historical_density_tolerance[tran_stage_type],
|
|
567
|
+
end_density);
|
|
568
|
+
if (end_density > 10.0 * historical_density) printf(" !! OG");
|
|
569
|
+
printf("\n");
|
|
570
|
+
}
|
|
571
|
+
stage.num_wrong_original_hyper_decision_++;
|
|
572
|
+
}
|
|
573
|
+
if (!use_solve_sparse_new_HFactor_logic) {
|
|
574
|
+
// New logic makes wrong decision to use hyper TRAN
|
|
575
|
+
if (rp) {
|
|
576
|
+
printf(
|
|
577
|
+
"New : Wrong hyper: (start = %10.4g <= %4.2f) and ( "
|
|
578
|
+
"predicted = %10.4g <= %4.2f); end = %10.4g",
|
|
579
|
+
start_density, new_start_density_tolerance[tran_stage_type],
|
|
580
|
+
predicted_end_density,
|
|
581
|
+
predicted_density_tolerance[tran_stage_type], end_density);
|
|
582
|
+
if (end_density > 10.0 * predicted_end_density) printf(" !! NW");
|
|
583
|
+
printf("\n");
|
|
584
|
+
}
|
|
585
|
+
stage.num_wrong_new_hyper_decision_++;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
updateScatterData(start_density, end_density, stage.rhs_density_);
|
|
590
|
+
regressScatterData(stage.rhs_density_);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
void HighsSimplexAnalysis::simplexTimerStart(const HighsInt simplex_clock,
|
|
594
|
+
const HighsInt thread_id) {
|
|
595
|
+
if (!analyse_simplex_time) return;
|
|
596
|
+
// assert(analyse_simplex_time);
|
|
597
|
+
thread_simplex_clocks[thread_id].timer_pointer_->start(
|
|
598
|
+
thread_simplex_clocks[thread_id].clock_[simplex_clock]);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
void HighsSimplexAnalysis::simplexTimerStop(const HighsInt simplex_clock,
|
|
602
|
+
const HighsInt thread_id) {
|
|
603
|
+
if (!analyse_simplex_time) return;
|
|
604
|
+
// assert(analyse_simplex_time);
|
|
605
|
+
thread_simplex_clocks[thread_id].timer_pointer_->stop(
|
|
606
|
+
thread_simplex_clocks[thread_id].clock_[simplex_clock]);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
bool HighsSimplexAnalysis::simplexTimerRunning(const HighsInt simplex_clock,
|
|
610
|
+
const HighsInt thread_id) const {
|
|
611
|
+
if (!analyse_simplex_time) return false;
|
|
612
|
+
// assert(analyse_simplex_time);
|
|
613
|
+
return thread_simplex_clocks[thread_id].timer_pointer_->clock_start
|
|
614
|
+
[thread_simplex_clocks[thread_id].clock_[simplex_clock]] < 0;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
HighsInt HighsSimplexAnalysis::simplexTimerNumCall(
|
|
618
|
+
const HighsInt simplex_clock, const HighsInt thread_id) const {
|
|
619
|
+
if (!analyse_simplex_time) return -1;
|
|
620
|
+
// assert(analyse_simplex_time);
|
|
621
|
+
return thread_simplex_clocks[thread_id]
|
|
622
|
+
.timer_pointer_
|
|
623
|
+
->clock_num_call[thread_simplex_clocks[thread_id].clock_[simplex_clock]];
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
double HighsSimplexAnalysis::simplexTimerRead(const HighsInt simplex_clock,
|
|
627
|
+
const HighsInt thread_id) const {
|
|
628
|
+
if (!analyse_simplex_time) return -1.0;
|
|
629
|
+
// assert(analyse_simplex_time);
|
|
630
|
+
return thread_simplex_clocks[thread_id].timer_pointer_->read(
|
|
631
|
+
thread_simplex_clocks[thread_id].clock_[simplex_clock]);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
HighsTimerClock* HighsSimplexAnalysis::getThreadFactorTimerClockPointer() {
|
|
635
|
+
HighsTimerClock* factor_timer_clock_pointer = NULL;
|
|
636
|
+
if (analyse_factor_time) {
|
|
637
|
+
HighsInt thread_id = highs::parallel::thread_num();
|
|
638
|
+
factor_timer_clock_pointer = &thread_factor_clocks[thread_id];
|
|
639
|
+
}
|
|
640
|
+
return factor_timer_clock_pointer;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
void HighsSimplexAnalysis::iterationRecord() {
|
|
644
|
+
assert(analyse_simplex_summary_data);
|
|
645
|
+
HighsInt AnIterCuIt = simplex_iteration_count;
|
|
646
|
+
if (rebuild_reason > 0) AnIterNumInvert[rebuild_reason]++;
|
|
647
|
+
if (AnIterCuIt > AnIterPrevIt)
|
|
648
|
+
AnIterNumEdWtIt[(HighsInt)edge_weight_mode] += (AnIterCuIt - AnIterPrevIt);
|
|
649
|
+
|
|
650
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[AnIterTraceNumRec];
|
|
651
|
+
// if (simplex_iteration_count ==
|
|
652
|
+
// AnIterTraceIterRec[AnIterTraceNumRec]+AnIterTraceIterDl) {
|
|
653
|
+
if (simplex_iteration_count == lcAnIter.AnIterTraceIter + AnIterTraceIterDl) {
|
|
654
|
+
if (AnIterTraceNumRec == kAnIterTraceMaxNumRec) {
|
|
655
|
+
for (HighsInt rec = 1; rec <= kAnIterTraceMaxNumRec / 2; rec++)
|
|
656
|
+
AnIterTrace[rec] = AnIterTrace[2 * rec];
|
|
657
|
+
AnIterTraceNumRec = AnIterTraceNumRec / 2;
|
|
658
|
+
AnIterTraceIterDl = AnIterTraceIterDl * 2;
|
|
659
|
+
} else {
|
|
660
|
+
AnIterTraceNumRec++;
|
|
661
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[AnIterTraceNumRec];
|
|
662
|
+
lcAnIter.AnIterTraceIter = simplex_iteration_count;
|
|
663
|
+
lcAnIter.AnIterTraceTime = timer_->getWallTime();
|
|
664
|
+
if (average_fraction_of_possible_minor_iterations_performed > 0) {
|
|
665
|
+
lcAnIter.AnIterTraceMulti =
|
|
666
|
+
average_fraction_of_possible_minor_iterations_performed;
|
|
667
|
+
} else {
|
|
668
|
+
lcAnIter.AnIterTraceMulti = 0;
|
|
669
|
+
}
|
|
670
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtran] = col_aq_density;
|
|
671
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaBtranEp] = row_ep_density;
|
|
672
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaPriceAp] = row_ap_density;
|
|
673
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranBfrt] = col_aq_density;
|
|
674
|
+
if (edge_weight_mode == EdgeWeightMode::kSteepestEdge) {
|
|
675
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = row_DSE_density;
|
|
676
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaBtranPse] =
|
|
677
|
+
col_steepest_edge_density;
|
|
678
|
+
lcAnIter.AnIterTraceCostlyDse = costly_DSE_measure;
|
|
679
|
+
} else {
|
|
680
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = 0;
|
|
681
|
+
lcAnIter.AnIterTraceCostlyDse = 0;
|
|
682
|
+
}
|
|
683
|
+
lcAnIter.AnIterTrace_simplex_strategy = (HighsInt)simplex_strategy;
|
|
684
|
+
lcAnIter.AnIterTrace_edge_weight_mode = (HighsInt)edge_weight_mode;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
AnIterPrevIt = AnIterCuIt;
|
|
688
|
+
updateValueDistribution(primal_step, cleanup_primal_step_distribution);
|
|
689
|
+
updateValueDistribution(dual_step, cleanup_dual_step_distribution);
|
|
690
|
+
updateValueDistribution(primal_step, primal_step_distribution);
|
|
691
|
+
updateValueDistribution(dual_step, dual_step_distribution);
|
|
692
|
+
updateValueDistribution(pivot_value_from_column, simplex_pivot_distribution);
|
|
693
|
+
updateValueDistribution(factor_pivot_threshold,
|
|
694
|
+
factor_pivot_threshold_distribution);
|
|
695
|
+
// Only update the distribution of legal values for
|
|
696
|
+
// numerical_trouble. Illegal values are set in PAMI since it's not
|
|
697
|
+
// known in minor iterations
|
|
698
|
+
if (numerical_trouble >= 0)
|
|
699
|
+
updateValueDistribution(numerical_trouble, numerical_trouble_distribution);
|
|
700
|
+
updateValueDistribution(edge_weight_error, edge_weight_error_distribution);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
void HighsSimplexAnalysis::iterationRecordMajor() {
|
|
704
|
+
assert(analyse_simplex_summary_data);
|
|
705
|
+
sum_multi_chosen += multi_chosen;
|
|
706
|
+
sum_multi_finished += multi_finished;
|
|
707
|
+
assert(multi_chosen > 0);
|
|
708
|
+
const double fraction_of_possible_minor_iterations_performed =
|
|
709
|
+
1.0 * multi_finished / multi_chosen;
|
|
710
|
+
if (average_fraction_of_possible_minor_iterations_performed < 0) {
|
|
711
|
+
average_fraction_of_possible_minor_iterations_performed =
|
|
712
|
+
fraction_of_possible_minor_iterations_performed;
|
|
713
|
+
} else {
|
|
714
|
+
average_fraction_of_possible_minor_iterations_performed =
|
|
715
|
+
kRunningAverageMultiplier *
|
|
716
|
+
fraction_of_possible_minor_iterations_performed +
|
|
717
|
+
(1 - kRunningAverageMultiplier) *
|
|
718
|
+
average_fraction_of_possible_minor_iterations_performed;
|
|
719
|
+
}
|
|
720
|
+
if (average_concurrency < 0) {
|
|
721
|
+
average_concurrency = num_concurrency;
|
|
722
|
+
} else {
|
|
723
|
+
average_concurrency = kRunningAverageMultiplier * num_concurrency +
|
|
724
|
+
(1 - kRunningAverageMultiplier) * average_concurrency;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
void HighsSimplexAnalysis::operationRecordBefore(
|
|
729
|
+
const HighsInt operation_type, const HVector& vector,
|
|
730
|
+
const double historical_density) {
|
|
731
|
+
assert(analyse_simplex_summary_data);
|
|
732
|
+
operationRecordBefore(operation_type, vector.count, historical_density);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
void HighsSimplexAnalysis::operationRecordBefore(
|
|
736
|
+
const HighsInt operation_type, const HighsInt current_count,
|
|
737
|
+
const double historical_density) {
|
|
738
|
+
double current_density = 1.0 * current_count / numRow;
|
|
739
|
+
AnIterOpRec& AnIter = AnIterOp[operation_type];
|
|
740
|
+
AnIter.AnIterOpNumCa++;
|
|
741
|
+
if (current_density <= AnIter.AnIterOpHyperCANCEL &&
|
|
742
|
+
historical_density <= AnIter.AnIterOpHyperTRAN)
|
|
743
|
+
AnIter.AnIterOpNumHyperOp++;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
void HighsSimplexAnalysis::operationRecordAfter(const HighsInt operation_type,
|
|
747
|
+
const HVector& vector) {
|
|
748
|
+
assert(analyse_simplex_summary_data);
|
|
749
|
+
operationRecordAfter(operation_type, vector.count);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
void HighsSimplexAnalysis::operationRecordAfter(const HighsInt operation_type,
|
|
753
|
+
const HighsInt result_count) {
|
|
754
|
+
AnIterOpRec& AnIter = AnIterOp[operation_type];
|
|
755
|
+
const double result_density = 1.0 * result_count / AnIter.AnIterOpRsDim;
|
|
756
|
+
if (result_density <= kHyperResult) AnIter.AnIterOpNumHyperRs++;
|
|
757
|
+
if (result_density > 0) {
|
|
758
|
+
AnIter.AnIterOpSumLog10RsDensity += log(result_density) / log(10.0);
|
|
759
|
+
} else {
|
|
760
|
+
/*
|
|
761
|
+
// TODO Investigate these zero norms
|
|
762
|
+
double vectorNorm = 0;
|
|
763
|
+
|
|
764
|
+
for (HighsInt index = 0; index < AnIter.AnIterOpRsDim; index++) {
|
|
765
|
+
double vectorValue = vector.array[index];
|
|
766
|
+
vectorNorm += vectorValue * vectorValue;
|
|
767
|
+
}
|
|
768
|
+
vectorNorm = sqrt(vectorNorm);
|
|
769
|
+
printf("Strange: operation %s has result density = %g: ||vector|| = %g\n",
|
|
770
|
+
AnIter.AnIterOpName.c_str(), result_density, vectorNorm);
|
|
771
|
+
*/
|
|
772
|
+
}
|
|
773
|
+
updateValueDistribution(result_density, AnIter.AnIterOp_density);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
void HighsSimplexAnalysis::summaryReport() {
|
|
777
|
+
assert(analyse_simplex_summary_data);
|
|
778
|
+
HighsInt AnIterNumIter = simplex_iteration_count - AnIterIt0;
|
|
779
|
+
if (AnIterNumIter <= 0) return;
|
|
780
|
+
printf("\nAnalysis of %" HIGHSINT_FORMAT " iterations (%" HIGHSINT_FORMAT
|
|
781
|
+
" to %" HIGHSINT_FORMAT ")\n",
|
|
782
|
+
AnIterNumIter, AnIterIt0 + 1, simplex_iteration_count);
|
|
783
|
+
if (AnIterNumIter <= 0) return;
|
|
784
|
+
HighsInt lc_EdWtNumIter;
|
|
785
|
+
lc_EdWtNumIter = AnIterNumEdWtIt[(HighsInt)EdgeWeightMode::kSteepestEdge];
|
|
786
|
+
if (lc_EdWtNumIter > 0)
|
|
787
|
+
printf("DSE for %12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
788
|
+
"%%) iterations\n",
|
|
789
|
+
lc_EdWtNumIter, (100 * lc_EdWtNumIter) / AnIterNumIter);
|
|
790
|
+
lc_EdWtNumIter = AnIterNumEdWtIt[(HighsInt)EdgeWeightMode::kDevex];
|
|
791
|
+
if (lc_EdWtNumIter > 0)
|
|
792
|
+
printf("Dvx for %12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
793
|
+
"%%) iterations\n",
|
|
794
|
+
lc_EdWtNumIter, (100 * lc_EdWtNumIter) / AnIterNumIter);
|
|
795
|
+
lc_EdWtNumIter = AnIterNumEdWtIt[(HighsInt)EdgeWeightMode::kDantzig];
|
|
796
|
+
if (lc_EdWtNumIter > 0)
|
|
797
|
+
printf("Dan for %12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
798
|
+
"%%) iterations\n",
|
|
799
|
+
lc_EdWtNumIter, (100 * lc_EdWtNumIter) / AnIterNumIter);
|
|
800
|
+
for (HighsInt k = 0; k < kNumSimplexNlaOperation; k++) {
|
|
801
|
+
AnIterOpRec& AnIter = AnIterOp[k];
|
|
802
|
+
HighsInt lcNumCa = AnIter.AnIterOpNumCa;
|
|
803
|
+
printf("\n%-10s performed %" HIGHSINT_FORMAT " times\n",
|
|
804
|
+
AnIter.AnIterOpName.c_str(), AnIter.AnIterOpNumCa);
|
|
805
|
+
if (lcNumCa > 0) {
|
|
806
|
+
HighsInt lcHyperOp = AnIter.AnIterOpNumHyperOp;
|
|
807
|
+
HighsInt lcHyperRs = AnIter.AnIterOpNumHyperRs;
|
|
808
|
+
HighsInt pctHyperOp = (100 * lcHyperOp) / lcNumCa;
|
|
809
|
+
HighsInt pctHyperRs = (100 * lcHyperRs) / lcNumCa;
|
|
810
|
+
double lcRsDensity =
|
|
811
|
+
pow(10.0, AnIter.AnIterOpSumLog10RsDensity / lcNumCa);
|
|
812
|
+
HighsInt lcAnIterOpRsDim = AnIter.AnIterOpRsDim;
|
|
813
|
+
HighsInt lcNumNNz = lcRsDensity * lcAnIterOpRsDim;
|
|
814
|
+
printf("%12" HIGHSINT_FORMAT
|
|
815
|
+
" hyper-sparse operations (%3" HIGHSINT_FORMAT "%%)\n",
|
|
816
|
+
lcHyperOp, pctHyperOp);
|
|
817
|
+
printf("%12" HIGHSINT_FORMAT
|
|
818
|
+
" hyper-sparse results (%3" HIGHSINT_FORMAT "%%)\n",
|
|
819
|
+
lcHyperRs, pctHyperRs);
|
|
820
|
+
printf("%12g density of result (%" HIGHSINT_FORMAT " / %" HIGHSINT_FORMAT
|
|
821
|
+
" nonzeros)\n",
|
|
822
|
+
lcRsDensity, lcNumNNz, lcAnIterOpRsDim);
|
|
823
|
+
logValueDistribution(log_options, AnIter.AnIterOp_density,
|
|
824
|
+
AnIter.AnIterOpRsDim);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
HighsInt NumInvert = 0;
|
|
828
|
+
|
|
829
|
+
HighsInt last_rebuild_reason = kRebuildReasonCount - 1;
|
|
830
|
+
for (HighsInt k = 1; k <= last_rebuild_reason; k++)
|
|
831
|
+
NumInvert += AnIterNumInvert[k];
|
|
832
|
+
if (NumInvert > 0) {
|
|
833
|
+
HighsInt lcNumInvert = 0;
|
|
834
|
+
printf("\nInvert performed %" HIGHSINT_FORMAT
|
|
835
|
+
" times: average frequency = %" HIGHSINT_FORMAT "\n",
|
|
836
|
+
NumInvert, AnIterNumIter / NumInvert);
|
|
837
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonUpdateLimitReached];
|
|
838
|
+
if (lcNumInvert > 0)
|
|
839
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
840
|
+
"%%) Invert operations due to update limit reached\n",
|
|
841
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
842
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonSyntheticClockSaysInvert];
|
|
843
|
+
if (lcNumInvert > 0)
|
|
844
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
845
|
+
"%%) Invert operations due to pseudo-clock\n",
|
|
846
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
847
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonPossiblyOptimal];
|
|
848
|
+
if (lcNumInvert > 0)
|
|
849
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
850
|
+
"%%) Invert operations due to possibly optimal\n",
|
|
851
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
852
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonPossiblyPrimalUnbounded];
|
|
853
|
+
if (lcNumInvert > 0)
|
|
854
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
855
|
+
"%%) Invert operations due to possibly primal unbounded\n",
|
|
856
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
857
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonPossiblyDualUnbounded];
|
|
858
|
+
if (lcNumInvert > 0)
|
|
859
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
860
|
+
"%%) Invert operations due to possibly dual unbounded\n",
|
|
861
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
862
|
+
lcNumInvert = AnIterNumInvert[kRebuildReasonPossiblySingularBasis];
|
|
863
|
+
if (lcNumInvert > 0)
|
|
864
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
865
|
+
"%%) Invert operations due to possibly singular basis\n",
|
|
866
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
867
|
+
lcNumInvert =
|
|
868
|
+
AnIterNumInvert[kRebuildReasonPrimalInfeasibleInPrimalSimplex];
|
|
869
|
+
if (lcNumInvert > 0)
|
|
870
|
+
printf("%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
871
|
+
"%%) Invert operations due to primal infeasible in primal "
|
|
872
|
+
"simplex\n",
|
|
873
|
+
lcNumInvert, (100 * lcNumInvert) / NumInvert);
|
|
874
|
+
}
|
|
875
|
+
HighsInt suPrice = num_col_price + num_row_price + num_row_price_with_switch;
|
|
876
|
+
if (suPrice > 0) {
|
|
877
|
+
printf("\n%12" HIGHSINT_FORMAT " Price operations:\n", suPrice);
|
|
878
|
+
printf("%12" HIGHSINT_FORMAT " Col Price (%3" HIGHSINT_FORMAT "%%)\n",
|
|
879
|
+
num_col_price, (100 * num_col_price) / suPrice);
|
|
880
|
+
printf("%12" HIGHSINT_FORMAT " Row Price (%3" HIGHSINT_FORMAT "%%)\n",
|
|
881
|
+
num_row_price, (100 * num_row_price) / suPrice);
|
|
882
|
+
printf("%12" HIGHSINT_FORMAT " Row PriceWSw (%3" HIGHSINT_FORMAT "%%)\n",
|
|
883
|
+
num_row_price_with_switch,
|
|
884
|
+
(100 * num_row_price_with_switch / suPrice));
|
|
885
|
+
}
|
|
886
|
+
printf("\n%12" HIGHSINT_FORMAT " (%3" HIGHSINT_FORMAT
|
|
887
|
+
"%%) costly DSE iterations\n",
|
|
888
|
+
num_costly_DSE_iteration,
|
|
889
|
+
(100 * num_costly_DSE_iteration) / AnIterNumIter);
|
|
890
|
+
|
|
891
|
+
// Look for any Devex data to summarise
|
|
892
|
+
if (num_devex_framework) {
|
|
893
|
+
printf("\nDevex summary\n");
|
|
894
|
+
printf("%12" HIGHSINT_FORMAT " Devex frameworks\n", num_devex_framework);
|
|
895
|
+
printf("%12" HIGHSINT_FORMAT " average number of iterations\n",
|
|
896
|
+
AnIterNumEdWtIt[(HighsInt)EdgeWeightMode::kDevex] /
|
|
897
|
+
num_devex_framework);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (num_primal_cycling_detections + num_dual_cycling_detections) {
|
|
901
|
+
printf("\nCycling detected %" HIGHSINT_FORMAT " times:",
|
|
902
|
+
num_primal_cycling_detections + num_dual_cycling_detections);
|
|
903
|
+
if (num_primal_cycling_detections) {
|
|
904
|
+
printf("%" HIGHSINT_FORMAT " in primal simplex",
|
|
905
|
+
num_primal_cycling_detections);
|
|
906
|
+
if (num_dual_cycling_detections) printf("; ");
|
|
907
|
+
}
|
|
908
|
+
if (num_dual_cycling_detections)
|
|
909
|
+
printf("%" HIGHSINT_FORMAT " in dual simplex",
|
|
910
|
+
num_dual_cycling_detections);
|
|
911
|
+
printf("\n");
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
const double average_quad_chuzc_size =
|
|
915
|
+
num_quad_chuzc ? sum_quad_chuzc_size / num_quad_chuzc : 0;
|
|
916
|
+
const double average_heap_chuzc_size =
|
|
917
|
+
num_heap_chuzc ? sum_heap_chuzc_size / num_heap_chuzc : 0;
|
|
918
|
+
if (num_quad_chuzc + num_heap_chuzc) {
|
|
919
|
+
printf("\nQuad/heap CHUZC summary\n");
|
|
920
|
+
if (num_quad_chuzc)
|
|
921
|
+
printf("%12" HIGHSINT_FORMAT
|
|
922
|
+
" quad CHUZC: average / max = %d / %" HIGHSINT_FORMAT "\n",
|
|
923
|
+
num_quad_chuzc, (int)average_quad_chuzc_size, max_quad_chuzc_size);
|
|
924
|
+
if (num_heap_chuzc)
|
|
925
|
+
printf("%12" HIGHSINT_FORMAT
|
|
926
|
+
" heap CHUZC: average / max = %d / %" HIGHSINT_FORMAT "\n",
|
|
927
|
+
num_heap_chuzc, (int)average_heap_chuzc_size, max_heap_chuzc_size);
|
|
928
|
+
}
|
|
929
|
+
printf("\ngrepQuadHeapChuzc,%s,%s, %" HIGHSINT_FORMAT
|
|
930
|
+
", ,%d,%" HIGHSINT_FORMAT ", %" HIGHSINT_FORMAT
|
|
931
|
+
", ,%d,%" HIGHSINT_FORMAT "\n",
|
|
932
|
+
model_name_.c_str(), lp_name_.c_str(), num_quad_chuzc,
|
|
933
|
+
(int)average_quad_chuzc_size, max_quad_chuzc_size, num_heap_chuzc,
|
|
934
|
+
(int)average_heap_chuzc_size, max_heap_chuzc_size);
|
|
935
|
+
|
|
936
|
+
if (num_improve_choose_column_row_call >= 0) {
|
|
937
|
+
printf("\nDual_CHUZC: Number of improve CHUZC row calls = %d\n",
|
|
938
|
+
(int)num_improve_choose_column_row_call);
|
|
939
|
+
printf("Dual_CHUZC: Number of pivots removed from pack = %d\n",
|
|
940
|
+
(int)num_remove_pivot_from_pack);
|
|
941
|
+
} else {
|
|
942
|
+
assert(num_remove_pivot_from_pack == 0);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
if (num_correct_dual_primal_flip + num_correct_dual_cost_shift +
|
|
946
|
+
num_single_cost_shift) {
|
|
947
|
+
printf("\nFlip/shift summary\n");
|
|
948
|
+
if (num_correct_dual_primal_flip) {
|
|
949
|
+
printf(
|
|
950
|
+
"%12" HIGHSINT_FORMAT
|
|
951
|
+
" correct dual primal flips (max = %g) for min dual infeasibility "
|
|
952
|
+
"= %g\n",
|
|
953
|
+
num_correct_dual_primal_flip, max_correct_dual_primal_flip,
|
|
954
|
+
min_correct_dual_primal_flip_dual_infeasibility);
|
|
955
|
+
}
|
|
956
|
+
if (num_correct_dual_cost_shift) {
|
|
957
|
+
printf(
|
|
958
|
+
"%12" HIGHSINT_FORMAT
|
|
959
|
+
" correct dual cost shifts (max = %g) for max dual infeasibility "
|
|
960
|
+
"= %g\n",
|
|
961
|
+
num_correct_dual_cost_shift, max_correct_dual_cost_shift,
|
|
962
|
+
max_correct_dual_cost_shift_dual_infeasibility);
|
|
963
|
+
}
|
|
964
|
+
if (num_single_cost_shift) {
|
|
965
|
+
printf("%12" HIGHSINT_FORMAT
|
|
966
|
+
" single cost shifts (sum / max = %g / %g)\n",
|
|
967
|
+
num_single_cost_shift, sum_single_cost_shift,
|
|
968
|
+
max_single_cost_shift);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
printf("\ngrepFlipShift,%s,%s,%" HIGHSINT_FORMAT ",%g,%g,%" HIGHSINT_FORMAT
|
|
972
|
+
",%g,%g,%" HIGHSINT_FORMAT ",%g,%g\n",
|
|
973
|
+
model_name_.c_str(), lp_name_.c_str(), num_correct_dual_primal_flip,
|
|
974
|
+
max_correct_dual_primal_flip,
|
|
975
|
+
min_correct_dual_primal_flip_dual_infeasibility,
|
|
976
|
+
num_correct_dual_cost_shift, max_correct_dual_cost_shift,
|
|
977
|
+
max_correct_dual_cost_shift_dual_infeasibility, num_single_cost_shift,
|
|
978
|
+
sum_single_cost_shift, max_single_cost_shift);
|
|
979
|
+
|
|
980
|
+
// Look for any PAMI data to summarise
|
|
981
|
+
if (sum_multi_chosen > 0) {
|
|
982
|
+
const HighsInt pct_minor_iterations_performed =
|
|
983
|
+
(100 * sum_multi_finished) / sum_multi_chosen;
|
|
984
|
+
printf("\nPAMI summary: for average of %0.1g threads \n",
|
|
985
|
+
average_concurrency);
|
|
986
|
+
printf("%12" HIGHSINT_FORMAT " Major iterations\n", multi_iteration_count);
|
|
987
|
+
printf("%12" HIGHSINT_FORMAT " Minor iterations\n", sum_multi_finished);
|
|
988
|
+
printf("%12" HIGHSINT_FORMAT
|
|
989
|
+
" Total rows chosen: performed %3" HIGHSINT_FORMAT
|
|
990
|
+
"%% of possible minor "
|
|
991
|
+
"iterations\n\n",
|
|
992
|
+
sum_multi_chosen, pct_minor_iterations_performed);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
996
|
+
"\nCost perturbation summary\n");
|
|
997
|
+
logValueDistribution(log_options, cost_perturbation1_distribution);
|
|
998
|
+
logValueDistribution(log_options, cost_perturbation2_distribution);
|
|
999
|
+
|
|
1000
|
+
logValueDistribution(log_options, before_ftran_upper_sparse_density, numRow);
|
|
1001
|
+
logValueDistribution(log_options, ftran_upper_sparse_density, numRow);
|
|
1002
|
+
logValueDistribution(log_options, before_ftran_upper_hyper_density, numRow);
|
|
1003
|
+
logValueDistribution(log_options, ftran_upper_hyper_density, numRow);
|
|
1004
|
+
logValueDistribution(log_options, primal_step_distribution);
|
|
1005
|
+
logValueDistribution(log_options, dual_step_distribution);
|
|
1006
|
+
logValueDistribution(log_options, simplex_pivot_distribution);
|
|
1007
|
+
logValueDistribution(log_options, factor_pivot_threshold_distribution);
|
|
1008
|
+
logValueDistribution(log_options, numerical_trouble_distribution);
|
|
1009
|
+
logValueDistribution(log_options, edge_weight_error_distribution);
|
|
1010
|
+
logValueDistribution(log_options, cleanup_dual_change_distribution);
|
|
1011
|
+
logValueDistribution(log_options, cleanup_primal_step_distribution);
|
|
1012
|
+
logValueDistribution(log_options, cleanup_dual_step_distribution);
|
|
1013
|
+
logValueDistribution(log_options, cleanup_primal_change_distribution);
|
|
1014
|
+
|
|
1015
|
+
if (AnIterTraceIterDl >= 100) {
|
|
1016
|
+
// Possibly (usually) add a temporary record for the final
|
|
1017
|
+
// iterations: may end up with one more than
|
|
1018
|
+
// kAnIterTraceMaxNumRec records, so ensure that there is
|
|
1019
|
+
// enough space in the arrays
|
|
1020
|
+
//
|
|
1021
|
+
const bool add_extra_record =
|
|
1022
|
+
simplex_iteration_count >
|
|
1023
|
+
AnIterTrace[AnIterTraceNumRec].AnIterTraceIter;
|
|
1024
|
+
if (add_extra_record) {
|
|
1025
|
+
AnIterTraceNumRec++;
|
|
1026
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[AnIterTraceNumRec];
|
|
1027
|
+
lcAnIter.AnIterTraceIter = simplex_iteration_count;
|
|
1028
|
+
lcAnIter.AnIterTraceTime = timer_->getWallTime();
|
|
1029
|
+
if (average_fraction_of_possible_minor_iterations_performed > 0) {
|
|
1030
|
+
lcAnIter.AnIterTraceMulti =
|
|
1031
|
+
average_fraction_of_possible_minor_iterations_performed;
|
|
1032
|
+
} else {
|
|
1033
|
+
lcAnIter.AnIterTraceMulti = 0;
|
|
1034
|
+
}
|
|
1035
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtran] = col_aq_density;
|
|
1036
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaBtranEp] = row_ep_density;
|
|
1037
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaPriceAp] = row_ap_density;
|
|
1038
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranBfrt] = col_aq_density;
|
|
1039
|
+
if (edge_weight_mode == EdgeWeightMode::kSteepestEdge) {
|
|
1040
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = row_DSE_density;
|
|
1041
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaBtranPse] =
|
|
1042
|
+
col_steepest_edge_density;
|
|
1043
|
+
lcAnIter.AnIterTraceCostlyDse = costly_DSE_measure;
|
|
1044
|
+
} else {
|
|
1045
|
+
lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = 0;
|
|
1046
|
+
lcAnIter.AnIterTraceCostlyDse = 0;
|
|
1047
|
+
}
|
|
1048
|
+
lcAnIter.AnIterTrace_simplex_strategy = (HighsInt)simplex_strategy;
|
|
1049
|
+
lcAnIter.AnIterTrace_edge_weight_mode = (HighsInt)edge_weight_mode;
|
|
1050
|
+
}
|
|
1051
|
+
// Determine whether the Multi and steepest edge columns should be reported
|
|
1052
|
+
double su_multi_values = 0;
|
|
1053
|
+
double su_dse_values = 0;
|
|
1054
|
+
double su_pse_values = 0;
|
|
1055
|
+
for (HighsInt rec = 1; rec <= AnIterTraceNumRec; rec++) {
|
|
1056
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[rec];
|
|
1057
|
+
su_multi_values += fabs(lcAnIter.AnIterTraceMulti);
|
|
1058
|
+
su_dse_values += fabs(lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse]);
|
|
1059
|
+
su_pse_values += fabs(lcAnIter.AnIterTraceDensity[kSimplexNlaBtranPse]);
|
|
1060
|
+
}
|
|
1061
|
+
const bool report_multi = su_multi_values > 0;
|
|
1062
|
+
const bool rp_dual_steepest_edge = su_dse_values > 0;
|
|
1063
|
+
const bool rp_primal_steepest_edge = su_pse_values > 0;
|
|
1064
|
+
printf("\n Iteration speed analysis\n");
|
|
1065
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[0];
|
|
1066
|
+
HighsInt fmIter = lcAnIter.AnIterTraceIter;
|
|
1067
|
+
double fmTime = lcAnIter.AnIterTraceTime;
|
|
1068
|
+
printf(" Iter ( FmIter: ToIter) Time Iter/sec ");
|
|
1069
|
+
if (report_multi) printf("| PAMI ");
|
|
1070
|
+
printf("| C_Aq R_Ep R_Ap ");
|
|
1071
|
+
if (rp_dual_steepest_edge) printf(" DSE ");
|
|
1072
|
+
if (rp_primal_steepest_edge) printf(" PSE ");
|
|
1073
|
+
printf("| EdWt ");
|
|
1074
|
+
if (rp_dual_steepest_edge) {
|
|
1075
|
+
printf("| CostlyDse\n");
|
|
1076
|
+
} else {
|
|
1077
|
+
printf("\n");
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
for (HighsInt rec = 1; rec <= AnIterTraceNumRec; rec++) {
|
|
1081
|
+
AnIterTraceRec& lcAnIter = AnIterTrace[rec];
|
|
1082
|
+
HighsInt toIter = lcAnIter.AnIterTraceIter;
|
|
1083
|
+
double toTime = lcAnIter.AnIterTraceTime;
|
|
1084
|
+
HighsInt dlIter = toIter - fmIter;
|
|
1085
|
+
if (rec < AnIterTraceNumRec && dlIter != AnIterTraceIterDl)
|
|
1086
|
+
printf("STRANGE: %" HIGHSINT_FORMAT
|
|
1087
|
+
" = dlIter != AnIterTraceIterDl = %" HIGHSINT_FORMAT "\n",
|
|
1088
|
+
dlIter, AnIterTraceIterDl);
|
|
1089
|
+
double dlTime = toTime - fmTime;
|
|
1090
|
+
HighsInt iterSpeed = 0;
|
|
1091
|
+
if (dlTime > 0) iterSpeed = dlIter / dlTime;
|
|
1092
|
+
HighsInt lc_edge_weight_mode = lcAnIter.AnIterTrace_edge_weight_mode;
|
|
1093
|
+
std::string str_edge_weight_mode;
|
|
1094
|
+
if (lc_edge_weight_mode == (HighsInt)EdgeWeightMode::kSteepestEdge)
|
|
1095
|
+
str_edge_weight_mode = "DSE";
|
|
1096
|
+
else if (lc_edge_weight_mode == (HighsInt)EdgeWeightMode::kDevex)
|
|
1097
|
+
str_edge_weight_mode = "Dvx";
|
|
1098
|
+
else if (lc_edge_weight_mode == (HighsInt)EdgeWeightMode::kDantzig)
|
|
1099
|
+
str_edge_weight_mode = "Dan";
|
|
1100
|
+
else
|
|
1101
|
+
str_edge_weight_mode = "XXX";
|
|
1102
|
+
printf("%12" HIGHSINT_FORMAT " (%12" HIGHSINT_FORMAT
|
|
1103
|
+
":%12" HIGHSINT_FORMAT ") %9.4f %12" HIGHSINT_FORMAT " ",
|
|
1104
|
+
dlIter, fmIter, toIter, dlTime, iterSpeed);
|
|
1105
|
+
if (report_multi) {
|
|
1106
|
+
const HighsInt pct = (100 * lcAnIter.AnIterTraceMulti);
|
|
1107
|
+
printf("| %3" HIGHSINT_FORMAT " ", pct);
|
|
1108
|
+
}
|
|
1109
|
+
printf("|");
|
|
1110
|
+
printOneDensity(lcAnIter.AnIterTraceDensity[kSimplexNlaFtran]);
|
|
1111
|
+
printOneDensity(lcAnIter.AnIterTraceDensity[kSimplexNlaBtranEp]);
|
|
1112
|
+
printOneDensity(lcAnIter.AnIterTraceDensity[kSimplexNlaPriceAp]);
|
|
1113
|
+
if (rp_dual_steepest_edge) {
|
|
1114
|
+
double use_DSE_density;
|
|
1115
|
+
if (lc_edge_weight_mode == (HighsInt)EdgeWeightMode::kSteepestEdge) {
|
|
1116
|
+
use_DSE_density = lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse];
|
|
1117
|
+
} else {
|
|
1118
|
+
use_DSE_density = 0;
|
|
1119
|
+
}
|
|
1120
|
+
printOneDensity(use_DSE_density);
|
|
1121
|
+
}
|
|
1122
|
+
printf(" | %3s ", str_edge_weight_mode.c_str());
|
|
1123
|
+
if (rp_dual_steepest_edge) {
|
|
1124
|
+
double use_costly_dse;
|
|
1125
|
+
printf("| ");
|
|
1126
|
+
if (lc_edge_weight_mode == (HighsInt)EdgeWeightMode::kSteepestEdge) {
|
|
1127
|
+
use_costly_dse = lcAnIter.AnIterTraceCostlyDse;
|
|
1128
|
+
} else {
|
|
1129
|
+
use_costly_dse = 0;
|
|
1130
|
+
}
|
|
1131
|
+
printOneDensity(use_costly_dse);
|
|
1132
|
+
}
|
|
1133
|
+
printf("\n");
|
|
1134
|
+
fmIter = toIter;
|
|
1135
|
+
fmTime = toTime;
|
|
1136
|
+
}
|
|
1137
|
+
printf("\n");
|
|
1138
|
+
// Remove any temporary record added for the final iterations
|
|
1139
|
+
if (add_extra_record) AnIterTraceNumRec--;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
void HighsSimplexAnalysis::summaryReportFactor() const {
|
|
1144
|
+
for (HighsInt tran_stage_type = 0; tran_stage_type < NUM_TRAN_STAGE_TYPE;
|
|
1145
|
+
tran_stage_type++) {
|
|
1146
|
+
const TranStageAnalysis& stage = tran_stage[tran_stage_type];
|
|
1147
|
+
// printScatterData(stage.name_, stage.rhs_density_);
|
|
1148
|
+
printScatterDataRegressionComparison(stage.name_, stage.rhs_density_);
|
|
1149
|
+
if (!stage.num_decision_) return;
|
|
1150
|
+
printf("Of %10" HIGHSINT_FORMAT
|
|
1151
|
+
" Sps/Hyper decisions made using regression:\n",
|
|
1152
|
+
stage.num_decision_);
|
|
1153
|
+
printf(" %10" HIGHSINT_FORMAT " wrong sparseTRAN; %10" HIGHSINT_FORMAT
|
|
1154
|
+
" wrong hyperTRAN: using original "
|
|
1155
|
+
"logic\n",
|
|
1156
|
+
stage.num_wrong_original_sparse_decision_,
|
|
1157
|
+
stage.num_wrong_original_hyper_decision_);
|
|
1158
|
+
printf(" %10" HIGHSINT_FORMAT " wrong sparseTRAN; %10" HIGHSINT_FORMAT
|
|
1159
|
+
" wrong hyperTRAN: using new "
|
|
1160
|
+
"logic\n",
|
|
1161
|
+
stage.num_wrong_new_sparse_decision_,
|
|
1162
|
+
stage.num_wrong_new_hyper_decision_);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
void HighsSimplexAnalysis::reportSimplexTimer() const {
|
|
1167
|
+
assert(analyse_simplex_time);
|
|
1168
|
+
SimplexTimer simplex_timer;
|
|
1169
|
+
simplex_timer.reportSimplexInnerClock(thread_simplex_clocks[0]);
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
void HighsSimplexAnalysis::reportFactorTimer() {
|
|
1173
|
+
assert(analyse_factor_time);
|
|
1174
|
+
FactorTimer factor_timer;
|
|
1175
|
+
HighsInt max_threads = highs::parallel::num_threads();
|
|
1176
|
+
for (HighsInt i = 0; i < max_threads; i++) {
|
|
1177
|
+
// for (HighsTimerClock clock : thread_factor_clocks) {
|
|
1178
|
+
printf("reportFactorTimer: HFactor clocks for thread %" HIGHSINT_FORMAT
|
|
1179
|
+
" / %" HIGHSINT_FORMAT "\n",
|
|
1180
|
+
i, max_threads - 1);
|
|
1181
|
+
factor_timer.reportFactorClock(thread_factor_clocks[i]);
|
|
1182
|
+
}
|
|
1183
|
+
if (max_threads > 1) {
|
|
1184
|
+
HighsTimer* timer_pointer = thread_factor_clocks[0].timer_pointer_;
|
|
1185
|
+
HighsTimerClock all_factor_clocks;
|
|
1186
|
+
all_factor_clocks.timer_pointer_ = timer_pointer;
|
|
1187
|
+
vector<HighsInt>& clock = all_factor_clocks.clock_;
|
|
1188
|
+
factor_timer.initialiseFactorClocks(all_factor_clocks);
|
|
1189
|
+
for (HighsInt i = 0; i < max_threads; i++) {
|
|
1190
|
+
vector<HighsInt>& thread_clock = thread_factor_clocks[i].clock_;
|
|
1191
|
+
for (HighsInt clock_id = 0; clock_id < FactorNumClock; clock_id++) {
|
|
1192
|
+
HighsInt all_factor_iClock = clock[clock_id];
|
|
1193
|
+
HighsInt thread_factor_iClock = thread_clock[clock_id];
|
|
1194
|
+
timer_pointer->clock_num_call[all_factor_iClock] +=
|
|
1195
|
+
timer_pointer->clock_num_call[thread_factor_iClock];
|
|
1196
|
+
timer_pointer->clock_time[all_factor_iClock] +=
|
|
1197
|
+
timer_pointer->clock_time[thread_factor_iClock];
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
printf("reportFactorTimer: HFactor clocks for all %" HIGHSINT_FORMAT
|
|
1201
|
+
" threads\n",
|
|
1202
|
+
max_threads);
|
|
1203
|
+
factor_timer.reportFactorClock(all_factor_clocks);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
void HighsSimplexAnalysis::updateInvertFormData(const HFactor& factor) {
|
|
1208
|
+
assert(analyse_factor_data);
|
|
1209
|
+
const bool report_kernel = false;
|
|
1210
|
+
num_invert++;
|
|
1211
|
+
assert(factor.basis_matrix_num_el);
|
|
1212
|
+
double invert_fill_factor =
|
|
1213
|
+
((1.0 * factor.invert_num_el) / factor.basis_matrix_num_el);
|
|
1214
|
+
if (report_kernel) printf("INVERT fill = %6.2f", invert_fill_factor);
|
|
1215
|
+
sum_invert_fill_factor += invert_fill_factor;
|
|
1216
|
+
running_average_invert_fill_factor =
|
|
1217
|
+
0.95 * running_average_invert_fill_factor + 0.05 * invert_fill_factor;
|
|
1218
|
+
|
|
1219
|
+
double kernel_relative_dim = (1.0 * factor.kernel_dim) / numRow;
|
|
1220
|
+
if (report_kernel) printf("; kernel dim = %11.4g", kernel_relative_dim);
|
|
1221
|
+
if (factor.kernel_dim) {
|
|
1222
|
+
num_kernel++;
|
|
1223
|
+
max_kernel_dim = max(kernel_relative_dim, max_kernel_dim);
|
|
1224
|
+
sum_kernel_dim += kernel_relative_dim;
|
|
1225
|
+
running_average_kernel_dim =
|
|
1226
|
+
0.95 * running_average_kernel_dim + 0.05 * kernel_relative_dim;
|
|
1227
|
+
|
|
1228
|
+
HighsInt kernel_invert_num_el =
|
|
1229
|
+
factor.invert_num_el -
|
|
1230
|
+
(factor.basis_matrix_num_el - factor.kernel_num_el);
|
|
1231
|
+
assert(factor.kernel_num_el);
|
|
1232
|
+
double kernel_fill_factor =
|
|
1233
|
+
(1.0 * kernel_invert_num_el) / factor.kernel_num_el;
|
|
1234
|
+
sum_kernel_fill_factor += kernel_fill_factor;
|
|
1235
|
+
running_average_kernel_fill_factor =
|
|
1236
|
+
0.95 * running_average_kernel_fill_factor + 0.05 * kernel_fill_factor;
|
|
1237
|
+
if (report_kernel) printf("; fill = %6.2f", kernel_fill_factor);
|
|
1238
|
+
const double kMajorKernelRelativeDimThreshold = 0.1;
|
|
1239
|
+
if (kernel_relative_dim > kMajorKernelRelativeDimThreshold) {
|
|
1240
|
+
num_major_kernel++;
|
|
1241
|
+
sum_major_kernel_fill_factor += kernel_fill_factor;
|
|
1242
|
+
running_average_major_kernel_fill_factor =
|
|
1243
|
+
0.95 * running_average_major_kernel_fill_factor +
|
|
1244
|
+
0.05 * kernel_fill_factor;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
if (report_kernel) printf("\n");
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
void HighsSimplexAnalysis::reportInvertFormData() const {
|
|
1251
|
+
assert(analyse_factor_data);
|
|
1252
|
+
printf("grep_kernel,%s,%s,%" HIGHSINT_FORMAT ",%" HIGHSINT_FORMAT
|
|
1253
|
+
",%" HIGHSINT_FORMAT ",",
|
|
1254
|
+
model_name_.c_str(), lp_name_.c_str(), num_invert, num_kernel,
|
|
1255
|
+
num_major_kernel);
|
|
1256
|
+
if (num_kernel) printf("%g", sum_kernel_dim / num_kernel);
|
|
1257
|
+
printf(",%g,%g,", running_average_kernel_dim, max_kernel_dim);
|
|
1258
|
+
if (num_invert) printf("Fill-in,%g", sum_invert_fill_factor / num_invert);
|
|
1259
|
+
printf(",");
|
|
1260
|
+
if (num_kernel) printf("%g", sum_kernel_fill_factor / num_kernel);
|
|
1261
|
+
printf(",");
|
|
1262
|
+
if (num_major_kernel)
|
|
1263
|
+
printf("%g", sum_major_kernel_fill_factor / num_major_kernel);
|
|
1264
|
+
printf(",%g,%g,%g\n", running_average_invert_fill_factor,
|
|
1265
|
+
running_average_kernel_fill_factor,
|
|
1266
|
+
running_average_major_kernel_fill_factor);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
void HighsSimplexAnalysis::iterationReport(const bool header) {
|
|
1270
|
+
analysis_log = std::unique_ptr<std::stringstream>(new std::stringstream());
|
|
1271
|
+
if (!header) {
|
|
1272
|
+
if (dualAlgorithm()) {
|
|
1273
|
+
if (pivotal_row_index < 0) return;
|
|
1274
|
+
} else {
|
|
1275
|
+
if (entering_variable < 0) return;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
reportAlgorithmPhase(header);
|
|
1279
|
+
reportIterationObjective(header);
|
|
1280
|
+
if (analyse_simplex_runtime_data) {
|
|
1281
|
+
reportDensity(header);
|
|
1282
|
+
reportIterationData(header);
|
|
1283
|
+
reportInfeasibility(header);
|
|
1284
|
+
}
|
|
1285
|
+
highsLogDev(log_options, kIterationReportLogType, "%s\n",
|
|
1286
|
+
analysis_log->str().c_str());
|
|
1287
|
+
if (!header) num_iteration_report_since_last_header++;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
void HighsSimplexAnalysis::reportAlgorithmPhase(const bool header) {
|
|
1291
|
+
if (header) {
|
|
1292
|
+
*analysis_log << " ";
|
|
1293
|
+
} else {
|
|
1294
|
+
std::string algorithm_name;
|
|
1295
|
+
if (dualAlgorithm()) {
|
|
1296
|
+
algorithm_name = "Du";
|
|
1297
|
+
} else {
|
|
1298
|
+
algorithm_name = "Pr";
|
|
1299
|
+
}
|
|
1300
|
+
*analysis_log << highsFormatToString("%2sPh%1" HIGHSINT_FORMAT,
|
|
1301
|
+
algorithm_name.c_str(), solve_phase);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
void HighsSimplexAnalysis::reportIterationObjective(const bool header) {
|
|
1306
|
+
if (header) {
|
|
1307
|
+
*analysis_log << " Iteration Objective ";
|
|
1308
|
+
} else {
|
|
1309
|
+
*analysis_log << highsFormatToString(" %10" HIGHSINT_FORMAT " %20.10e",
|
|
1310
|
+
simplex_iteration_count,
|
|
1311
|
+
objective_value);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
void HighsSimplexAnalysis::reportInfeasibility(const bool header) {
|
|
1316
|
+
if (header) {
|
|
1317
|
+
*analysis_log << " Infeasibilities num(sum)";
|
|
1318
|
+
} else {
|
|
1319
|
+
// Primal infeasibility information may not be known if dual ray
|
|
1320
|
+
// has proved primal infeasibility
|
|
1321
|
+
if (num_primal_infeasibility <= kHighsIllegalInfeasibilityCount ||
|
|
1322
|
+
sum_primal_infeasibility >= kHighsIllegalInfeasibilityMeasure)
|
|
1323
|
+
return;
|
|
1324
|
+
if (solve_phase == 1) {
|
|
1325
|
+
*analysis_log << highsFormatToString(" Ph1: %" HIGHSINT_FORMAT "(%g)",
|
|
1326
|
+
num_primal_infeasibility,
|
|
1327
|
+
sum_primal_infeasibility);
|
|
1328
|
+
} else {
|
|
1329
|
+
*analysis_log << highsFormatToString(" Pr: %" HIGHSINT_FORMAT "(%g)",
|
|
1330
|
+
num_primal_infeasibility,
|
|
1331
|
+
sum_primal_infeasibility);
|
|
1332
|
+
}
|
|
1333
|
+
if (sum_dual_infeasibility > 0) {
|
|
1334
|
+
*analysis_log << highsFormatToString("; Du: %" HIGHSINT_FORMAT "(%g)",
|
|
1335
|
+
num_dual_infeasibility,
|
|
1336
|
+
sum_dual_infeasibility);
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
void HighsSimplexAnalysis::reportThreads(const bool header) {
|
|
1342
|
+
assert(analyse_simplex_runtime_data);
|
|
1343
|
+
if (header) {
|
|
1344
|
+
*analysis_log << highsFormatToString(" Concurr.");
|
|
1345
|
+
} else if (num_concurrency > 0) {
|
|
1346
|
+
*analysis_log << highsFormatToString(
|
|
1347
|
+
" %2" HIGHSINT_FORMAT "|%2" HIGHSINT_FORMAT "|%2" HIGHSINT_FORMAT "",
|
|
1348
|
+
min_concurrency, num_concurrency, max_concurrency);
|
|
1349
|
+
} else {
|
|
1350
|
+
*analysis_log << highsFormatToString(" | | ");
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
void HighsSimplexAnalysis::reportMulti(const bool header) {
|
|
1355
|
+
assert(analyse_simplex_runtime_data);
|
|
1356
|
+
if (header) {
|
|
1357
|
+
*analysis_log << highsFormatToString(" Multi");
|
|
1358
|
+
} else if (average_fraction_of_possible_minor_iterations_performed >= 0) {
|
|
1359
|
+
*analysis_log << highsFormatToString(
|
|
1360
|
+
" %3" HIGHSINT_FORMAT "%%",
|
|
1361
|
+
(HighsInt)(100 *
|
|
1362
|
+
average_fraction_of_possible_minor_iterations_performed));
|
|
1363
|
+
} else {
|
|
1364
|
+
*analysis_log << highsFormatToString(" ");
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
void HighsSimplexAnalysis::reportOneDensity(const double density) {
|
|
1369
|
+
assert(
|
|
1370
|
+
// analyse_simplex_summary_data ||
|
|
1371
|
+
analyse_simplex_runtime_data);
|
|
1372
|
+
const HighsInt log_10_density = intLog10(density);
|
|
1373
|
+
if (log_10_density > -99) {
|
|
1374
|
+
*analysis_log << highsFormatToString(" %4" HIGHSINT_FORMAT "",
|
|
1375
|
+
log_10_density);
|
|
1376
|
+
} else {
|
|
1377
|
+
*analysis_log << highsFormatToString(" ");
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
void HighsSimplexAnalysis::printOneDensity(const double density) const {
|
|
1382
|
+
assert(analyse_simplex_summary_data || analyse_simplex_runtime_data);
|
|
1383
|
+
const HighsInt log_10_density = intLog10(density);
|
|
1384
|
+
if (log_10_density > -99) {
|
|
1385
|
+
printf(" %4" HIGHSINT_FORMAT "", log_10_density);
|
|
1386
|
+
} else {
|
|
1387
|
+
printf(" ");
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
void HighsSimplexAnalysis::reportDensity(const bool header) {
|
|
1392
|
+
assert(analyse_simplex_runtime_data);
|
|
1393
|
+
const bool rp_steepest_edge =
|
|
1394
|
+
edge_weight_mode == EdgeWeightMode::kSteepestEdge;
|
|
1395
|
+
if (header) {
|
|
1396
|
+
*analysis_log << highsFormatToString(" C_Aq R_Ep R_Ap");
|
|
1397
|
+
if (rp_steepest_edge) {
|
|
1398
|
+
*analysis_log << highsFormatToString(" S_Ed");
|
|
1399
|
+
} else {
|
|
1400
|
+
*analysis_log << highsFormatToString(" ");
|
|
1401
|
+
}
|
|
1402
|
+
} else {
|
|
1403
|
+
reportOneDensity(col_aq_density);
|
|
1404
|
+
reportOneDensity(row_ep_density);
|
|
1405
|
+
reportOneDensity(row_ap_density);
|
|
1406
|
+
double use_steepest_edge_density;
|
|
1407
|
+
if (rp_steepest_edge) {
|
|
1408
|
+
if (simplex_strategy == kSimplexStrategyPrimal) {
|
|
1409
|
+
use_steepest_edge_density = col_steepest_edge_density;
|
|
1410
|
+
} else {
|
|
1411
|
+
use_steepest_edge_density = row_DSE_density;
|
|
1412
|
+
}
|
|
1413
|
+
} else {
|
|
1414
|
+
use_steepest_edge_density = 0;
|
|
1415
|
+
}
|
|
1416
|
+
reportOneDensity(use_steepest_edge_density);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
void HighsSimplexAnalysis::reportInvert(const bool header) {
|
|
1421
|
+
if (header) return;
|
|
1422
|
+
*analysis_log << " " << rebuild_reason_string;
|
|
1423
|
+
}
|
|
1424
|
+
/*
|
|
1425
|
+
void HighsSimplexAnalysis::reportCondition(const bool header) {
|
|
1426
|
+
assert(analyse_simplex_runtime_data);
|
|
1427
|
+
if (header) {
|
|
1428
|
+
*analysis_log << highsFormatToString(" k(B)");
|
|
1429
|
+
} else {
|
|
1430
|
+
*analysis_log << highsFormatToString(" %10.4g",
|
|
1431
|
+
basis_condition);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
*/
|
|
1435
|
+
|
|
1436
|
+
// Primal:
|
|
1437
|
+
// * primal_delta - 0
|
|
1438
|
+
// * dual_step - ThDu (theta_dual) - dual infeasibility from CHUZC
|
|
1439
|
+
// * primal_step - ThPr (theta_primal_ - primal step from CHUZR
|
|
1440
|
+
//
|
|
1441
|
+
// Dual:
|
|
1442
|
+
// * primal_delta - DlPr (delta_primal) - primal infeasibility from CHUZR
|
|
1443
|
+
// * dual_step - ThDu (theta_dual) - dual step from CHUZC
|
|
1444
|
+
// * primal_step - ThPr (theta_primal) - step to bound of leaving variable
|
|
1445
|
+
// after pivoting
|
|
1446
|
+
void HighsSimplexAnalysis::reportIterationData(const bool header) {
|
|
1447
|
+
if (header) {
|
|
1448
|
+
*analysis_log << highsFormatToString(
|
|
1449
|
+
" EnC LvC LvR ThDu ThPr "
|
|
1450
|
+
"DlPr NumCk Aa");
|
|
1451
|
+
} else if (pivotal_row_index >= 0) {
|
|
1452
|
+
*analysis_log << highsFormatToString(
|
|
1453
|
+
" %7" HIGHSINT_FORMAT " %7" HIGHSINT_FORMAT " %7" HIGHSINT_FORMAT,
|
|
1454
|
+
entering_variable, leaving_variable, pivotal_row_index);
|
|
1455
|
+
if (entering_variable >= 0) {
|
|
1456
|
+
*analysis_log << highsFormatToString(
|
|
1457
|
+
" %11.4g %11.4g %11.4g %11.4g %11.4g", dual_step, primal_step,
|
|
1458
|
+
primal_delta, numerical_trouble, pivot_value_from_column);
|
|
1459
|
+
} else {
|
|
1460
|
+
// Unboundedness in dual simplex
|
|
1461
|
+
assert(dualAlgorithm());
|
|
1462
|
+
*analysis_log << highsFormatToString(
|
|
1463
|
+
" %11.4g ",
|
|
1464
|
+
primal_delta);
|
|
1465
|
+
}
|
|
1466
|
+
} else {
|
|
1467
|
+
// Bound swap in primal simplex
|
|
1468
|
+
assert(!dualAlgorithm());
|
|
1469
|
+
*analysis_log << highsFormatToString(
|
|
1470
|
+
" %7" HIGHSINT_FORMAT " %7" HIGHSINT_FORMAT " %7" HIGHSINT_FORMAT
|
|
1471
|
+
" %11.4g %11.4g ",
|
|
1472
|
+
entering_variable, leaving_variable, pivotal_row_index, dual_step,
|
|
1473
|
+
primal_step);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
void HighsSimplexAnalysis::reportRunTime(const bool header,
|
|
1478
|
+
const double run_time) {
|
|
1479
|
+
if (header) return;
|
|
1480
|
+
#ifndef NDEBUG
|
|
1481
|
+
*analysis_log << highsFormatToString(" %15.8gs", run_time);
|
|
1482
|
+
#else
|
|
1483
|
+
*analysis_log << highsFormatToString(" %.1fs", run_time);
|
|
1484
|
+
#endif
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
HighsInt HighsSimplexAnalysis::intLog10(const double v) const {
|
|
1488
|
+
return static_cast<HighsInt>(v > 0 ? -2.0 * log(v) / log(10.0) : 99);
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
bool HighsSimplexAnalysis::dualAlgorithm() const {
|
|
1492
|
+
return (simplex_strategy == kSimplexStrategyDual ||
|
|
1493
|
+
simplex_strategy == kSimplexStrategyDualTasks ||
|
|
1494
|
+
simplex_strategy == kSimplexStrategyDualMulti);
|
|
1495
|
+
}
|