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,1001 @@
|
|
|
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 io/HMPSIO.cpp
|
|
9
|
+
* @brief
|
|
10
|
+
*/
|
|
11
|
+
#include "io/HMPSIO.h"
|
|
12
|
+
|
|
13
|
+
#include <algorithm>
|
|
14
|
+
#include <cstdio>
|
|
15
|
+
|
|
16
|
+
#include "lp_data/HConst.h"
|
|
17
|
+
#include "lp_data/HighsLp.h"
|
|
18
|
+
#include "lp_data/HighsModelUtils.h"
|
|
19
|
+
#include "lp_data/HighsOptions.h"
|
|
20
|
+
#include "util/HighsUtils.h"
|
|
21
|
+
#include "util/stringutil.h"
|
|
22
|
+
|
|
23
|
+
#ifdef ZLIB_FOUND
|
|
24
|
+
#include "../extern/zstr/zstr.hpp"
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
using std::map;
|
|
28
|
+
|
|
29
|
+
//
|
|
30
|
+
// Read file called filename. Returns 0 if OK and 1 if file can't be opened
|
|
31
|
+
//
|
|
32
|
+
FilereaderRetcode readMps(
|
|
33
|
+
const HighsLogOptions& log_options, const std::string& filename,
|
|
34
|
+
HighsInt mxNumRow, HighsInt mxNumCol, HighsInt& numRow, HighsInt& numCol,
|
|
35
|
+
ObjSense& objSense, double& objOffset, vector<HighsInt>& Astart,
|
|
36
|
+
vector<HighsInt>& Aindex, vector<double>& Avalue, vector<double>& colCost,
|
|
37
|
+
vector<double>& colLower, vector<double>& colUpper,
|
|
38
|
+
vector<double>& rowLower, vector<double>& rowUpper,
|
|
39
|
+
vector<HighsVarType>& integerColumn, std::string& objective_name,
|
|
40
|
+
vector<std::string>& col_names, vector<std::string>& row_names,
|
|
41
|
+
HighsInt& Qdim, vector<HighsInt>& Qstart, vector<HighsInt>& Qindex,
|
|
42
|
+
vector<double>& Qvalue, HighsInt& cost_row_location, bool& warning_issued,
|
|
43
|
+
const HighsInt keep_n_rows) {
|
|
44
|
+
// Keep track of any warnings that are issued so that
|
|
45
|
+
// Highs::readModel can return HighsStatus::kWarning
|
|
46
|
+
warning_issued = false;
|
|
47
|
+
// MPS file buffer
|
|
48
|
+
numRow = 0;
|
|
49
|
+
numCol = 0;
|
|
50
|
+
Qdim = 0;
|
|
51
|
+
cost_row_location = -1;
|
|
52
|
+
objOffset = 0;
|
|
53
|
+
objSense = ObjSense::kMinimize;
|
|
54
|
+
objective_name = "";
|
|
55
|
+
|
|
56
|
+
// Astart.clear() added since setting Astart.push_back(0) in
|
|
57
|
+
// setup_clearModel() messes up the MPS read
|
|
58
|
+
Astart.clear();
|
|
59
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
60
|
+
"readMPS: Trying to open file %s\n", filename.c_str());
|
|
61
|
+
#ifdef ZLIB_FOUND
|
|
62
|
+
zstr::ifstream file;
|
|
63
|
+
try {
|
|
64
|
+
file.open(filename, std::ios::in);
|
|
65
|
+
} catch (const strict_fstream::Exception& e) {
|
|
66
|
+
highsLogDev(log_options, HighsLogType::kInfo, e.what());
|
|
67
|
+
return FilereaderRetcode::kFileNotFound;
|
|
68
|
+
}
|
|
69
|
+
#else
|
|
70
|
+
std::ifstream file;
|
|
71
|
+
file.open(filename, std::ios::in);
|
|
72
|
+
#endif
|
|
73
|
+
if (!file.is_open()) {
|
|
74
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
75
|
+
"readMPS: Not opened file OK\n");
|
|
76
|
+
return FilereaderRetcode::kFileNotFound;
|
|
77
|
+
}
|
|
78
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Opened file OK\n");
|
|
79
|
+
// Input buffer
|
|
80
|
+
const HighsInt lmax = 128;
|
|
81
|
+
std::array<char, lmax> line;
|
|
82
|
+
std::array<char, 2> flag = {0, 0};
|
|
83
|
+
std::array<double, 3> data;
|
|
84
|
+
|
|
85
|
+
HighsInt num_alien_entries = 0;
|
|
86
|
+
HighsVarType integerCol = HighsVarType::kContinuous;
|
|
87
|
+
|
|
88
|
+
// Load NAME
|
|
89
|
+
load_mpsLine(file, integerCol, lmax, line.data(), flag.data(), data.data());
|
|
90
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read NAME OK\n");
|
|
91
|
+
// Load OBJSENSE or ROWS
|
|
92
|
+
load_mpsLine(file, integerCol, lmax, line.data(), flag.data(), data.data());
|
|
93
|
+
if (flag[0] == 'O') {
|
|
94
|
+
// Found OBJSENSE
|
|
95
|
+
load_mpsLine(file, integerCol, lmax, line.data(), flag.data(), data.data());
|
|
96
|
+
std::string sense(&line[2], &line[2] + 3);
|
|
97
|
+
// the sense must be "MAX" or "MIN"
|
|
98
|
+
if (sense.compare("MAX") == 0) {
|
|
99
|
+
objSense = ObjSense::kMaximize;
|
|
100
|
+
} else if (sense.compare("MIN") == 0) {
|
|
101
|
+
objSense = ObjSense::kMinimize;
|
|
102
|
+
} else {
|
|
103
|
+
return FilereaderRetcode::kParserError;
|
|
104
|
+
}
|
|
105
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
106
|
+
"readMPS: Read OBJSENSE OK\n");
|
|
107
|
+
// Load ROWS
|
|
108
|
+
load_mpsLine(file, integerCol, lmax, line.data(), flag.data(), data.data());
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
row_names.clear();
|
|
112
|
+
col_names.clear();
|
|
113
|
+
vector<char> rowType;
|
|
114
|
+
map<double, int> rowIndex;
|
|
115
|
+
double objName = 0;
|
|
116
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
117
|
+
data.data())) {
|
|
118
|
+
if (flag[0] == 'N' &&
|
|
119
|
+
(objName == 0 || keep_n_rows == kKeepNRowsDeleteRows)) {
|
|
120
|
+
// N-row: take the first as the objective and possibly ignore any others
|
|
121
|
+
if (objName == 0) {
|
|
122
|
+
objName = data[1];
|
|
123
|
+
std::string name(&line[4], &line[4] + 8);
|
|
124
|
+
objective_name = trim(name);
|
|
125
|
+
cost_row_location = numRow;
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
if (mxNumRow > 0 && numRow >= mxNumRow)
|
|
129
|
+
return FilereaderRetcode::kParserError;
|
|
130
|
+
rowType.push_back(flag[0]);
|
|
131
|
+
// rowIndex is used to get the row index from a row name in the
|
|
132
|
+
// COLUMNS, RHS and RANGES section. However, if this contains a
|
|
133
|
+
// reference to a row that isn't in the ROWS section the value
|
|
134
|
+
// of rowIndex is zero. Unless the value associated with the
|
|
135
|
+
// name in rowIndex is one more than the index of the row, this
|
|
136
|
+
// return of zero leads to data relating to row 0 being
|
|
137
|
+
// over-written and (generally) corrupted.
|
|
138
|
+
rowIndex[data[1]] = ++numRow;
|
|
139
|
+
std::string name(&line[4], &line[4] + 8);
|
|
140
|
+
name = trim(name);
|
|
141
|
+
row_names.push_back(name);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read ROWS OK\n");
|
|
145
|
+
|
|
146
|
+
// Load COLUMNS
|
|
147
|
+
map<double, int> colIndex;
|
|
148
|
+
double lastName = 0;
|
|
149
|
+
// flag[1] is used to indicate whether there is more to read on the
|
|
150
|
+
// line - field 5 non-empty. save_flag1 is used to deduce whether
|
|
151
|
+
// the row name and value are from fields 5 and 6, or 3 and 4
|
|
152
|
+
HighsInt save_flag1 = 0;
|
|
153
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
154
|
+
data.data())) {
|
|
155
|
+
HighsInt iRow = rowIndex[data[2]] - 1;
|
|
156
|
+
std::string name = "";
|
|
157
|
+
if (iRow >= 0) name = row_names[iRow];
|
|
158
|
+
if (lastName != data[1]) { // New column
|
|
159
|
+
if (mxNumCol > 0 && numCol >= mxNumCol)
|
|
160
|
+
return FilereaderRetcode::kParserError;
|
|
161
|
+
lastName = data[1];
|
|
162
|
+
// colIndex is used to get the column index from a column name
|
|
163
|
+
// in the BOUNDS section. However, if this contains a reference
|
|
164
|
+
// to a column that isn't in the COLUMNS section the value of
|
|
165
|
+
// colIndex is zero. Unless the value associated with the name
|
|
166
|
+
// in colIndex is one more than the index of the column, this
|
|
167
|
+
// return of zero leads to the bounds on column 0 being
|
|
168
|
+
// over-written and (generally) corrupted.
|
|
169
|
+
colIndex[data[1]] = ++numCol;
|
|
170
|
+
colCost.push_back(0);
|
|
171
|
+
Astart.push_back(Aindex.size());
|
|
172
|
+
integerColumn.push_back(integerCol);
|
|
173
|
+
std::string name(&line[field_2_start],
|
|
174
|
+
&line[field_2_start] + field_2_width);
|
|
175
|
+
name = trim(name);
|
|
176
|
+
col_names.push_back(name);
|
|
177
|
+
}
|
|
178
|
+
if (data[2] == objName) // Cost
|
|
179
|
+
colCost.back() = data[0];
|
|
180
|
+
else if (data[0] != 0) {
|
|
181
|
+
HighsInt iRow = rowIndex[data[2]] - 1;
|
|
182
|
+
if (iRow >= 0) {
|
|
183
|
+
if (rowType[iRow] != 'N' || keep_n_rows != kKeepNRowsDeleteEntries) {
|
|
184
|
+
Aindex.push_back(iRow);
|
|
185
|
+
Avalue.push_back(data[0]);
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
// Spurious row name
|
|
189
|
+
std::string name;
|
|
190
|
+
if (!save_flag1) {
|
|
191
|
+
std::string field_3(&line[field_3_start],
|
|
192
|
+
&line[field_3_start] + field_3_width);
|
|
193
|
+
name = field_3;
|
|
194
|
+
} else {
|
|
195
|
+
std::string field_5(&line[field_5_start],
|
|
196
|
+
&line[field_5_start] + field_5_width);
|
|
197
|
+
name = field_5;
|
|
198
|
+
}
|
|
199
|
+
num_alien_entries++;
|
|
200
|
+
highsLogDev(
|
|
201
|
+
log_options, HighsLogType::kInfo,
|
|
202
|
+
"COLUMNS section contains row %-8s not in ROWS section, line: "
|
|
203
|
+
"%s\n",
|
|
204
|
+
name.c_str(), line);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
save_flag1 = flag[1];
|
|
208
|
+
}
|
|
209
|
+
Astart.push_back(Aindex.size());
|
|
210
|
+
|
|
211
|
+
if (num_alien_entries) {
|
|
212
|
+
warning_issued = true;
|
|
213
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
214
|
+
"COLUMNS section entries contain %8" HIGHSINT_FORMAT
|
|
215
|
+
" with row not in ROWS "
|
|
216
|
+
" section: ignored\n",
|
|
217
|
+
num_alien_entries);
|
|
218
|
+
}
|
|
219
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read COLUMNS OK\n");
|
|
220
|
+
|
|
221
|
+
// Load RHS
|
|
222
|
+
num_alien_entries = 0;
|
|
223
|
+
vector<double> RHS(numRow, 0);
|
|
224
|
+
save_flag1 = 0;
|
|
225
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
226
|
+
data.data())) {
|
|
227
|
+
if (data[2] != objName) {
|
|
228
|
+
HighsInt iRow = rowIndex[data[2]] - 1;
|
|
229
|
+
if (iRow >= 0) {
|
|
230
|
+
RHS[iRow] = data[0];
|
|
231
|
+
} else {
|
|
232
|
+
// Spurious row name
|
|
233
|
+
std::string name;
|
|
234
|
+
if (!save_flag1) {
|
|
235
|
+
std::string field_3(&line[field_3_start],
|
|
236
|
+
&line[field_3_start] + field_3_width);
|
|
237
|
+
name = field_3;
|
|
238
|
+
} else {
|
|
239
|
+
std::string field_5(&line[field_5_start],
|
|
240
|
+
&line[field_5_start] + field_5_width);
|
|
241
|
+
name = field_5;
|
|
242
|
+
}
|
|
243
|
+
num_alien_entries++;
|
|
244
|
+
highsLogUser(log_options, HighsLogType::kInfo,
|
|
245
|
+
"RHS section contains row %-8s not in ROWS "
|
|
246
|
+
"section, line: %s\n",
|
|
247
|
+
name.c_str(), line);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
// Treat negation of a RHS entry for the N row as an objective
|
|
251
|
+
// offset. Not all MPS readers do this, so give different
|
|
252
|
+
// reported objective values for problems (eg e226)
|
|
253
|
+
highsLogDev(
|
|
254
|
+
log_options, HighsLogType::kInfo,
|
|
255
|
+
"Using RHS value of %g for N-row in MPS file as negated objective "
|
|
256
|
+
"offset\n",
|
|
257
|
+
data[0]);
|
|
258
|
+
objOffset = -data[0]; // Objective offset
|
|
259
|
+
}
|
|
260
|
+
save_flag1 = flag[1];
|
|
261
|
+
}
|
|
262
|
+
if (num_alien_entries) {
|
|
263
|
+
warning_issued = true;
|
|
264
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
265
|
+
"RHS section entries contain %8" HIGHSINT_FORMAT
|
|
266
|
+
" with row not in ROWS "
|
|
267
|
+
" section: ignored\n",
|
|
268
|
+
num_alien_entries);
|
|
269
|
+
}
|
|
270
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read RHS OK\n");
|
|
271
|
+
|
|
272
|
+
// Load RANGES
|
|
273
|
+
num_alien_entries = 0;
|
|
274
|
+
rowLower.resize(numRow);
|
|
275
|
+
rowUpper.resize(numRow);
|
|
276
|
+
if (flag[0] == 'R') {
|
|
277
|
+
save_flag1 = 0;
|
|
278
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
279
|
+
data.data())) {
|
|
280
|
+
HighsInt iRow = rowIndex[data[2]] - 1;
|
|
281
|
+
if (iRow >= 0) {
|
|
282
|
+
if (rowType[iRow] == 'L' || (rowType[iRow] == 'E' && data[0] < 0)) {
|
|
283
|
+
rowLower[iRow] = RHS[iRow] - fabs(data[0]);
|
|
284
|
+
rowUpper[iRow] = RHS[iRow];
|
|
285
|
+
} else {
|
|
286
|
+
rowUpper[iRow] = RHS[iRow] + fabs(data[0]);
|
|
287
|
+
rowLower[iRow] = RHS[iRow];
|
|
288
|
+
}
|
|
289
|
+
rowType[iRow] = 'X';
|
|
290
|
+
} else {
|
|
291
|
+
// Spurious row name
|
|
292
|
+
std::string name;
|
|
293
|
+
if (!save_flag1) {
|
|
294
|
+
std::string field_3(&line[field_3_start],
|
|
295
|
+
&line[field_3_start] + field_3_width);
|
|
296
|
+
name = field_3;
|
|
297
|
+
} else {
|
|
298
|
+
std::string field_5(&line[field_5_start],
|
|
299
|
+
&line[field_5_start] + field_5_width);
|
|
300
|
+
name = field_5;
|
|
301
|
+
}
|
|
302
|
+
num_alien_entries++;
|
|
303
|
+
highsLogDev(
|
|
304
|
+
log_options, HighsLogType::kInfo,
|
|
305
|
+
"RANGES section contains row %-8s not in ROWS section, line: "
|
|
306
|
+
"%s\n",
|
|
307
|
+
name.c_str(), line);
|
|
308
|
+
}
|
|
309
|
+
save_flag1 = flag[1];
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Setup bounds for row without 'RANGE'
|
|
314
|
+
for (HighsInt iRow = 0; iRow < numRow; iRow++) {
|
|
315
|
+
switch (rowType[iRow]) {
|
|
316
|
+
case 'L':
|
|
317
|
+
rowLower[iRow] = -kHighsInf;
|
|
318
|
+
rowUpper[iRow] = RHS[iRow];
|
|
319
|
+
break;
|
|
320
|
+
case 'G':
|
|
321
|
+
rowLower[iRow] = RHS[iRow];
|
|
322
|
+
rowUpper[iRow] = +kHighsInf;
|
|
323
|
+
break;
|
|
324
|
+
case 'E':
|
|
325
|
+
rowLower[iRow] = RHS[iRow];
|
|
326
|
+
rowUpper[iRow] = RHS[iRow];
|
|
327
|
+
break;
|
|
328
|
+
case 'N':
|
|
329
|
+
rowLower[iRow] = -kHighsInf;
|
|
330
|
+
rowUpper[iRow] = +kHighsInf;
|
|
331
|
+
break;
|
|
332
|
+
case 'X':
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (num_alien_entries) {
|
|
337
|
+
warning_issued = true;
|
|
338
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
339
|
+
"RANGES section entries contain %8" HIGHSINT_FORMAT
|
|
340
|
+
" with row not in ROWS "
|
|
341
|
+
" section: ignored\n",
|
|
342
|
+
num_alien_entries);
|
|
343
|
+
}
|
|
344
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read RANGES OK\n");
|
|
345
|
+
|
|
346
|
+
// Load BOUNDS
|
|
347
|
+
num_alien_entries = 0;
|
|
348
|
+
colLower.assign(numCol, 0);
|
|
349
|
+
colUpper.assign(numCol, kHighsInf);
|
|
350
|
+
if (flag[0] == 'B') {
|
|
351
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
352
|
+
data.data())) {
|
|
353
|
+
// Find the column index associated with the name "data[2]". If
|
|
354
|
+
// the name is in colIndex then the value stored is the true
|
|
355
|
+
// column index plus one. Otherwise 0 will be returned.
|
|
356
|
+
HighsInt iCol = colIndex[data[2]] - 1;
|
|
357
|
+
if (iCol >= 0) {
|
|
358
|
+
switch (flag[0]) {
|
|
359
|
+
case 'O': /*LO*/
|
|
360
|
+
colLower[iCol] = data[0];
|
|
361
|
+
break;
|
|
362
|
+
case 'I': /*MI*/
|
|
363
|
+
colLower[iCol] = -kHighsInf;
|
|
364
|
+
break;
|
|
365
|
+
case 'L': /*PL*/
|
|
366
|
+
colUpper[iCol] = kHighsInf;
|
|
367
|
+
break;
|
|
368
|
+
case 'X': /*FX*/
|
|
369
|
+
colLower[iCol] = data[0];
|
|
370
|
+
colUpper[iCol] = data[0];
|
|
371
|
+
break;
|
|
372
|
+
case 'R': /*FR*/
|
|
373
|
+
colLower[iCol] = -kHighsInf;
|
|
374
|
+
colUpper[iCol] = kHighsInf;
|
|
375
|
+
break;
|
|
376
|
+
case 'P': /*UP*/
|
|
377
|
+
colUpper[iCol] = data[0];
|
|
378
|
+
if (colLower[iCol] == 0 && data[0] < 0) colLower[iCol] = -kHighsInf;
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
} else {
|
|
382
|
+
std::string name(&line[field_3_start],
|
|
383
|
+
&line[field_3_start] + field_3_width);
|
|
384
|
+
num_alien_entries++;
|
|
385
|
+
highsLogDev(
|
|
386
|
+
log_options, HighsLogType::kInfo,
|
|
387
|
+
"BOUNDS section contains col %-8s not in COLUMNS section, line: "
|
|
388
|
+
"%s\n",
|
|
389
|
+
name.c_str(), line);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
// Load Hessian
|
|
394
|
+
if (flag[0] == 'Q') {
|
|
395
|
+
warning_issued = true;
|
|
396
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
397
|
+
"Quadratic section: under development. Assumes "
|
|
398
|
+
"QUADOBJ/QSECTION section\n");
|
|
399
|
+
Qdim = numCol;
|
|
400
|
+
HighsInt hessian_nz = 0;
|
|
401
|
+
HighsInt previous_col = -1;
|
|
402
|
+
bool has_diagonal = false;
|
|
403
|
+
Qstart.clear();
|
|
404
|
+
while (load_mpsLine(file, integerCol, lmax, line.data(), flag.data(),
|
|
405
|
+
data.data())) {
|
|
406
|
+
HighsInt iCol0 = colIndex[data[1]] - 1;
|
|
407
|
+
std::string name0 = "";
|
|
408
|
+
if (iCol0 >= 0) name0 = col_names[iCol0];
|
|
409
|
+
HighsInt iCol1 = colIndex[data[2]] - 1;
|
|
410
|
+
std::string name1 = "";
|
|
411
|
+
if (iCol1 >= 0) name1 = col_names[iCol1];
|
|
412
|
+
double value = data[0];
|
|
413
|
+
if (iCol0 != previous_col) {
|
|
414
|
+
// Can't handle columns out of order
|
|
415
|
+
if (iCol0 < previous_col) {
|
|
416
|
+
return FilereaderRetcode::kParserError;
|
|
417
|
+
} else if (iCol0 > previous_col) {
|
|
418
|
+
// A previous column has entries, but not on the diagonal
|
|
419
|
+
if (previous_col >= 0 && !has_diagonal)
|
|
420
|
+
return FilereaderRetcode::kParserError;
|
|
421
|
+
// New column, so set up starts of any intermediate (empty) columns
|
|
422
|
+
for (HighsInt iCol = previous_col + 1; iCol < iCol0; iCol++)
|
|
423
|
+
Qstart.push_back(hessian_nz);
|
|
424
|
+
Qstart.push_back(hessian_nz);
|
|
425
|
+
previous_col = iCol0;
|
|
426
|
+
has_diagonal = false;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
// Assumes QUADOBJ, so iCol1 cannot be less than iCol0
|
|
430
|
+
if (iCol1 < iCol0) return FilereaderRetcode::kParserError;
|
|
431
|
+
if (iCol1 == iCol0) has_diagonal = true;
|
|
432
|
+
if (value) {
|
|
433
|
+
Qindex.push_back(iCol1);
|
|
434
|
+
Qvalue.push_back(value);
|
|
435
|
+
hessian_nz++;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
// Hessian entries have been read, so set up starts of any remaining (empty)
|
|
439
|
+
// columns
|
|
440
|
+
for (HighsInt iCol = previous_col + 1; iCol < numCol; iCol++)
|
|
441
|
+
Qstart.push_back(hessian_nz);
|
|
442
|
+
Qstart.push_back(hessian_nz);
|
|
443
|
+
assert((HighsInt)Qstart.size() == Qdim + 1);
|
|
444
|
+
assert((HighsInt)Qindex.size() == hessian_nz);
|
|
445
|
+
assert((HighsInt)Qvalue.size() == hessian_nz);
|
|
446
|
+
}
|
|
447
|
+
// Determine the number of integer variables and set bounds of [0,1]
|
|
448
|
+
// for integer variables without bounds
|
|
449
|
+
HighsInt num_int = 0;
|
|
450
|
+
for (HighsInt iCol = 0; iCol < numCol; iCol++) {
|
|
451
|
+
if (integerColumn[iCol] == HighsVarType::kInteger) {
|
|
452
|
+
num_int++;
|
|
453
|
+
if (colUpper[iCol] >= kHighsInf) colUpper[iCol] = 1;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (num_alien_entries) {
|
|
457
|
+
warning_issued = true;
|
|
458
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
459
|
+
"BOUNDS section entries contain %8" HIGHSINT_FORMAT
|
|
460
|
+
" with col not in "
|
|
461
|
+
"COLUMNS section: ignored\n",
|
|
462
|
+
num_alien_entries);
|
|
463
|
+
}
|
|
464
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read BOUNDS OK\n");
|
|
465
|
+
highsLogDev(log_options, HighsLogType::kInfo, "readMPS: Read ENDATA OK\n");
|
|
466
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
467
|
+
"readMPS: Model has %" HIGHSINT_FORMAT
|
|
468
|
+
" rows and %" HIGHSINT_FORMAT " columns with %" HIGHSINT_FORMAT
|
|
469
|
+
" integer\n",
|
|
470
|
+
numRow, numCol, num_int);
|
|
471
|
+
// Load ENDATA and close file
|
|
472
|
+
file.close();
|
|
473
|
+
// If there are no integer variables then clear the integrality vector
|
|
474
|
+
if (!num_int) integerColumn.clear();
|
|
475
|
+
return FilereaderRetcode::kOk;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
bool load_mpsLine(std::istream& file, HighsVarType& integerVar, HighsInt lmax,
|
|
479
|
+
char* line, char* flag, double* data) {
|
|
480
|
+
HighsInt F1 = 1, F2 = 4, F3 = 14, F4 = 24, F5 = 39, F6 = 49;
|
|
481
|
+
|
|
482
|
+
// check the buffer
|
|
483
|
+
if (flag[1]) {
|
|
484
|
+
flag[1] = 0;
|
|
485
|
+
memcpy(&data[2], &line[F5], 8);
|
|
486
|
+
data[0] = atof(&line[F6]);
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// try to read some to the line
|
|
491
|
+
for (;;) {
|
|
492
|
+
// Line input
|
|
493
|
+
*line = '\0';
|
|
494
|
+
file.get(line, lmax);
|
|
495
|
+
if (*line == '\0' && file.eof()) // nothing read and EOF
|
|
496
|
+
return false;
|
|
497
|
+
|
|
498
|
+
// Line trim -- to delete tailing white spaces
|
|
499
|
+
HighsInt lcnt = strlen(line) - 1;
|
|
500
|
+
// if file.get() did not stop because it reached the lmax-1 limit,
|
|
501
|
+
// then because it reached a newline char (or eof); lets consume this
|
|
502
|
+
// newline (or do nothing if eof)
|
|
503
|
+
if (lcnt + 1 < lmax - 1) file.get();
|
|
504
|
+
while (isspace(line[lcnt]) && lcnt >= 0) lcnt--;
|
|
505
|
+
if (lcnt <= 0 || line[0] == '*') continue;
|
|
506
|
+
|
|
507
|
+
// Line expand -- to get data easier
|
|
508
|
+
lcnt++;
|
|
509
|
+
while (lcnt < F4) line[lcnt++] = ' '; // For row and bound row name
|
|
510
|
+
if (lcnt == F4) line[lcnt++] = '0'; // For bound value
|
|
511
|
+
line[lcnt] = '\0';
|
|
512
|
+
|
|
513
|
+
// Done with section symbol
|
|
514
|
+
if (line[0] != ' ') {
|
|
515
|
+
flag[0] = line[0];
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if (line[F3] == '\'') {
|
|
520
|
+
if (line[F3 + 1] == 'M' && line[F3 + 2] == 'A' && line[F3 + 3] == 'R' &&
|
|
521
|
+
line[F3 + 4] == 'K' && line[F3 + 5] == 'E' && line[F3 + 6] == 'R') {
|
|
522
|
+
HighsInt cnter = line[F3 + 8];
|
|
523
|
+
while (line[cnter] != '\'') ++cnter;
|
|
524
|
+
if (line[cnter + 1] == 'I' && line[cnter + 2] == 'N' &&
|
|
525
|
+
line[cnter + 3] == 'T' && line[cnter + 4] == 'O' &&
|
|
526
|
+
line[cnter + 5] == 'R' && line[cnter + 6] == 'G')
|
|
527
|
+
integerVar = HighsVarType::kInteger;
|
|
528
|
+
else if (line[cnter + 1] == 'I' && line[cnter + 2] == 'N' &&
|
|
529
|
+
line[cnter + 3] == 'T' && line[cnter + 4] == 'E' &&
|
|
530
|
+
line[cnter + 5] == 'N' && line[cnter + 6] == 'D')
|
|
531
|
+
integerVar = HighsVarType::kContinuous;
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// Read major symbol & name
|
|
537
|
+
flag[0] = line[F1 + 1] == ' ' ? line[F1] : line[F1 + 1];
|
|
538
|
+
memcpy(&data[1], &line[F2], 8);
|
|
539
|
+
// Read 1st minor name & value to output
|
|
540
|
+
memcpy(&data[2], &line[F3], 8);
|
|
541
|
+
data[0] = atof(&line[F4]);
|
|
542
|
+
|
|
543
|
+
// Keep 2nd minor name & value for future
|
|
544
|
+
if (lcnt > F5) flag[1] = 1;
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return true;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
HighsStatus writeModelAsMps(const HighsOptions& options,
|
|
552
|
+
const std::string& filename,
|
|
553
|
+
const HighsModel& model, const bool free_format) {
|
|
554
|
+
bool warning_found = false;
|
|
555
|
+
const HighsLp& lp = model.lp_;
|
|
556
|
+
|
|
557
|
+
const bool ok_names = lp.okNames();
|
|
558
|
+
assert(ok_names);
|
|
559
|
+
if (!ok_names) return HighsStatus::kError;
|
|
560
|
+
|
|
561
|
+
const HighsHessian& hessian = model.hessian_;
|
|
562
|
+
|
|
563
|
+
HighsInt max_name_length = maxNameLength(lp);
|
|
564
|
+
bool use_free_format = free_format;
|
|
565
|
+
if (!free_format) {
|
|
566
|
+
if (max_name_length > 8) {
|
|
567
|
+
highsLogUser(options.log_options, HighsLogType::kWarning,
|
|
568
|
+
"Maximum name length is %" HIGHSINT_FORMAT
|
|
569
|
+
" so using free format rather "
|
|
570
|
+
"than fixed format\n",
|
|
571
|
+
max_name_length);
|
|
572
|
+
use_free_format = true;
|
|
573
|
+
warning_found = true;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
// Set a local objective name, creating one if necessary
|
|
577
|
+
const std::string local_objective_name =
|
|
578
|
+
findModelObjectiveName(&lp, &hessian);
|
|
579
|
+
// If there is Hessian data to write out, writeMps assumes that hessian is
|
|
580
|
+
// triangular
|
|
581
|
+
if (hessian.dim_) assert(hessian.format_ == HessianFormat::kTriangular);
|
|
582
|
+
|
|
583
|
+
HighsStatus write_status = writeMps(
|
|
584
|
+
options.log_options, filename, lp.model_name_, lp.num_row_, lp.num_col_,
|
|
585
|
+
hessian.dim_, lp.sense_, lp.offset_, lp.col_cost_, lp.col_lower_,
|
|
586
|
+
lp.col_upper_, lp.row_lower_, lp.row_upper_, lp.a_matrix_.start_,
|
|
587
|
+
lp.a_matrix_.index_, lp.a_matrix_.value_, hessian.start_, hessian.index_,
|
|
588
|
+
hessian.value_, lp.integrality_, local_objective_name, lp.col_names_,
|
|
589
|
+
lp.row_names_, use_free_format);
|
|
590
|
+
if (write_status == HighsStatus::kOk && warning_found)
|
|
591
|
+
return HighsStatus::kWarning;
|
|
592
|
+
return write_status;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
HighsStatus writeMps(
|
|
596
|
+
const HighsLogOptions& log_options, const std::string& filename,
|
|
597
|
+
const std::string& model_name, const HighsInt& num_row,
|
|
598
|
+
const HighsInt& num_col, const HighsInt& q_dim, const ObjSense& sense,
|
|
599
|
+
const double& offset, const vector<double>& col_cost,
|
|
600
|
+
const vector<double>& col_lower, const vector<double>& col_upper,
|
|
601
|
+
const vector<double>& row_lower, const vector<double>& row_upper,
|
|
602
|
+
const vector<HighsInt>& a_start, const vector<HighsInt>& a_index,
|
|
603
|
+
const vector<double>& a_value, const vector<HighsInt>& q_start,
|
|
604
|
+
const vector<HighsInt>& q_index, const vector<double>& q_value,
|
|
605
|
+
const vector<HighsVarType>& integrality, const std::string& objective_name,
|
|
606
|
+
const vector<std::string>& col_names, const vector<std::string>& row_names,
|
|
607
|
+
const bool use_free_format) {
|
|
608
|
+
HighsInt num_no_cost_zero_columns = 0;
|
|
609
|
+
HighsInt num_no_cost_zero_columns_in_bounds_section = 0;
|
|
610
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
611
|
+
"writeMPS: Trying to open file %s\n", filename.c_str());
|
|
612
|
+
FILE* file = fopen(filename.c_str(), "w");
|
|
613
|
+
if (file == 0) {
|
|
614
|
+
highsLogUser(log_options, HighsLogType::kError, "Cannot open file %s\n",
|
|
615
|
+
filename.c_str());
|
|
616
|
+
return HighsStatus::kError;
|
|
617
|
+
}
|
|
618
|
+
highsLogDev(log_options, HighsLogType::kInfo, "writeMPS: Opened file OK\n");
|
|
619
|
+
// Check that the names are no longer than 8 characters for fixed format write
|
|
620
|
+
HighsInt max_name_length =
|
|
621
|
+
std::max(maxNameLength(col_names), maxNameLength(row_names));
|
|
622
|
+
if (!use_free_format && max_name_length > 8) {
|
|
623
|
+
highsLogUser(
|
|
624
|
+
log_options, HighsLogType::kError,
|
|
625
|
+
"Cannot write fixed MPS with names of length (up to) %" HIGHSINT_FORMAT
|
|
626
|
+
"\n",
|
|
627
|
+
max_name_length);
|
|
628
|
+
fclose(file);
|
|
629
|
+
return HighsStatus::kError;
|
|
630
|
+
}
|
|
631
|
+
assert(objective_name != "");
|
|
632
|
+
vector<HighsInt> r_ty;
|
|
633
|
+
vector<double> rhs, ranges;
|
|
634
|
+
bool have_rhs = false;
|
|
635
|
+
bool have_ranges = false;
|
|
636
|
+
bool have_bounds = false;
|
|
637
|
+
bool have_int = false;
|
|
638
|
+
r_ty.resize(num_row);
|
|
639
|
+
rhs.assign(num_row, 0);
|
|
640
|
+
ranges.assign(num_row, 0);
|
|
641
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
642
|
+
if (row_lower[r_n] == row_upper[r_n]) {
|
|
643
|
+
// Equality constraint - Type E - range = 0
|
|
644
|
+
r_ty[r_n] = MPS_ROW_TY_E;
|
|
645
|
+
rhs[r_n] = row_lower[r_n];
|
|
646
|
+
} else if (!highs_isInfinity(row_upper[r_n])) {
|
|
647
|
+
// Upper bounded constraint - Type L
|
|
648
|
+
r_ty[r_n] = MPS_ROW_TY_L;
|
|
649
|
+
rhs[r_n] = row_upper[r_n];
|
|
650
|
+
if (!highs_isInfinity(-row_lower[r_n])) {
|
|
651
|
+
// Boxed constraint - range = u-l
|
|
652
|
+
ranges[r_n] = row_upper[r_n] - row_lower[r_n];
|
|
653
|
+
}
|
|
654
|
+
} else if (!highs_isInfinity(-row_lower[r_n])) {
|
|
655
|
+
// Lower bounded constraint - Type G
|
|
656
|
+
r_ty[r_n] = MPS_ROW_TY_G;
|
|
657
|
+
rhs[r_n] = row_lower[r_n];
|
|
658
|
+
} else {
|
|
659
|
+
// Free constraint - Type N
|
|
660
|
+
r_ty[r_n] = MPS_ROW_TY_N;
|
|
661
|
+
rhs[r_n] = 0;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
666
|
+
if (rhs[r_n]) {
|
|
667
|
+
have_rhs = true;
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
// Check whether there is an objective offset - which will be defines as a RHS
|
|
672
|
+
// on the cost row
|
|
673
|
+
if (offset) have_rhs = true;
|
|
674
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
675
|
+
if (ranges[r_n]) {
|
|
676
|
+
have_ranges = true;
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
have_int = false;
|
|
681
|
+
if (integrality.size()) {
|
|
682
|
+
for (HighsInt c_n = 0; c_n < num_col; c_n++) {
|
|
683
|
+
if (integrality[c_n] == HighsVarType::kInteger ||
|
|
684
|
+
integrality[c_n] == HighsVarType::kSemiContinuous ||
|
|
685
|
+
integrality[c_n] == HighsVarType::kSemiInteger) {
|
|
686
|
+
have_int = true;
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
for (HighsInt c_n = 0; c_n < num_col; c_n++) {
|
|
692
|
+
if (col_lower[c_n]) {
|
|
693
|
+
have_bounds = true;
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
bool discrete = false;
|
|
697
|
+
if (have_int)
|
|
698
|
+
discrete = integrality[c_n] == HighsVarType::kInteger ||
|
|
699
|
+
integrality[c_n] == HighsVarType::kSemiContinuous ||
|
|
700
|
+
integrality[c_n] == HighsVarType::kSemiInteger;
|
|
701
|
+
if (!highs_isInfinity(col_upper[c_n]) || discrete) {
|
|
702
|
+
// If the upper bound is finite, or the variable is integer or a
|
|
703
|
+
// semi-variable then there is a BOUNDS section. Integer
|
|
704
|
+
// variables with infinite upper bound are indicated as LI. All
|
|
705
|
+
// semi-variables appear in the BOUNDS section.
|
|
706
|
+
have_bounds = true;
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
highsLogDev(log_options, HighsLogType::kInfo,
|
|
711
|
+
"Model: RHS = %s\n RANGES = %s\n BOUNDS = %s\n",
|
|
712
|
+
highsBoolToString(have_rhs).c_str(),
|
|
713
|
+
highsBoolToString(have_ranges).c_str(),
|
|
714
|
+
highsBoolToString(have_bounds).c_str());
|
|
715
|
+
|
|
716
|
+
// Field: 1 2 3 4 5 6
|
|
717
|
+
// Columns: 2-3 5-12 15-22 25-36 40-47 50-61 Indexed
|
|
718
|
+
// from 1 Columns: 1-2 4-11 14-21 24-35 39-46 49-60
|
|
719
|
+
// Indexed from 0
|
|
720
|
+
// 1 2 3 4 5 6
|
|
721
|
+
// 0123456789012345678901234567890123456789012345678901234567890
|
|
722
|
+
// x11x22222222xx33333333xx444444444444xxx55555555xx666666666666
|
|
723
|
+
// ROWS
|
|
724
|
+
// N ENDCAP
|
|
725
|
+
// COLUMNS
|
|
726
|
+
// CFOOD01 BAGR01 .00756 BFTT01 .150768
|
|
727
|
+
// RHS
|
|
728
|
+
// RHSIDE HCAP01 -20. CBCAP01 -8.
|
|
729
|
+
// RANGES
|
|
730
|
+
// RANGE1 VILLKOR2 7. VILLKOR3 7.
|
|
731
|
+
// BOUNDS
|
|
732
|
+
// LO BOUND CFOOD01 850.
|
|
733
|
+
//
|
|
734
|
+
// NB d6cube has (eg)
|
|
735
|
+
// COLUMNS
|
|
736
|
+
// 1 1 1. 4 -1.
|
|
737
|
+
// 1 5 -1. 1151 1.
|
|
738
|
+
// Indexed from 0
|
|
739
|
+
// 1 2 3 4 5 6
|
|
740
|
+
// 0123456789012345678901234567890123456789012345678901234567890
|
|
741
|
+
// x11x22222222xx33333333xx444444444444xxx55555555xx666666666666
|
|
742
|
+
//
|
|
743
|
+
// In fixed format the first column name is " 1 ", and its first entry is
|
|
744
|
+
// in row "1 ".
|
|
745
|
+
//
|
|
746
|
+
// The free format reader thought that it had a name of "1 1" containing
|
|
747
|
+
// spaces.
|
|
748
|
+
|
|
749
|
+
fprintf(file, "NAME %s\n", model_name.c_str());
|
|
750
|
+
const bool use_objsense = true;
|
|
751
|
+
const HighsInt use_sense = use_objsense ? 1 : (HighsInt)sense;
|
|
752
|
+
if (sense == ObjSense::kMaximize) fprintf(file, "OBJSENSE\n MAX\n");
|
|
753
|
+
fprintf(file, "ROWS\n");
|
|
754
|
+
fprintf(file, " N %-8s\n", objective_name.c_str());
|
|
755
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
756
|
+
if (r_ty[r_n] == MPS_ROW_TY_E) {
|
|
757
|
+
fprintf(file, " E %-8s\n", row_names[r_n].c_str());
|
|
758
|
+
} else if (r_ty[r_n] == MPS_ROW_TY_G) {
|
|
759
|
+
fprintf(file, " G %-8s\n", row_names[r_n].c_str());
|
|
760
|
+
} else if (r_ty[r_n] == MPS_ROW_TY_L) {
|
|
761
|
+
fprintf(file, " L %-8s\n", row_names[r_n].c_str());
|
|
762
|
+
} else {
|
|
763
|
+
fprintf(file, " N %-8s\n", row_names[r_n].c_str());
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
bool integerFg = false;
|
|
767
|
+
HighsInt nIntegerMk = 0;
|
|
768
|
+
fprintf(file, "COLUMNS\n");
|
|
769
|
+
const bool write_no_cost_zero_columns = true;
|
|
770
|
+
for (HighsInt c_n = 0; c_n < num_col; c_n++) {
|
|
771
|
+
const bool no_cost_zero_column =
|
|
772
|
+
!col_cost[c_n] && a_start[c_n] == a_start[c_n + 1];
|
|
773
|
+
if (no_cost_zero_column) {
|
|
774
|
+
// Possibly skip this column as it's zero and has no cost
|
|
775
|
+
num_no_cost_zero_columns++;
|
|
776
|
+
if (write_no_cost_zero_columns) {
|
|
777
|
+
// Give the column a presence by writing out a zero cost
|
|
778
|
+
fprintf(file, " %-8s %-8s %.15g\n", col_names[c_n].c_str(),
|
|
779
|
+
objective_name.c_str(), 0.0);
|
|
780
|
+
}
|
|
781
|
+
continue;
|
|
782
|
+
}
|
|
783
|
+
if (have_int) {
|
|
784
|
+
if (integrality[c_n] == HighsVarType::kInteger && !integerFg) {
|
|
785
|
+
// Start an integer section
|
|
786
|
+
fprintf(file,
|
|
787
|
+
" MARK%04" HIGHSINT_FORMAT
|
|
788
|
+
" 'MARKER' 'INTORG'\n",
|
|
789
|
+
nIntegerMk++);
|
|
790
|
+
integerFg = true;
|
|
791
|
+
} else if (integrality[c_n] != HighsVarType::kInteger && integerFg) {
|
|
792
|
+
// End an integer section
|
|
793
|
+
fprintf(file,
|
|
794
|
+
" MARK%04" HIGHSINT_FORMAT
|
|
795
|
+
" 'MARKER' 'INTEND'\n",
|
|
796
|
+
nIntegerMk++);
|
|
797
|
+
integerFg = false;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
if (col_cost[c_n] != 0) {
|
|
801
|
+
double v = use_sense * col_cost[c_n];
|
|
802
|
+
fprintf(file, " %-8s %-8s %.15g\n", col_names[c_n].c_str(),
|
|
803
|
+
objective_name.c_str(), v);
|
|
804
|
+
}
|
|
805
|
+
for (HighsInt el_n = a_start[c_n]; el_n < a_start[c_n + 1]; el_n++) {
|
|
806
|
+
double v = a_value[el_n];
|
|
807
|
+
HighsInt r_n = a_index[el_n];
|
|
808
|
+
fprintf(file, " %-8s %-8s %.15g\n", col_names[c_n].c_str(),
|
|
809
|
+
row_names[r_n].c_str(), v);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
// End any integer section
|
|
813
|
+
if (integerFg)
|
|
814
|
+
fprintf(file,
|
|
815
|
+
" MARK%04" HIGHSINT_FORMAT
|
|
816
|
+
" 'MARKER' 'INTEND'\n",
|
|
817
|
+
nIntegerMk++);
|
|
818
|
+
have_rhs = true;
|
|
819
|
+
if (have_rhs) {
|
|
820
|
+
fprintf(file, "RHS\n");
|
|
821
|
+
if (offset) {
|
|
822
|
+
// Handle the objective offset as a RHS entry for the cost row
|
|
823
|
+
double v = -use_sense * offset;
|
|
824
|
+
fprintf(file, " RHS_V %-8s %.15g\n", objective_name.c_str(), v);
|
|
825
|
+
}
|
|
826
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
827
|
+
double v = rhs[r_n];
|
|
828
|
+
if (v) {
|
|
829
|
+
fprintf(file, " RHS_V %-8s %.15g\n", row_names[r_n].c_str(), v);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
if (have_ranges) {
|
|
834
|
+
fprintf(file, "RANGES\n");
|
|
835
|
+
for (HighsInt r_n = 0; r_n < num_row; r_n++) {
|
|
836
|
+
double v = ranges[r_n];
|
|
837
|
+
if (v) {
|
|
838
|
+
fprintf(file, " RANGE %-8s %.15g\n", row_names[r_n].c_str(), v);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
if (have_bounds) {
|
|
843
|
+
fprintf(file, "BOUNDS\n");
|
|
844
|
+
for (HighsInt c_n = 0; c_n < num_col; c_n++) {
|
|
845
|
+
double lb = col_lower[c_n];
|
|
846
|
+
double ub = col_upper[c_n];
|
|
847
|
+
bool discrete = false;
|
|
848
|
+
if (have_int)
|
|
849
|
+
discrete = integrality[c_n] == HighsVarType::kInteger ||
|
|
850
|
+
integrality[c_n] == HighsVarType::kSemiContinuous ||
|
|
851
|
+
integrality[c_n] == HighsVarType::kSemiInteger;
|
|
852
|
+
const bool no_cost_zero_column =
|
|
853
|
+
!col_cost[c_n] && a_start[c_n] == a_start[c_n + 1];
|
|
854
|
+
if (no_cost_zero_column) {
|
|
855
|
+
// Possibly skip this column if it's zero and has no cost
|
|
856
|
+
if (!highs_isInfinity(ub) || lb) {
|
|
857
|
+
// Column would have a bound to report
|
|
858
|
+
num_no_cost_zero_columns_in_bounds_section++;
|
|
859
|
+
}
|
|
860
|
+
if (!write_no_cost_zero_columns) continue;
|
|
861
|
+
}
|
|
862
|
+
if (lb == ub) {
|
|
863
|
+
// Equal lower and upper bounds: Fixed
|
|
864
|
+
fprintf(file, " FX BOUND %-8s %.15g\n", col_names[c_n].c_str(),
|
|
865
|
+
lb);
|
|
866
|
+
} else if (highs_isInfinity(-lb) && highs_isInfinity(ub)) {
|
|
867
|
+
// Infinite lower and upper bounds: Free
|
|
868
|
+
fprintf(file, " FR BOUND %-8s\n", col_names[c_n].c_str());
|
|
869
|
+
} else {
|
|
870
|
+
if (discrete) {
|
|
871
|
+
// Warn if writing non-integer bounds for integer or semi-integer
|
|
872
|
+
// variables
|
|
873
|
+
if (integrality[c_n] == HighsVarType::kInteger ||
|
|
874
|
+
integrality[c_n] == HighsVarType::kSemiInteger) {
|
|
875
|
+
if (lb > -kHighsInf) {
|
|
876
|
+
HighsInt i_lb = static_cast<HighsInt>(lb);
|
|
877
|
+
double dl = lb - i_lb;
|
|
878
|
+
if (dl)
|
|
879
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
880
|
+
"Lower bound for integer or semi-integer column "
|
|
881
|
+
"\"%s\" is %g: not integer\n",
|
|
882
|
+
col_names[c_n].c_str(), lb);
|
|
883
|
+
}
|
|
884
|
+
if (ub < kHighsInf) {
|
|
885
|
+
HighsInt i_ub = static_cast<HighsInt>(ub);
|
|
886
|
+
double dl = ub - i_ub;
|
|
887
|
+
if (dl)
|
|
888
|
+
highsLogUser(log_options, HighsLogType::kWarning,
|
|
889
|
+
"Upper bound for integer or semi-integer column "
|
|
890
|
+
"\"%s\" is %g: not integer\n",
|
|
891
|
+
col_names[c_n].c_str(), ub);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
if (integrality[c_n] == HighsVarType::kInteger) {
|
|
895
|
+
if (lb == 0 && ub == 1) {
|
|
896
|
+
// Binary
|
|
897
|
+
fprintf(file, " BV BOUND %-8s\n", col_names[c_n].c_str());
|
|
898
|
+
} else {
|
|
899
|
+
if (!highs_isInfinity(-lb)) {
|
|
900
|
+
// Finite lower bound. No need to state this if LB is
|
|
901
|
+
// zero unless UB is infinite
|
|
902
|
+
if (lb || highs_isInfinity(ub))
|
|
903
|
+
fprintf(file, " LI BOUND %-8s %.15g\n",
|
|
904
|
+
col_names[c_n].c_str(), lb);
|
|
905
|
+
} else {
|
|
906
|
+
// Infinite lower bound
|
|
907
|
+
fprintf(file, " MI BOUND %-8s\n", col_names[c_n].c_str());
|
|
908
|
+
}
|
|
909
|
+
if (!highs_isInfinity(ub)) {
|
|
910
|
+
// Finite upper bound
|
|
911
|
+
fprintf(file, " UI BOUND %-8s %.15g\n",
|
|
912
|
+
col_names[c_n].c_str(), ub);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
} else if (integrality[c_n] == HighsVarType::kSemiInteger ||
|
|
916
|
+
integrality[c_n] == HighsVarType::kSemiContinuous) {
|
|
917
|
+
// Have to use lb and ub to define semi-variables: lb is
|
|
918
|
+
// naturally finite, but what if ub is infinite?
|
|
919
|
+
//
|
|
920
|
+
// writing "inf" is fine, except for with mingw, it
|
|
921
|
+
// appears, so use something bigger than the infinite
|
|
922
|
+
// bounds value - since options.infinite_bound is
|
|
923
|
+
// unavailable
|
|
924
|
+
const double infinite_bound = 1e30;
|
|
925
|
+
const bool inf_lb = lb <= -kHighsInf;
|
|
926
|
+
const double use_lb = inf_lb ? -infinite_bound : lb;
|
|
927
|
+
const bool inf_ub = ub >= kHighsInf;
|
|
928
|
+
const double use_ub = inf_ub ? infinite_bound : ub;
|
|
929
|
+
if (inf_lb)
|
|
930
|
+
highsLogUser(
|
|
931
|
+
log_options, HighsLogType::kWarning,
|
|
932
|
+
"Lower bound for semi-variable \"%s\" is %g but writing %g\n",
|
|
933
|
+
col_names[c_n].c_str(), lb, use_lb);
|
|
934
|
+
if (inf_ub)
|
|
935
|
+
highsLogUser(
|
|
936
|
+
log_options, HighsLogType::kWarning,
|
|
937
|
+
"Upper bound for semi-variable \"%s\" is %g but writing %g\n",
|
|
938
|
+
col_names[c_n].c_str(), ub, use_ub);
|
|
939
|
+
fprintf(file, " LO BOUND %-8s %.15g\n", col_names[c_n].c_str(),
|
|
940
|
+
use_lb);
|
|
941
|
+
if (integrality[c_n] == HighsVarType::kSemiInteger) {
|
|
942
|
+
fprintf(file, " SI BOUND %-8s %.15g\n",
|
|
943
|
+
col_names[c_n].c_str(), use_ub);
|
|
944
|
+
} else {
|
|
945
|
+
// Semi-continuous
|
|
946
|
+
fprintf(file, " SC BOUND %-8s %.15g\n",
|
|
947
|
+
col_names[c_n].c_str(), use_ub);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
} else {
|
|
951
|
+
if (!highs_isInfinity(-lb)) {
|
|
952
|
+
// Lower bounded variable - default is 0
|
|
953
|
+
if (lb) {
|
|
954
|
+
fprintf(file, " LO BOUND %-8s %.15g\n",
|
|
955
|
+
col_names[c_n].c_str(), lb);
|
|
956
|
+
}
|
|
957
|
+
} else {
|
|
958
|
+
// Infinite lower bound
|
|
959
|
+
fprintf(file, " MI BOUND %-8s\n", col_names[c_n].c_str());
|
|
960
|
+
}
|
|
961
|
+
if (!highs_isInfinity(ub)) {
|
|
962
|
+
// Upper bounded variable
|
|
963
|
+
fprintf(file, " UP BOUND %-8s %.15g\n", col_names[c_n].c_str(),
|
|
964
|
+
ub);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
if (q_dim) {
|
|
971
|
+
// Write out Hessian info
|
|
972
|
+
assert((HighsInt)q_start.size() >= q_dim + 1);
|
|
973
|
+
assert((HighsInt)q_index.size() >= q_start[q_dim]);
|
|
974
|
+
assert((HighsInt)q_value.size() >= q_start[q_dim]);
|
|
975
|
+
|
|
976
|
+
// Assumes that Hessian entries are the lower triangle column-wise
|
|
977
|
+
fprintf(file, "QUADOBJ\n");
|
|
978
|
+
for (HighsInt col = 0; col < q_dim; col++) {
|
|
979
|
+
for (HighsInt el = q_start[col]; el < q_start[col + 1]; el++) {
|
|
980
|
+
HighsInt row = q_index[el];
|
|
981
|
+
assert(row >= col);
|
|
982
|
+
// May have explicit zeroes on the diagonal
|
|
983
|
+
if (q_value[el])
|
|
984
|
+
fprintf(file, " %-8s %-8s %.15g\n", col_names[col].c_str(),
|
|
985
|
+
col_names[row].c_str(), use_sense * q_value[el]);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
fprintf(file, "ENDATA\n");
|
|
990
|
+
if (num_no_cost_zero_columns)
|
|
991
|
+
highsLogUser(log_options, HighsLogType::kInfo,
|
|
992
|
+
"Model has %" HIGHSINT_FORMAT
|
|
993
|
+
" zero columns with no costs: %" HIGHSINT_FORMAT
|
|
994
|
+
" have finite upper bounds "
|
|
995
|
+
"or nonzero lower bounds and are %swritten in MPS file\n",
|
|
996
|
+
num_no_cost_zero_columns,
|
|
997
|
+
num_no_cost_zero_columns_in_bounds_section,
|
|
998
|
+
write_no_cost_zero_columns ? "" : "not ");
|
|
999
|
+
fclose(file);
|
|
1000
|
+
return HighsStatus::kOk;
|
|
1001
|
+
}
|