lpsolver 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +70 -26
- data/ext/lpsolver/Makefile +273 -0
- data/ext/lpsolver/ext.c +353 -0
- data/ext/lpsolver/ext.o +0 -0
- data/ext/lpsolver/extconf.rb +79 -0
- data/ext/lpsolver/native.so +0 -0
- data/ext/lpsolver-highs/AUTHORS +7 -0
- data/ext/lpsolver-highs/BUILD.bazel +243 -0
- data/ext/lpsolver-highs/CITATION.cff +29 -0
- data/ext/lpsolver-highs/CMakeCache.txt +406 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCCompiler.cmake +81 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake +101 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CMakeSystem.cmake +15 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/CMakeCCompilerId.c +904 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdC/a.out +0 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +919 -0
- data/ext/lpsolver-highs/CMakeFiles/3.31.4/CompilerIdCXX/a.out +0 -0
- data/ext/lpsolver-highs/CMakeFiles/CMakeConfigureLog.yaml +576 -0
- data/ext/lpsolver-highs/CMakeFiles/cmake.check_cache +1 -0
- data/ext/lpsolver-highs/CMakeLists.txt +983 -0
- data/ext/lpsolver-highs/CODE_OF_CONDUCT.md +128 -0
- data/ext/lpsolver-highs/CONTRIBUTING.md +31 -0
- data/ext/lpsolver-highs/FEATURES.md +61 -0
- data/ext/lpsolver-highs/LICENSE.txt +21 -0
- data/ext/lpsolver-highs/MODULE.bazel +38 -0
- data/ext/lpsolver-highs/README.md +281 -0
- data/ext/lpsolver-highs/THIRD_PARTY_NOTICES.md +78 -0
- data/ext/lpsolver-highs/Version.txt +4 -0
- data/ext/lpsolver-highs/WORKSPACE +33 -0
- data/ext/lpsolver-highs/app/CMakeLists.txt +110 -0
- data/ext/lpsolver-highs/app/HighsRuntimeOptions.h +292 -0
- data/ext/lpsolver-highs/app/RunHighs.cpp +147 -0
- data/ext/lpsolver-highs/app/highs_webdemo_shell.html +73 -0
- data/ext/lpsolver-highs/build/bin/highs +0 -0
- data/ext/lpsolver-highs/build/include/highs/HConfig.h +22 -0
- data/ext/lpsolver-highs/build/include/highs/Highs.h +1812 -0
- data/ext/lpsolver-highs/build/include/highs/interfaces/highs_c_api.h +2651 -0
- data/ext/lpsolver-highs/build/include/highs/io/Filereader.h +45 -0
- data/ext/lpsolver-highs/build/include/highs/io/FilereaderLp.h +49 -0
- data/ext/lpsolver-highs/build/include/highs/io/FilereaderMps.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/io/HMPSIO.h +78 -0
- data/ext/lpsolver-highs/build/include/highs/io/HMpsFF.h +245 -0
- data/ext/lpsolver-highs/build/include/highs/io/HighsIO.h +118 -0
- data/ext/lpsolver-highs/build/include/highs/io/LoadOptions.h +24 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/builder.hpp +25 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/def.hpp +19 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/model.hpp +68 -0
- data/ext/lpsolver-highs/build/include/highs/io/filereaderlp/reader.hpp +10 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/IpxSolution.h +32 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/IpxWrapper.h +106 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu.h +161 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_object.h +30 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/basiclu_update.h +125 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_def.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_file.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_internal.h +220 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/basiclu/lu_list.h +173 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/basis.h +350 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/control.h +167 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/crossover.h +157 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/diagonal_precond.h +45 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/guess_basis.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/indexed_vector.h +113 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/info.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipm.h +94 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_c.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_config.h +9 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_info.h +111 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_internal.h +89 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_parameters.h +76 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/ipx_status.h +57 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/iterate.h +331 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver.h +70 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/linear_operator.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lp_solver.h +204 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_factorization.h +79 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/lu_update.h +129 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/maxvolume.h +54 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/model.h +413 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/multistream.h +52 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/normal_matrix.h +44 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/power_method.h +44 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_matrix.h +195 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/sparse_utils.h +58 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/starting_basis.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/symbolic_invert.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/timer.h +25 -0
- data/ext/lpsolver-highs/build/include/highs/ipm/ipx/utils.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HConst.h +430 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HStruct.h +213 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsAnalysis.h +23 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallback.h +104 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsCallbackStruct.h +70 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsDebug.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsIis.h +139 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfo.h +421 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsInfoDebug.h +27 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLp.h +97 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpSolverObject.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsLpUtils.h +330 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsModelUtils.h +129 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsOptions.h +1715 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsRanging.h +43 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolution.h +179 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolutionDebug.h +87 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsSolve.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/lp_data/HighsStatus.h +29 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCliqueTable.h +329 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsConflictPool.h +109 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCutGeneration.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsCutPool.h +168 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDebugSol.h +133 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDomain.h +657 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDomainChange.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsDynamicRowMatrix.h +104 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsGFkSolve.h +439 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsImplications.h +194 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsLpAggregator.h +50 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsLpRelaxation.h +361 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipAnalysis.h +71 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolver.h +159 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsMipSolverData.h +313 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsModkSeparator.h +60 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsNodeQueue.h +312 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsObjectiveFunction.h +71 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPathSeparator.h +39 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPrimalHeuristics.h +75 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsPseudocost.h +366 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsRedcostFixing.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSearch.h +241 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparation.h +41 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsSeparator.h +60 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsTableauSeparator.h +34 -0
- data/ext/lpsolver-highs/build/include/highs/mip/HighsTransformedLp.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/mip/MipTimer.h +544 -0
- data/ext/lpsolver-highs/build/include/highs/mip/feasibilityjump.hh +800 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsHessian.h +54 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsHessianUtils.h +47 -0
- data/ext/lpsolver-highs/build/include/highs/model/HighsModel.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsBinarySemaphore.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsCacheAlign.h +82 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsCombinable.h +116 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsMutex.h +124 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsParallel.h +128 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsRaceTimer.h +38 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSchedulerConstants.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSpinMutex.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsSplitDeque.h +606 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsTask.h +170 -0
- data/ext/lpsolver-highs/build/include/highs/parallel/HighsTaskExecutor.h +217 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/CupdlpWrapper.h +108 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpTimer.h +155 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/HiPdlpWrapper.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/defs.hpp +222 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/linalg.hpp +61 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/logger.hpp +80 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/pdhg.hpp +358 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/restart.hpp +96 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/scaling.hpp +74 -0
- data/ext/lpsolver-highs/build/include/highs/pdlp/hipdlp/solver_results.hpp +65 -0
- data/ext/lpsolver-highs/build/include/highs/pdqsort/pdqsort.h +532 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HPresolve.h +505 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HPresolveAnalysis.h +52 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HighsPostsolveStack.h +943 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/HighsSymmetry.h +284 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrash.h +124 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrashUtil.h +62 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/ICrashX.h +23 -0
- data/ext/lpsolver-highs/build/include/highs/presolve/PresolveComponent.h +90 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/a_asm.hpp +77 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/a_quass.hpp +22 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/basis.hpp +159 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/crashsolution.hpp +20 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/dantzigpricing.hpp +80 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/devexpricing.hpp +108 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/eventhandler.hpp +30 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/factor.hpp +408 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_bounded.hpp +114 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/feasibility_highs.hpp +301 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/gradient.hpp +46 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/instance.hpp +70 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/matrix.hpp +342 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/perturbation.hpp +15 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/pricing.hpp +22 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/qpconst.hpp +34 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/qpvector.hpp +242 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/quass.hpp +27 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/ratiotest.hpp +26 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/runtime.hpp +45 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/scaling.hpp +15 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/settings.hpp +84 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/snippets.hpp +36 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/statistics.hpp +30 -0
- data/ext/lpsolver-highs/build/include/highs/qpsolver/steepestedgepricing.hpp +173 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HApp.h +550 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkk.h +419 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDual.h +513 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRHS.h +134 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkDualRow.h +201 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HEkkPrimal.h +191 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplex.h +42 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexDebug.h +48 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexNla.h +158 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HSimplexReport.h +21 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/HighsSimplexAnalysis.h +500 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexConst.h +273 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexStruct.h +263 -0
- data/ext/lpsolver-highs/build/include/highs/simplex/SimplexTimer.h +414 -0
- data/ext/lpsolver-highs/build/include/highs/test_kkt/DevKkt.h +143 -0
- data/ext/lpsolver-highs/build/include/highs/test_kkt/KktCh2.h +79 -0
- data/ext/lpsolver-highs/build/include/highs/util/FactorTimer.h +199 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactor.h +587 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactorConst.h +81 -0
- data/ext/lpsolver-highs/build/include/highs/util/HFactorDebug.h +55 -0
- data/ext/lpsolver-highs/build/include/highs/util/HSet.h +89 -0
- data/ext/lpsolver-highs/build/include/highs/util/HVector.h +22 -0
- data/ext/lpsolver-highs/build/include/highs/util/HVectorBase.h +102 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsCDouble.h +323 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsComponent.h +53 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsDataStack.h +83 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsDisjointSets.h +107 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsHash.h +1274 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsHashTree.h +1461 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsInt.h +36 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsIntegers.h +212 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsLinearSumBounds.h +203 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixPic.h +37 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixSlice.h +561 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMatrixUtils.h +57 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsMemoryAllocation.h +63 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsRandom.h +242 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsRbTree.h +452 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSort.h +131 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSparseMatrix.h +151 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSparseVectorSum.h +95 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsSplay.h +135 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsTimer.h +385 -0
- data/ext/lpsolver-highs/build/include/highs/util/HighsUtils.h +272 -0
- data/ext/lpsolver-highs/build/include/highs/util/stringutil.h +46 -0
- data/ext/lpsolver-highs/build/include/highs/zstr/strict_fstream.hpp +237 -0
- data/ext/lpsolver-highs/build/include/highs/zstr/zstr.hpp +473 -0
- data/ext/lpsolver-highs/build/include/highs_export.h +43 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config-version.cmake +65 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-config.cmake +36 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets-release.cmake +19 -0
- data/ext/lpsolver-highs/build/lib/cmake/highs/highs-targets.cmake +111 -0
- data/ext/lpsolver-highs/build/lib/libhighs.a +0 -0
- data/ext/lpsolver-highs/build/lib/pkgconfig/highs.pc +12 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/AUTHORS +7 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CITATION.cff +29 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CODE_OF_CONDUCT.md +128 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/CONTRIBUTING.md +31 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/FEATURES.md +61 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/LICENSE.txt +21 -0
- data/ext/lpsolver-highs/build/share/doc/HIGHS/README.md +281 -0
- data/ext/lpsolver-highs/build_webdemo.sh +46 -0
- data/ext/lpsolver-highs/check/Avgas.cpp +245 -0
- data/ext/lpsolver-highs/check/Avgas.h +44 -0
- data/ext/lpsolver-highs/check/CMakeLists.txt +573 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.bazel.in +6 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.in +12 -0
- data/ext/lpsolver-highs/check/HCheckConfig.h.meson.in +6 -0
- data/ext/lpsolver-highs/check/SpecialLps.h +405 -0
- data/ext/lpsolver-highs/check/TestAlienBasis.cpp +720 -0
- data/ext/lpsolver-highs/check/TestBasis.cpp +359 -0
- data/ext/lpsolver-highs/check/TestBasisSolves.cpp +669 -0
- data/ext/lpsolver-highs/check/TestCAPI.c +2513 -0
- data/ext/lpsolver-highs/check/TestCallbacks.cpp +608 -0
- data/ext/lpsolver-highs/check/TestCheckSolution.cpp +740 -0
- data/ext/lpsolver-highs/check/TestCrossover.cpp +111 -0
- data/ext/lpsolver-highs/check/TestDualize.cpp +172 -0
- data/ext/lpsolver-highs/check/TestEkk.cpp +100 -0
- data/ext/lpsolver-highs/check/TestFactor.cpp +389 -0
- data/ext/lpsolver-highs/check/TestFilereader.cpp +568 -0
- data/ext/lpsolver-highs/check/TestFortranAPI.f90 +65 -0
- data/ext/lpsolver-highs/check/TestHSet.cpp +80 -0
- data/ext/lpsolver-highs/check/TestHighsCDouble.cpp +109 -0
- data/ext/lpsolver-highs/check/TestHighsGFkSolve.cpp +102 -0
- data/ext/lpsolver-highs/check/TestHighsHash.cpp +126 -0
- data/ext/lpsolver-highs/check/TestHighsHessian.cpp +329 -0
- data/ext/lpsolver-highs/check/TestHighsIntegers.cpp +42 -0
- data/ext/lpsolver-highs/check/TestHighsModel.cpp +134 -0
- data/ext/lpsolver-highs/check/TestHighsParallel.cpp +277 -0
- data/ext/lpsolver-highs/check/TestHighsRbTree.cpp +109 -0
- data/ext/lpsolver-highs/check/TestHighsSparseMatrix.cpp +126 -0
- data/ext/lpsolver-highs/check/TestHighsVersion.cpp +61 -0
- data/ext/lpsolver-highs/check/TestHipo.cpp +122 -0
- data/ext/lpsolver-highs/check/TestICrash.cpp +46 -0
- data/ext/lpsolver-highs/check/TestIO.cpp +163 -0
- data/ext/lpsolver-highs/check/TestIis.cpp +1063 -0
- data/ext/lpsolver-highs/check/TestInfo.cpp +116 -0
- data/ext/lpsolver-highs/check/TestIpm.cpp +226 -0
- data/ext/lpsolver-highs/check/TestIpx.cpp +96 -0
- data/ext/lpsolver-highs/check/TestLPFileFormat.cpp +22 -0
- data/ext/lpsolver-highs/check/TestLogging.cpp +69 -0
- data/ext/lpsolver-highs/check/TestLpModification.cpp +2497 -0
- data/ext/lpsolver-highs/check/TestLpOrientation.cpp +121 -0
- data/ext/lpsolver-highs/check/TestLpSolvers.cpp +555 -0
- data/ext/lpsolver-highs/check/TestLpValidation.cpp +689 -0
- data/ext/lpsolver-highs/check/TestMain.cpp +6 -0
- data/ext/lpsolver-highs/check/TestMipSolver.cpp +1406 -0
- data/ext/lpsolver-highs/check/TestModelProperties.cpp +143 -0
- data/ext/lpsolver-highs/check/TestMultiObjective.cpp +198 -0
- data/ext/lpsolver-highs/check/TestNames.cpp +187 -0
- data/ext/lpsolver-highs/check/TestOptions.cpp +544 -0
- data/ext/lpsolver-highs/check/TestPdlp.cpp +327 -0
- data/ext/lpsolver-highs/check/TestPdlpHi.cpp +40 -0
- data/ext/lpsolver-highs/check/TestPresolve.cpp +912 -0
- data/ext/lpsolver-highs/check/TestQpSolver.cpp +1345 -0
- data/ext/lpsolver-highs/check/TestRanging.cpp +558 -0
- data/ext/lpsolver-highs/check/TestRays.cpp +1010 -0
- data/ext/lpsolver-highs/check/TestSemiVariables.cpp +329 -0
- data/ext/lpsolver-highs/check/TestSetup.cpp +12 -0
- data/ext/lpsolver-highs/check/TestSort.cpp +247 -0
- data/ext/lpsolver-highs/check/TestSpecialLps.cpp +775 -0
- data/ext/lpsolver-highs/check/TestThrow.cpp +83 -0
- data/ext/lpsolver-highs/check/TestTspSolver.cpp +19 -0
- data/ext/lpsolver-highs/check/TestUserScale.cpp +444 -0
- data/ext/lpsolver-highs/check/cublas_example.cpp +76 -0
- data/ext/lpsolver-highs/check/cublas_gpu_start.cpp +88 -0
- data/ext/lpsolver-highs/check/hipo_test_option_files/hipo_options_0 +1 -0
- data/ext/lpsolver-highs/check/instances/1448.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1449a.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1449b.lp +1 -0
- data/ext/lpsolver-highs/check/instances/1451.lp +8 -0
- data/ext/lpsolver-highs/check/instances/2122.lp +1822 -0
- data/ext/lpsolver-highs/check/instances/2171.mps +717 -0
- data/ext/lpsolver-highs/check/instances/25fv47.mps +6919 -0
- data/ext/lpsolver-highs/check/instances/2821-duplicate.mps +31 -0
- data/ext/lpsolver-highs/check/instances/2821-qmatrix.mps +31 -0
- data/ext/lpsolver-highs/check/instances/2821-quadobj.mps +29 -0
- data/ext/lpsolver-highs/check/instances/2821-summation.mps +30 -0
- data/ext/lpsolver-highs/check/instances/2821.mps +29 -0
- data/ext/lpsolver-highs/check/instances/2894.mps +89 -0
- data/ext/lpsolver-highs/check/instances/80bau3b.mps +23732 -0
- data/ext/lpsolver-highs/check/instances/WithInf.set +3 -0
- data/ext/lpsolver-highs/check/instances/adlittle.mps +335 -0
- data/ext/lpsolver-highs/check/instances/afiro.mps +83 -0
- data/ext/lpsolver-highs/check/instances/avgas.mps +51 -0
- data/ext/lpsolver-highs/check/instances/bell5.mps +384 -0
- data/ext/lpsolver-highs/check/instances/bgetam.mps +2112 -0
- data/ext/lpsolver-highs/check/instances/blending.mps +13 -0
- data/ext/lpsolver-highs/check/instances/box1.mps +1085 -0
- data/ext/lpsolver-highs/check/instances/chip.mps +13 -0
- data/ext/lpsolver-highs/check/instances/comment.mps +23 -0
- data/ext/lpsolver-highs/check/instances/cplex1.mps +9674 -0
- data/ext/lpsolver-highs/check/instances/dD2e.mps +10 -0
- data/ext/lpsolver-highs/check/instances/dcmulti.mps +2310 -0
- data/ext/lpsolver-highs/check/instances/e226.mps +1733 -0
- data/ext/lpsolver-highs/check/instances/egout-ac.mps +473 -0
- data/ext/lpsolver-highs/check/instances/egout.mps +403 -0
- data/ext/lpsolver-highs/check/instances/etamacro.mps +2084 -0
- data/ext/lpsolver-highs/check/instances/ex72a.mps +849 -0
- data/ext/lpsolver-highs/check/instances/fixed-binary.lp +11 -0
- data/ext/lpsolver-highs/check/instances/flugpl.mps +111 -0
- data/ext/lpsolver-highs/check/instances/flugpl_illegal_integer.sol +24 -0
- data/ext/lpsolver-highs/check/instances/flugpl_integer.sol +25 -0
- data/ext/lpsolver-highs/check/instances/forest6.mps +261 -0
- data/ext/lpsolver-highs/check/instances/galenet.mps +34 -0
- data/ext/lpsolver-highs/check/instances/gams10am.mps +478 -0
- data/ext/lpsolver-highs/check/instances/garbage.ems +3 -0
- data/ext/lpsolver-highs/check/instances/garbage.lp +3 -0
- data/ext/lpsolver-highs/check/instances/garbage.mps +3 -0
- data/ext/lpsolver-highs/check/instances/gas11.mps +2924 -0
- data/ext/lpsolver-highs/check/instances/gesa2.mps +5459 -0
- data/ext/lpsolver-highs/check/instances/greenbea.mps +19215 -0
- data/ext/lpsolver-highs/check/instances/gt2.mps +534 -0
- data/ext/lpsolver-highs/check/instances/infeasible-mip0.mps +140 -0
- data/ext/lpsolver-highs/check/instances/infeasible-mip1.mps +371 -0
- data/ext/lpsolver-highs/check/instances/israel.mps +1490 -0
- data/ext/lpsolver-highs/check/instances/issue-2095.mps +836 -0
- data/ext/lpsolver-highs/check/instances/issue-2173.mps +3331 -0
- data/ext/lpsolver-highs/check/instances/issue-2204.mps +143 -0
- data/ext/lpsolver-highs/check/instances/issue-2290.mps +158 -0
- data/ext/lpsolver-highs/check/instances/issue-2388.lp +76 -0
- data/ext/lpsolver-highs/check/instances/issue-2402.mps +435 -0
- data/ext/lpsolver-highs/check/instances/issue-2446.mps +9154 -0
- data/ext/lpsolver-highs/check/instances/issue-2585.lp +16 -0
- data/ext/lpsolver-highs/check/instances/issue-2874-3.mps +97 -0
- data/ext/lpsolver-highs/check/instances/klein1.mps +422 -0
- data/ext/lpsolver-highs/check/instances/lseu.mps +371 -0
- data/ext/lpsolver-highs/check/instances/model.xyz +1 -0
- data/ext/lpsolver-highs/check/instances/nan0.mps +13 -0
- data/ext/lpsolver-highs/check/instances/nan1.mps +13 -0
- data/ext/lpsolver-highs/check/instances/nan2.mps +13 -0
- data/ext/lpsolver-highs/check/instances/no-newline-eof.lp +5 -0
- data/ext/lpsolver-highs/check/instances/p01.mps +909 -0
- data/ext/lpsolver-highs/check/instances/p0548.mps +1992 -0
- data/ext/lpsolver-highs/check/instances/primal1.mps +3909 -0
- data/ext/lpsolver-highs/check/instances/qap04.mps +606 -0
- data/ext/lpsolver-highs/check/instances/qcqp.lp +8 -0
- data/ext/lpsolver-highs/check/instances/qjh.lp +9 -0
- data/ext/lpsolver-highs/check/instances/qjh.mps +18 -0
- data/ext/lpsolver-highs/check/instances/qjh_qmatrix.mps +19 -0
- data/ext/lpsolver-highs/check/instances/qjh_quadobj.mps +18 -0
- data/ext/lpsolver-highs/check/instances/qjh_quadobj_qmatrix.mps +25 -0
- data/ext/lpsolver-highs/check/instances/qjh_uncon.lp +10 -0
- data/ext/lpsolver-highs/check/instances/qjh_uncon.mps +17 -0
- data/ext/lpsolver-highs/check/instances/qpinfeasible.lp +8 -0
- data/ext/lpsolver-highs/check/instances/qptestnw.lp +7 -0
- data/ext/lpsolver-highs/check/instances/qpunbounded.lp +5 -0
- data/ext/lpsolver-highs/check/instances/refinery.mps +1882 -0
- data/ext/lpsolver-highs/check/instances/rgn.mps +559 -0
- data/ext/lpsolver-highs/check/instances/scrs8.mps +2717 -0
- data/ext/lpsolver-highs/check/instances/sctest.mps +66 -0
- data/ext/lpsolver-highs/check/instances/semi-continuous.lp +13 -0
- data/ext/lpsolver-highs/check/instances/semi-continuous.mps +24 -0
- data/ext/lpsolver-highs/check/instances/semi-integer.lp +15 -0
- data/ext/lpsolver-highs/check/instances/semi-integer.mps +22 -0
- data/ext/lpsolver-highs/check/instances/shell.mps +4039 -0
- data/ext/lpsolver-highs/check/instances/silly-names.mps +14 -0
- data/ext/lpsolver-highs/check/instances/small_mip.mps +87 -0
- data/ext/lpsolver-highs/check/instances/smalllp.mps +21 -0
- data/ext/lpsolver-highs/check/instances/sp150x300d.mps +1983 -0
- data/ext/lpsolver-highs/check/instances/stair.mps +2499 -0
- data/ext/lpsolver-highs/check/instances/standata.mps +2317 -0
- data/ext/lpsolver-highs/check/instances/standgub.mps +2428 -0
- data/ext/lpsolver-highs/check/instances/standmps.mps +2695 -0
- data/ext/lpsolver-highs/check/instances/test.mps +53 -0
- data/ext/lpsolver-highs/check/instances/vol1.mps +1895 -0
- data/ext/lpsolver-highs/check/instances/warnings.mps +68 -0
- data/ext/lpsolver-highs/check/instances/woodinfe.mps +216 -0
- data/ext/lpsolver-highs/check/matrix_multiplication.hpp +49 -0
- data/ext/lpsolver-highs/check/meson.build +92 -0
- data/ext/lpsolver-highs/check/pythontest.py +11 -0
- data/ext/lpsolver-highs/check/sample_options_file +8 -0
- data/ext/lpsolver-highs/cmake/CheckAtomic.cmake +74 -0
- data/ext/lpsolver-highs/cmake/FindCUDAConf.cmake +44 -0
- data/ext/lpsolver-highs/cmake/FindHipoDeps.cmake +351 -0
- data/ext/lpsolver-highs/cmake/README.md +243 -0
- data/ext/lpsolver-highs/cmake/cpp-highs.cmake +243 -0
- data/ext/lpsolver-highs/cmake/dotnet.cmake +94 -0
- data/ext/lpsolver-highs/cmake/highs-config.cmake.in +22 -0
- data/ext/lpsolver-highs/cmake/python-highs.cmake +74 -0
- data/ext/lpsolver-highs/cmake/set-version.cmake +26 -0
- data/ext/lpsolver-highs/cmake/sources-python.cmake +461 -0
- data/ext/lpsolver-highs/cmake/sources.cmake +618 -0
- data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeader.pl +78 -0
- data/ext/lpsolver-highs/docs/HiGHS_CopyrightHeaderUpdateAll +32 -0
- data/ext/lpsolver-highs/docs/Project.toml +7 -0
- data/ext/lpsolver-highs/docs/README.md +27 -0
- data/ext/lpsolver-highs/docs/c_api_gen/HConfig.h +1 -0
- data/ext/lpsolver-highs/docs/c_api_gen/build.jl +48 -0
- data/ext/lpsolver-highs/docs/make.jl +115 -0
- data/ext/lpsolver-highs/docs/src/assets/logo.png +0 -0
- data/ext/lpsolver-highs/docs/src/callbacks.md +171 -0
- data/ext/lpsolver-highs/docs/src/executable.md +88 -0
- data/ext/lpsolver-highs/docs/src/guide/advanced.md +66 -0
- data/ext/lpsolver-highs/docs/src/guide/basic.md +116 -0
- data/ext/lpsolver-highs/docs/src/guide/further.md +193 -0
- data/ext/lpsolver-highs/docs/src/guide/gpu.md +58 -0
- data/ext/lpsolver-highs/docs/src/guide/index.md +18 -0
- data/ext/lpsolver-highs/docs/src/guide/kkt.md +219 -0
- data/ext/lpsolver-highs/docs/src/guide/numerics.md +55 -0
- data/ext/lpsolver-highs/docs/src/index.md +86 -0
- data/ext/lpsolver-highs/docs/src/installation.md +130 -0
- data/ext/lpsolver-highs/docs/src/interfaces/c_api.md +6 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/examples.md +1 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/index.md +29 -0
- data/ext/lpsolver-highs/docs/src/interfaces/cpp/library.md +107 -0
- data/ext/lpsolver-highs/docs/src/interfaces/csharp.md +55 -0
- data/ext/lpsolver-highs/docs/src/interfaces/fortran.md +11 -0
- data/ext/lpsolver-highs/docs/src/interfaces/julia/index.md +130 -0
- data/ext/lpsolver-highs/docs/src/interfaces/other.md +41 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/example-py.md +275 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/index.md +91 -0
- data/ext/lpsolver-highs/docs/src/interfaces/python/model-py.md +90 -0
- data/ext/lpsolver-highs/docs/src/options/definitions.md +529 -0
- data/ext/lpsolver-highs/docs/src/options/intro.md +46 -0
- data/ext/lpsolver-highs/docs/src/parallel.md +88 -0
- data/ext/lpsolver-highs/docs/src/solvers.md +168 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsHessian.md +9 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsIis.md +16 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsLp.md +19 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsModel.md +6 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/HighsSparseMatrix.md +10 -0
- data/ext/lpsolver-highs/docs/src/structures/classes/index.md +11 -0
- data/ext/lpsolver-highs/docs/src/structures/enums.md +114 -0
- data/ext/lpsolver-highs/docs/src/structures/index.md +12 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsBasis.md +8 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsInfo.md +148 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsLinearObjective.md +11 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/HighsSolution.md +10 -0
- data/ext/lpsolver-highs/docs/src/structures/structs/index.md +10 -0
- data/ext/lpsolver-highs/docs/src/terminology.md +163 -0
- data/ext/lpsolver-highs/examples/CMakeLists.txt +26 -0
- data/ext/lpsolver-highs/examples/Docs.py +104 -0
- data/ext/lpsolver-highs/examples/branch-and-price.py +465 -0
- data/ext/lpsolver-highs/examples/call_highs_from_c.c +685 -0
- data/ext/lpsolver-highs/examples/call_highs_from_c_minimal.c +659 -0
- data/ext/lpsolver-highs/examples/call_highs_from_cpp.cpp +178 -0
- data/ext/lpsolver-highs/examples/call_highs_from_csharp.cs +83 -0
- data/ext/lpsolver-highs/examples/call_highs_from_fortran.f90 +579 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python.py +448 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python_highspy.py +71 -0
- data/ext/lpsolver-highs/examples/call_highs_from_python_mps.py +59 -0
- data/ext/lpsolver-highs/examples/callback_gap.py +71 -0
- data/ext/lpsolver-highs/examples/chip.py +43 -0
- data/ext/lpsolver-highs/examples/chip0.py +29 -0
- data/ext/lpsolver-highs/examples/distillation.py +77 -0
- data/ext/lpsolver-highs/examples/knapsack.py +43 -0
- data/ext/lpsolver-highs/examples/minimal.py +11 -0
- data/ext/lpsolver-highs/examples/multi_objective.py +139 -0
- data/ext/lpsolver-highs/examples/multiple_objective.py +120 -0
- data/ext/lpsolver-highs/examples/network_flow.py +37 -0
- data/ext/lpsolver-highs/examples/nqueens.py +29 -0
- data/ext/lpsolver-highs/examples/plot_highs_log.py +134 -0
- data/ext/lpsolver-highs/extern/CLI11.hpp +11546 -0
- data/ext/lpsolver-highs/extern/LICENCE_1_0.txt +23 -0
- data/ext/lpsolver-highs/extern/amd/License.txt +35 -0
- data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.c +54 -0
- data/ext/lpsolver-highs/extern/amd/SuiteSparse_config.h +56 -0
- data/ext/lpsolver-highs/extern/amd/amd.h +357 -0
- data/ext/lpsolver-highs/extern/amd/amd_1.c +172 -0
- data/ext/lpsolver-highs/extern/amd/amd_2.c +1761 -0
- data/ext/lpsolver-highs/extern/amd/amd_aat.c +179 -0
- data/ext/lpsolver-highs/extern/amd/amd_control.c +65 -0
- data/ext/lpsolver-highs/extern/amd/amd_defaults.c +37 -0
- data/ext/lpsolver-highs/extern/amd/amd_info.c +120 -0
- data/ext/lpsolver-highs/extern/amd/amd_internal.h +137 -0
- data/ext/lpsolver-highs/extern/amd/amd_order.c +195 -0
- data/ext/lpsolver-highs/extern/amd/amd_post_tree.c +105 -0
- data/ext/lpsolver-highs/extern/amd/amd_postorder.c +140 -0
- data/ext/lpsolver-highs/extern/amd/amd_preprocess.c +107 -0
- data/ext/lpsolver-highs/extern/amd/amd_valid.c +93 -0
- data/ext/lpsolver-highs/extern/amd/changes.txt +8 -0
- data/ext/lpsolver-highs/extern/catch.hpp +18861 -0
- data/ext/lpsolver-highs/extern/metis/Changes.txt +31 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/GKlib.h +62 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/error.c +21 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_arch.h +64 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_defs.h +19 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_macros.h +50 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkblas.h +51 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkmemory.h +80 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkpqueue.h +329 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mkrandom.h +89 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_mksort.h +271 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_inttypes.h +41 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stat.h +22 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_ms_stdint.h +41 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_proto.h +50 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_struct.h +66 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/gk_types.h +15 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/mcore.c +176 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/memory.c +23 -0
- data/ext/lpsolver-highs/extern/metis/GKlib/random.c +37 -0
- data/ext/lpsolver-highs/extern/metis/LICENSE.txt +18 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/auxapi.c +27 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/balance.c +491 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/bucketsort.c +44 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/coarsen.c +895 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/compress.c +231 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/contig.c +83 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/defs.h +39 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/fm.c +527 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/gklib.c +55 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/gklib_defs.h +33 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/graph.c +268 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/initpart.c +385 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/macros.h +59 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/mcutil.c +162 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/metislib.h +35 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/mmd.c +598 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/ometis.c +661 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/options.c +260 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/proto.h +172 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/refine.c +99 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/separator.c +57 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/sfm.c +581 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/srefine.c +152 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/stdheaders.h +29 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/struct.h +117 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/util.c +59 -0
- data/ext/lpsolver-highs/extern/metis/libmetis/wspace.c +91 -0
- data/ext/lpsolver-highs/extern/metis/metis.h +271 -0
- data/ext/lpsolver-highs/extern/pdqsort/license.txt +16 -0
- data/ext/lpsolver-highs/extern/pdqsort/pdqsort.h +532 -0
- data/ext/lpsolver-highs/extern/rcm/LICENSE +19 -0
- data/ext/lpsolver-highs/extern/rcm/rcm.cpp +873 -0
- data/ext/lpsolver-highs/extern/rcm/rcm.h +22 -0
- data/ext/lpsolver-highs/extern/zstr/LICENSE +21 -0
- data/ext/lpsolver-highs/extern/zstr/strict_fstream.hpp +237 -0
- data/ext/lpsolver-highs/extern/zstr/zstr.hpp +473 -0
- data/ext/lpsolver-highs/flake.lock +61 -0
- data/ext/lpsolver-highs/flake.nix +73 -0
- data/ext/lpsolver-highs/highs/CMakeLists.txt +499 -0
- data/ext/lpsolver-highs/highs/HConfig.h.bazel.in +25 -0
- data/ext/lpsolver-highs/highs/HConfig.h.in +22 -0
- data/ext/lpsolver-highs/highs/HConfig.h.meson.in +17 -0
- data/ext/lpsolver-highs/highs/Highs.h +1812 -0
- data/ext/lpsolver-highs/highs/HighsRun.md +143 -0
- data/ext/lpsolver-highs/highs/highs_bindings.cpp +1826 -0
- data/ext/lpsolver-highs/highs/highspy/__init__.py +93 -0
- data/ext/lpsolver-highs/highs/highspy/__init__.pyi +91 -0
- data/ext/lpsolver-highs/highs/highspy/_core/__init__.pyi +1058 -0
- data/ext/lpsolver-highs/highs/highspy/_core/cb.pyi +118 -0
- data/ext/lpsolver-highs/highs/highspy/_core/simplex_constants.pyi +472 -0
- data/ext/lpsolver-highs/highs/highspy/highs.py +2430 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_c_api.cpp +1812 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_c_api.h +2651 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_csharp_api.cs +1142 -0
- data/ext/lpsolver-highs/highs/interfaces/highs_fortran_api.f90 +873 -0
- data/ext/lpsolver-highs/highs/io/Filereader.cpp +87 -0
- data/ext/lpsolver-highs/highs/io/Filereader.h +45 -0
- data/ext/lpsolver-highs/highs/io/FilereaderLp.cpp +539 -0
- data/ext/lpsolver-highs/highs/io/FilereaderLp.h +49 -0
- data/ext/lpsolver-highs/highs/io/FilereaderMps.cpp +86 -0
- data/ext/lpsolver-highs/highs/io/FilereaderMps.h +27 -0
- data/ext/lpsolver-highs/highs/io/HMPSIO.cpp +1001 -0
- data/ext/lpsolver-highs/highs/io/HMPSIO.h +78 -0
- data/ext/lpsolver-highs/highs/io/HMpsFF.cpp +2113 -0
- data/ext/lpsolver-highs/highs/io/HMpsFF.h +245 -0
- data/ext/lpsolver-highs/highs/io/HighsIO.cpp +371 -0
- data/ext/lpsolver-highs/highs/io/HighsIO.h +118 -0
- data/ext/lpsolver-highs/highs/io/LoadOptions.cpp +60 -0
- data/ext/lpsolver-highs/highs/io/LoadOptions.h +24 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/LICENSE +19 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/builder.hpp +25 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/def.hpp +19 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/model.hpp +68 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/reader.cpp +1375 -0
- data/ext/lpsolver-highs/highs/io/filereaderlp/reader.hpp +10 -0
- data/ext/lpsolver-highs/highs/ipm/IpxSolution.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/IpxWrapper.cpp +1526 -0
- data/ext/lpsolver-highs/highs/ipm/IpxWrapper.h +106 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu.h +161 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.c +132 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.c +148 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.c +24 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.c +325 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_object.h +30 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.c +46 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.c +79 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.c +63 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.c +44 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/basiclu_update.h +125 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_build_factors.c +441 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_condest.c +124 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_def.h +39 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_dfs.c +141 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_factorize_bump.c +56 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.c +184 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_file.h +21 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_garbage_perm.c +53 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_initialize.c +56 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.c +352 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_internal.h +220 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_list.h +173 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_markowitz.c +188 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_matrix_norm.c +51 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_pivot.c +1247 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_residual_test.c +155 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_setup_bump.c +198 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_singletons.c +511 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_dense.c +129 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_for_update.c +360 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_sparse.c +284 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_symbolic.c +48 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_solve_triangular.c +140 -0
- data/ext/lpsolver-highs/highs/ipm/basiclu/lu_update.c +908 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.cpp +301 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Auxiliary.h +104 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/IntConfig.h +27 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.cpp +193 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/KrylovMethods.h +30 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.cpp +60 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/Log.h +62 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/OrderingPrint.h +10 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.cpp +117 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/VectorOperations.h +59 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/auxiliary/mycblas.h +85 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.cpp +1367 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Analyse.h +122 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.cpp +114 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CallAndTimeBlas.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.cpp +82 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/CliqueStack.h +83 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.cpp +326 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DataCollector.h +86 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFact.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactHybrid.cpp +279 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DenseFactKernel.cpp +284 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.cpp +38 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/DgemmParallel.h +32 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.cpp +57 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHS.h +112 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.cpp +405 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Factorise.h +85 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.cpp +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/FormatHandler.h +95 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp +238 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.h +31 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp +272 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/HybridSolveHandler.h +26 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.cpp +83 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/KrylovMethodsIpm.h +45 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.cpp +54 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Numeric.h +46 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/ReturnValues.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.cpp +10 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/SolveHandler.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.cpp +70 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Swaps.h +19 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.cpp +101 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Symbolic.h +220 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/factorhighs/Timing.h +114 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.cpp +38 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Control.h +41 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp +887 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/FactorHiGHSSolver.h +92 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Info.h +58 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.cpp +8 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/IpmData.h +37 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.cpp +640 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Iterate.h +172 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LinearSolver.h +81 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.cpp +71 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/LogHighs.h +33 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.cpp +403 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Model.h +136 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Options.h +35 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Parameters.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.cpp +646 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/PreProcess.h +94 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Refine.cpp +214 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.cpp +1346 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Solver.h +338 -0
- data/ext/lpsolver-highs/highs/ipm/hipo/ipm/Status.h +88 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.cc +71 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_kernel.h +20 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.cc +299 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basis.cc +966 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/basis.h +350 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.cc +217 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/conjugate_residuals.h +74 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/control.cc +151 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/control.h +167 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/crossover.cc +479 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/crossover.h +157 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.cc +70 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/diagonal_precond.h +45 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.cc +360 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/forrest_tomlin.h +102 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.cc +233 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/guess_basis.h +21 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.cc +30 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/indexed_vector.h +113 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/info.cc +124 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/info.h +27 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipm.cc +897 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipm.h +94 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.cc +83 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_c.h +47 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_config.h +9 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_info.h +111 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_internal.h +89 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_parameters.h +76 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/ipx_status.h +57 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/iterate.cc +683 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/iterate.h +331 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.cc +23 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver.h +70 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.cc +387 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.cc +120 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.cc +10 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/linear_operator.h +26 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.cc +686 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lp_solver.h +204 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.cc +131 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_factorization.h +79 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.cc +62 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/lu_update.h +129 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.cc +337 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/maxvolume.h +54 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/model.cc +1528 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/model.h +413 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/multistream.h +52 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.cc +126 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/normal_matrix.h +44 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/power_method.h +44 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.cc +382 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_matrix.h +195 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.cc +92 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/sparse_utils.h +58 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.cc +117 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.cc +182 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/starting_basis.h +39 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.cc +183 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/symbolic_invert.h +29 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/timer.cc +16 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/timer.h +25 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/utils.cc +95 -0
- data/ext/lpsolver-highs/highs/ipm/ipx/utils.h +37 -0
- data/ext/lpsolver-highs/highs/lp_data/HConst.h +430 -0
- data/ext/lpsolver-highs/highs/lp_data/HStruct.h +213 -0
- data/ext/lpsolver-highs/highs/lp_data/Highs.cpp +4949 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsAnalysis.h +23 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallback.cpp +323 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallback.h +104 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsCallbackStruct.h +70 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDebug.cpp +54 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDebug.h +34 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsDeprecated.cpp +181 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsIis.cpp +1290 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsIis.h +139 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfo.cpp +426 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfo.h +421 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.cpp +175 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInfoDebug.h +27 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsInterface.cpp +4344 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLp.cpp +564 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLp.h +97 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpSolverObject.h +47 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.cpp +3794 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsLpUtils.h +330 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.cpp +1650 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsModelUtils.h +129 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsOptions.cpp +1176 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsOptions.h +1715 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsRanging.cpp +733 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsRanging.h +43 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolution.cpp +2194 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolution.h +179 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.cpp +490 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolutionDebug.h +87 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolve.cpp +747 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsSolve.h +29 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsStatus.cpp +48 -0
- data/ext/lpsolver-highs/highs/lp_data/HighsStatus.h +29 -0
- data/ext/lpsolver-highs/highs/lp_data/Iis.md +113 -0
- data/ext/lpsolver-highs/highs/meson.build +433 -0
- data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.cpp +2236 -0
- data/ext/lpsolver-highs/highs/mip/HighsCliqueTable.h +329 -0
- data/ext/lpsolver-highs/highs/mip/HighsConflictPool.cpp +201 -0
- data/ext/lpsolver-highs/highs/mip/HighsConflictPool.h +109 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.cpp +1491 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutGeneration.h +108 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutPool.cpp +526 -0
- data/ext/lpsolver-highs/highs/mip/HighsCutPool.h +168 -0
- data/ext/lpsolver-highs/highs/mip/HighsDebugSol.cpp +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsDebugSol.h +133 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomain.cpp +3861 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomain.h +657 -0
- data/ext/lpsolver-highs/highs/mip/HighsDomainChange.h +48 -0
- data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.cpp +199 -0
- data/ext/lpsolver-highs/highs/mip/HighsDynamicRowMatrix.h +104 -0
- data/ext/lpsolver-highs/highs/mip/HighsFeasibilityJump.cpp +139 -0
- data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.cpp +106 -0
- data/ext/lpsolver-highs/highs/mip/HighsGFkSolve.h +439 -0
- data/ext/lpsolver-highs/highs/mip/HighsImplications.cpp +915 -0
- data/ext/lpsolver-highs/highs/mip/HighsImplications.h +194 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.cpp +56 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpAggregator.h +50 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.cpp +1609 -0
- data/ext/lpsolver-highs/highs/mip/HighsLpRelaxation.h +361 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.cpp +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipAnalysis.h +71 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolver.cpp +1002 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolver.h +159 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.cpp +2936 -0
- data/ext/lpsolver-highs/highs/mip/HighsMipSolverData.h +313 -0
- data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.cpp +267 -0
- data/ext/lpsolver-highs/highs/mip/HighsModkSeparator.h +60 -0
- data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.cpp +443 -0
- data/ext/lpsolver-highs/highs/mip/HighsNodeQueue.h +312 -0
- data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.cpp +124 -0
- data/ext/lpsolver-highs/highs/mip/HighsObjectiveFunction.h +71 -0
- data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.cpp +549 -0
- data/ext/lpsolver-highs/highs/mip/HighsPathSeparator.h +39 -0
- data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.cpp +1673 -0
- data/ext/lpsolver-highs/highs/mip/HighsPrimalHeuristics.h +75 -0
- data/ext/lpsolver-highs/highs/mip/HighsPseudocost.cpp +129 -0
- data/ext/lpsolver-highs/highs/mip/HighsPseudocost.h +366 -0
- data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.cpp +316 -0
- data/ext/lpsolver-highs/highs/mip/HighsRedcostFixing.h +42 -0
- data/ext/lpsolver-highs/highs/mip/HighsSearch.cpp +1881 -0
- data/ext/lpsolver-highs/highs/mip/HighsSearch.h +241 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparation.cpp +186 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparation.h +41 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparator.cpp +39 -0
- data/ext/lpsolver-highs/highs/mip/HighsSeparator.h +60 -0
- data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.cpp +244 -0
- data/ext/lpsolver-highs/highs/mip/HighsTableauSeparator.h +34 -0
- data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.cpp +563 -0
- data/ext/lpsolver-highs/highs/mip/HighsTransformedLp.h +63 -0
- data/ext/lpsolver-highs/highs/mip/MipTimer.h +544 -0
- data/ext/lpsolver-highs/highs/mip/feasibilityjump.hh +800 -0
- data/ext/lpsolver-highs/highs/model/HighsHessian.cpp +263 -0
- data/ext/lpsolver-highs/highs/model/HighsHessian.h +54 -0
- data/ext/lpsolver-highs/highs/model/HighsHessianUtils.cpp +584 -0
- data/ext/lpsolver-highs/highs/model/HighsHessianUtils.h +47 -0
- data/ext/lpsolver-highs/highs/model/HighsModel.cpp +46 -0
- data/ext/lpsolver-highs/highs/model/HighsModel.h +42 -0
- data/ext/lpsolver-highs/highs/parallel/HighsBinarySemaphore.h +108 -0
- data/ext/lpsolver-highs/highs/parallel/HighsCacheAlign.h +82 -0
- data/ext/lpsolver-highs/highs/parallel/HighsCombinable.h +116 -0
- data/ext/lpsolver-highs/highs/parallel/HighsMutex.h +124 -0
- data/ext/lpsolver-highs/highs/parallel/HighsParallel.h +128 -0
- data/ext/lpsolver-highs/highs/parallel/HighsRaceTimer.h +38 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSchedulerConstants.h +19 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSpinMutex.h +48 -0
- data/ext/lpsolver-highs/highs/parallel/HighsSplitDeque.h +606 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTask.h +170 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.cpp +43 -0
- data/ext/lpsolver-highs/highs/parallel/HighsTaskExecutor.h +217 -0
- data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.cpp +848 -0
- data/ext/lpsolver-highs/highs/pdlp/CupdlpWrapper.h +108 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpTimer.h +155 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.cpp +141 -0
- data/ext/lpsolver-highs/highs/pdlp/HiPdlpWrapper.h +26 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Diff +12 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Meld +7 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/Merge +2 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/README.md +95 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/CMakeLists.txt +58 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu +338 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh +319 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu +386 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh +149 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cublas.c +154 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cuda/test_cuda_linalg.c +79 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp.h +16 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.c +214 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_cs.h +40 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_defs.h +447 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.c +802 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_linalg.h +189 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.c +148 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.c +124 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.c +425 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_scaling.h +26 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.c +1498 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_solver.h +105 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.c +478 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_step.h +37 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.c +1850 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/cupdlp_utils.h +212 -0
- data/ext/lpsolver-highs/highs/pdlp/cupdlp/glbopts.h +342 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/defs.hpp +222 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.cc +231 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/linalg.hpp +61 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.cc +225 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/logger.hpp +80 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cc +2798 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.cu +497 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg.hpp +358 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdhg_kernels.hpp +77 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/pdlp_gpu_debug.hpp +62 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.cc +132 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/restart.hpp +96 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.cc +307 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/scaling.hpp +74 -0
- data/ext/lpsolver-highs/highs/pdlp/hipdlp/solver_results.hpp +65 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolve.cpp +8511 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolve.h +505 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.cpp +239 -0
- data/ext/lpsolver-highs/highs/presolve/HPresolveAnalysis.h +52 -0
- data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.cpp +1368 -0
- data/ext/lpsolver-highs/highs/presolve/HighsPostsolveStack.h +943 -0
- data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.cpp +1921 -0
- data/ext/lpsolver-highs/highs/presolve/HighsSymmetry.h +284 -0
- data/ext/lpsolver-highs/highs/presolve/ICrash.cpp +474 -0
- data/ext/lpsolver-highs/highs/presolve/ICrash.h +124 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashUtil.cpp +267 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashUtil.h +62 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashX.cpp +173 -0
- data/ext/lpsolver-highs/highs/presolve/ICrashX.h +23 -0
- data/ext/lpsolver-highs/highs/presolve/PresolveComponent.cpp +45 -0
- data/ext/lpsolver-highs/highs/presolve/PresolveComponent.h +90 -0
- data/ext/lpsolver-highs/highs/qpsolver/README.md +185 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_asm.cpp +139 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_asm.hpp +77 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_quass.cpp +194 -0
- data/ext/lpsolver-highs/highs/qpsolver/a_quass.hpp +22 -0
- data/ext/lpsolver-highs/highs/qpsolver/basis.cpp +443 -0
- data/ext/lpsolver-highs/highs/qpsolver/basis.hpp +159 -0
- data/ext/lpsolver-highs/highs/qpsolver/crashsolution.hpp +20 -0
- data/ext/lpsolver-highs/highs/qpsolver/dantzigpricing.hpp +80 -0
- data/ext/lpsolver-highs/highs/qpsolver/devexharrispricing.hpp +98 -0
- data/ext/lpsolver-highs/highs/qpsolver/devexpricing.hpp +108 -0
- data/ext/lpsolver-highs/highs/qpsolver/eventhandler.hpp +30 -0
- data/ext/lpsolver-highs/highs/qpsolver/factor.hpp +408 -0
- data/ext/lpsolver-highs/highs/qpsolver/feasibility_bounded.hpp +114 -0
- data/ext/lpsolver-highs/highs/qpsolver/feasibility_highs.hpp +301 -0
- data/ext/lpsolver-highs/highs/qpsolver/gradient.hpp +46 -0
- data/ext/lpsolver-highs/highs/qpsolver/instance.hpp +70 -0
- data/ext/lpsolver-highs/highs/qpsolver/matrix.hpp +342 -0
- data/ext/lpsolver-highs/highs/qpsolver/perturbation.cpp +41 -0
- data/ext/lpsolver-highs/highs/qpsolver/perturbation.hpp +15 -0
- data/ext/lpsolver-highs/highs/qpsolver/pricing.hpp +22 -0
- data/ext/lpsolver-highs/highs/qpsolver/qpconst.hpp +34 -0
- data/ext/lpsolver-highs/highs/qpsolver/qpvector.hpp +242 -0
- data/ext/lpsolver-highs/highs/qpsolver/quass.cpp +551 -0
- data/ext/lpsolver-highs/highs/qpsolver/quass.hpp +27 -0
- data/ext/lpsolver-highs/highs/qpsolver/ratiotest.cpp +146 -0
- data/ext/lpsolver-highs/highs/qpsolver/ratiotest.hpp +26 -0
- data/ext/lpsolver-highs/highs/qpsolver/reducedcosts.hpp +46 -0
- data/ext/lpsolver-highs/highs/qpsolver/reducedgradient.hpp +95 -0
- data/ext/lpsolver-highs/highs/qpsolver/runtime.hpp +45 -0
- data/ext/lpsolver-highs/highs/qpsolver/scaling.cpp +123 -0
- data/ext/lpsolver-highs/highs/qpsolver/scaling.hpp +15 -0
- data/ext/lpsolver-highs/highs/qpsolver/settings.hpp +84 -0
- data/ext/lpsolver-highs/highs/qpsolver/snippets.hpp +36 -0
- data/ext/lpsolver-highs/highs/qpsolver/statistics.hpp +30 -0
- data/ext/lpsolver-highs/highs/qpsolver/steepestedgepricing.hpp +173 -0
- data/ext/lpsolver-highs/highs/simplex/HApp.h +550 -0
- data/ext/lpsolver-highs/highs/simplex/HEkk.cpp +4404 -0
- data/ext/lpsolver-highs/highs/simplex/HEkk.h +419 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkControl.cpp +146 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDebug.cpp +1722 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDual.cpp +3003 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDual.h +513 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualMulti.cpp +1020 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.cpp +535 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRHS.h +134 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.cpp +697 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkDualRow.h +201 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkInterface.cpp +26 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.cpp +2984 -0
- data/ext/lpsolver-highs/highs/simplex/HEkkPrimal.h +191 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplex.cpp +330 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplex.h +42 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.cpp +145 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexDebug.h +48 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNla.cpp +517 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNla.h +158 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaDebug.cpp +373 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaFreeze.cpp +28 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexNlaProductForm.cpp +113 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexReport.cpp +77 -0
- data/ext/lpsolver-highs/highs/simplex/HSimplexReport.h +21 -0
- data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.cpp +1495 -0
- data/ext/lpsolver-highs/highs/simplex/HighsSimplexAnalysis.h +500 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexConst.h +273 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexStruct.h +263 -0
- data/ext/lpsolver-highs/highs/simplex/SimplexTimer.h +414 -0
- data/ext/lpsolver-highs/highs/test_kkt/DevKkt.cpp +469 -0
- data/ext/lpsolver-highs/highs/test_kkt/DevKkt.h +143 -0
- data/ext/lpsolver-highs/highs/test_kkt/KktCh2.cpp +305 -0
- data/ext/lpsolver-highs/highs/test_kkt/KktCh2.h +79 -0
- data/ext/lpsolver-highs/highs/util/FactorTimer.h +199 -0
- data/ext/lpsolver-highs/highs/util/HFactor.cpp +2597 -0
- data/ext/lpsolver-highs/highs/util/HFactor.h +587 -0
- data/ext/lpsolver-highs/highs/util/HFactorConst.h +81 -0
- data/ext/lpsolver-highs/highs/util/HFactorDebug.cpp +231 -0
- data/ext/lpsolver-highs/highs/util/HFactorDebug.h +55 -0
- data/ext/lpsolver-highs/highs/util/HFactorExtend.cpp +229 -0
- data/ext/lpsolver-highs/highs/util/HFactorRefactor.cpp +304 -0
- data/ext/lpsolver-highs/highs/util/HFactorUtils.cpp +122 -0
- data/ext/lpsolver-highs/highs/util/HSet.cpp +197 -0
- data/ext/lpsolver-highs/highs/util/HSet.h +89 -0
- data/ext/lpsolver-highs/highs/util/HVector.h +22 -0
- data/ext/lpsolver-highs/highs/util/HVectorBase.cpp +271 -0
- data/ext/lpsolver-highs/highs/util/HVectorBase.h +102 -0
- data/ext/lpsolver-highs/highs/util/HighsCDouble.h +323 -0
- data/ext/lpsolver-highs/highs/util/HighsComponent.h +53 -0
- data/ext/lpsolver-highs/highs/util/HighsDataStack.h +83 -0
- data/ext/lpsolver-highs/highs/util/HighsDisjointSets.h +107 -0
- data/ext/lpsolver-highs/highs/util/HighsHash.cpp +10 -0
- data/ext/lpsolver-highs/highs/util/HighsHash.h +1274 -0
- data/ext/lpsolver-highs/highs/util/HighsHashTree.h +1461 -0
- data/ext/lpsolver-highs/highs/util/HighsInt.h +36 -0
- data/ext/lpsolver-highs/highs/util/HighsIntegers.h +212 -0
- data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.cpp +267 -0
- data/ext/lpsolver-highs/highs/util/HighsLinearSumBounds.h +203 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixPic.cpp +146 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixPic.h +37 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixSlice.h +561 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.cpp +407 -0
- data/ext/lpsolver-highs/highs/util/HighsMatrixUtils.h +57 -0
- data/ext/lpsolver-highs/highs/util/HighsMemoryAllocation.h +63 -0
- data/ext/lpsolver-highs/highs/util/HighsRandom.h +242 -0
- data/ext/lpsolver-highs/highs/util/HighsRbTree.h +452 -0
- data/ext/lpsolver-highs/highs/util/HighsSort.cpp +364 -0
- data/ext/lpsolver-highs/highs/util/HighsSort.h +131 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.cpp +1746 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseMatrix.h +151 -0
- data/ext/lpsolver-highs/highs/util/HighsSparseVectorSum.h +95 -0
- data/ext/lpsolver-highs/highs/util/HighsSplay.h +135 -0
- data/ext/lpsolver-highs/highs/util/HighsTimer.h +385 -0
- data/ext/lpsolver-highs/highs/util/HighsUtils.cpp +1259 -0
- data/ext/lpsolver-highs/highs/util/HighsUtils.h +272 -0
- data/ext/lpsolver-highs/highs/util/stringutil.cpp +131 -0
- data/ext/lpsolver-highs/highs/util/stringutil.h +46 -0
- data/ext/lpsolver-highs/highs.pc.in +12 -0
- data/ext/lpsolver-highs/meson.build +198 -0
- data/ext/lpsolver-highs/meson_options.txt +31 -0
- data/ext/lpsolver-highs/nuget/HiGHS_Logo.png +0 -0
- data/ext/lpsolver-highs/nuget/Highs.csproj +25 -0
- data/ext/lpsolver-highs/nuget/Highs.csproj.in +36 -0
- data/ext/lpsolver-highs/nuget/HowToAlternative.md +77 -0
- data/ext/lpsolver-highs/nuget/README.md +38 -0
- data/ext/lpsolver-highs/nuget/arm-toolchain.cmake +15 -0
- data/ext/lpsolver-highs/nuget/build_linux-arm.sh +13 -0
- data/ext/lpsolver-highs/nuget/build_linux.sh +10 -0
- data/ext/lpsolver-highs/nuget/build_windows.ps1 +27 -0
- data/ext/lpsolver-highs/nuget/generatePackage.ps1 +28 -0
- data/ext/lpsolver-highs/pyproject.toml +221 -0
- data/ext/lpsolver-highs/subprojects/pybind11.wrap +13 -0
- data/ext/lpsolver-highs/tests/test_highspy.py +2310 -0
- data/ext/lpsolver-highs/version.rc.in +50 -0
- data/lib/lpsolver/highs +0 -0
- data/lib/lpsolver/model.rb +28 -4
- data/lib/lpsolver/native.so +0 -0
- data/lib/lpsolver/native_model.rb +261 -0
- data/lib/lpsolver/solution.rb +72 -7
- data/lib/lpsolver/version.rb +1 -1
- data/lpsolver.gemspec +4 -1
- metadata +1176 -4
|
@@ -0,0 +1,848 @@
|
|
|
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 pdlp/CupdlpWrapper.cpp
|
|
9
|
+
* @brief
|
|
10
|
+
* @author Julian Hall
|
|
11
|
+
*/
|
|
12
|
+
#include "pdlp/CupdlpWrapper.h"
|
|
13
|
+
|
|
14
|
+
void getUserParamsFromOptions(const HighsOptions& options, HighsTimer& timer,
|
|
15
|
+
cupdlp_bool* ifChangeIntParam,
|
|
16
|
+
cupdlp_int* intParam,
|
|
17
|
+
cupdlp_bool* ifChangeFloatParam,
|
|
18
|
+
cupdlp_float* floatParam);
|
|
19
|
+
|
|
20
|
+
void analysePdlpSolution(const HighsOptions& options, const HighsLp& lp,
|
|
21
|
+
const HighsSolution& highs_solution);
|
|
22
|
+
|
|
23
|
+
HighsStatus solveLpCupdlp(HighsLpSolverObject& solver_object) {
|
|
24
|
+
return solveLpCupdlp(solver_object.options_, solver_object.timer_,
|
|
25
|
+
solver_object.lp_, solver_object.basis_,
|
|
26
|
+
solver_object.solution_, solver_object.model_status_,
|
|
27
|
+
solver_object.highs_info_, solver_object.callback_);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
HighsStatus solveLpCupdlp(const HighsOptions& options, HighsTimer& timer,
|
|
31
|
+
const HighsLp& lp, HighsBasis& highs_basis,
|
|
32
|
+
HighsSolution& highs_solution,
|
|
33
|
+
HighsModelStatus& model_status, HighsInfo& highs_info,
|
|
34
|
+
HighsCallback& callback) {
|
|
35
|
+
// Indicate that no imprecise solution has (yet) been found
|
|
36
|
+
resetModelStatusAndHighsInfo(model_status, highs_info);
|
|
37
|
+
|
|
38
|
+
char* fp = nullptr;
|
|
39
|
+
char* fp_sol = nullptr;
|
|
40
|
+
|
|
41
|
+
int nCols;
|
|
42
|
+
int nRows;
|
|
43
|
+
int nEqs;
|
|
44
|
+
int nCols_origin;
|
|
45
|
+
cupdlp_bool ifSaveSol = false;
|
|
46
|
+
cupdlp_bool ifPresolve = false;
|
|
47
|
+
|
|
48
|
+
int nnz = 0;
|
|
49
|
+
double* rhs = NULL;
|
|
50
|
+
double* cost = NULL;
|
|
51
|
+
|
|
52
|
+
cupdlp_float* lower = NULL;
|
|
53
|
+
cupdlp_float* upper = NULL;
|
|
54
|
+
|
|
55
|
+
// -------------------------
|
|
56
|
+
int *csc_beg = NULL, *csc_idx = NULL;
|
|
57
|
+
double* csc_val = NULL;
|
|
58
|
+
double offset =
|
|
59
|
+
0.0; // true objVal = sig * c'x - offset, sig = 1 (min) or -1 (max)
|
|
60
|
+
double sense_origin = 1; // 1 (min) or -1 (max)
|
|
61
|
+
int* constraint_new_idx = NULL;
|
|
62
|
+
int* constraint_type = NULL;
|
|
63
|
+
|
|
64
|
+
void* model = NULL;
|
|
65
|
+
void* presolvedmodel = NULL;
|
|
66
|
+
void* model2solve = NULL;
|
|
67
|
+
|
|
68
|
+
// WIP on zbook?
|
|
69
|
+
//
|
|
70
|
+
// HighsInt size_of_CUPDLPscaling = sizeof(CUPDLPscaling);
|
|
71
|
+
//
|
|
72
|
+
CUPDLPscaling* scaling = (CUPDLPscaling*)cupdlp_malloc(sizeof(CUPDLPscaling));
|
|
73
|
+
|
|
74
|
+
// WIP on zbook?
|
|
75
|
+
//
|
|
76
|
+
// printf("size_of_CUPDLPscaling = %d\n", size_of_CUPDLPscaling);
|
|
77
|
+
// scaling->ifRuizScaling = 1;
|
|
78
|
+
// printf("scaling->ifRuizScaling = %d\n", scaling->ifRuizScaling);
|
|
79
|
+
|
|
80
|
+
// claim solvers variables
|
|
81
|
+
// prepare pointers
|
|
82
|
+
CUPDLP_MATRIX_FORMAT src_matrix_format = CSC;
|
|
83
|
+
CUPDLP_MATRIX_FORMAT dst_matrix_format = CSR_CSC;
|
|
84
|
+
CUPDLPcsc* csc_cpu = cupdlp_NULL;
|
|
85
|
+
CUPDLPproblem* prob = cupdlp_NULL;
|
|
86
|
+
|
|
87
|
+
// load parameters
|
|
88
|
+
|
|
89
|
+
// set solver parameters
|
|
90
|
+
cupdlp_bool ifChangeIntParam[N_INT_USER_PARAM] = {false};
|
|
91
|
+
cupdlp_int intParam[N_INT_USER_PARAM] = {0};
|
|
92
|
+
cupdlp_bool ifChangeFloatParam[N_FLOAT_USER_PARAM] = {false};
|
|
93
|
+
cupdlp_float floatParam[N_FLOAT_USER_PARAM] = {0.0};
|
|
94
|
+
|
|
95
|
+
// Transfer from options
|
|
96
|
+
getUserParamsFromOptions(options, timer, ifChangeIntParam, intParam,
|
|
97
|
+
ifChangeFloatParam, floatParam);
|
|
98
|
+
|
|
99
|
+
// std::vector<int> constraint_type(lp.num_row_);
|
|
100
|
+
|
|
101
|
+
const cupdlp_int local_log_level = getCupdlpLogLevel(options);
|
|
102
|
+
if (local_log_level) cupdlp_printf("Solving with cuPDLP-C\n");
|
|
103
|
+
|
|
104
|
+
formulateLP_highs(local_log_level, lp, &cost, &nCols, &nRows, &nnz, &nEqs,
|
|
105
|
+
&csc_beg, &csc_idx, &csc_val, &rhs, &lower, &upper, &offset,
|
|
106
|
+
&sense_origin, &nCols_origin, &constraint_new_idx,
|
|
107
|
+
&constraint_type);
|
|
108
|
+
|
|
109
|
+
// H_Init_Scaling(local_log_level, scaling, nCols, nRows, cost, rhs);
|
|
110
|
+
Init_Scaling(local_log_level, scaling, nCols, nRows, cost, rhs);
|
|
111
|
+
|
|
112
|
+
cupdlp_int ifScaling = intParam[IF_SCALING];
|
|
113
|
+
|
|
114
|
+
CUPDLPwork* w = cupdlp_NULL;
|
|
115
|
+
cupdlp_init_work(w, 1);
|
|
116
|
+
|
|
117
|
+
#ifdef CUPDLP_GPU
|
|
118
|
+
cupdlp_float cuda_prepare_time = getTimeStamp();
|
|
119
|
+
// CHECK_CUSPARSE(cusparseCreate(&w->cusparsehandle));
|
|
120
|
+
cusparseStatus_t status_cusparse = cusparseCreate(&w->cusparsehandle);
|
|
121
|
+
if (status_cusparse != CUSPARSE_STATUS_SUCCESS) {
|
|
122
|
+
printf("CUSPARSE API failed at line %d of %s with error: %s (%d)\n",
|
|
123
|
+
__LINE__, __FILE__, cusparseGetErrorString(status_cusparse),
|
|
124
|
+
status_cusparse);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// CHECK_CUBLAS(cublasCreate(&w->cublashandle));
|
|
128
|
+
cublasStatus_t status_cublas = cublasCreate(&w->cublashandle);
|
|
129
|
+
if (status_cublas != CUBLAS_STATUS_SUCCESS) {
|
|
130
|
+
printf("CUBLAS API failed at line %d of %s with error: %s (%d)\n", __LINE__,
|
|
131
|
+
__FILE__, cublasGetStatusString(status_cublas), status_cublas);
|
|
132
|
+
}
|
|
133
|
+
cuda_prepare_time = getTimeStamp() - cuda_prepare_time;
|
|
134
|
+
#endif
|
|
135
|
+
|
|
136
|
+
problem_create(&prob);
|
|
137
|
+
|
|
138
|
+
// currently, only supprot that input matrix is CSC, and store both CSC and
|
|
139
|
+
// CSR
|
|
140
|
+
csc_create(&csc_cpu);
|
|
141
|
+
csc_cpu->nRows = nRows;
|
|
142
|
+
csc_cpu->nCols = nCols;
|
|
143
|
+
csc_cpu->nMatElem = nnz;
|
|
144
|
+
csc_cpu->colMatBeg = (int*)malloc((1 + nCols) * sizeof(int));
|
|
145
|
+
csc_cpu->colMatIdx = (int*)malloc(nnz * sizeof(int));
|
|
146
|
+
csc_cpu->colMatElem = (double*)malloc(nnz * sizeof(double));
|
|
147
|
+
memcpy(csc_cpu->colMatBeg, csc_beg, (nCols + 1) * sizeof(int));
|
|
148
|
+
memcpy(csc_cpu->colMatIdx, csc_idx, nnz * sizeof(int));
|
|
149
|
+
memcpy(csc_cpu->colMatElem, csc_val, nnz * sizeof(double));
|
|
150
|
+
|
|
151
|
+
cupdlp_float scaling_time = getTimeStamp();
|
|
152
|
+
|
|
153
|
+
PDHG_Scale_Data(local_log_level, csc_cpu, ifScaling, scaling, cost, lower,
|
|
154
|
+
upper, rhs);
|
|
155
|
+
|
|
156
|
+
scaling_time = getTimeStamp() - scaling_time;
|
|
157
|
+
|
|
158
|
+
cupdlp_float alloc_matrix_time = 0.0;
|
|
159
|
+
cupdlp_float copy_vec_time = 0.0;
|
|
160
|
+
|
|
161
|
+
problem_alloc(prob, nRows, nCols, nEqs, cost, offset, sense_origin, csc_cpu,
|
|
162
|
+
src_matrix_format, dst_matrix_format, rhs, lower, upper,
|
|
163
|
+
&alloc_matrix_time, ©_vec_time);
|
|
164
|
+
|
|
165
|
+
w->problem = prob;
|
|
166
|
+
w->scaling = scaling;
|
|
167
|
+
PDHG_Alloc(w);
|
|
168
|
+
w->timers->dScalingTime = scaling_time;
|
|
169
|
+
w->timers->dPresolveTime = 0; // presolve_time;
|
|
170
|
+
#ifdef CUPDLP_CPU
|
|
171
|
+
cupdlp_copy_vec(w->rowScale, scaling->rowScale, cupdlp_float, nRows);
|
|
172
|
+
cupdlp_copy_vec(w->colScale, scaling->colScale, cupdlp_float, nCols);
|
|
173
|
+
#else
|
|
174
|
+
CUPDLP_COPY_VEC(w->rowScale, scaling->rowScale, cupdlp_float, nRows);
|
|
175
|
+
CUPDLP_COPY_VEC(w->colScale, scaling->colScale, cupdlp_float, nCols);
|
|
176
|
+
#endif
|
|
177
|
+
|
|
178
|
+
#ifdef CUPDLP_GPU
|
|
179
|
+
w->timers->AllocMem_CopyMatToDeviceTime += alloc_matrix_time;
|
|
180
|
+
w->timers->CopyVecToDeviceTime += copy_vec_time;
|
|
181
|
+
w->timers->CudaPrepareTime = cuda_prepare_time;
|
|
182
|
+
#endif
|
|
183
|
+
|
|
184
|
+
// CUPDLP_CALL(LP_SolvePDHG(prob, cupdlp_NULL, cupdlp_NULL, cupdlp_NULL,
|
|
185
|
+
// cupdlp_NULL));
|
|
186
|
+
// CUPDLP_CALL(LP_SolvePDHG(prob, ifChangeIntParam, intParam,
|
|
187
|
+
// ifChangeFloatParam, floatParam, fp));
|
|
188
|
+
|
|
189
|
+
// Resize the highs_solution so cuPDLP-c can use it internally
|
|
190
|
+
highs_solution.col_value.resize(lp.num_col_);
|
|
191
|
+
highs_solution.row_value.resize(lp.num_row_);
|
|
192
|
+
highs_solution.col_dual.resize(lp.num_col_);
|
|
193
|
+
highs_solution.row_dual.resize(lp.num_row_);
|
|
194
|
+
int value_valid = highs_solution.value_valid;
|
|
195
|
+
int dual_valid = highs_solution.dual_valid;
|
|
196
|
+
int pdlp_model_status = 0;
|
|
197
|
+
cupdlp_int pdlp_num_iter = 0;
|
|
198
|
+
|
|
199
|
+
cupdlp_retcode retcode = LP_SolvePDHG(
|
|
200
|
+
w, ifChangeIntParam, intParam, ifChangeFloatParam, floatParam, fp,
|
|
201
|
+
nCols_origin, highs_solution.col_value.data(),
|
|
202
|
+
highs_solution.col_dual.data(), highs_solution.row_value.data(),
|
|
203
|
+
highs_solution.row_dual.data(), &value_valid, &dual_valid, ifSaveSol,
|
|
204
|
+
fp_sol, constraint_new_idx, constraint_type, &pdlp_model_status,
|
|
205
|
+
&pdlp_num_iter);
|
|
206
|
+
highs_info.pdlp_iteration_count = pdlp_num_iter;
|
|
207
|
+
|
|
208
|
+
#if PDLP_DEBUG_LOG
|
|
209
|
+
// Print final solution using debugPdlpFinalSolutionLog
|
|
210
|
+
debugPdlpFinalSolutionLog(w->debug_pdlp_log_file_,
|
|
211
|
+
highs_solution.col_value.data(), lp.num_col_,
|
|
212
|
+
highs_solution.row_dual.data(), lp.num_row_);
|
|
213
|
+
if (w->debug_pdlp_log_file_) fclose(w->debug_pdlp_log_file_);
|
|
214
|
+
// Moved this from LP_SolvePDHG so w->debug_pdlp_log_file_ can
|
|
215
|
+
// still be used
|
|
216
|
+
//
|
|
217
|
+
#endif
|
|
218
|
+
PDHG_Destroy(&w);
|
|
219
|
+
|
|
220
|
+
model_status = HighsModelStatus::kUnknown;
|
|
221
|
+
highs_solution.value_valid = value_valid;
|
|
222
|
+
highs_solution.dual_valid = dual_valid;
|
|
223
|
+
highs_basis.valid = false;
|
|
224
|
+
|
|
225
|
+
if (retcode == RETCODE_OK) {
|
|
226
|
+
if (pdlp_model_status == OPTIMAL) {
|
|
227
|
+
model_status = HighsModelStatus::kOptimal;
|
|
228
|
+
} else if (pdlp_model_status == INFEASIBLE) {
|
|
229
|
+
model_status = HighsModelStatus::kInfeasible;
|
|
230
|
+
} else if (pdlp_model_status == UNBOUNDED) {
|
|
231
|
+
model_status = HighsModelStatus::kUnbounded;
|
|
232
|
+
} else if (pdlp_model_status == INFEASIBLE_OR_UNBOUNDED) {
|
|
233
|
+
model_status = HighsModelStatus::kUnboundedOrInfeasible;
|
|
234
|
+
} else if (pdlp_model_status == TIMELIMIT_OR_ITERLIMIT) {
|
|
235
|
+
model_status = pdlp_num_iter >= intParam[N_ITER_LIM] - 1
|
|
236
|
+
? HighsModelStatus::kIterationLimit
|
|
237
|
+
: HighsModelStatus::kTimeLimit;
|
|
238
|
+
} else if (pdlp_model_status == FEASIBLE) {
|
|
239
|
+
assert(111 == 666);
|
|
240
|
+
model_status = HighsModelStatus::kUnknown;
|
|
241
|
+
} else {
|
|
242
|
+
assert(111 == 777);
|
|
243
|
+
}
|
|
244
|
+
#if CUPDLP_DEBUG
|
|
245
|
+
if (options.log_dev_level >= kHighsLogDevLevelDetailed)
|
|
246
|
+
analysePdlpSolution(options, lp, highs_solution);
|
|
247
|
+
#endif
|
|
248
|
+
} else {
|
|
249
|
+
// Failure return from LP_SolvePDHG
|
|
250
|
+
model_status = HighsModelStatus::kSolveError;
|
|
251
|
+
}
|
|
252
|
+
// free problem
|
|
253
|
+
if (scaling) {
|
|
254
|
+
scaling_clear(scaling);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (cost != NULL) cupdlp_free(cost);
|
|
258
|
+
if (csc_beg != NULL) cupdlp_free(csc_beg);
|
|
259
|
+
if (csc_idx != NULL) cupdlp_free(csc_idx);
|
|
260
|
+
if (csc_val != NULL) cupdlp_free(csc_val);
|
|
261
|
+
if (rhs != NULL) cupdlp_free(rhs);
|
|
262
|
+
if (lower != NULL) cupdlp_free(lower);
|
|
263
|
+
if (upper != NULL) cupdlp_free(upper);
|
|
264
|
+
if (constraint_new_idx != NULL) cupdlp_free(constraint_new_idx);
|
|
265
|
+
if (constraint_type != NULL) cupdlp_free(constraint_type);
|
|
266
|
+
|
|
267
|
+
// free memory
|
|
268
|
+
csc_clear_host(csc_cpu);
|
|
269
|
+
problem_clear(prob);
|
|
270
|
+
#if !defined(CUPDLP_CPU)
|
|
271
|
+
if (check_cuda_call(cudaDeviceReset(), __FILE__, __LINE__) != cudaSuccess) {
|
|
272
|
+
model_status = HighsModelStatus::kSolveError;
|
|
273
|
+
return HighsStatus::kError;
|
|
274
|
+
// CHECK_CUDA(cudaDeviceReset())
|
|
275
|
+
}
|
|
276
|
+
#endif
|
|
277
|
+
return retcode == RETCODE_OK ? HighsStatus::kOk : HighsStatus::kError;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
int formulateLP_highs(const cupdlp_int local_log_level, const HighsLp& lp,
|
|
281
|
+
double** cost, int* nCols, int* nRows, int* nnz,
|
|
282
|
+
int* nEqs, int** csc_beg, int** csc_idx, double** csc_val,
|
|
283
|
+
double** rhs, double** lower, double** upper,
|
|
284
|
+
double* offset, double* sense_origin, int* nCols_origin,
|
|
285
|
+
int** constraint_new_idx, int** constraint_type) {
|
|
286
|
+
int retcode = 0;
|
|
287
|
+
|
|
288
|
+
// problem size for malloc
|
|
289
|
+
int nCols_clp = lp.num_col_;
|
|
290
|
+
int nRows_clp = lp.num_row_;
|
|
291
|
+
int nnz_clp = lp.a_matrix_.start_[lp.num_col_];
|
|
292
|
+
*nCols_origin = nCols_clp;
|
|
293
|
+
*nRows = nRows_clp; // need not recalculate
|
|
294
|
+
*nCols = nCols_clp; // need recalculate
|
|
295
|
+
*nEqs = 0; // need recalculate
|
|
296
|
+
*nnz = nnz_clp; // need recalculate
|
|
297
|
+
*offset = lp.offset_; // need not recalculate
|
|
298
|
+
if (lp.sense_ == ObjSense::kMinimize) {
|
|
299
|
+
*sense_origin = 1.0;
|
|
300
|
+
} else if (lp.sense_ == ObjSense::kMaximize) {
|
|
301
|
+
*sense_origin = -1.0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const double* lhs_clp = lp.row_lower_.data();
|
|
305
|
+
const double* rhs_clp = lp.row_upper_.data();
|
|
306
|
+
const HighsInt* A_csc_beg = lp.a_matrix_.start_.data();
|
|
307
|
+
const HighsInt* A_csc_idx = lp.a_matrix_.index_.data();
|
|
308
|
+
const double* A_csc_val = lp.a_matrix_.value_.data();
|
|
309
|
+
int has_lower, has_upper;
|
|
310
|
+
|
|
311
|
+
cupdlp_init_int(*constraint_type, *nRows);
|
|
312
|
+
cupdlp_init_int(*constraint_new_idx, *nRows);
|
|
313
|
+
|
|
314
|
+
// recalculate nRows and nnz for Ax - z = 0
|
|
315
|
+
for (int i = 0; i < nRows_clp; i++) {
|
|
316
|
+
has_lower = lhs_clp[i] > -1e20;
|
|
317
|
+
has_upper = rhs_clp[i] < 1e20;
|
|
318
|
+
|
|
319
|
+
// count number of equations and rows
|
|
320
|
+
if (has_lower && has_upper && lhs_clp[i] == rhs_clp[i]) {
|
|
321
|
+
(*constraint_type)[i] = EQ;
|
|
322
|
+
(*nEqs)++;
|
|
323
|
+
} else if (has_lower && !has_upper) {
|
|
324
|
+
(*constraint_type)[i] = GEQ;
|
|
325
|
+
} else if (!has_lower && has_upper) {
|
|
326
|
+
(*constraint_type)[i] = LEQ;
|
|
327
|
+
} else if (has_lower && has_upper) {
|
|
328
|
+
(*constraint_type)[i] = BOUND;
|
|
329
|
+
(*nCols)++;
|
|
330
|
+
(*nnz)++;
|
|
331
|
+
(*nEqs)++;
|
|
332
|
+
} else {
|
|
333
|
+
// printf("Error: constraint %d has no lower and upper bound\n", i);
|
|
334
|
+
// retcode = 1;
|
|
335
|
+
// goto exit_cleanup;
|
|
336
|
+
|
|
337
|
+
// what if regard free as bounded
|
|
338
|
+
printf("Warning: constraint %d has no lower and upper bound\n", i);
|
|
339
|
+
(*constraint_type)[i] = BOUND;
|
|
340
|
+
(*nCols)++;
|
|
341
|
+
(*nnz)++;
|
|
342
|
+
(*nEqs)++;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// allocate memory
|
|
347
|
+
cupdlp_init_double(*cost, *nCols);
|
|
348
|
+
cupdlp_init_double(*lower, *nCols);
|
|
349
|
+
cupdlp_init_double(*upper, *nCols);
|
|
350
|
+
cupdlp_init_int(*csc_beg, *nCols + 1);
|
|
351
|
+
cupdlp_init_int(*csc_idx, *nnz);
|
|
352
|
+
cupdlp_init_double(*csc_val, *nnz);
|
|
353
|
+
cupdlp_init_double(*rhs, *nRows);
|
|
354
|
+
|
|
355
|
+
// cost, lower, upper
|
|
356
|
+
for (int i = 0; i < nCols_clp; i++) {
|
|
357
|
+
(*cost)[i] = lp.col_cost_[i] * (*sense_origin);
|
|
358
|
+
(*lower)[i] = lp.col_lower_[i];
|
|
359
|
+
|
|
360
|
+
(*upper)[i] = lp.col_upper_[i];
|
|
361
|
+
}
|
|
362
|
+
// slack costs
|
|
363
|
+
for (int i = nCols_clp; i < *nCols; i++) {
|
|
364
|
+
(*cost)[i] = 0.0;
|
|
365
|
+
}
|
|
366
|
+
// slack bounds
|
|
367
|
+
for (int i = 0, j = nCols_clp; i < *nRows; i++) {
|
|
368
|
+
if ((*constraint_type)[i] == BOUND) {
|
|
369
|
+
(*lower)[j] = lhs_clp[i];
|
|
370
|
+
(*upper)[j] = rhs_clp[i];
|
|
371
|
+
j++;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
for (int i = 0; i < *nCols; i++) {
|
|
376
|
+
if ((*lower)[i] < -1e20) (*lower)[i] = -INFINITY;
|
|
377
|
+
if ((*upper)[i] > 1e20) (*upper)[i] = INFINITY;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// permute LP rhs
|
|
381
|
+
// EQ or BOUND first
|
|
382
|
+
for (int i = 0, j = 0; i < *nRows; i++) {
|
|
383
|
+
if ((*constraint_type)[i] == EQ) {
|
|
384
|
+
(*rhs)[j] = lhs_clp[i];
|
|
385
|
+
(*constraint_new_idx)[i] = j;
|
|
386
|
+
j++;
|
|
387
|
+
} else if ((*constraint_type)[i] == BOUND) {
|
|
388
|
+
(*rhs)[j] = 0.0;
|
|
389
|
+
(*constraint_new_idx)[i] = j;
|
|
390
|
+
j++;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
// then LEQ or GEQ
|
|
394
|
+
for (int i = 0, j = *nEqs; i < *nRows; i++) {
|
|
395
|
+
if ((*constraint_type)[i] == LEQ) {
|
|
396
|
+
(*rhs)[j] = -rhs_clp[i]; // multiply -1
|
|
397
|
+
(*constraint_new_idx)[i] = j;
|
|
398
|
+
j++;
|
|
399
|
+
} else if ((*constraint_type)[i] == GEQ) {
|
|
400
|
+
(*rhs)[j] = lhs_clp[i];
|
|
401
|
+
(*constraint_new_idx)[i] = j;
|
|
402
|
+
j++;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// formulate and permute LP matrix
|
|
407
|
+
// beg remains the same
|
|
408
|
+
for (int i = 0; i < nCols_clp + 1; i++) (*csc_beg)[i] = A_csc_beg[i];
|
|
409
|
+
for (int i = nCols_clp + 1; i < *nCols + 1; i++)
|
|
410
|
+
(*csc_beg)[i] = (*csc_beg)[i - 1] + 1;
|
|
411
|
+
|
|
412
|
+
// row idx changes
|
|
413
|
+
for (int i = 0, k = 0; i < nCols_clp; i++) {
|
|
414
|
+
// same order as in rhs
|
|
415
|
+
// EQ or BOUND first
|
|
416
|
+
for (int j = (*csc_beg)[i]; j < (*csc_beg)[i + 1]; j++) {
|
|
417
|
+
if ((*constraint_type)[A_csc_idx[j]] == EQ ||
|
|
418
|
+
(*constraint_type)[A_csc_idx[j]] == BOUND) {
|
|
419
|
+
(*csc_idx)[k] = (*constraint_new_idx)[A_csc_idx[j]];
|
|
420
|
+
(*csc_val)[k] = A_csc_val[j];
|
|
421
|
+
k++;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// then LEQ or GEQ
|
|
425
|
+
for (int j = (*csc_beg)[i]; j < (*csc_beg)[i + 1]; j++) {
|
|
426
|
+
if ((*constraint_type)[A_csc_idx[j]] == LEQ) {
|
|
427
|
+
(*csc_idx)[k] = (*constraint_new_idx)[A_csc_idx[j]];
|
|
428
|
+
(*csc_val)[k] = -A_csc_val[j]; // multiply -1
|
|
429
|
+
k++;
|
|
430
|
+
} else if ((*constraint_type)[A_csc_idx[j]] == GEQ) {
|
|
431
|
+
(*csc_idx)[k] = (*constraint_new_idx)[A_csc_idx[j]];
|
|
432
|
+
(*csc_val)[k] = A_csc_val[j];
|
|
433
|
+
k++;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// slacks for BOUND
|
|
439
|
+
for (int i = 0, j = nCols_clp; i < *nRows; i++) {
|
|
440
|
+
if ((*constraint_type)[i] == BOUND) {
|
|
441
|
+
(*csc_idx)[(*csc_beg)[j]] = (*constraint_new_idx)[i];
|
|
442
|
+
(*csc_val)[(*csc_beg)[j]] = -1.0;
|
|
443
|
+
j++;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return retcode;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
cupdlp_retcode problem_create(CUPDLPproblem** prob) {
|
|
451
|
+
cupdlp_retcode retcode = RETCODE_OK;
|
|
452
|
+
|
|
453
|
+
cupdlp_init_problem(*prob, 1);
|
|
454
|
+
|
|
455
|
+
return retcode;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// cupdlp_retcode csc_create(CUPDLPcsc **csc_cpu) {
|
|
459
|
+
// cupdlp_retcode retcode = RETCODE_OK;
|
|
460
|
+
//
|
|
461
|
+
// cupdlp_init_csc_cpu(*csc_cpu, 1);
|
|
462
|
+
//
|
|
463
|
+
// return retcode;
|
|
464
|
+
// }
|
|
465
|
+
|
|
466
|
+
cupdlp_retcode data_alloc(CUPDLPdata* data, cupdlp_int nRows, cupdlp_int nCols,
|
|
467
|
+
void* matrix, CUPDLP_MATRIX_FORMAT src_matrix_format,
|
|
468
|
+
CUPDLP_MATRIX_FORMAT dst_matrix_format) {
|
|
469
|
+
cupdlp_retcode retcode = RETCODE_OK;
|
|
470
|
+
|
|
471
|
+
data->nRows = nRows;
|
|
472
|
+
data->nCols = nCols;
|
|
473
|
+
data->matrix_format = dst_matrix_format;
|
|
474
|
+
data->dense_matrix = cupdlp_NULL;
|
|
475
|
+
data->csr_matrix = cupdlp_NULL;
|
|
476
|
+
data->csc_matrix = cupdlp_NULL;
|
|
477
|
+
data->device = CPU;
|
|
478
|
+
#ifdef CUPDLP_CPU
|
|
479
|
+
data->device = CPU;
|
|
480
|
+
#else
|
|
481
|
+
data->device = SINGLE_GPU;
|
|
482
|
+
#endif
|
|
483
|
+
|
|
484
|
+
switch (dst_matrix_format) {
|
|
485
|
+
case DENSE:
|
|
486
|
+
dense_create(&data->dense_matrix);
|
|
487
|
+
dense_alloc_matrix(data->dense_matrix, nRows, nCols, matrix,
|
|
488
|
+
src_matrix_format);
|
|
489
|
+
break;
|
|
490
|
+
case CSR:
|
|
491
|
+
csr_create(&data->csr_matrix);
|
|
492
|
+
csr_alloc_matrix(data->csr_matrix, nRows, nCols, matrix,
|
|
493
|
+
src_matrix_format);
|
|
494
|
+
break;
|
|
495
|
+
case CSC:
|
|
496
|
+
csc_create(&data->csc_matrix);
|
|
497
|
+
csc_alloc_matrix(data->csc_matrix, nRows, nCols, matrix,
|
|
498
|
+
src_matrix_format);
|
|
499
|
+
break;
|
|
500
|
+
case CSR_CSC:
|
|
501
|
+
csc_create(&data->csc_matrix);
|
|
502
|
+
csc_alloc_matrix(data->csc_matrix, nRows, nCols, matrix,
|
|
503
|
+
src_matrix_format);
|
|
504
|
+
csr_create(&data->csr_matrix);
|
|
505
|
+
csr_alloc_matrix(data->csr_matrix, nRows, nCols, matrix,
|
|
506
|
+
src_matrix_format);
|
|
507
|
+
break;
|
|
508
|
+
default:
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
// currently, only supprot that input matrix is CSC, and store both CSC and
|
|
512
|
+
// CSR data->csc_matrix = matrix;
|
|
513
|
+
|
|
514
|
+
return retcode;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
cupdlp_retcode problem_alloc(
|
|
518
|
+
CUPDLPproblem* prob, cupdlp_int nRows, cupdlp_int nCols, cupdlp_int nEqs,
|
|
519
|
+
cupdlp_float* cost, cupdlp_float offset, cupdlp_float sense_origin,
|
|
520
|
+
void* matrix, CUPDLP_MATRIX_FORMAT src_matrix_format,
|
|
521
|
+
CUPDLP_MATRIX_FORMAT dst_matrix_format, cupdlp_float* rhs,
|
|
522
|
+
cupdlp_float* lower, cupdlp_float* upper, cupdlp_float* alloc_matrix_time,
|
|
523
|
+
cupdlp_float* copy_vec_time) {
|
|
524
|
+
cupdlp_retcode retcode = RETCODE_OK;
|
|
525
|
+
prob->nRows = nRows;
|
|
526
|
+
prob->nCols = nCols;
|
|
527
|
+
prob->nEqs = nEqs;
|
|
528
|
+
prob->data = cupdlp_NULL;
|
|
529
|
+
prob->cost = cupdlp_NULL;
|
|
530
|
+
prob->offset = offset;
|
|
531
|
+
prob->sense_origin = sense_origin;
|
|
532
|
+
prob->rhs = cupdlp_NULL;
|
|
533
|
+
prob->lower = cupdlp_NULL;
|
|
534
|
+
prob->upper = cupdlp_NULL;
|
|
535
|
+
|
|
536
|
+
cupdlp_float begin = getTimeStamp();
|
|
537
|
+
|
|
538
|
+
cupdlp_init_data(prob->data, 1);
|
|
539
|
+
|
|
540
|
+
cupdlp_init_vec_double(prob->cost, nCols);
|
|
541
|
+
cupdlp_init_vec_double(prob->rhs, nRows);
|
|
542
|
+
cupdlp_init_vec_double(prob->lower, nCols);
|
|
543
|
+
cupdlp_init_vec_double(prob->upper, nCols);
|
|
544
|
+
cupdlp_init_zero_vec_double(prob->hasLower, nCols);
|
|
545
|
+
cupdlp_init_zero_vec_double(prob->hasUpper, nCols);
|
|
546
|
+
// #elif defined(CUPDLP_GPU)
|
|
547
|
+
// CUPDLP_INIT_VEC(prob->cost, nCols);
|
|
548
|
+
// CUPDLP_INIT_VEC(prob->rhs, nRows);
|
|
549
|
+
// CUPDLP_INIT_VEC(prob->lower, nCols);
|
|
550
|
+
// CUPDLP_INIT_VEC(prob->upper, nCols);
|
|
551
|
+
// CUPDLP_INIT_ZERO_VEC(prob->hasLower, nCols);
|
|
552
|
+
// CUPDLP_INIT_ZERO_VEC(prob->hasUpper, nCols);
|
|
553
|
+
// #endif
|
|
554
|
+
|
|
555
|
+
data_alloc(prob->data, nRows, nCols, matrix, src_matrix_format,
|
|
556
|
+
dst_matrix_format);
|
|
557
|
+
*alloc_matrix_time = getTimeStamp() - begin;
|
|
558
|
+
|
|
559
|
+
prob->data->csc_matrix->MatElemNormInf =
|
|
560
|
+
infNorm(((CUPDLPcsc*)matrix)->colMatElem, ((CUPDLPcsc*)matrix)->nMatElem);
|
|
561
|
+
|
|
562
|
+
begin = getTimeStamp();
|
|
563
|
+
#ifdef CUPDLP_CPU
|
|
564
|
+
cupdlp_copy_vec(prob->cost, cost, cupdlp_float, nCols);
|
|
565
|
+
cupdlp_copy_vec(prob->rhs, rhs, cupdlp_float, nRows);
|
|
566
|
+
cupdlp_copy_vec(prob->lower, lower, cupdlp_float, nCols);
|
|
567
|
+
cupdlp_copy_vec(prob->upper, upper, cupdlp_float, nCols);
|
|
568
|
+
#else
|
|
569
|
+
CUPDLP_COPY_VEC(prob->cost, cost, cupdlp_float, nCols);
|
|
570
|
+
CUPDLP_COPY_VEC(prob->rhs, rhs, cupdlp_float, nRows);
|
|
571
|
+
CUPDLP_COPY_VEC(prob->lower, lower, cupdlp_float, nCols);
|
|
572
|
+
CUPDLP_COPY_VEC(prob->upper, upper, cupdlp_float, nCols);
|
|
573
|
+
#endif
|
|
574
|
+
|
|
575
|
+
*copy_vec_time = getTimeStamp() - begin;
|
|
576
|
+
|
|
577
|
+
// Keep
|
|
578
|
+
cupdlp_haslb(prob->hasLower, prob->lower, -INFINITY, nCols);
|
|
579
|
+
cupdlp_hasub(prob->hasUpper, prob->upper, +INFINITY, nCols);
|
|
580
|
+
|
|
581
|
+
// TODO: cal dMaxCost, dMaxRhs, dMaxRowBound
|
|
582
|
+
|
|
583
|
+
exit_cleanup:
|
|
584
|
+
return retcode;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// ToDo: Why can linker not pick up infNorm, cupdlp_haslb and
|
|
588
|
+
// cupdlp_hasub from pdlp/cupdlp/cupdlp_linalg.c?
|
|
589
|
+
|
|
590
|
+
double infNorm(double* x, cupdlp_int n) {
|
|
591
|
+
double norm = 0;
|
|
592
|
+
for (HighsInt iX = 0; iX < n; iX++) norm = std::max(std::fabs(x[iX]), norm);
|
|
593
|
+
return norm;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// void cupdlp_haslb(cupdlp_float* haslb, const cupdlp_float* lb,
|
|
597
|
+
// const cupdlp_float bound, const cupdlp_int len) {
|
|
598
|
+
// for (int i = 0; i < len; i++) {
|
|
599
|
+
// haslb[i] = lb[i] > bound ? 1.0 : 0.0;
|
|
600
|
+
// }
|
|
601
|
+
// }
|
|
602
|
+
|
|
603
|
+
// void cupdlp_hasub(cupdlp_float* hasub, const cupdlp_float* ub,
|
|
604
|
+
// const cupdlp_float bound, const cupdlp_int len) {
|
|
605
|
+
// for (int i = 0; i < len; i++) {
|
|
606
|
+
// hasub[i] = ub[i] < bound ? 1.0 : 0.0;
|
|
607
|
+
// }
|
|
608
|
+
// }
|
|
609
|
+
|
|
610
|
+
void cupdlp_hasLower(cupdlp_float* haslb, const cupdlp_float* lb,
|
|
611
|
+
const cupdlp_float bound, const cupdlp_int len) {
|
|
612
|
+
for (int i = 0; i < len; i++) {
|
|
613
|
+
haslb[i] = lb[i] > bound ? 1.0 : 0.0;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
void cupdlp_hasUpper(cupdlp_float* hasub, const cupdlp_float* ub,
|
|
618
|
+
const cupdlp_float bound, const cupdlp_int len) {
|
|
619
|
+
for (int i = 0; i < len; i++) {
|
|
620
|
+
hasub[i] = ub[i] < bound ? 1.0 : 0.0;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
void cupdlp_haslb(cupdlp_float* haslb, const cupdlp_float* lb,
|
|
625
|
+
const cupdlp_float bound, const cupdlp_int len) {
|
|
626
|
+
#ifndef CUPDLP_CPU
|
|
627
|
+
cupdlp_haslb_cuda(haslb, lb, bound, len);
|
|
628
|
+
#else
|
|
629
|
+
cupdlp_hasLower(haslb, lb, bound, len);
|
|
630
|
+
#endif
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
void cupdlp_hasub(cupdlp_float* hasub, const cupdlp_float* ub,
|
|
634
|
+
const cupdlp_float bound, const cupdlp_int len) {
|
|
635
|
+
#ifndef CUPDLP_CPU
|
|
636
|
+
cupdlp_hasub_cuda(hasub, ub, bound, len);
|
|
637
|
+
#else
|
|
638
|
+
cupdlp_hasUpper(hasub, ub, bound, len);
|
|
639
|
+
#endif
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
void getUserParamsFromOptions(const HighsOptions& options, HighsTimer& timer,
|
|
643
|
+
cupdlp_bool* ifChangeIntParam,
|
|
644
|
+
cupdlp_int* intParam,
|
|
645
|
+
cupdlp_bool* ifChangeFloatParam,
|
|
646
|
+
cupdlp_float* floatParam) {
|
|
647
|
+
for (cupdlp_int i = 0; i < N_INT_USER_PARAM; ++i) ifChangeIntParam[i] = false;
|
|
648
|
+
for (cupdlp_int i = 0; i < N_FLOAT_USER_PARAM; ++i)
|
|
649
|
+
ifChangeFloatParam[i] = false;
|
|
650
|
+
// Assume all PDLP-related options in HiGHS cause changes
|
|
651
|
+
ifChangeIntParam[N_ITER_LIM] = true;
|
|
652
|
+
// If HiGHS is using 64-bit integers, then the default value of
|
|
653
|
+
// options.pdlp_iteration_limit is kHighsIInf, so copying this to
|
|
654
|
+
// intParam[N_ITER_LIM] will overflow.
|
|
655
|
+
intParam[N_ITER_LIM] = cupdlp_int(options.pdlp_iteration_limit > kHighsIInf32
|
|
656
|
+
? kHighsIInf32
|
|
657
|
+
: options.pdlp_iteration_limit);
|
|
658
|
+
//
|
|
659
|
+
ifChangeIntParam[N_LOG_LEVEL] = true;
|
|
660
|
+
intParam[N_LOG_LEVEL] = getCupdlpLogLevel(options);
|
|
661
|
+
//
|
|
662
|
+
ifChangeIntParam[IF_SCALING] = true;
|
|
663
|
+
cupdlp_int scaling_on =
|
|
664
|
+
(options.pdlp_features_off & kPdlpScalingOff) == 0 ? 1 : 0;
|
|
665
|
+
intParam[IF_SCALING] = scaling_on;
|
|
666
|
+
if (scaling_on == 0)
|
|
667
|
+
highsLogUser(options.log_options, HighsLogType::kInfo,
|
|
668
|
+
"PDLP: Scaling off\n");
|
|
669
|
+
//
|
|
670
|
+
ifChangeIntParam[E_LINE_SEARCH_METHOD] = true;
|
|
671
|
+
cupdlp_int adaptive_lineasearch =
|
|
672
|
+
(options.pdlp_features_off & kPdlpAdaptiveStepSizeOff) == 0 ? 1 : 0;
|
|
673
|
+
intParam[E_LINE_SEARCH_METHOD] = adaptive_lineasearch;
|
|
674
|
+
if (adaptive_lineasearch == 1) {
|
|
675
|
+
intParam[E_LINE_SEARCH_METHOD] = PDHG_ADAPTIVE_LINESEARCH;
|
|
676
|
+
} else {
|
|
677
|
+
intParam[E_LINE_SEARCH_METHOD] = PDHG_FIXED_LINESEARCH;
|
|
678
|
+
}
|
|
679
|
+
if (adaptive_lineasearch == 0)
|
|
680
|
+
highsLogUser(options.log_options, HighsLogType::kInfo,
|
|
681
|
+
"PDLP: Adaptive line search off\n");
|
|
682
|
+
//
|
|
683
|
+
ifChangeFloatParam[D_PRIMAL_TOL] = true;
|
|
684
|
+
floatParam[D_PRIMAL_TOL] = options.primal_feasibility_tolerance;
|
|
685
|
+
//
|
|
686
|
+
ifChangeFloatParam[D_DUAL_TOL] = true;
|
|
687
|
+
floatParam[D_DUAL_TOL] = options.dual_feasibility_tolerance;
|
|
688
|
+
//
|
|
689
|
+
ifChangeFloatParam[D_GAP_TOL] = true;
|
|
690
|
+
floatParam[D_GAP_TOL] = options.pdlp_optimality_tolerance;
|
|
691
|
+
// Possibly over-write with uniform KKT tolerance
|
|
692
|
+
if (options.kkt_tolerance != kDefaultKktTolerance) {
|
|
693
|
+
floatParam[D_PRIMAL_TOL] = options.kkt_tolerance;
|
|
694
|
+
floatParam[D_DUAL_TOL] = options.kkt_tolerance;
|
|
695
|
+
floatParam[D_GAP_TOL] = options.kkt_tolerance;
|
|
696
|
+
}
|
|
697
|
+
//
|
|
698
|
+
// cuPDLP-C has its own timer, so set its time limit according to
|
|
699
|
+
// the time remaining with respect to the HiGHS time limit (if
|
|
700
|
+
// finite)
|
|
701
|
+
double time_limit = options.time_limit;
|
|
702
|
+
if (time_limit < kHighsInf) {
|
|
703
|
+
time_limit -= timer.read();
|
|
704
|
+
time_limit = std::max(0.0, time_limit);
|
|
705
|
+
}
|
|
706
|
+
ifChangeFloatParam[D_TIME_LIM] = true;
|
|
707
|
+
floatParam[D_TIME_LIM] = options.time_limit;
|
|
708
|
+
//
|
|
709
|
+
ifChangeIntParam[E_RESTART_METHOD] = true;
|
|
710
|
+
cupdlp_int restart_on =
|
|
711
|
+
(options.pdlp_features_off & kPdlpRestartOff) == 0 ? 1 : 0;
|
|
712
|
+
if (options.pdlp_cupdlpc_restart_method == 0) restart_on = 0;
|
|
713
|
+
intParam[E_RESTART_METHOD] = restart_on;
|
|
714
|
+
if (restart_on == 0)
|
|
715
|
+
highsLogUser(options.log_options, HighsLogType::kInfo,
|
|
716
|
+
"PDLP: Restart off\n");
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
void analysePdlpSolution(const HighsOptions& options, const HighsLp& lp,
|
|
720
|
+
const HighsSolution& highs_solution) {
|
|
721
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++)
|
|
722
|
+
printf("x[%2d] = %11.5g\n", int(iCol), highs_solution.col_value[iCol]);
|
|
723
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
724
|
+
printf("y[%2d] = %11.5g\n", int(iRow), highs_solution.row_dual[iRow]);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
HighsInt num_primal_infeasibility = 0;
|
|
728
|
+
HighsInt num_dual_infeasibility = 0;
|
|
729
|
+
double max_primal_infeasibility = 0;
|
|
730
|
+
double max_dual_infeasibility = 0;
|
|
731
|
+
double sum_primal_infeasibility = 0;
|
|
732
|
+
double sum_dual_infeasibility = 0;
|
|
733
|
+
const double primal_feasibility_tolerance =
|
|
734
|
+
options.primal_feasibility_tolerance;
|
|
735
|
+
const double dual_feasibility_tolerance = options.dual_feasibility_tolerance;
|
|
736
|
+
double lower;
|
|
737
|
+
double upper;
|
|
738
|
+
double value;
|
|
739
|
+
double dual;
|
|
740
|
+
// lambda for computing infeasibilities
|
|
741
|
+
auto updateInfeasibilities = [&]() {
|
|
742
|
+
double primal_infeasibility = 0;
|
|
743
|
+
double dual_infeasibility = 0;
|
|
744
|
+
// @primal_infeasibility calculation
|
|
745
|
+
if (value < lower - primal_feasibility_tolerance) {
|
|
746
|
+
// Below lower
|
|
747
|
+
primal_infeasibility = lower - value;
|
|
748
|
+
} else if (value > upper + primal_feasibility_tolerance) {
|
|
749
|
+
// Above upper
|
|
750
|
+
primal_infeasibility = value - upper;
|
|
751
|
+
}
|
|
752
|
+
double value_residual =
|
|
753
|
+
std::min(std::fabs(lower - value), std::fabs(value - upper));
|
|
754
|
+
bool at_a_bound = value_residual <= primal_feasibility_tolerance;
|
|
755
|
+
if (at_a_bound) {
|
|
756
|
+
// At a bound
|
|
757
|
+
double middle = (lower + upper) * 0.5;
|
|
758
|
+
if (lower < upper) {
|
|
759
|
+
// Non-fixed variable
|
|
760
|
+
if (value < middle) {
|
|
761
|
+
// At lower
|
|
762
|
+
dual_infeasibility = std::max(-dual, 0.);
|
|
763
|
+
} else {
|
|
764
|
+
// At upper
|
|
765
|
+
dual_infeasibility = std::max(dual, 0.);
|
|
766
|
+
}
|
|
767
|
+
} else {
|
|
768
|
+
// Fixed variable
|
|
769
|
+
dual_infeasibility = 0;
|
|
770
|
+
}
|
|
771
|
+
} else {
|
|
772
|
+
// Off bounds (or free)
|
|
773
|
+
dual_infeasibility = fabs(dual);
|
|
774
|
+
}
|
|
775
|
+
// Accumulate primal infeasibilities
|
|
776
|
+
if (primal_infeasibility > primal_feasibility_tolerance)
|
|
777
|
+
num_primal_infeasibility++;
|
|
778
|
+
max_primal_infeasibility =
|
|
779
|
+
std::max(primal_infeasibility, max_primal_infeasibility);
|
|
780
|
+
sum_primal_infeasibility += primal_infeasibility;
|
|
781
|
+
// Accumulate dual infeasibilities
|
|
782
|
+
if (dual_infeasibility > dual_feasibility_tolerance)
|
|
783
|
+
num_dual_infeasibility++;
|
|
784
|
+
max_dual_infeasibility =
|
|
785
|
+
std::max(dual_infeasibility, max_dual_infeasibility);
|
|
786
|
+
sum_dual_infeasibility += dual_infeasibility;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
// Apply the model sense, as PDLP will have done this
|
|
790
|
+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) {
|
|
791
|
+
lower = lp.col_lower_[iCol];
|
|
792
|
+
upper = lp.col_upper_[iCol];
|
|
793
|
+
value = highs_solution.col_value[iCol];
|
|
794
|
+
dual = int(lp.sense_) * highs_solution.col_dual[iCol];
|
|
795
|
+
updateInfeasibilities();
|
|
796
|
+
}
|
|
797
|
+
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
|
|
798
|
+
lower = lp.row_lower_[iRow];
|
|
799
|
+
upper = lp.row_upper_[iRow];
|
|
800
|
+
value = highs_solution.row_value[iRow];
|
|
801
|
+
dual = int(lp.sense_) * highs_solution.row_dual[iRow];
|
|
802
|
+
updateInfeasibilities();
|
|
803
|
+
}
|
|
804
|
+
//
|
|
805
|
+
// Determine the sum of complementary violations
|
|
806
|
+
double max_complementary_violation = 0;
|
|
807
|
+
for (HighsInt iVar = 0; iVar < lp.num_col_ + lp.num_row_; iVar++) {
|
|
808
|
+
const bool is_col = iVar < lp.num_col_;
|
|
809
|
+
const HighsInt iRow = iVar - lp.num_col_;
|
|
810
|
+
const double primal = is_col ? highs_solution.col_value[iVar]
|
|
811
|
+
: highs_solution.row_value[iRow];
|
|
812
|
+
const double dual =
|
|
813
|
+
is_col ? highs_solution.col_dual[iVar] : highs_solution.row_dual[iRow];
|
|
814
|
+
const double lower = is_col ? lp.col_lower_[iVar] : lp.row_lower_[iRow];
|
|
815
|
+
const double upper = is_col ? lp.col_upper_[iVar] : lp.row_upper_[iRow];
|
|
816
|
+
const double mid = (lower + upper) * 0.5;
|
|
817
|
+
const double primal_residual =
|
|
818
|
+
primal < mid ? std::fabs(lower - primal) : std::fabs(upper - primal);
|
|
819
|
+
const double dual_residual = std::fabs(dual);
|
|
820
|
+
const double complementary_violation = primal_residual * dual_residual;
|
|
821
|
+
max_complementary_violation =
|
|
822
|
+
std::max(complementary_violation, max_complementary_violation);
|
|
823
|
+
printf(
|
|
824
|
+
"%s %2d [%11.5g, %11.5g, %11.5g] has (primal_residual, dual) values "
|
|
825
|
+
"(%11.6g, %11.6g) so complementary_violation = %11.6g\n",
|
|
826
|
+
is_col ? "Column" : "Row ", is_col ? int(iVar) : int(iRow), lower,
|
|
827
|
+
primal, upper, primal_residual, dual_residual, complementary_violation);
|
|
828
|
+
}
|
|
829
|
+
printf("PDLP max complementary violation = %g\n",
|
|
830
|
+
max_complementary_violation);
|
|
831
|
+
printf(" primal infeasibilities (%d, %11.6g, %11.6g)\n",
|
|
832
|
+
int(num_primal_infeasibility), sum_primal_infeasibility,
|
|
833
|
+
max_primal_infeasibility);
|
|
834
|
+
printf(" dual infeasibilities (%d, %11.6g, %11.6g)\n",
|
|
835
|
+
int(num_dual_infeasibility), sum_dual_infeasibility,
|
|
836
|
+
max_dual_infeasibility);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
cupdlp_int getCupdlpLogLevel(const HighsOptions& options) {
|
|
840
|
+
if (options.output_flag) {
|
|
841
|
+
if (options.log_dev_level) {
|
|
842
|
+
return 2;
|
|
843
|
+
} else {
|
|
844
|
+
return 1;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return 0;
|
|
848
|
+
}
|