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,1176 @@
|
|
|
1
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
2
|
+
/* */
|
|
3
|
+
/* This file is part of the HiGHS linear optimization suite */
|
|
4
|
+
/* */
|
|
5
|
+
/* Available as open-source under the MIT License */
|
|
6
|
+
/* */
|
|
7
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
8
|
+
/**@file lp_data/HighsOptions.cpp
|
|
9
|
+
* @brief
|
|
10
|
+
*/
|
|
11
|
+
#include "lp_data/HighsOptions.h"
|
|
12
|
+
|
|
13
|
+
#include <algorithm>
|
|
14
|
+
#include <cassert>
|
|
15
|
+
#include <cctype>
|
|
16
|
+
|
|
17
|
+
#include "util/stringutil.h"
|
|
18
|
+
|
|
19
|
+
// void setLogOptions();
|
|
20
|
+
|
|
21
|
+
void highsOpenLogFile(HighsLogOptions& log_options,
|
|
22
|
+
std::vector<OptionRecord*>& option_records,
|
|
23
|
+
const std::string& log_file) {
|
|
24
|
+
HighsInt index;
|
|
25
|
+
OptionStatus status =
|
|
26
|
+
getOptionIndex(log_options, "log_file", option_records, index);
|
|
27
|
+
assert(status == OptionStatus::kOk);
|
|
28
|
+
if (log_options.log_stream != nullptr) {
|
|
29
|
+
// Current log file stream is not null, so flush and close it
|
|
30
|
+
fflush(log_options.log_stream);
|
|
31
|
+
fclose(log_options.log_stream);
|
|
32
|
+
// Set the stream to null to give a test whether it has been
|
|
33
|
+
// closed (and avoid trying to close it again which causes an
|
|
34
|
+
// error)
|
|
35
|
+
log_options.log_stream = nullptr;
|
|
36
|
+
}
|
|
37
|
+
assert(!log_options.log_stream);
|
|
38
|
+
// If new log file name is not empty, open it, appending if possible
|
|
39
|
+
//
|
|
40
|
+
// If fopen fails then it returns nullptr, so log_file is open for
|
|
41
|
+
// writing or nullptr
|
|
42
|
+
if (log_file.compare(""))
|
|
43
|
+
log_options.log_stream = fopen(log_file.c_str(), "a");
|
|
44
|
+
OptionRecordString& option = *(OptionRecordString*)option_records[index];
|
|
45
|
+
option.assignvalue(log_file);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static std::string optionEntryTypeToString(const HighsOptionType type) {
|
|
49
|
+
if (type == HighsOptionType::kBool) {
|
|
50
|
+
return "bool";
|
|
51
|
+
} else if (type == HighsOptionType::kInt) {
|
|
52
|
+
return "HighsInt";
|
|
53
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
54
|
+
return "double";
|
|
55
|
+
} else {
|
|
56
|
+
return "string";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
bool optionOffChooseOnOk(const HighsLogOptions& report_log_options,
|
|
61
|
+
const string& name, const string& value) {
|
|
62
|
+
if (value == kHighsOffString || value == kHighsChooseString ||
|
|
63
|
+
value == kHighsOnString)
|
|
64
|
+
return true;
|
|
65
|
+
highsLogUser(
|
|
66
|
+
report_log_options, HighsLogType::kError,
|
|
67
|
+
"Value \"%s\" for %s option is not one of \"%s\", \"%s\" or \"%s\"\n",
|
|
68
|
+
value.c_str(), name.c_str(), kHighsOffString.c_str(),
|
|
69
|
+
kHighsChooseString.c_str(), kHighsOnString.c_str());
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
bool optionOffOnOk(const HighsLogOptions& report_log_options,
|
|
74
|
+
const string& name, const string& value) {
|
|
75
|
+
if (value == kHighsOffString || value == kHighsOnString) return true;
|
|
76
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
77
|
+
"Value \"%s\" for %s option is not one of \"%s\" or \"%s\"\n",
|
|
78
|
+
value.c_str(), name.c_str(), kHighsOffString.c_str(),
|
|
79
|
+
kHighsOnString.c_str());
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#ifndef HIPO
|
|
84
|
+
static void noHipoErrorLog(const HighsLogOptions& report_log_options,
|
|
85
|
+
const string& option_name) {
|
|
86
|
+
highsLogUser(
|
|
87
|
+
report_log_options, HighsLogType::kError,
|
|
88
|
+
"The HiPO solver was requested via the \"%s\" option, but this build "
|
|
89
|
+
"was compiled without HiPO support. Reconfigure with -DFAST_BUILD=ON "
|
|
90
|
+
"and -DHIPO=ON to enable HiPO.\n",
|
|
91
|
+
option_name.c_str());
|
|
92
|
+
}
|
|
93
|
+
#endif
|
|
94
|
+
|
|
95
|
+
bool optionSolverOk(const HighsLogOptions& report_log_options,
|
|
96
|
+
const string& value) {
|
|
97
|
+
#ifndef HIPO
|
|
98
|
+
if (value == kHipoString) {
|
|
99
|
+
noHipoErrorLog(report_log_options, kSolverString);
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
#endif
|
|
103
|
+
if (value == kHighsChooseString || value == kSimplexString ||
|
|
104
|
+
value == kIpmString || value == kIpxString ||
|
|
105
|
+
#ifdef HIPO
|
|
106
|
+
value == kHipoString ||
|
|
107
|
+
#endif
|
|
108
|
+
value == kPdlpString || value == kQpAsmString || value == kHiPdlpString)
|
|
109
|
+
return true;
|
|
110
|
+
highsLogUser(report_log_options, HighsLogType::kWarning,
|
|
111
|
+
"Value \"%s\" for solver option is not one of \"%s\", \"%s\", "
|
|
112
|
+
"\"%s\", \"%s\", "
|
|
113
|
+
#ifdef HIPO
|
|
114
|
+
"\"%s\", "
|
|
115
|
+
#endif
|
|
116
|
+
"\"%s\", \"%s\" or \"%s\"\n",
|
|
117
|
+
value.c_str(), kHighsChooseString.c_str(),
|
|
118
|
+
kSimplexString.c_str(), kIpmString.c_str(), kIpxString.c_str(),
|
|
119
|
+
#ifdef HIPO
|
|
120
|
+
kHipoString.c_str(),
|
|
121
|
+
#endif
|
|
122
|
+
kPdlpString.c_str(), kQpAsmString.c_str(),
|
|
123
|
+
kHiPdlpString.c_str());
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
bool optionMipLpSolverOk(const HighsLogOptions& report_log_options,
|
|
128
|
+
const string& value) {
|
|
129
|
+
#ifndef HIPO
|
|
130
|
+
if (value == kHipoString) {
|
|
131
|
+
noHipoErrorLog(report_log_options, kMipLpSolverString);
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
#endif
|
|
135
|
+
if (value == kHighsChooseString || value == kSimplexString ||
|
|
136
|
+
value == kIpmString ||
|
|
137
|
+
#ifdef HIPO
|
|
138
|
+
value == kHipoString ||
|
|
139
|
+
#endif
|
|
140
|
+
value == kIpxString)
|
|
141
|
+
return true;
|
|
142
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
143
|
+
"Value \"%s\" for MIP LP solver option (\"%s\") is not one of "
|
|
144
|
+
#ifdef HIPO
|
|
145
|
+
"\"%s\", "
|
|
146
|
+
#endif
|
|
147
|
+
"\"%s\", \"%s\", \"%s\" or \"%s\"\n",
|
|
148
|
+
value.c_str(), kMipLpSolverString.c_str(),
|
|
149
|
+
kHighsChooseString.c_str(), kSimplexString.c_str(),
|
|
150
|
+
kIpmString.c_str(),
|
|
151
|
+
#ifdef HIPO
|
|
152
|
+
kHipoString.c_str(),
|
|
153
|
+
#endif
|
|
154
|
+
kIpxString.c_str());
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
bool optionMipIpmSolverOk(const HighsLogOptions& report_log_options,
|
|
159
|
+
const string& value) {
|
|
160
|
+
#ifndef HIPO
|
|
161
|
+
if (value == kHipoString) {
|
|
162
|
+
noHipoErrorLog(report_log_options, kMipIpmSolverString);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
#endif
|
|
166
|
+
if (value == kHighsChooseString || value == kIpmString ||
|
|
167
|
+
#ifdef HIPO
|
|
168
|
+
value == kHipoString ||
|
|
169
|
+
#endif
|
|
170
|
+
value == kIpxString)
|
|
171
|
+
return true;
|
|
172
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
173
|
+
"Value \"%s\" for MIP IPM solver (\"%s\") option is not one of "
|
|
174
|
+
#ifdef HIPO
|
|
175
|
+
"\"%s\", "
|
|
176
|
+
#endif
|
|
177
|
+
"\"%s\", \"%s\" or \"%s\"\n",
|
|
178
|
+
value.c_str(), kMipIpmSolverString.c_str(),
|
|
179
|
+
kHighsChooseString.c_str(), kIpmString.c_str(),
|
|
180
|
+
#ifdef HIPO
|
|
181
|
+
kHipoString.c_str(),
|
|
182
|
+
#endif
|
|
183
|
+
kIpxString.c_str());
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
bool optionHipoParallelTypeOk(const HighsLogOptions& report_log_options,
|
|
188
|
+
const string& value) {
|
|
189
|
+
if (value == kHipoNodeString || value == kHipoTreeString ||
|
|
190
|
+
value == kHipoBothString)
|
|
191
|
+
return true;
|
|
192
|
+
highsLogUser(
|
|
193
|
+
report_log_options, HighsLogType::kError,
|
|
194
|
+
"Value \"%s\" for %s option is not one of \"%s\", \"%s\" or \"%s\"\n",
|
|
195
|
+
value.c_str(), kHipoParallelString.c_str(), kHipoTreeString.c_str(),
|
|
196
|
+
kHipoNodeString.c_str(), kHipoBothString.c_str());
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
bool optionHipoSystemOk(const HighsLogOptions& report_log_options,
|
|
201
|
+
const string& value) {
|
|
202
|
+
if (value == kHipoNormalEqString || value == kHipoAugmentedString ||
|
|
203
|
+
value == kHighsChooseString)
|
|
204
|
+
return true;
|
|
205
|
+
highsLogUser(
|
|
206
|
+
report_log_options, HighsLogType::kError,
|
|
207
|
+
"Value \"%s\" for %s option is not one of \"%s\", \"%s\" or \"%s\"\n",
|
|
208
|
+
value.c_str(), kHipoSystemString.c_str(), kHipoNormalEqString.c_str(),
|
|
209
|
+
kHipoAugmentedString.c_str(), kHighsChooseString.c_str());
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
bool optionHipoOrderingOk(const HighsLogOptions& report_log_options,
|
|
214
|
+
const string& value) {
|
|
215
|
+
if (value == kHipoAmdString || value == kHipoMetisString ||
|
|
216
|
+
value == kHipoRcmString || value == kHighsChooseString)
|
|
217
|
+
return true;
|
|
218
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
219
|
+
"Value \"%s\" for %s option is not one of \"%s\", \"%s\", "
|
|
220
|
+
"\"%s\" or \"%s\"\n",
|
|
221
|
+
value.c_str(), kHipoOrderingString.c_str(),
|
|
222
|
+
kHipoAmdString.c_str(), kHipoMetisString.c_str(),
|
|
223
|
+
kHipoRcmString.c_str(), kHighsChooseString.c_str());
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
bool boolFromString(std::string value, bool& bool_value) {
|
|
228
|
+
std::transform(value.begin(), value.end(), value.begin(),
|
|
229
|
+
[](unsigned char c) { return std::tolower(c); });
|
|
230
|
+
if (value == "t" || value == "true" || value == "1" ||
|
|
231
|
+
value == kHighsOnString) {
|
|
232
|
+
bool_value = true;
|
|
233
|
+
} else if (value == "f" || value == "false" || value == "0" ||
|
|
234
|
+
value == kHighsOffString) {
|
|
235
|
+
bool_value = false;
|
|
236
|
+
} else {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
OptionStatus getOptionIndex(const HighsLogOptions& report_log_options,
|
|
243
|
+
const std::string& name,
|
|
244
|
+
const std::vector<OptionRecord*>& option_records,
|
|
245
|
+
HighsInt& index) {
|
|
246
|
+
HighsInt num_options = option_records.size();
|
|
247
|
+
for (index = 0; index < num_options; index++)
|
|
248
|
+
if (option_records[index]->name == name) return OptionStatus::kOk;
|
|
249
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
250
|
+
"getOptionIndex: Option \"%s\" is unknown\n", name.c_str());
|
|
251
|
+
return OptionStatus::kUnknownOption;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
OptionStatus checkOptions(const HighsLogOptions& report_log_options,
|
|
255
|
+
const std::vector<OptionRecord*>& option_records) {
|
|
256
|
+
bool error_found = false;
|
|
257
|
+
HighsInt num_options = option_records.size();
|
|
258
|
+
for (HighsInt index = 0; index < num_options; index++) {
|
|
259
|
+
std::string name = option_records[index]->name;
|
|
260
|
+
HighsOptionType type = option_records[index]->type;
|
|
261
|
+
// Check that there are no other options with the same name
|
|
262
|
+
for (HighsInt check_index = 0; check_index < num_options; check_index++) {
|
|
263
|
+
if (check_index == index) continue;
|
|
264
|
+
std::string check_name = option_records[check_index]->name;
|
|
265
|
+
if (check_name == name) {
|
|
266
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
267
|
+
"checkOptions: Option %" HIGHSINT_FORMAT
|
|
268
|
+
" (\"%s\") has the same name as "
|
|
269
|
+
"option %" HIGHSINT_FORMAT " \"%s\"\n",
|
|
270
|
+
index, name.c_str(), check_index, check_name.c_str());
|
|
271
|
+
error_found = true;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (type == HighsOptionType::kBool) {
|
|
275
|
+
// Check bool option
|
|
276
|
+
OptionRecordBool& option = ((OptionRecordBool*)option_records[index])[0];
|
|
277
|
+
// Check that there are no other options with the same value pointers
|
|
278
|
+
bool* value_pointer = option.value;
|
|
279
|
+
for (HighsInt check_index = 0; check_index < num_options; check_index++) {
|
|
280
|
+
if (check_index == index) continue;
|
|
281
|
+
if (option_records[check_index]->type == HighsOptionType::kBool) {
|
|
282
|
+
OptionRecordBool& check_option =
|
|
283
|
+
((OptionRecordBool*)option_records[check_index])[0];
|
|
284
|
+
if (check_option.value == value_pointer) {
|
|
285
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
286
|
+
"checkOptions: Option %" HIGHSINT_FORMAT
|
|
287
|
+
" (\"%s\") has the same "
|
|
288
|
+
"value pointer as option %" HIGHSINT_FORMAT
|
|
289
|
+
" (\"%s\")\n",
|
|
290
|
+
index, option.name.c_str(), check_index,
|
|
291
|
+
check_option.name.c_str());
|
|
292
|
+
error_found = true;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
} else if (type == HighsOptionType::kInt) {
|
|
297
|
+
// Check HighsInt option
|
|
298
|
+
OptionRecordInt& option = ((OptionRecordInt*)option_records[index])[0];
|
|
299
|
+
if (checkOption(report_log_options, option) != OptionStatus::kOk)
|
|
300
|
+
error_found = true;
|
|
301
|
+
// Check that there are no other options with the same value pointers
|
|
302
|
+
HighsInt* value_pointer = option.value;
|
|
303
|
+
for (HighsInt check_index = 0; check_index < num_options; check_index++) {
|
|
304
|
+
if (check_index == index) continue;
|
|
305
|
+
if (option_records[check_index]->type == HighsOptionType::kInt) {
|
|
306
|
+
OptionRecordInt& check_option =
|
|
307
|
+
((OptionRecordInt*)option_records[check_index])[0];
|
|
308
|
+
if (check_option.value == value_pointer) {
|
|
309
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
310
|
+
"checkOptions: Option %" HIGHSINT_FORMAT
|
|
311
|
+
" (\"%s\") has the same "
|
|
312
|
+
"value pointer as option %" HIGHSINT_FORMAT
|
|
313
|
+
" (\"%s\")\n",
|
|
314
|
+
index, option.name.c_str(), check_index,
|
|
315
|
+
check_option.name.c_str());
|
|
316
|
+
error_found = true;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
321
|
+
// Check double option
|
|
322
|
+
OptionRecordDouble& option =
|
|
323
|
+
((OptionRecordDouble*)option_records[index])[0];
|
|
324
|
+
if (checkOption(report_log_options, option) != OptionStatus::kOk)
|
|
325
|
+
error_found = true;
|
|
326
|
+
// Check that there are no other options with the same value pointers
|
|
327
|
+
double* value_pointer = option.value;
|
|
328
|
+
for (HighsInt check_index = 0; check_index < num_options; check_index++) {
|
|
329
|
+
if (check_index == index) continue;
|
|
330
|
+
if (option_records[check_index]->type == HighsOptionType::kDouble) {
|
|
331
|
+
OptionRecordDouble& check_option =
|
|
332
|
+
((OptionRecordDouble*)option_records[check_index])[0];
|
|
333
|
+
if (check_option.value == value_pointer) {
|
|
334
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
335
|
+
"checkOptions: Option %" HIGHSINT_FORMAT
|
|
336
|
+
" (\"%s\") has the same "
|
|
337
|
+
"value pointer as option %" HIGHSINT_FORMAT
|
|
338
|
+
" (\"%s\")\n",
|
|
339
|
+
index, option.name.c_str(), check_index,
|
|
340
|
+
check_option.name.c_str());
|
|
341
|
+
error_found = true;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
} else if (type == HighsOptionType::kString) {
|
|
346
|
+
// Check string option
|
|
347
|
+
OptionRecordString& option =
|
|
348
|
+
((OptionRecordString*)option_records[index])[0];
|
|
349
|
+
// Check that there are no other options with the same value pointers
|
|
350
|
+
std::string* value_pointer = option.value;
|
|
351
|
+
for (HighsInt check_index = 0; check_index < num_options; check_index++) {
|
|
352
|
+
if (check_index == index) continue;
|
|
353
|
+
if (option_records[check_index]->type == HighsOptionType::kString) {
|
|
354
|
+
OptionRecordString& check_option =
|
|
355
|
+
((OptionRecordString*)option_records[check_index])[0];
|
|
356
|
+
if (check_option.value == value_pointer) {
|
|
357
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
358
|
+
"checkOptions: Option %" HIGHSINT_FORMAT
|
|
359
|
+
" (\"%s\") has the same "
|
|
360
|
+
"value pointer as option %" HIGHSINT_FORMAT
|
|
361
|
+
" (\"%s\")\n",
|
|
362
|
+
index, option.name.c_str(), check_index,
|
|
363
|
+
check_option.name.c_str());
|
|
364
|
+
error_found = true;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (error_found) return OptionStatus::kIllegalValue;
|
|
371
|
+
highsLogUser(report_log_options, HighsLogType::kInfo,
|
|
372
|
+
"checkOptions: Options are OK\n");
|
|
373
|
+
return OptionStatus::kOk;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
OptionStatus checkOption(const HighsLogOptions& report_log_options,
|
|
377
|
+
const OptionRecordInt& option) {
|
|
378
|
+
if (option.lower_bound > option.upper_bound) {
|
|
379
|
+
highsLogUser(
|
|
380
|
+
report_log_options, HighsLogType::kError,
|
|
381
|
+
"checkOption: Option \"%s\" has inconsistent bounds [%" HIGHSINT_FORMAT
|
|
382
|
+
", %" HIGHSINT_FORMAT "]\n",
|
|
383
|
+
option.name.c_str(), option.lower_bound, option.upper_bound);
|
|
384
|
+
return OptionStatus::kIllegalValue;
|
|
385
|
+
}
|
|
386
|
+
if (option.default_value < option.lower_bound ||
|
|
387
|
+
option.default_value > option.upper_bound) {
|
|
388
|
+
highsLogUser(
|
|
389
|
+
report_log_options, HighsLogType::kError,
|
|
390
|
+
"checkOption: Option \"%s\" has default value %" HIGHSINT_FORMAT
|
|
391
|
+
" "
|
|
392
|
+
"inconsistent with bounds [%" HIGHSINT_FORMAT ", %" HIGHSINT_FORMAT
|
|
393
|
+
"]\n",
|
|
394
|
+
option.name.c_str(), option.default_value, option.lower_bound,
|
|
395
|
+
option.upper_bound);
|
|
396
|
+
return OptionStatus::kIllegalValue;
|
|
397
|
+
}
|
|
398
|
+
HighsInt value = *option.value;
|
|
399
|
+
if (value < option.lower_bound || value > option.upper_bound) {
|
|
400
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
401
|
+
"checkOption: Option \"%s\" has value %" HIGHSINT_FORMAT
|
|
402
|
+
" inconsistent with "
|
|
403
|
+
"bounds [%" HIGHSINT_FORMAT ", %" HIGHSINT_FORMAT "]\n",
|
|
404
|
+
option.name.c_str(), value, option.lower_bound,
|
|
405
|
+
option.upper_bound);
|
|
406
|
+
return OptionStatus::kIllegalValue;
|
|
407
|
+
}
|
|
408
|
+
return OptionStatus::kOk;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
OptionStatus checkOption(const HighsLogOptions& report_log_options,
|
|
412
|
+
const OptionRecordDouble& option) {
|
|
413
|
+
if (option.lower_bound > option.upper_bound) {
|
|
414
|
+
highsLogUser(
|
|
415
|
+
report_log_options, HighsLogType::kError,
|
|
416
|
+
"checkOption: Option \"%s\" has inconsistent bounds [%g, %g]\n",
|
|
417
|
+
option.name.c_str(), option.lower_bound, option.upper_bound);
|
|
418
|
+
return OptionStatus::kIllegalValue;
|
|
419
|
+
}
|
|
420
|
+
if (option.default_value < option.lower_bound ||
|
|
421
|
+
option.default_value > option.upper_bound) {
|
|
422
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
423
|
+
"checkOption: Option \"%s\" has default value %g "
|
|
424
|
+
"inconsistent with bounds [%g, %g]\n",
|
|
425
|
+
option.name.c_str(), option.default_value, option.lower_bound,
|
|
426
|
+
option.upper_bound);
|
|
427
|
+
return OptionStatus::kIllegalValue;
|
|
428
|
+
}
|
|
429
|
+
double value = *option.value;
|
|
430
|
+
if (value < option.lower_bound || value > option.upper_bound) {
|
|
431
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
432
|
+
"checkOption: Option \"%s\" has value %g inconsistent with "
|
|
433
|
+
"bounds [%g, %g]\n",
|
|
434
|
+
option.name.c_str(), value, option.lower_bound,
|
|
435
|
+
option.upper_bound);
|
|
436
|
+
return OptionStatus::kIllegalValue;
|
|
437
|
+
}
|
|
438
|
+
return OptionStatus::kOk;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
OptionStatus checkOptionValue(const HighsLogOptions& report_log_options,
|
|
442
|
+
OptionRecordInt& option, const HighsInt value) {
|
|
443
|
+
if (value < option.lower_bound) {
|
|
444
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
445
|
+
"checkOptionValue: Value %" HIGHSINT_FORMAT
|
|
446
|
+
" for option \"%s\" is below "
|
|
447
|
+
"lower bound of %" HIGHSINT_FORMAT "\n",
|
|
448
|
+
value, option.name.c_str(), option.lower_bound);
|
|
449
|
+
return OptionStatus::kIllegalValue;
|
|
450
|
+
} else if (value > option.upper_bound) {
|
|
451
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
452
|
+
"checkOptionValue: Value %" HIGHSINT_FORMAT
|
|
453
|
+
" for option \"%s\" is above "
|
|
454
|
+
"upper bound of %" HIGHSINT_FORMAT "\n",
|
|
455
|
+
value, option.name.c_str(), option.upper_bound);
|
|
456
|
+
return OptionStatus::kIllegalValue;
|
|
457
|
+
}
|
|
458
|
+
return OptionStatus::kOk;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
OptionStatus checkOptionValue(const HighsLogOptions& report_log_options,
|
|
462
|
+
OptionRecordDouble& option, const double value) {
|
|
463
|
+
if (value < option.lower_bound) {
|
|
464
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
465
|
+
"checkOptionValue: Value %g for option \"%s\" is below "
|
|
466
|
+
"lower bound of %g\n",
|
|
467
|
+
value, option.name.c_str(), option.lower_bound);
|
|
468
|
+
return OptionStatus::kIllegalValue;
|
|
469
|
+
} else if (value > option.upper_bound) {
|
|
470
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
471
|
+
"checkOptionValue: Value %g for option \"%s\" is above "
|
|
472
|
+
"upper bound of %g\n",
|
|
473
|
+
value, option.name.c_str(), option.upper_bound);
|
|
474
|
+
return OptionStatus::kIllegalValue;
|
|
475
|
+
}
|
|
476
|
+
return OptionStatus::kOk;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
OptionStatus checkOptionValue(const HighsLogOptions& report_log_options,
|
|
480
|
+
OptionRecordString& option,
|
|
481
|
+
const std::string& value) {
|
|
482
|
+
// Setting a string option. For some options only particular values
|
|
483
|
+
// are permitted, so check them
|
|
484
|
+
if (option.name == kPresolveString) {
|
|
485
|
+
if (!optionOffChooseOnOk(report_log_options, option.name, value) &&
|
|
486
|
+
value != "mip")
|
|
487
|
+
return OptionStatus::kIllegalValue;
|
|
488
|
+
} else if (option.name == kSolverString) {
|
|
489
|
+
if (!optionSolverOk(report_log_options, value))
|
|
490
|
+
return OptionStatus::kIllegalValue;
|
|
491
|
+
} else if (option.name == kMipLpSolverString) {
|
|
492
|
+
if (!optionMipLpSolverOk(report_log_options, value))
|
|
493
|
+
return OptionStatus::kIllegalValue;
|
|
494
|
+
} else if (option.name == kMipIpmSolverString) {
|
|
495
|
+
if (!optionMipIpmSolverOk(report_log_options, value))
|
|
496
|
+
return OptionStatus::kIllegalValue;
|
|
497
|
+
} else if (option.name == kParallelString) {
|
|
498
|
+
if (!optionOffChooseOnOk(report_log_options, option.name, value))
|
|
499
|
+
return OptionStatus::kIllegalValue;
|
|
500
|
+
} else if (option.name == kRunCrossoverString) {
|
|
501
|
+
if (!optionOffChooseOnOk(report_log_options, option.name, value))
|
|
502
|
+
return OptionStatus::kIllegalValue;
|
|
503
|
+
} else if (option.name == kRangingString) {
|
|
504
|
+
if (!optionOffOnOk(report_log_options, option.name, value))
|
|
505
|
+
return OptionStatus::kIllegalValue;
|
|
506
|
+
} else if (option.name == kHipoParallelString) {
|
|
507
|
+
if (!optionHipoParallelTypeOk(report_log_options, value))
|
|
508
|
+
return OptionStatus::kIllegalValue;
|
|
509
|
+
} else if (option.name == kHipoSystemString) {
|
|
510
|
+
if (!optionHipoSystemOk(report_log_options, value))
|
|
511
|
+
return OptionStatus::kIllegalValue;
|
|
512
|
+
} else if (option.name == kHipoOrderingString) {
|
|
513
|
+
if (!optionHipoOrderingOk(report_log_options, value))
|
|
514
|
+
return OptionStatus::kIllegalValue;
|
|
515
|
+
}
|
|
516
|
+
return OptionStatus::kOk;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
520
|
+
const std::string& name,
|
|
521
|
+
std::vector<OptionRecord*>& option_records,
|
|
522
|
+
const bool value) {
|
|
523
|
+
HighsInt index;
|
|
524
|
+
OptionStatus status =
|
|
525
|
+
getOptionIndex(report_log_options, name, option_records, index);
|
|
526
|
+
if (status != OptionStatus::kOk) return status;
|
|
527
|
+
HighsOptionType type = option_records[index]->type;
|
|
528
|
+
if (type != HighsOptionType::kBool) {
|
|
529
|
+
highsLogUser(
|
|
530
|
+
report_log_options, HighsLogType::kError,
|
|
531
|
+
"setLocalOptionValue: Option \"%s\" cannot be assigned a bool\n",
|
|
532
|
+
name.c_str());
|
|
533
|
+
return OptionStatus::kIllegalValue;
|
|
534
|
+
}
|
|
535
|
+
return setLocalOptionValue(((OptionRecordBool*)option_records[index])[0],
|
|
536
|
+
value);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
540
|
+
const std::string& name,
|
|
541
|
+
std::vector<OptionRecord*>& option_records,
|
|
542
|
+
const HighsInt value) {
|
|
543
|
+
HighsInt index;
|
|
544
|
+
OptionStatus status =
|
|
545
|
+
getOptionIndex(report_log_options, name, option_records, index);
|
|
546
|
+
if (status != OptionStatus::kOk) return status;
|
|
547
|
+
HighsOptionType type = option_records[index]->type;
|
|
548
|
+
if (type != HighsOptionType::kInt) {
|
|
549
|
+
if (type == HighsOptionType::kDouble) {
|
|
550
|
+
// Interpret integer as double
|
|
551
|
+
double use_value = value;
|
|
552
|
+
return setLocalOptionValue(
|
|
553
|
+
report_log_options, ((OptionRecordDouble*)option_records[index])[0],
|
|
554
|
+
use_value);
|
|
555
|
+
}
|
|
556
|
+
highsLogUser(
|
|
557
|
+
report_log_options, HighsLogType::kError,
|
|
558
|
+
"setLocalOptionValue: Option \"%s\" cannot be assigned an int\n",
|
|
559
|
+
name.c_str());
|
|
560
|
+
return OptionStatus::kIllegalValue;
|
|
561
|
+
}
|
|
562
|
+
return setLocalOptionValue(
|
|
563
|
+
report_log_options, ((OptionRecordInt*)option_records[index])[0], value);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
567
|
+
const std::string& name,
|
|
568
|
+
std::vector<OptionRecord*>& option_records,
|
|
569
|
+
const double value) {
|
|
570
|
+
HighsInt index;
|
|
571
|
+
OptionStatus status =
|
|
572
|
+
getOptionIndex(report_log_options, name, option_records, index);
|
|
573
|
+
if (status != OptionStatus::kOk) return status;
|
|
574
|
+
HighsOptionType type = option_records[index]->type;
|
|
575
|
+
if (type != HighsOptionType::kDouble) {
|
|
576
|
+
highsLogUser(
|
|
577
|
+
report_log_options, HighsLogType::kError,
|
|
578
|
+
"setLocalOptionValue: Option \"%s\" cannot be assigned a double\n",
|
|
579
|
+
name.c_str());
|
|
580
|
+
return OptionStatus::kIllegalValue;
|
|
581
|
+
}
|
|
582
|
+
return setLocalOptionValue(report_log_options,
|
|
583
|
+
((OptionRecordDouble*)option_records[index])[0],
|
|
584
|
+
value);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
588
|
+
const std::string& name,
|
|
589
|
+
HighsLogOptions& log_options,
|
|
590
|
+
std::vector<OptionRecord*>& option_records,
|
|
591
|
+
const std::string& value_passed) {
|
|
592
|
+
// Trim any leading and trailing spaces
|
|
593
|
+
std::string value_trim = value_passed;
|
|
594
|
+
trim(value_trim, " ");
|
|
595
|
+
HighsInt index;
|
|
596
|
+
OptionStatus status =
|
|
597
|
+
getOptionIndex(report_log_options, name, option_records, index);
|
|
598
|
+
if (status != OptionStatus::kOk) return status;
|
|
599
|
+
HighsOptionType type = option_records[index]->type;
|
|
600
|
+
if (type == HighsOptionType::kBool) {
|
|
601
|
+
bool value_bool;
|
|
602
|
+
bool return_status = boolFromString(value_trim, value_bool);
|
|
603
|
+
if (!return_status) {
|
|
604
|
+
highsLogUser(
|
|
605
|
+
report_log_options, HighsLogType::kError,
|
|
606
|
+
"setLocalOptionValue: Value \"%s\" cannot be interpreted as a bool\n",
|
|
607
|
+
value_trim.c_str());
|
|
608
|
+
return OptionStatus::kIllegalValue;
|
|
609
|
+
}
|
|
610
|
+
return setLocalOptionValue(((OptionRecordBool*)option_records[index])[0],
|
|
611
|
+
value_bool);
|
|
612
|
+
} else if (type == HighsOptionType::kInt) {
|
|
613
|
+
// Check that the string only contains legitimate characters
|
|
614
|
+
if (value_trim.find_first_not_of("+-0123456789eE") != std::string::npos)
|
|
615
|
+
return OptionStatus::kIllegalValue;
|
|
616
|
+
HighsInt value_int;
|
|
617
|
+
int scanned_num_char;
|
|
618
|
+
const char* value_char = value_trim.c_str();
|
|
619
|
+
sscanf(value_char, "%" HIGHSINT_FORMAT "%n", &value_int, &scanned_num_char);
|
|
620
|
+
const int value_num_char = strlen(value_char);
|
|
621
|
+
// Check that all characters in value_char are scanned by the format
|
|
622
|
+
const bool converted_ok = scanned_num_char == value_num_char;
|
|
623
|
+
if (!converted_ok) {
|
|
624
|
+
highsLogDev(report_log_options, HighsLogType::kError,
|
|
625
|
+
"setLocalOptionValue: Value = \"%s\" converts via sscanf as "
|
|
626
|
+
"%" HIGHSINT_FORMAT
|
|
627
|
+
" "
|
|
628
|
+
"by scanning %" HIGHSINT_FORMAT " of %" HIGHSINT_FORMAT
|
|
629
|
+
" characters\n",
|
|
630
|
+
value_trim.c_str(), value_int, scanned_num_char,
|
|
631
|
+
value_num_char);
|
|
632
|
+
return OptionStatus::kIllegalValue;
|
|
633
|
+
}
|
|
634
|
+
return setLocalOptionValue(report_log_options,
|
|
635
|
+
((OptionRecordInt*)option_records[index])[0],
|
|
636
|
+
value_int);
|
|
637
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
638
|
+
// Check that the string only contains legitimate characters -
|
|
639
|
+
// after handling +/- inf
|
|
640
|
+
double value_double = 0;
|
|
641
|
+
tolower(value_trim);
|
|
642
|
+
if (value_trim == "inf" || value_trim == "+inf") {
|
|
643
|
+
value_double = kHighsInf;
|
|
644
|
+
} else if (value_trim == "-inf") {
|
|
645
|
+
value_double = -kHighsInf;
|
|
646
|
+
} else {
|
|
647
|
+
if (value_trim.find_first_not_of("+-.0123456789eE") != std::string::npos)
|
|
648
|
+
return OptionStatus::kIllegalValue;
|
|
649
|
+
HighsInt value_int = atoi(value_trim.c_str());
|
|
650
|
+
value_double = atof(value_trim.c_str());
|
|
651
|
+
double value_int_double = value_int;
|
|
652
|
+
if (value_double == value_int_double) {
|
|
653
|
+
highsLogDev(report_log_options, HighsLogType::kInfo,
|
|
654
|
+
"setLocalOptionValue: Value = \"%s\" converts via atoi as "
|
|
655
|
+
"%" HIGHSINT_FORMAT
|
|
656
|
+
" "
|
|
657
|
+
"so is %g as double, and %g via atof\n",
|
|
658
|
+
value_trim.c_str(), value_int, value_int_double,
|
|
659
|
+
value_double);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return setLocalOptionValue(report_log_options,
|
|
663
|
+
((OptionRecordDouble*)option_records[index])[0],
|
|
664
|
+
value_double);
|
|
665
|
+
} else {
|
|
666
|
+
// Setting a string option value
|
|
667
|
+
if (!name.compare(kLogFileString)) {
|
|
668
|
+
OptionRecordString& option = *(OptionRecordString*)option_records[index];
|
|
669
|
+
std::string original_log_file = *(option.value);
|
|
670
|
+
if (value_passed.compare(original_log_file)) {
|
|
671
|
+
// Changing the name of the log file
|
|
672
|
+
highsOpenLogFile(log_options, option_records, value_passed);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
if (!name.compare(kModelFileString)) {
|
|
676
|
+
// Don't allow model filename to be changed - it's only an
|
|
677
|
+
// option so that reading of run-time options works
|
|
678
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
679
|
+
"setLocalOptionValue: model filename cannot be set\n");
|
|
680
|
+
return OptionStatus::kUnknownOption;
|
|
681
|
+
} else {
|
|
682
|
+
return setLocalOptionValue(
|
|
683
|
+
report_log_options, ((OptionRecordString*)option_records[index])[0],
|
|
684
|
+
value_passed);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
690
|
+
const std::string& name,
|
|
691
|
+
HighsLogOptions& log_options,
|
|
692
|
+
std::vector<OptionRecord*>& option_records,
|
|
693
|
+
const char* value) {
|
|
694
|
+
// Handles values passed as explicit values in quotes
|
|
695
|
+
std::string value_as_string(value);
|
|
696
|
+
return setLocalOptionValue(report_log_options, name, log_options,
|
|
697
|
+
option_records, value_as_string);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
OptionStatus setLocalOptionValue(OptionRecordBool& option, const bool value) {
|
|
701
|
+
option.assignvalue(value);
|
|
702
|
+
return OptionStatus::kOk;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
706
|
+
OptionRecordInt& option,
|
|
707
|
+
const HighsInt value) {
|
|
708
|
+
OptionStatus return_status =
|
|
709
|
+
checkOptionValue(report_log_options, option, value);
|
|
710
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
711
|
+
option.assignvalue(value);
|
|
712
|
+
return OptionStatus::kOk;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
716
|
+
OptionRecordDouble& option,
|
|
717
|
+
const double value) {
|
|
718
|
+
OptionStatus return_status =
|
|
719
|
+
checkOptionValue(report_log_options, option, value);
|
|
720
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
721
|
+
option.assignvalue(value);
|
|
722
|
+
return OptionStatus::kOk;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
OptionStatus setLocalOptionValue(const HighsLogOptions& report_log_options,
|
|
726
|
+
OptionRecordString& option,
|
|
727
|
+
const std::string& value) {
|
|
728
|
+
OptionStatus return_status =
|
|
729
|
+
checkOptionValue(report_log_options, option, value);
|
|
730
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
731
|
+
option.assignvalue(value);
|
|
732
|
+
return OptionStatus::kOk;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
OptionStatus passLocalOptions(const HighsLogOptions& report_log_options,
|
|
736
|
+
const HighsOptions& from_options,
|
|
737
|
+
HighsOptions& to_options) {
|
|
738
|
+
// (Attempt to) set option value from the HighsOptions passed in
|
|
739
|
+
OptionStatus return_status;
|
|
740
|
+
// std::string empty_file = "";
|
|
741
|
+
// std::string from_log_file = from_options.log_file;
|
|
742
|
+
// std::string original_to_log_file = to_options.log_file;
|
|
743
|
+
// FILE* original_to_log_stream =
|
|
744
|
+
// to_options.log_options.log_stream;
|
|
745
|
+
HighsInt num_options = to_options.records.size();
|
|
746
|
+
// Check all the option values before setting any of them - in case
|
|
747
|
+
// to_options are the main Highs options. Checks are only needed for
|
|
748
|
+
// HighsInt, double and string since bool values can't be illegal
|
|
749
|
+
for (HighsInt index = 0; index < num_options; index++) {
|
|
750
|
+
HighsOptionType type = to_options.records[index]->type;
|
|
751
|
+
if (type == HighsOptionType::kInt) {
|
|
752
|
+
HighsInt value =
|
|
753
|
+
*(((OptionRecordInt*)from_options.records[index])[0].value);
|
|
754
|
+
return_status = checkOptionValue(
|
|
755
|
+
report_log_options, ((OptionRecordInt*)to_options.records[index])[0],
|
|
756
|
+
value);
|
|
757
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
758
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
759
|
+
double value =
|
|
760
|
+
*(((OptionRecordDouble*)from_options.records[index])[0].value);
|
|
761
|
+
return_status = checkOptionValue(
|
|
762
|
+
report_log_options,
|
|
763
|
+
((OptionRecordDouble*)to_options.records[index])[0], value);
|
|
764
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
765
|
+
} else if (type == HighsOptionType::kString) {
|
|
766
|
+
std::string value =
|
|
767
|
+
*(((OptionRecordString*)from_options.records[index])[0].value);
|
|
768
|
+
return_status = checkOptionValue(
|
|
769
|
+
report_log_options,
|
|
770
|
+
((OptionRecordString*)to_options.records[index])[0], value);
|
|
771
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
// Checked from_options and found it to be OK, so set all the values
|
|
775
|
+
for (HighsInt index = 0; index < num_options; index++) {
|
|
776
|
+
HighsOptionType type = to_options.records[index]->type;
|
|
777
|
+
if (type == HighsOptionType::kBool) {
|
|
778
|
+
bool value = *(((OptionRecordBool*)from_options.records[index])[0].value);
|
|
779
|
+
return_status = setLocalOptionValue(
|
|
780
|
+
((OptionRecordBool*)to_options.records[index])[0], value);
|
|
781
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
782
|
+
} else if (type == HighsOptionType::kInt) {
|
|
783
|
+
HighsInt value =
|
|
784
|
+
*(((OptionRecordInt*)from_options.records[index])[0].value);
|
|
785
|
+
return_status = setLocalOptionValue(
|
|
786
|
+
report_log_options, ((OptionRecordInt*)to_options.records[index])[0],
|
|
787
|
+
value);
|
|
788
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
789
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
790
|
+
double value =
|
|
791
|
+
*(((OptionRecordDouble*)from_options.records[index])[0].value);
|
|
792
|
+
return_status = setLocalOptionValue(
|
|
793
|
+
report_log_options,
|
|
794
|
+
((OptionRecordDouble*)to_options.records[index])[0], value);
|
|
795
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
796
|
+
} else {
|
|
797
|
+
std::string value =
|
|
798
|
+
*(((OptionRecordString*)from_options.records[index])[0].value);
|
|
799
|
+
return_status = setLocalOptionValue(
|
|
800
|
+
report_log_options,
|
|
801
|
+
((OptionRecordString*)to_options.records[index])[0], value);
|
|
802
|
+
if (return_status != OptionStatus::kOk) return return_status;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
/*
|
|
806
|
+
if (from_log_file.compare(original_to_log_file)) {
|
|
807
|
+
// The log file name has changed
|
|
808
|
+
if (from_options.log_options.log_stream &&
|
|
809
|
+
!original_to_log_file.compare(empty_file)) {
|
|
810
|
+
// The stream corresponding to from_log_file is non-null and the
|
|
811
|
+
// original log file name was empty, so to_options inherits the
|
|
812
|
+
// stream, but associated with the (necessarily) non-empty name
|
|
813
|
+
// from_log_file
|
|
814
|
+
//
|
|
815
|
+
// This ensures that the stream to Highs.log opened in
|
|
816
|
+
// RunHighs.cpp is retained unless the log file name is changed.
|
|
817
|
+
assert(from_log_file.compare(empty_file));
|
|
818
|
+
assert(!original_to_log_stream);
|
|
819
|
+
to_options.log_options.log_stream =
|
|
820
|
+
from_options.log_options.log_stream;
|
|
821
|
+
} else {
|
|
822
|
+
highsOpenLogFile(to_options, to_options.log_file);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
*/
|
|
826
|
+
return OptionStatus::kOk;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
OptionStatus getLocalOptionValues(
|
|
830
|
+
const HighsLogOptions& report_log_options, const std::string& option,
|
|
831
|
+
const std::vector<OptionRecord*>& option_records, bool* current_value,
|
|
832
|
+
bool* default_value) {
|
|
833
|
+
HighsInt index;
|
|
834
|
+
OptionStatus status =
|
|
835
|
+
getOptionIndex(report_log_options, option, option_records, index);
|
|
836
|
+
if (status != OptionStatus::kOk) return status;
|
|
837
|
+
HighsOptionType type = option_records[index]->type;
|
|
838
|
+
if (type != HighsOptionType::kBool) {
|
|
839
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
840
|
+
"getLocalOptionValue: Option \"%s\" requires value of type "
|
|
841
|
+
"%s, not bool\n",
|
|
842
|
+
option.c_str(), optionEntryTypeToString(type).c_str());
|
|
843
|
+
return OptionStatus::kIllegalValue;
|
|
844
|
+
}
|
|
845
|
+
OptionRecordBool& option_record =
|
|
846
|
+
((OptionRecordBool*)option_records[index])[0];
|
|
847
|
+
if (current_value) *current_value = *(option_record.value);
|
|
848
|
+
if (default_value) *default_value = option_record.default_value;
|
|
849
|
+
return OptionStatus::kOk;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
OptionStatus getLocalOptionValues(
|
|
853
|
+
const HighsLogOptions& report_log_options, const std::string& option,
|
|
854
|
+
const std::vector<OptionRecord*>& option_records, HighsInt* current_value,
|
|
855
|
+
HighsInt* min_value, HighsInt* max_value, HighsInt* default_value) {
|
|
856
|
+
HighsInt index;
|
|
857
|
+
OptionStatus status =
|
|
858
|
+
getOptionIndex(report_log_options, option, option_records, index);
|
|
859
|
+
if (status != OptionStatus::kOk) return status;
|
|
860
|
+
HighsOptionType type = option_records[index]->type;
|
|
861
|
+
if (type != HighsOptionType::kInt) {
|
|
862
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
863
|
+
"getLocalOptionValue: Option \"%s\" requires value of type "
|
|
864
|
+
"%s, not HighsInt\n",
|
|
865
|
+
option.c_str(), optionEntryTypeToString(type).c_str());
|
|
866
|
+
return OptionStatus::kIllegalValue;
|
|
867
|
+
}
|
|
868
|
+
OptionRecordInt& option_record = ((OptionRecordInt*)option_records[index])[0];
|
|
869
|
+
if (current_value) *current_value = *(option_record.value);
|
|
870
|
+
if (min_value) *min_value = option_record.lower_bound;
|
|
871
|
+
if (max_value) *max_value = option_record.upper_bound;
|
|
872
|
+
if (default_value) *default_value = option_record.default_value;
|
|
873
|
+
return OptionStatus::kOk;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
OptionStatus getLocalOptionValues(
|
|
877
|
+
const HighsLogOptions& report_log_options, const std::string& option,
|
|
878
|
+
const std::vector<OptionRecord*>& option_records, double* current_value,
|
|
879
|
+
double* min_value, double* max_value, double* default_value) {
|
|
880
|
+
HighsInt index;
|
|
881
|
+
OptionStatus status =
|
|
882
|
+
getOptionIndex(report_log_options, option, option_records, index);
|
|
883
|
+
if (status != OptionStatus::kOk) return status;
|
|
884
|
+
HighsOptionType type = option_records[index]->type;
|
|
885
|
+
if (type != HighsOptionType::kDouble) {
|
|
886
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
887
|
+
"getLocalOptionValue: Option \"%s\" requires value of type "
|
|
888
|
+
"%s, not double\n",
|
|
889
|
+
option.c_str(), optionEntryTypeToString(type).c_str());
|
|
890
|
+
return OptionStatus::kIllegalValue;
|
|
891
|
+
}
|
|
892
|
+
OptionRecordDouble& option_record =
|
|
893
|
+
((OptionRecordDouble*)option_records[index])[0];
|
|
894
|
+
if (current_value) *current_value = *(option_record.value);
|
|
895
|
+
if (min_value) *min_value = option_record.lower_bound;
|
|
896
|
+
if (max_value) *max_value = option_record.upper_bound;
|
|
897
|
+
if (default_value) *default_value = option_record.default_value;
|
|
898
|
+
return OptionStatus::kOk;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
OptionStatus getLocalOptionValues(
|
|
902
|
+
const HighsLogOptions& report_log_options, const std::string& option,
|
|
903
|
+
const std::vector<OptionRecord*>& option_records,
|
|
904
|
+
std::string* current_value, std::string* default_value) {
|
|
905
|
+
HighsInt index;
|
|
906
|
+
OptionStatus status =
|
|
907
|
+
getOptionIndex(report_log_options, option, option_records, index);
|
|
908
|
+
if (status != OptionStatus::kOk) return status;
|
|
909
|
+
HighsOptionType type = option_records[index]->type;
|
|
910
|
+
if (type != HighsOptionType::kString) {
|
|
911
|
+
highsLogUser(report_log_options, HighsLogType::kError,
|
|
912
|
+
"getLocalOptionValue: Option \"%s\" requires value of type "
|
|
913
|
+
"%s, not string\n",
|
|
914
|
+
option.c_str(), optionEntryTypeToString(type).c_str());
|
|
915
|
+
return OptionStatus::kIllegalValue;
|
|
916
|
+
}
|
|
917
|
+
OptionRecordString& option_record =
|
|
918
|
+
((OptionRecordString*)option_records[index])[0];
|
|
919
|
+
if (current_value) *current_value = *(option_record.value);
|
|
920
|
+
if (default_value) *default_value = option_record.default_value;
|
|
921
|
+
return OptionStatus::kOk;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
OptionStatus getLocalOptionType(
|
|
925
|
+
const HighsLogOptions& report_log_options, const std::string& option,
|
|
926
|
+
const std::vector<OptionRecord*>& option_records, HighsOptionType* type) {
|
|
927
|
+
HighsInt index;
|
|
928
|
+
OptionStatus status =
|
|
929
|
+
getOptionIndex(report_log_options, option, option_records, index);
|
|
930
|
+
if (status != OptionStatus::kOk) return status;
|
|
931
|
+
if (type) *type = option_records[index]->type;
|
|
932
|
+
return OptionStatus::kOk;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
void resetLocalOptions(std::vector<OptionRecord*>& option_records) {
|
|
936
|
+
HighsInt num_options = option_records.size();
|
|
937
|
+
for (HighsInt index = 0; index < num_options; index++) {
|
|
938
|
+
HighsOptionType type = option_records[index]->type;
|
|
939
|
+
if (type == HighsOptionType::kBool) {
|
|
940
|
+
OptionRecordBool& option = ((OptionRecordBool*)option_records[index])[0];
|
|
941
|
+
*(option.value) = option.default_value;
|
|
942
|
+
} else if (type == HighsOptionType::kInt) {
|
|
943
|
+
OptionRecordInt& option = ((OptionRecordInt*)option_records[index])[0];
|
|
944
|
+
*(option.value) = option.default_value;
|
|
945
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
946
|
+
OptionRecordDouble& option =
|
|
947
|
+
((OptionRecordDouble*)option_records[index])[0];
|
|
948
|
+
*(option.value) = option.default_value;
|
|
949
|
+
} else {
|
|
950
|
+
OptionRecordString& option =
|
|
951
|
+
((OptionRecordString*)option_records[index])[0];
|
|
952
|
+
*(option.value) = option.default_value;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
HighsStatus writeOptionsToFile(FILE* file, const HighsLogOptions& log_options,
|
|
958
|
+
const std::vector<OptionRecord*>& option_records,
|
|
959
|
+
const bool report_only_deviations,
|
|
960
|
+
const HighsFileType file_type) {
|
|
961
|
+
reportOptions(file, log_options, option_records, report_only_deviations,
|
|
962
|
+
file_type);
|
|
963
|
+
return HighsStatus::kOk;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
void reportOptions(FILE* file, const HighsLogOptions& log_options,
|
|
967
|
+
const std::vector<OptionRecord*>& option_records,
|
|
968
|
+
const bool report_only_deviations,
|
|
969
|
+
const HighsFileType file_type) {
|
|
970
|
+
HighsInt num_options = option_records.size();
|
|
971
|
+
const bool not_md_or_full =
|
|
972
|
+
file_type != HighsFileType::kMd && file_type != HighsFileType::kFull;
|
|
973
|
+
if (file_type == HighsFileType::kMd)
|
|
974
|
+
fprintf(file, "# [List of options](@id option-definitions)\n\n");
|
|
975
|
+
for (HighsInt index = 0; index < num_options; index++) {
|
|
976
|
+
HighsOptionType type = option_records[index]->type;
|
|
977
|
+
if (not_md_or_full) {
|
|
978
|
+
if (option_records[index]->name == kLogFileString) {
|
|
979
|
+
// Default HiGHS log file name is "" so that deviations from it
|
|
980
|
+
// trigger opening the log file. However, it's unnecessary to
|
|
981
|
+
// report the deviation to kLogFileString, which is the default
|
|
982
|
+
// non-empty log file name in HighsRun.cpp
|
|
983
|
+
if (*((OptionRecordString*)option_records[index])[0].value ==
|
|
984
|
+
kHighsRunLogFile)
|
|
985
|
+
continue;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
// Only report non-advanced options
|
|
989
|
+
if (option_records[index]->advanced) {
|
|
990
|
+
// Possibly skip the advanced options when creating Md file
|
|
991
|
+
if (!kAdvancedInDocumentation) continue;
|
|
992
|
+
}
|
|
993
|
+
if (type == HighsOptionType::kBool) {
|
|
994
|
+
reportOption(file, log_options,
|
|
995
|
+
((OptionRecordBool*)option_records[index])[0],
|
|
996
|
+
report_only_deviations, file_type);
|
|
997
|
+
} else if (type == HighsOptionType::kInt) {
|
|
998
|
+
reportOption(file, log_options,
|
|
999
|
+
((OptionRecordInt*)option_records[index])[0],
|
|
1000
|
+
report_only_deviations, file_type);
|
|
1001
|
+
} else if (type == HighsOptionType::kDouble) {
|
|
1002
|
+
reportOption(file, log_options,
|
|
1003
|
+
((OptionRecordDouble*)option_records[index])[0],
|
|
1004
|
+
report_only_deviations, file_type);
|
|
1005
|
+
} else {
|
|
1006
|
+
reportOption(file, log_options,
|
|
1007
|
+
((OptionRecordString*)option_records[index])[0],
|
|
1008
|
+
report_only_deviations, file_type);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
void reportOption(FILE* file, const HighsLogOptions& log_options,
|
|
1014
|
+
const OptionRecordBool& option,
|
|
1015
|
+
const bool report_only_deviations,
|
|
1016
|
+
const HighsFileType file_type) {
|
|
1017
|
+
if (!report_only_deviations || option.default_value != *option.value) {
|
|
1018
|
+
if (file_type == HighsFileType::kMd) {
|
|
1019
|
+
fprintf(file,
|
|
1020
|
+
"## [%s](@id option-%s)\n- %s\n- Type: boolean\n- Default: "
|
|
1021
|
+
"\"%s\"\n\n",
|
|
1022
|
+
highsInsertMdEscapes(option.name).c_str(),
|
|
1023
|
+
highsInsertMdId(option.name).c_str(),
|
|
1024
|
+
highsInsertMdEscapes(option.description).c_str(),
|
|
1025
|
+
highsBoolToString(option.default_value).c_str());
|
|
1026
|
+
} else if (file_type == HighsFileType::kFull) {
|
|
1027
|
+
fprintf(file, "\n# %s\n", option.description.c_str());
|
|
1028
|
+
fprintf(
|
|
1029
|
+
file,
|
|
1030
|
+
"# [type: bool, advanced: %s, range: {false, true}, default: %s]\n",
|
|
1031
|
+
highsBoolToString(option.advanced).c_str(),
|
|
1032
|
+
highsBoolToString(option.default_value).c_str());
|
|
1033
|
+
fprintf(file, "%s = %s\n", option.name.c_str(),
|
|
1034
|
+
highsBoolToString(*option.value).c_str());
|
|
1035
|
+
} else {
|
|
1036
|
+
std::string line =
|
|
1037
|
+
highsFormatToString("Set option %s to %s\n", option.name.c_str(),
|
|
1038
|
+
highsBoolToString(*option.value).c_str());
|
|
1039
|
+
if (file == stdout) {
|
|
1040
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s", line.c_str());
|
|
1041
|
+
} else {
|
|
1042
|
+
fprintf(file, "%s", line.c_str());
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
void reportOption(FILE* file, const HighsLogOptions& log_options,
|
|
1049
|
+
const OptionRecordInt& option,
|
|
1050
|
+
const bool report_only_deviations,
|
|
1051
|
+
const HighsFileType file_type) {
|
|
1052
|
+
if (!report_only_deviations || option.default_value != *option.value) {
|
|
1053
|
+
if (file_type == HighsFileType::kMd) {
|
|
1054
|
+
fprintf(file,
|
|
1055
|
+
"## [%s](@id option-%s)\n- %s\n- Type: integer\n- Range: {%d, "
|
|
1056
|
+
"%d}\n- Default: %d\n\n",
|
|
1057
|
+
highsInsertMdEscapes(option.name).c_str(),
|
|
1058
|
+
highsInsertMdId(option.name).c_str(),
|
|
1059
|
+
highsInsertMdEscapes(option.description).c_str(),
|
|
1060
|
+
int(option.lower_bound), int(option.upper_bound),
|
|
1061
|
+
int(option.default_value));
|
|
1062
|
+
} else if (file_type == HighsFileType::kFull) {
|
|
1063
|
+
fprintf(file, "\n# %s\n", option.description.c_str());
|
|
1064
|
+
fprintf(file,
|
|
1065
|
+
"# [type: integer, advanced: %s, range: {%" HIGHSINT_FORMAT
|
|
1066
|
+
", %d}, default: %d]\n",
|
|
1067
|
+
highsBoolToString(option.advanced).c_str(), option.lower_bound,
|
|
1068
|
+
int(option.upper_bound), int(option.default_value));
|
|
1069
|
+
fprintf(file, "%s = %d\n", option.name.c_str(), int(*option.value));
|
|
1070
|
+
} else {
|
|
1071
|
+
std::string line = highsFormatToString(
|
|
1072
|
+
"Set option %s to %d\n", option.name.c_str(), int(*option.value));
|
|
1073
|
+
if (file == stdout) {
|
|
1074
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s", line.c_str());
|
|
1075
|
+
} else {
|
|
1076
|
+
fprintf(file, "%s", line.c_str());
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
void reportOption(FILE* file, const HighsLogOptions& log_options,
|
|
1083
|
+
const OptionRecordDouble& option,
|
|
1084
|
+
const bool report_only_deviations,
|
|
1085
|
+
const HighsFileType file_type) {
|
|
1086
|
+
if (!report_only_deviations || option.default_value != *option.value) {
|
|
1087
|
+
if (file_type == HighsFileType::kMd) {
|
|
1088
|
+
fprintf(file,
|
|
1089
|
+
"## [%s](@id option-%s)\n- %s\n- Type: double\n- Range: [%g, "
|
|
1090
|
+
"%g]\n- Default: %g\n\n",
|
|
1091
|
+
highsInsertMdEscapes(option.name).c_str(),
|
|
1092
|
+
highsInsertMdId(option.name).c_str(),
|
|
1093
|
+
highsInsertMdEscapes(option.description).c_str(),
|
|
1094
|
+
option.lower_bound, option.upper_bound, option.default_value);
|
|
1095
|
+
} else if (file_type == HighsFileType::kFull) {
|
|
1096
|
+
fprintf(file, "\n# %s\n", option.description.c_str());
|
|
1097
|
+
fprintf(file,
|
|
1098
|
+
"# [type: double, advanced: %s, range: [%g, %g], default: %g]\n",
|
|
1099
|
+
highsBoolToString(option.advanced).c_str(), option.lower_bound,
|
|
1100
|
+
option.upper_bound, option.default_value);
|
|
1101
|
+
fprintf(file, "%s = %g\n", option.name.c_str(), *option.value);
|
|
1102
|
+
} else {
|
|
1103
|
+
std::string line = highsFormatToString(
|
|
1104
|
+
"Set option %s to %g\n", option.name.c_str(), *option.value);
|
|
1105
|
+
if (file == stdout) {
|
|
1106
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s", line.c_str());
|
|
1107
|
+
} else {
|
|
1108
|
+
fprintf(file, "%s", line.c_str());
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
void reportOption(FILE* file, const HighsLogOptions& log_options,
|
|
1115
|
+
const OptionRecordString& option,
|
|
1116
|
+
const bool report_only_deviations,
|
|
1117
|
+
const HighsFileType file_type) {
|
|
1118
|
+
// Don't report for the options file if writing to an options file
|
|
1119
|
+
// Don't report options that can only be passed via the command line
|
|
1120
|
+
if (option.name == kOptionsFileString) return;
|
|
1121
|
+
// ToDo: are there others?
|
|
1122
|
+
|
|
1123
|
+
if (!report_only_deviations || option.default_value != *option.value) {
|
|
1124
|
+
if (file_type == HighsFileType::kMd) {
|
|
1125
|
+
fprintf(
|
|
1126
|
+
file,
|
|
1127
|
+
"## [%s](@id option-%s)\n- %s\n- Type: string\n- Default: \"%s\"\n\n",
|
|
1128
|
+
highsInsertMdEscapes(option.name).c_str(),
|
|
1129
|
+
highsInsertMdId(option.name).c_str(),
|
|
1130
|
+
highsInsertMdEscapes(option.description).c_str(),
|
|
1131
|
+
option.default_value.c_str());
|
|
1132
|
+
} else if (file_type == HighsFileType::kFull) {
|
|
1133
|
+
fprintf(file, "\n# %s\n", option.description.c_str());
|
|
1134
|
+
fprintf(file, "# [type: string, advanced: %s, default: \"%s\"]\n",
|
|
1135
|
+
highsBoolToString(option.advanced).c_str(),
|
|
1136
|
+
option.default_value.c_str());
|
|
1137
|
+
fprintf(file, "%s = %s\n", option.name.c_str(), (*option.value).c_str());
|
|
1138
|
+
} else {
|
|
1139
|
+
std::string line =
|
|
1140
|
+
highsFormatToString("Set option %s to \"%s\"\n", option.name.c_str(),
|
|
1141
|
+
(*option.value).c_str());
|
|
1142
|
+
if (file == stdout) {
|
|
1143
|
+
highsLogUser(log_options, HighsLogType::kInfo, "%s", line.c_str());
|
|
1144
|
+
} else {
|
|
1145
|
+
fprintf(file, "%s", line.c_str());
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
void HighsOptions::setLogOptions() {
|
|
1152
|
+
this->log_options.output_flag = &this->output_flag;
|
|
1153
|
+
this->log_options.log_to_console = &this->log_to_console;
|
|
1154
|
+
this->log_options.log_dev_level = &this->log_dev_level;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
void warnSolverInvalid(const HighsOptions& options,
|
|
1158
|
+
const std::string& problem_type) {
|
|
1159
|
+
highsLogUser(options.log_options, HighsLogType::kWarning,
|
|
1160
|
+
"Solver \"%s\" is not available for %s. Option \"%s\" ignored\n",
|
|
1161
|
+
options.solver.c_str(), problem_type.c_str(),
|
|
1162
|
+
kSolverString.c_str());
|
|
1163
|
+
}
|
|
1164
|
+
bool solverValidForLp(const std::string& solver) {
|
|
1165
|
+
return solver == kHighsChooseString || solver == kSimplexString ||
|
|
1166
|
+
solver == kIpmString || solver == kIpxString ||
|
|
1167
|
+
solver == kHipoString || solver == kPdlpString ||
|
|
1168
|
+
solver == kHiPdlpString;
|
|
1169
|
+
}
|
|
1170
|
+
bool solverValidForMip(const std::string& solver) {
|
|
1171
|
+
return solver == kHighsChooseString;
|
|
1172
|
+
}
|
|
1173
|
+
bool solverValidForQp(const std::string& solver) {
|
|
1174
|
+
return solver == kHighsChooseString || solver == kQpAsmString ||
|
|
1175
|
+
solver == kIpmString || solver == kHipoString;
|
|
1176
|
+
}
|