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,1826 @@
|
|
|
1
|
+
#define PYBIND11_DETAILED_ERROR_MESSAGES 1
|
|
2
|
+
#include <pybind11/functional.h>
|
|
3
|
+
#include <pybind11/numpy.h>
|
|
4
|
+
#include <pybind11/pybind11.h>
|
|
5
|
+
#include <pybind11/stl.h>
|
|
6
|
+
|
|
7
|
+
#include <cassert>
|
|
8
|
+
|
|
9
|
+
#include "Highs.h"
|
|
10
|
+
#include "lp_data/HighsCallback.h"
|
|
11
|
+
|
|
12
|
+
namespace py = pybind11;
|
|
13
|
+
using namespace pybind11::literals;
|
|
14
|
+
|
|
15
|
+
// arrays are assumed to be contiguous c-style arrays of correct type
|
|
16
|
+
// * c_style forces the array to be stored in C-style contiguous order
|
|
17
|
+
// * forcecast converts the array to the correct type if needed
|
|
18
|
+
template <typename T>
|
|
19
|
+
using dense_array_t = py::array_t<T, py::array::c_style | py::array::forcecast>;
|
|
20
|
+
|
|
21
|
+
// 'getter' wrapper around std::vector<T> to numpy array without copying data
|
|
22
|
+
template <typename Base, typename T>
|
|
23
|
+
std::function<dense_array_t<T>(const Base&)> make_readonly_ptr(
|
|
24
|
+
std::vector<T> Base::* member) {
|
|
25
|
+
return [member](const Base& self) -> dense_array_t<T> {
|
|
26
|
+
// last parameter means we keep ownership
|
|
27
|
+
return dense_array_t<T>((self.*member).size(), (self.*member).data(),
|
|
28
|
+
py::cast(self));
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 'setter' wrapper around numpy array to std::vector<T> (copies the data from python)
|
|
33
|
+
template <typename Base, typename T>
|
|
34
|
+
std::function<void(Base&, dense_array_t<T>)> make_setter_ptr(
|
|
35
|
+
std::vector<T> Base::* member) {
|
|
36
|
+
return [member](Base& self, dense_array_t<T> array) -> void {
|
|
37
|
+
auto buf = array.request();
|
|
38
|
+
if (buf.ndim != 1) {
|
|
39
|
+
throw std::runtime_error("Expected a 1D array");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
(self.*member) = std::move(std::vector<T>(static_cast<T*>(buf.ptr),
|
|
43
|
+
static_cast<T*>(buf.ptr) + buf.shape[0]));
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
HighsStatus highs_passModel(Highs* h, HighsModel& model) {
|
|
48
|
+
return h->passModel(model);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
HighsStatus highs_passModelPointers(
|
|
52
|
+
Highs* h, const HighsInt num_col, const HighsInt num_row,
|
|
53
|
+
const HighsInt num_nz, const HighsInt q_num_nz, const HighsInt a_format,
|
|
54
|
+
const HighsInt q_format, const HighsInt sense, const double offset,
|
|
55
|
+
const dense_array_t<double> col_cost, const dense_array_t<double> col_lower,
|
|
56
|
+
const dense_array_t<double> col_upper,
|
|
57
|
+
const dense_array_t<double> row_lower,
|
|
58
|
+
const dense_array_t<double> row_upper,
|
|
59
|
+
const dense_array_t<HighsInt> a_start,
|
|
60
|
+
const dense_array_t<HighsInt> a_index, const dense_array_t<double> a_value,
|
|
61
|
+
const dense_array_t<HighsInt> q_start,
|
|
62
|
+
const dense_array_t<HighsInt> q_index, const dense_array_t<double> q_value,
|
|
63
|
+
const dense_array_t<HighsInt> integrality) {
|
|
64
|
+
py::buffer_info col_cost_info = col_cost.request();
|
|
65
|
+
py::buffer_info col_lower_info = col_lower.request();
|
|
66
|
+
py::buffer_info col_upper_info = col_upper.request();
|
|
67
|
+
py::buffer_info row_lower_info = row_lower.request();
|
|
68
|
+
py::buffer_info row_upper_info = row_upper.request();
|
|
69
|
+
py::buffer_info a_start_info = a_start.request();
|
|
70
|
+
py::buffer_info a_index_info = a_index.request();
|
|
71
|
+
py::buffer_info a_value_info = a_value.request();
|
|
72
|
+
py::buffer_info q_start_info = q_start.request();
|
|
73
|
+
py::buffer_info q_index_info = q_index.request();
|
|
74
|
+
py::buffer_info q_value_info = q_value.request();
|
|
75
|
+
py::buffer_info integrality_info = integrality.request();
|
|
76
|
+
|
|
77
|
+
const double* col_cost_ptr = static_cast<double*>(col_cost_info.ptr);
|
|
78
|
+
const double* col_lower_ptr = static_cast<double*>(col_lower_info.ptr);
|
|
79
|
+
const double* col_upper_ptr = static_cast<double*>(col_upper_info.ptr);
|
|
80
|
+
const double* row_lower_ptr = static_cast<double*>(row_lower_info.ptr);
|
|
81
|
+
const double* row_upper_ptr = static_cast<double*>(row_upper_info.ptr);
|
|
82
|
+
const double* a_value_ptr = static_cast<double*>(a_value_info.ptr);
|
|
83
|
+
const double* q_value_ptr = static_cast<double*>(q_value_info.ptr);
|
|
84
|
+
const HighsInt* a_start_ptr = static_cast<HighsInt*>(a_start_info.ptr);
|
|
85
|
+
const HighsInt* a_index_ptr = static_cast<HighsInt*>(a_index_info.ptr);
|
|
86
|
+
const HighsInt* q_start_ptr = static_cast<HighsInt*>(q_start_info.ptr);
|
|
87
|
+
const HighsInt* q_index_ptr = static_cast<HighsInt*>(q_index_info.ptr);
|
|
88
|
+
const HighsInt* integrality_ptr =
|
|
89
|
+
static_cast<HighsInt*>(integrality_info.ptr);
|
|
90
|
+
|
|
91
|
+
return h->passModel(
|
|
92
|
+
static_cast<HighsInt>(num_col), static_cast<HighsInt>(num_row),
|
|
93
|
+
static_cast<HighsInt>(num_nz), static_cast<HighsInt>(q_num_nz),
|
|
94
|
+
static_cast<HighsInt>(a_format), static_cast<HighsInt>(q_format),
|
|
95
|
+
static_cast<HighsInt>(sense), offset, col_cost_ptr, col_lower_ptr,
|
|
96
|
+
col_upper_ptr, row_lower_ptr, row_upper_ptr, a_start_ptr, a_index_ptr,
|
|
97
|
+
a_value_ptr, q_start_ptr, q_index_ptr, q_value_ptr, integrality_ptr);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
HighsStatus highs_passLp(Highs* h, HighsLp& lp) { return h->passModel(lp); }
|
|
101
|
+
|
|
102
|
+
HighsStatus highs_passLpPointers(Highs* h, const HighsInt num_col,
|
|
103
|
+
const HighsInt num_row, const HighsInt num_nz,
|
|
104
|
+
const HighsInt a_format, const HighsInt sense,
|
|
105
|
+
const double offset,
|
|
106
|
+
const dense_array_t<double> col_cost,
|
|
107
|
+
const dense_array_t<double> col_lower,
|
|
108
|
+
const dense_array_t<double> col_upper,
|
|
109
|
+
const dense_array_t<double> row_lower,
|
|
110
|
+
const dense_array_t<double> row_upper,
|
|
111
|
+
const dense_array_t<HighsInt> a_start,
|
|
112
|
+
const dense_array_t<HighsInt> a_index,
|
|
113
|
+
const dense_array_t<double> a_value,
|
|
114
|
+
const dense_array_t<HighsInt> integrality) {
|
|
115
|
+
py::buffer_info col_cost_info = col_cost.request();
|
|
116
|
+
py::buffer_info col_lower_info = col_lower.request();
|
|
117
|
+
py::buffer_info col_upper_info = col_upper.request();
|
|
118
|
+
py::buffer_info row_lower_info = row_lower.request();
|
|
119
|
+
py::buffer_info row_upper_info = row_upper.request();
|
|
120
|
+
py::buffer_info a_start_info = a_start.request();
|
|
121
|
+
py::buffer_info a_index_info = a_index.request();
|
|
122
|
+
py::buffer_info a_value_info = a_value.request();
|
|
123
|
+
py::buffer_info integrality_info = integrality.request();
|
|
124
|
+
|
|
125
|
+
const double* col_cost_ptr = static_cast<double*>(col_cost_info.ptr);
|
|
126
|
+
const double* col_lower_ptr = static_cast<double*>(col_lower_info.ptr);
|
|
127
|
+
const double* col_upper_ptr = static_cast<double*>(col_upper_info.ptr);
|
|
128
|
+
const double* row_lower_ptr = static_cast<double*>(row_lower_info.ptr);
|
|
129
|
+
const double* row_upper_ptr = static_cast<double*>(row_upper_info.ptr);
|
|
130
|
+
const HighsInt* a_start_ptr = static_cast<HighsInt*>(a_start_info.ptr);
|
|
131
|
+
const HighsInt* a_index_ptr = static_cast<HighsInt*>(a_index_info.ptr);
|
|
132
|
+
const double* a_value_ptr = static_cast<double*>(a_value_info.ptr);
|
|
133
|
+
const HighsInt* integrality_ptr =
|
|
134
|
+
static_cast<HighsInt*>(integrality_info.ptr);
|
|
135
|
+
|
|
136
|
+
return h->passModel(
|
|
137
|
+
static_cast<HighsInt>(num_col), static_cast<HighsInt>(num_row),
|
|
138
|
+
static_cast<HighsInt>(num_nz), static_cast<HighsInt>(a_format),
|
|
139
|
+
static_cast<HighsInt>(sense), offset, col_cost_ptr, col_lower_ptr,
|
|
140
|
+
col_upper_ptr, row_lower_ptr, row_upper_ptr, a_start_ptr, a_index_ptr,
|
|
141
|
+
a_value_ptr, integrality_ptr);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
HighsStatus highs_passHessian(Highs* h, HighsHessian& hessian) {
|
|
145
|
+
return h->passHessian(hessian);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
HighsStatus highs_passHessianPointers(Highs* h, const HighsInt dim,
|
|
149
|
+
const HighsInt num_nz,
|
|
150
|
+
const HighsInt format,
|
|
151
|
+
const dense_array_t<HighsInt> q_start,
|
|
152
|
+
const dense_array_t<HighsInt> q_index,
|
|
153
|
+
const dense_array_t<double> q_value) {
|
|
154
|
+
py::buffer_info q_start_info = q_start.request();
|
|
155
|
+
py::buffer_info q_index_info = q_index.request();
|
|
156
|
+
py::buffer_info q_value_info = q_value.request();
|
|
157
|
+
|
|
158
|
+
const HighsInt* q_start_ptr = static_cast<HighsInt*>(q_start_info.ptr);
|
|
159
|
+
const HighsInt* q_index_ptr = static_cast<HighsInt*>(q_index_info.ptr);
|
|
160
|
+
const double* q_value_ptr = static_cast<double*>(q_value_info.ptr);
|
|
161
|
+
|
|
162
|
+
return h->passHessian(dim, num_nz, format, q_start_ptr, q_index_ptr,
|
|
163
|
+
q_value_ptr);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
HighsStatus highs_addLinearObjective(
|
|
167
|
+
Highs* h, const HighsLinearObjective& linear_objective) {
|
|
168
|
+
return h->addLinearObjective(linear_objective, -1);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
HighsStatus highs_postsolve(Highs* h, const HighsSolution& solution,
|
|
172
|
+
const HighsBasis& basis) {
|
|
173
|
+
return h->postsolve(solution, basis);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
HighsStatus highs_mipPostsolve(Highs* h, const HighsSolution& solution) {
|
|
177
|
+
return h->postsolve(solution);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
HighsStatus highs_writeSolution(Highs* h, const std::string& filename,
|
|
181
|
+
const HighsInt style) {
|
|
182
|
+
return h->writeSolution(filename, style);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Not needed once getModelStatus(const bool scaled_model) disappears
|
|
186
|
+
// from, Highs.h
|
|
187
|
+
HighsModelStatus highs_getModelStatus(Highs* h) { return h->getModelStatus(); }
|
|
188
|
+
|
|
189
|
+
std::tuple<HighsStatus, HighsRanging> highs_getRanging(Highs* h) {
|
|
190
|
+
HighsRanging ranging;
|
|
191
|
+
HighsStatus status = h->getRanging(ranging);
|
|
192
|
+
return std::make_tuple(status, ranging);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
std::tuple<HighsStatus, HighsIis> highs_getIis(Highs* h) {
|
|
196
|
+
HighsIis iis;
|
|
197
|
+
HighsStatus status = h->getIis(iis);
|
|
198
|
+
return std::make_tuple(status, iis);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
std::tuple<HighsStatus, dense_array_t<HighsInt>> highs_getBasicVariables(
|
|
202
|
+
Highs* h) {
|
|
203
|
+
HighsInt num_row = h->getNumRow();
|
|
204
|
+
|
|
205
|
+
HighsStatus status = HighsStatus::kOk;
|
|
206
|
+
std::vector<HighsInt> basic_variables(num_row);
|
|
207
|
+
HighsInt* basic_variables_ptr =
|
|
208
|
+
static_cast<HighsInt*>(basic_variables.data());
|
|
209
|
+
if (num_row > 0) status = h->getBasicVariables(basic_variables_ptr);
|
|
210
|
+
return std::make_tuple(status, py::cast(basic_variables));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getBasisInverseRow(
|
|
214
|
+
Highs* h, HighsInt row) {
|
|
215
|
+
HighsInt num_row = h->getNumRow();
|
|
216
|
+
|
|
217
|
+
HighsStatus status = HighsStatus::kOk;
|
|
218
|
+
std::vector<double> solution_vector(num_row);
|
|
219
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
220
|
+
|
|
221
|
+
if (num_row > 0) status = h->getBasisInverseRow(row, solution_vector_ptr);
|
|
222
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
226
|
+
dense_array_t<HighsInt>>
|
|
227
|
+
highs_getBasisInverseRowSparse(Highs* h, HighsInt row) {
|
|
228
|
+
HighsInt num_row = h->getNumRow();
|
|
229
|
+
|
|
230
|
+
HighsStatus status = HighsStatus::kOk;
|
|
231
|
+
HighsInt solution_num_nz = 0;
|
|
232
|
+
std::vector<double> solution_vector(num_row);
|
|
233
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
234
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
235
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
236
|
+
|
|
237
|
+
if (num_row > 0)
|
|
238
|
+
status = h->getBasisInverseRow(row, solution_vector_ptr, &solution_num_nz,
|
|
239
|
+
solution_index_ptr);
|
|
240
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
241
|
+
py::cast(solution_index));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getBasisInverseCol(
|
|
245
|
+
Highs* h, HighsInt col) {
|
|
246
|
+
HighsInt num_row = h->getNumRow();
|
|
247
|
+
|
|
248
|
+
HighsStatus status = HighsStatus::kOk;
|
|
249
|
+
std::vector<double> solution_vector(num_row);
|
|
250
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
251
|
+
|
|
252
|
+
if (num_row > 0) status = h->getBasisInverseCol(col, solution_vector_ptr);
|
|
253
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
257
|
+
dense_array_t<HighsInt>>
|
|
258
|
+
highs_getBasisInverseColSparse(Highs* h, HighsInt col) {
|
|
259
|
+
HighsInt num_row = h->getNumRow();
|
|
260
|
+
|
|
261
|
+
HighsStatus status = HighsStatus::kOk;
|
|
262
|
+
HighsInt solution_num_nz = 0;
|
|
263
|
+
std::vector<double> solution_vector(num_row);
|
|
264
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
265
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
266
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
267
|
+
|
|
268
|
+
if (num_row > 0)
|
|
269
|
+
status = h->getBasisInverseCol(col, solution_vector_ptr, &solution_num_nz,
|
|
270
|
+
solution_index_ptr);
|
|
271
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
272
|
+
py::cast(solution_index));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getBasisSolve(
|
|
276
|
+
Highs* h, dense_array_t<double> rhs) {
|
|
277
|
+
HighsInt num_row = h->getNumRow();
|
|
278
|
+
|
|
279
|
+
py::buffer_info rhs_info = rhs.request();
|
|
280
|
+
double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
|
|
281
|
+
|
|
282
|
+
HighsStatus status = HighsStatus::kOk;
|
|
283
|
+
std::vector<double> solution_vector(num_row);
|
|
284
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
285
|
+
|
|
286
|
+
if (num_row > 0) status = h->getBasisSolve(rhs_ptr, solution_vector_ptr);
|
|
287
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
291
|
+
dense_array_t<HighsInt>>
|
|
292
|
+
highs_getBasisSolveSparse(Highs* h, dense_array_t<double> rhs) {
|
|
293
|
+
HighsInt num_row = h->getNumRow();
|
|
294
|
+
|
|
295
|
+
py::buffer_info rhs_info = rhs.request();
|
|
296
|
+
double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
|
|
297
|
+
|
|
298
|
+
HighsStatus status = HighsStatus::kOk;
|
|
299
|
+
HighsInt solution_num_nz = 0;
|
|
300
|
+
std::vector<double> solution_vector(num_row);
|
|
301
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
302
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
303
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
304
|
+
|
|
305
|
+
if (num_row > 0)
|
|
306
|
+
status = h->getBasisSolve(rhs_ptr, solution_vector_ptr, &solution_num_nz,
|
|
307
|
+
solution_index_ptr);
|
|
308
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
309
|
+
py::cast(solution_index));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getBasisTransposeSolve(
|
|
313
|
+
Highs* h, dense_array_t<double> rhs) {
|
|
314
|
+
HighsInt num_row = h->getNumRow();
|
|
315
|
+
|
|
316
|
+
py::buffer_info rhs_info = rhs.request();
|
|
317
|
+
double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
|
|
318
|
+
|
|
319
|
+
HighsStatus status = HighsStatus::kOk;
|
|
320
|
+
std::vector<double> solution_vector(num_row);
|
|
321
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
322
|
+
|
|
323
|
+
if (num_row > 0)
|
|
324
|
+
status = h->getBasisTransposeSolve(rhs_ptr, solution_vector_ptr);
|
|
325
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
329
|
+
dense_array_t<HighsInt>>
|
|
330
|
+
highs_getBasisTransposeSolveSparse(Highs* h, dense_array_t<double> rhs) {
|
|
331
|
+
HighsInt num_row = h->getNumRow();
|
|
332
|
+
|
|
333
|
+
py::buffer_info rhs_info = rhs.request();
|
|
334
|
+
double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
|
|
335
|
+
|
|
336
|
+
HighsStatus status = HighsStatus::kOk;
|
|
337
|
+
HighsInt solution_num_nz = 0;
|
|
338
|
+
std::vector<double> solution_vector(num_row);
|
|
339
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
340
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
341
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
342
|
+
|
|
343
|
+
if (num_row > 0)
|
|
344
|
+
status = h->getBasisTransposeSolve(rhs_ptr, solution_vector_ptr,
|
|
345
|
+
&solution_num_nz, solution_index_ptr);
|
|
346
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
347
|
+
py::cast(solution_index));
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getReducedRow(
|
|
351
|
+
Highs* h, HighsInt row) {
|
|
352
|
+
HighsInt num_col = h->getNumCol();
|
|
353
|
+
HighsInt num_row = h->getNumRow();
|
|
354
|
+
|
|
355
|
+
HighsStatus status = HighsStatus::kOk;
|
|
356
|
+
std::vector<double> solution_vector(num_col);
|
|
357
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
358
|
+
|
|
359
|
+
if (num_row > 0) status = h->getReducedRow(row, solution_vector_ptr);
|
|
360
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
364
|
+
dense_array_t<HighsInt>>
|
|
365
|
+
highs_getReducedRowSparse(Highs* h, HighsInt row) {
|
|
366
|
+
HighsInt num_row = h->getNumRow();
|
|
367
|
+
|
|
368
|
+
HighsStatus status = HighsStatus::kOk;
|
|
369
|
+
HighsInt solution_num_nz = 0;
|
|
370
|
+
std::vector<double> solution_vector(num_row);
|
|
371
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
372
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
373
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
374
|
+
|
|
375
|
+
if (num_row > 0)
|
|
376
|
+
status = h->getReducedRow(row, solution_vector_ptr, &solution_num_nz,
|
|
377
|
+
solution_index_ptr);
|
|
378
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
379
|
+
py::cast(solution_index));
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
std::tuple<HighsStatus, dense_array_t<double>> highs_getReducedColumn(
|
|
383
|
+
Highs* h, HighsInt col) {
|
|
384
|
+
HighsInt num_row = h->getNumRow();
|
|
385
|
+
|
|
386
|
+
HighsStatus status = HighsStatus::kOk;
|
|
387
|
+
std::vector<double> solution_vector(num_row);
|
|
388
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
389
|
+
|
|
390
|
+
if (num_row > 0) status = h->getReducedColumn(col, solution_vector_ptr);
|
|
391
|
+
return std::make_tuple(status, py::cast(solution_vector));
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
|
|
395
|
+
dense_array_t<HighsInt>>
|
|
396
|
+
highs_getReducedColumnSparse(Highs* h, HighsInt col) {
|
|
397
|
+
HighsInt num_row = h->getNumRow();
|
|
398
|
+
|
|
399
|
+
HighsStatus status = HighsStatus::kOk;
|
|
400
|
+
HighsInt solution_num_nz = 0;
|
|
401
|
+
std::vector<double> solution_vector(num_row);
|
|
402
|
+
std::vector<HighsInt> solution_index(num_row);
|
|
403
|
+
double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
|
|
404
|
+
HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
|
|
405
|
+
|
|
406
|
+
if (num_row > 0)
|
|
407
|
+
status = h->getReducedColumn(col, solution_vector_ptr, &solution_num_nz,
|
|
408
|
+
solution_index_ptr);
|
|
409
|
+
return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
|
|
410
|
+
py::cast(solution_index));
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
std::tuple<HighsStatus, HighsLp> highs_getFixedLp(Highs* h) {
|
|
414
|
+
HighsLp lp;
|
|
415
|
+
HighsStatus status = h->getFixedLp(lp);
|
|
416
|
+
return std::make_tuple(status, lp);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
std::tuple<HighsStatus, bool> highs_getDualRayExist(Highs* h) {
|
|
420
|
+
bool has_dual_ray;
|
|
421
|
+
HighsStatus status = h->getDualRay(has_dual_ray);
|
|
422
|
+
return std::make_tuple(status, has_dual_ray);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
std::tuple<HighsStatus, bool, dense_array_t<double>> highs_getDualRay(
|
|
426
|
+
Highs* h) {
|
|
427
|
+
HighsInt num_row = h->getNumRow();
|
|
428
|
+
bool has_dual_ray;
|
|
429
|
+
HighsStatus status = HighsStatus::kOk;
|
|
430
|
+
std::vector<double> value(num_row);
|
|
431
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
432
|
+
if (num_row > 0) status = h->getDualRay(has_dual_ray, value_ptr);
|
|
433
|
+
return std::make_tuple(status, has_dual_ray, py::cast(value));
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
std::tuple<HighsStatus, bool> highs_getDualUnboundednessDirectionExist(
|
|
437
|
+
Highs* h) {
|
|
438
|
+
bool has_dual_unboundedness_direction;
|
|
439
|
+
HighsStatus status =
|
|
440
|
+
h->getDualUnboundednessDirection(has_dual_unboundedness_direction);
|
|
441
|
+
return std::make_tuple(status, has_dual_unboundedness_direction);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
std::tuple<HighsStatus, bool, dense_array_t<double>>
|
|
445
|
+
highs_getDualUnboundednessDirection(Highs* h) {
|
|
446
|
+
HighsInt num_col = h->getNumCol();
|
|
447
|
+
bool has_dual_unboundedness_direction;
|
|
448
|
+
HighsStatus status = HighsStatus::kOk;
|
|
449
|
+
std::vector<double> value(num_col);
|
|
450
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
451
|
+
if (num_col > 0)
|
|
452
|
+
status = h->getDualUnboundednessDirection(has_dual_unboundedness_direction,
|
|
453
|
+
value_ptr);
|
|
454
|
+
return std::make_tuple(status, has_dual_unboundedness_direction,
|
|
455
|
+
py::cast(value));
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
std::tuple<HighsStatus, bool> highs_getPrimalRayExist(Highs* h) {
|
|
459
|
+
bool has_primal_ray;
|
|
460
|
+
HighsStatus status = h->getPrimalRay(has_primal_ray);
|
|
461
|
+
return std::make_tuple(status, has_primal_ray);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
std::tuple<HighsStatus, bool, dense_array_t<double>> highs_getPrimalRay(
|
|
465
|
+
Highs* h) {
|
|
466
|
+
HighsInt num_col = h->getNumCol();
|
|
467
|
+
bool has_primal_ray;
|
|
468
|
+
HighsStatus status = HighsStatus::kOk;
|
|
469
|
+
std::vector<double> value(num_col);
|
|
470
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
471
|
+
if (num_col > 0) status = h->getPrimalRay(has_primal_ray, value_ptr);
|
|
472
|
+
return std::make_tuple(status, has_primal_ray, py::cast(value));
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
HighsStatus highs_addRow(Highs* h, double lower, double upper,
|
|
476
|
+
HighsInt num_new_nz, dense_array_t<HighsInt> indices,
|
|
477
|
+
dense_array_t<double> values) {
|
|
478
|
+
py::buffer_info indices_info = indices.request();
|
|
479
|
+
py::buffer_info values_info = values.request();
|
|
480
|
+
|
|
481
|
+
HighsInt* indices_ptr = reinterpret_cast<HighsInt*>(indices_info.ptr);
|
|
482
|
+
double* values_ptr = static_cast<double*>(values_info.ptr);
|
|
483
|
+
|
|
484
|
+
return h->addRow(lower, upper, num_new_nz, indices_ptr, values_ptr);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
HighsStatus highs_addRows(Highs* h, HighsInt num_row,
|
|
488
|
+
dense_array_t<double> lower,
|
|
489
|
+
dense_array_t<double> upper, HighsInt num_new_nz,
|
|
490
|
+
dense_array_t<HighsInt> starts,
|
|
491
|
+
dense_array_t<HighsInt> indices,
|
|
492
|
+
dense_array_t<double> values) {
|
|
493
|
+
py::buffer_info lower_info = lower.request();
|
|
494
|
+
py::buffer_info upper_info = upper.request();
|
|
495
|
+
py::buffer_info starts_info = starts.request();
|
|
496
|
+
py::buffer_info indices_info = indices.request();
|
|
497
|
+
py::buffer_info values_info = values.request();
|
|
498
|
+
|
|
499
|
+
double* lower_ptr = static_cast<double*>(lower_info.ptr);
|
|
500
|
+
double* upper_ptr = static_cast<double*>(upper_info.ptr);
|
|
501
|
+
HighsInt* starts_ptr = reinterpret_cast<HighsInt*>(starts_info.ptr);
|
|
502
|
+
HighsInt* indices_ptr = reinterpret_cast<HighsInt*>(indices_info.ptr);
|
|
503
|
+
double* values_ptr = static_cast<double*>(values_info.ptr);
|
|
504
|
+
|
|
505
|
+
return h->addRows(num_row, lower_ptr, upper_ptr, num_new_nz, starts_ptr,
|
|
506
|
+
indices_ptr, values_ptr);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
HighsStatus highs_addCol(Highs* h, double cost, double lower, double upper,
|
|
510
|
+
HighsInt num_new_nz, dense_array_t<HighsInt> indices,
|
|
511
|
+
dense_array_t<double> values) {
|
|
512
|
+
py::buffer_info indices_info = indices.request();
|
|
513
|
+
py::buffer_info values_info = values.request();
|
|
514
|
+
|
|
515
|
+
HighsInt* indices_ptr = reinterpret_cast<HighsInt*>(indices_info.ptr);
|
|
516
|
+
double* values_ptr = static_cast<double*>(values_info.ptr);
|
|
517
|
+
|
|
518
|
+
return h->addCol(cost, lower, upper, num_new_nz, indices_ptr, values_ptr);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
HighsStatus highs_addCols(Highs* h, HighsInt num_col,
|
|
522
|
+
dense_array_t<double> cost,
|
|
523
|
+
dense_array_t<double> lower,
|
|
524
|
+
dense_array_t<double> upper, HighsInt num_new_nz,
|
|
525
|
+
dense_array_t<HighsInt> starts,
|
|
526
|
+
dense_array_t<HighsInt> indices,
|
|
527
|
+
dense_array_t<double> values) {
|
|
528
|
+
py::buffer_info cost_info = cost.request();
|
|
529
|
+
py::buffer_info lower_info = lower.request();
|
|
530
|
+
py::buffer_info upper_info = upper.request();
|
|
531
|
+
py::buffer_info starts_info = starts.request();
|
|
532
|
+
py::buffer_info indices_info = indices.request();
|
|
533
|
+
py::buffer_info values_info = values.request();
|
|
534
|
+
|
|
535
|
+
double* cost_ptr = static_cast<double*>(cost_info.ptr);
|
|
536
|
+
double* lower_ptr = static_cast<double*>(lower_info.ptr);
|
|
537
|
+
double* upper_ptr = static_cast<double*>(upper_info.ptr);
|
|
538
|
+
HighsInt* starts_ptr = reinterpret_cast<HighsInt*>(starts_info.ptr);
|
|
539
|
+
const HighsInt* indices_ptr = reinterpret_cast<HighsInt*>(indices_info.ptr);
|
|
540
|
+
double* values_ptr = static_cast<double*>(values_info.ptr);
|
|
541
|
+
|
|
542
|
+
return h->addCols(num_col, cost_ptr, lower_ptr, upper_ptr, num_new_nz,
|
|
543
|
+
starts_ptr, indices_ptr, values_ptr);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
HighsStatus highs_addVar(Highs* h, double lower, double upper) {
|
|
547
|
+
return h->addVar(lower, upper);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
HighsStatus highs_addVars(Highs* h, HighsInt num_vars,
|
|
551
|
+
dense_array_t<double> lower,
|
|
552
|
+
dense_array_t<double> upper) {
|
|
553
|
+
py::buffer_info lower_info = lower.request();
|
|
554
|
+
py::buffer_info upper_info = upper.request();
|
|
555
|
+
|
|
556
|
+
double* lower_ptr = static_cast<double*>(lower_info.ptr);
|
|
557
|
+
double* upper_ptr = static_cast<double*>(upper_info.ptr);
|
|
558
|
+
|
|
559
|
+
return h->addVars(num_vars, lower_ptr, upper_ptr);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
HighsStatus highs_changeColsCost(Highs* h, HighsInt num_set_entries,
|
|
563
|
+
dense_array_t<HighsInt> indices,
|
|
564
|
+
dense_array_t<double> cost) {
|
|
565
|
+
py::buffer_info indices_info = indices.request();
|
|
566
|
+
py::buffer_info cost_info = cost.request();
|
|
567
|
+
|
|
568
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
569
|
+
double* cost_ptr = static_cast<double*>(cost_info.ptr);
|
|
570
|
+
|
|
571
|
+
return h->changeColsCost(num_set_entries, indices_ptr, cost_ptr);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
HighsStatus highs_changeColsBounds(Highs* h, HighsInt num_set_entries,
|
|
575
|
+
dense_array_t<HighsInt> indices,
|
|
576
|
+
dense_array_t<double> lower,
|
|
577
|
+
dense_array_t<double> upper) {
|
|
578
|
+
py::buffer_info indices_info = indices.request();
|
|
579
|
+
py::buffer_info lower_info = lower.request();
|
|
580
|
+
py::buffer_info upper_info = upper.request();
|
|
581
|
+
|
|
582
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
583
|
+
double* lower_ptr = static_cast<double*>(lower_info.ptr);
|
|
584
|
+
double* upper_ptr = static_cast<double*>(upper_info.ptr);
|
|
585
|
+
|
|
586
|
+
return h->changeColsBounds(num_set_entries, indices_ptr, lower_ptr,
|
|
587
|
+
upper_ptr);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
HighsStatus highs_changeColsIntegrality(
|
|
591
|
+
Highs* h, HighsInt num_set_entries, dense_array_t<HighsInt> indices,
|
|
592
|
+
dense_array_t<HighsVarType> integrality) {
|
|
593
|
+
py::buffer_info indices_info = indices.request();
|
|
594
|
+
py::buffer_info integrality_info = integrality.request();
|
|
595
|
+
|
|
596
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
597
|
+
HighsVarType* integrality_ptr =
|
|
598
|
+
static_cast<HighsVarType*>(integrality_info.ptr);
|
|
599
|
+
|
|
600
|
+
return h->changeColsIntegrality(num_set_entries, indices_ptr,
|
|
601
|
+
integrality_ptr);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
HighsStatus highs_changeRowsBounds(Highs* h, HighsInt num_set_entries,
|
|
605
|
+
dense_array_t<HighsInt> indices,
|
|
606
|
+
dense_array_t<double> lower,
|
|
607
|
+
dense_array_t<double> upper) {
|
|
608
|
+
py::buffer_info indices_info = indices.request();
|
|
609
|
+
py::buffer_info lower_info = lower.request();
|
|
610
|
+
py::buffer_info upper_info = upper.request();
|
|
611
|
+
|
|
612
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
613
|
+
double* lower_ptr = static_cast<double*>(lower_info.ptr);
|
|
614
|
+
double* upper_ptr = static_cast<double*>(upper_info.ptr);
|
|
615
|
+
|
|
616
|
+
return h->changeRowsBounds(num_set_entries, indices_ptr, lower_ptr,
|
|
617
|
+
upper_ptr);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// Same as deleteVars
|
|
621
|
+
HighsStatus highs_deleteCols(Highs* h, HighsInt num_set_entries,
|
|
622
|
+
dense_array_t<HighsInt> indices) {
|
|
623
|
+
py::buffer_info index_info = indices.request();
|
|
624
|
+
HighsInt* index_ptr = reinterpret_cast<HighsInt*>(index_info.ptr);
|
|
625
|
+
return h->deleteCols(num_set_entries, index_ptr);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
HighsStatus highs_deleteRows(Highs* h, HighsInt num_set_entries,
|
|
629
|
+
dense_array_t<HighsInt> indices) {
|
|
630
|
+
py::buffer_info index_info = indices.request();
|
|
631
|
+
HighsInt* index_ptr = reinterpret_cast<HighsInt*>(index_info.ptr);
|
|
632
|
+
return h->deleteRows(num_set_entries, index_ptr);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
HighsStatus highs_setSolution(Highs* h, HighsSolution& solution) {
|
|
636
|
+
return h->setSolution(solution);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
HighsStatus highs_setSparseSolution(Highs* h, HighsInt num_entries,
|
|
640
|
+
dense_array_t<HighsInt> index,
|
|
641
|
+
dense_array_t<double> value) {
|
|
642
|
+
py::buffer_info index_info = index.request();
|
|
643
|
+
py::buffer_info value_info = value.request();
|
|
644
|
+
|
|
645
|
+
HighsInt* index_ptr = reinterpret_cast<HighsInt*>(index_info.ptr);
|
|
646
|
+
double* value_ptr = static_cast<double*>(value_info.ptr);
|
|
647
|
+
|
|
648
|
+
return h->setSolution(num_entries, index_ptr, value_ptr);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
HighsStatus highs_setBasis(Highs* h, HighsBasis& basis) {
|
|
652
|
+
return h->setBasis(basis);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
HighsStatus highs_setLogicalBasis(Highs* h) { return h->setBasis(); }
|
|
656
|
+
|
|
657
|
+
std::tuple<HighsStatus, py::object> highs_getOptionValue(
|
|
658
|
+
Highs* h, const std::string& option) {
|
|
659
|
+
HighsOptionType option_type;
|
|
660
|
+
HighsStatus status = h->getOptionType(option, option_type);
|
|
661
|
+
|
|
662
|
+
if (status != HighsStatus::kOk) return std::make_tuple(status, py::cast(0));
|
|
663
|
+
|
|
664
|
+
if (option_type == HighsOptionType::kBool) {
|
|
665
|
+
bool value;
|
|
666
|
+
status = h->getOptionValue(option, value);
|
|
667
|
+
return std::make_tuple(status, py::cast(value));
|
|
668
|
+
} else if (option_type == HighsOptionType::kInt) {
|
|
669
|
+
HighsInt value;
|
|
670
|
+
status = h->getOptionValue(option, value);
|
|
671
|
+
return std::make_tuple(status, py::cast(value));
|
|
672
|
+
} else if (option_type == HighsOptionType::kDouble) {
|
|
673
|
+
double value;
|
|
674
|
+
status = h->getOptionValue(option, value);
|
|
675
|
+
return std::make_tuple(status, py::cast(value));
|
|
676
|
+
} else if (option_type == HighsOptionType::kString) {
|
|
677
|
+
std::string value;
|
|
678
|
+
status = h->getOptionValue(option, value);
|
|
679
|
+
return std::make_tuple(status, py::cast(value));
|
|
680
|
+
} else
|
|
681
|
+
return std::make_tuple(HighsStatus::kError, py::cast(0));
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
std::tuple<HighsStatus, HighsOptionType> highs_getOptionType(
|
|
685
|
+
Highs* h, const std::string& option) {
|
|
686
|
+
HighsOptionType option_type;
|
|
687
|
+
HighsStatus status = h->getOptionType(option, option_type);
|
|
688
|
+
return std::make_tuple(status, option_type);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
HighsStatus highs_writeOptions(Highs* h, const std::string& filename) {
|
|
692
|
+
return h->writeOptions(filename);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
std::tuple<HighsStatus, py::object> highs_getInfoValue(
|
|
696
|
+
Highs* h, const std::string& info) {
|
|
697
|
+
HighsInfoType info_type;
|
|
698
|
+
HighsStatus status = h->getInfoType(info, info_type);
|
|
699
|
+
|
|
700
|
+
if (status != HighsStatus::kOk) return std::make_tuple(status, py::cast(0));
|
|
701
|
+
|
|
702
|
+
if (info_type == HighsInfoType::kInt64) {
|
|
703
|
+
int64_t value;
|
|
704
|
+
status = h->getInfoValue(info, value);
|
|
705
|
+
return std::make_tuple(status, py::cast(value));
|
|
706
|
+
} else if (info_type == HighsInfoType::kInt) {
|
|
707
|
+
HighsInt value;
|
|
708
|
+
status = h->getInfoValue(info, value);
|
|
709
|
+
return std::make_tuple(status, py::cast(value));
|
|
710
|
+
} else if (info_type == HighsInfoType::kDouble) {
|
|
711
|
+
double value;
|
|
712
|
+
status = h->getInfoValue(info, value);
|
|
713
|
+
return std::make_tuple(status, py::cast(value));
|
|
714
|
+
} else
|
|
715
|
+
return std::make_tuple(HighsStatus::kError, py::cast(0));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
std::tuple<HighsStatus, HighsInfoType> highs_getInfoType(
|
|
719
|
+
Highs* h, const std::string& info) {
|
|
720
|
+
HighsInfoType info_type;
|
|
721
|
+
HighsStatus status = h->getInfoType(info, info_type);
|
|
722
|
+
return std::make_tuple(status, info_type);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
std::tuple<HighsStatus, ObjSense> highs_getObjectiveSense(Highs* h) {
|
|
726
|
+
ObjSense obj_sense;
|
|
727
|
+
HighsStatus status = h->getObjectiveSense(obj_sense);
|
|
728
|
+
return std::make_tuple(status, obj_sense);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
std::tuple<HighsStatus, double> highs_getObjectiveOffset(Highs* h) {
|
|
732
|
+
double obj_offset;
|
|
733
|
+
HighsStatus status = h->getObjectiveOffset(obj_offset);
|
|
734
|
+
return std::make_tuple(status, obj_offset);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
std::tuple<HighsStatus, double, double, double, HighsInt> highs_getCol(
|
|
738
|
+
Highs* h, HighsInt col) {
|
|
739
|
+
double cost, lower, upper;
|
|
740
|
+
HighsInt get_num_col;
|
|
741
|
+
HighsInt get_num_nz;
|
|
742
|
+
HighsInt col_ = static_cast<HighsInt>(col);
|
|
743
|
+
HighsStatus status = h->getCols(1, &col_, get_num_col, &cost, &lower, &upper,
|
|
744
|
+
get_num_nz, nullptr, nullptr, nullptr);
|
|
745
|
+
return std::make_tuple(status, cost, lower, upper, get_num_nz);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
std::tuple<HighsStatus, dense_array_t<HighsInt>, dense_array_t<double>>
|
|
749
|
+
highs_getColEntries(Highs* h, HighsInt col) {
|
|
750
|
+
HighsInt get_num_col;
|
|
751
|
+
HighsInt get_num_nz;
|
|
752
|
+
HighsInt col_ = static_cast<HighsInt>(col);
|
|
753
|
+
h->getCols(1, &col_, get_num_col, nullptr, nullptr, nullptr, get_num_nz,
|
|
754
|
+
nullptr, nullptr, nullptr);
|
|
755
|
+
get_num_nz = get_num_nz > 0 ? get_num_nz : 1;
|
|
756
|
+
HighsInt start;
|
|
757
|
+
std::vector<HighsInt> index(get_num_nz);
|
|
758
|
+
std::vector<double> value(get_num_nz);
|
|
759
|
+
HighsInt* index_ptr = static_cast<HighsInt*>(index.data());
|
|
760
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
761
|
+
HighsStatus status =
|
|
762
|
+
h->getCols(1, &col_, get_num_col, nullptr, nullptr, nullptr, get_num_nz,
|
|
763
|
+
&start, index_ptr, value_ptr);
|
|
764
|
+
return std::make_tuple(status, py::cast(index), py::cast(value));
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
std::tuple<HighsStatus, double, double, HighsInt> highs_getRow(Highs* h,
|
|
768
|
+
HighsInt row) {
|
|
769
|
+
double lower, upper;
|
|
770
|
+
HighsInt get_num_row;
|
|
771
|
+
HighsInt get_num_nz;
|
|
772
|
+
HighsInt row_ = static_cast<HighsInt>(row);
|
|
773
|
+
HighsStatus status = h->getRows(1, &row_, get_num_row, &lower, &upper,
|
|
774
|
+
get_num_nz, nullptr, nullptr, nullptr);
|
|
775
|
+
return std::make_tuple(status, lower, upper, get_num_nz);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
std::tuple<HighsStatus, dense_array_t<HighsInt>, dense_array_t<double>>
|
|
779
|
+
highs_getRowEntries(Highs* h, HighsInt row) {
|
|
780
|
+
HighsInt get_num_row;
|
|
781
|
+
HighsInt get_num_nz;
|
|
782
|
+
HighsInt row_ = static_cast<HighsInt>(row);
|
|
783
|
+
h->getRows(1, &row_, get_num_row, nullptr, nullptr, get_num_nz, nullptr,
|
|
784
|
+
nullptr, nullptr);
|
|
785
|
+
get_num_nz = get_num_nz > 0 ? get_num_nz : 1;
|
|
786
|
+
HighsInt start;
|
|
787
|
+
std::vector<HighsInt> index(get_num_nz);
|
|
788
|
+
std::vector<double> value(get_num_nz);
|
|
789
|
+
HighsInt* index_ptr = static_cast<HighsInt*>(index.data());
|
|
790
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
791
|
+
HighsStatus status = h->getRows(1, &row_, get_num_row, nullptr, nullptr,
|
|
792
|
+
get_num_nz, &start, index_ptr, value_ptr);
|
|
793
|
+
return std::make_tuple(status, py::cast(index), py::cast(value));
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
std::tuple<HighsStatus, HighsInt, dense_array_t<double>, dense_array_t<double>,
|
|
797
|
+
dense_array_t<double>, HighsInt>
|
|
798
|
+
highs_getCols(Highs* h, HighsInt num_set_entries,
|
|
799
|
+
dense_array_t<HighsInt> indices) {
|
|
800
|
+
py::buffer_info indices_info = indices.request();
|
|
801
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
802
|
+
// Make sure that the vectors are not empty
|
|
803
|
+
const HighsInt dim = num_set_entries > 0 ? num_set_entries : 1;
|
|
804
|
+
std::vector<double> cost(dim);
|
|
805
|
+
std::vector<double> lower(dim);
|
|
806
|
+
std::vector<double> upper(dim);
|
|
807
|
+
double* cost_ptr = static_cast<double*>(cost.data());
|
|
808
|
+
double* lower_ptr = static_cast<double*>(lower.data());
|
|
809
|
+
double* upper_ptr = static_cast<double*>(upper.data());
|
|
810
|
+
HighsInt get_num_col;
|
|
811
|
+
HighsInt get_num_nz;
|
|
812
|
+
HighsStatus status =
|
|
813
|
+
h->getCols(num_set_entries, indices_ptr, get_num_col, cost_ptr, lower_ptr,
|
|
814
|
+
upper_ptr, get_num_nz, nullptr, nullptr, nullptr);
|
|
815
|
+
return std::make_tuple(status, get_num_col, py::cast(cost), py::cast(lower),
|
|
816
|
+
py::cast(upper), get_num_nz);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
std::tuple<HighsStatus, dense_array_t<HighsInt>, dense_array_t<HighsInt>,
|
|
820
|
+
dense_array_t<double>>
|
|
821
|
+
highs_getColsEntries(Highs* h, HighsInt num_set_entries,
|
|
822
|
+
dense_array_t<HighsInt> indices) {
|
|
823
|
+
py::buffer_info indices_info = indices.request();
|
|
824
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
825
|
+
// Make sure that the vectors are not empty
|
|
826
|
+
const HighsInt dim = num_set_entries > 0 ? num_set_entries : 1;
|
|
827
|
+
HighsInt get_num_col;
|
|
828
|
+
HighsInt get_num_nz;
|
|
829
|
+
h->getCols(num_set_entries, indices_ptr, get_num_col, nullptr, nullptr,
|
|
830
|
+
nullptr, get_num_nz, nullptr, nullptr, nullptr);
|
|
831
|
+
get_num_nz = get_num_nz > 0 ? get_num_nz : 1;
|
|
832
|
+
std::vector<HighsInt> start(dim);
|
|
833
|
+
std::vector<HighsInt> index(get_num_nz);
|
|
834
|
+
std::vector<double> value(get_num_nz);
|
|
835
|
+
HighsInt* start_ptr = static_cast<HighsInt*>(start.data());
|
|
836
|
+
HighsInt* index_ptr = static_cast<HighsInt*>(index.data());
|
|
837
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
838
|
+
HighsStatus status =
|
|
839
|
+
h->getCols(num_set_entries, indices_ptr, get_num_col, nullptr, nullptr,
|
|
840
|
+
nullptr, get_num_nz, start_ptr, index_ptr, value_ptr);
|
|
841
|
+
return std::make_tuple(status, py::cast(start), py::cast(index),
|
|
842
|
+
py::cast(value));
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
std::tuple<HighsStatus, HighsVarType> highs_getColIntegrality(Highs* h,
|
|
846
|
+
HighsInt col) {
|
|
847
|
+
HighsInt col_ = static_cast<HighsInt>(col);
|
|
848
|
+
HighsVarType integrality;
|
|
849
|
+
HighsStatus status = h->getColIntegrality(col_, integrality);
|
|
850
|
+
return std::make_tuple(status, integrality);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
std::tuple<HighsStatus, HighsInt, dense_array_t<double>, dense_array_t<double>,
|
|
854
|
+
HighsInt>
|
|
855
|
+
highs_getRows(Highs* h, HighsInt num_set_entries,
|
|
856
|
+
dense_array_t<HighsInt> indices) {
|
|
857
|
+
py::buffer_info indices_info = indices.request();
|
|
858
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
859
|
+
// Make sure that the vectors are not empty
|
|
860
|
+
const HighsInt dim = num_set_entries > 0 ? num_set_entries : 1;
|
|
861
|
+
std::vector<double> lower(dim);
|
|
862
|
+
std::vector<double> upper(dim);
|
|
863
|
+
double* lower_ptr = static_cast<double*>(lower.data());
|
|
864
|
+
double* upper_ptr = static_cast<double*>(upper.data());
|
|
865
|
+
HighsInt get_num_row;
|
|
866
|
+
HighsInt get_num_nz;
|
|
867
|
+
HighsStatus status =
|
|
868
|
+
h->getRows(num_set_entries, indices_ptr, get_num_row, lower_ptr,
|
|
869
|
+
upper_ptr, get_num_nz, nullptr, nullptr, nullptr);
|
|
870
|
+
return std::make_tuple(status, get_num_row, py::cast(lower), py::cast(upper),
|
|
871
|
+
get_num_nz);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
std::tuple<HighsStatus, dense_array_t<HighsInt>, dense_array_t<HighsInt>,
|
|
875
|
+
dense_array_t<double>>
|
|
876
|
+
highs_getRowsEntries(Highs* h, HighsInt num_set_entries,
|
|
877
|
+
dense_array_t<HighsInt> indices) {
|
|
878
|
+
py::buffer_info indices_info = indices.request();
|
|
879
|
+
HighsInt* indices_ptr = static_cast<HighsInt*>(indices_info.ptr);
|
|
880
|
+
// Make sure that the vectors are not empty
|
|
881
|
+
const HighsInt dim = num_set_entries > 0 ? num_set_entries : 1;
|
|
882
|
+
HighsInt get_num_row;
|
|
883
|
+
HighsInt get_num_nz;
|
|
884
|
+
h->getRows(num_set_entries, indices_ptr, get_num_row, nullptr, nullptr,
|
|
885
|
+
get_num_nz, nullptr, nullptr, nullptr);
|
|
886
|
+
get_num_nz = get_num_nz > 0 ? get_num_nz : 1;
|
|
887
|
+
std::vector<HighsInt> start(dim);
|
|
888
|
+
std::vector<HighsInt> index(get_num_nz);
|
|
889
|
+
std::vector<double> value(get_num_nz);
|
|
890
|
+
HighsInt* start_ptr = static_cast<HighsInt*>(start.data());
|
|
891
|
+
HighsInt* index_ptr = static_cast<HighsInt*>(index.data());
|
|
892
|
+
double* value_ptr = static_cast<double*>(value.data());
|
|
893
|
+
HighsStatus status =
|
|
894
|
+
h->getRows(num_set_entries, indices_ptr, get_num_row, nullptr, nullptr,
|
|
895
|
+
get_num_nz, start_ptr, index_ptr, value_ptr);
|
|
896
|
+
return std::make_tuple(status, py::cast(start), py::cast(index),
|
|
897
|
+
py::cast(value));
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
std::tuple<HighsStatus, std::string> highs_getColName(Highs* h,
|
|
901
|
+
const HighsInt col) {
|
|
902
|
+
std::string name;
|
|
903
|
+
HighsStatus status = h->getColName(col, name);
|
|
904
|
+
return std::make_tuple(status, name);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
std::tuple<HighsStatus, int> highs_getColByName(Highs* h,
|
|
908
|
+
const std::string& name) {
|
|
909
|
+
HighsInt col;
|
|
910
|
+
HighsStatus status = h->getColByName(name, col);
|
|
911
|
+
return std::make_tuple(status, col);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
std::tuple<HighsStatus, std::string> highs_getRowName(Highs* h,
|
|
915
|
+
const HighsInt row) {
|
|
916
|
+
std::string name;
|
|
917
|
+
HighsStatus status = h->getRowName(row, name);
|
|
918
|
+
return std::make_tuple(status, name);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
std::tuple<HighsStatus, int> highs_getRowByName(Highs* h,
|
|
922
|
+
const std::string& name) {
|
|
923
|
+
HighsInt row;
|
|
924
|
+
HighsStatus status = h->getRowByName(name, row);
|
|
925
|
+
return std::make_tuple(status, row);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
// Wrap the setCallback function to appropriately handle user data.
|
|
929
|
+
// pybind11 automatically ensures GIL is re-acquired when the callback is
|
|
930
|
+
// called.
|
|
931
|
+
HighsStatus highs_setCallback(
|
|
932
|
+
Highs* h,
|
|
933
|
+
std::function<void(int, const std::string&, const HighsCallbackOutput*,
|
|
934
|
+
HighsCallbackInput*, py::handle)>
|
|
935
|
+
fn,
|
|
936
|
+
py::handle data) {
|
|
937
|
+
if (static_cast<bool>(fn) == false)
|
|
938
|
+
return h->setCallback((HighsCallbackFunctionType) nullptr, nullptr);
|
|
939
|
+
else
|
|
940
|
+
return h->setCallback(
|
|
941
|
+
[fn](int callbackType, const std::string& msg,
|
|
942
|
+
const HighsCallbackOutput* dataOut, HighsCallbackInput* dataIn,
|
|
943
|
+
void* d) {
|
|
944
|
+
return fn(callbackType, msg, dataOut, dataIn,
|
|
945
|
+
py::handle(reinterpret_cast<PyObject*>(d)));
|
|
946
|
+
},
|
|
947
|
+
data.ptr());
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
HighsStatus highs_setcbSolution(HighsCallbackInput* cb,
|
|
951
|
+
const dense_array_t<double> value) {
|
|
952
|
+
py::buffer_info value_info = value.request();
|
|
953
|
+
const auto* value_ptr = static_cast<double*>(value_info.ptr);
|
|
954
|
+
return cb->setSolution(value_info.size, value_ptr);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
HighsStatus highs_setcbSparseSolution(HighsCallbackInput* cb,
|
|
958
|
+
const dense_array_t<HighsInt> index,
|
|
959
|
+
const dense_array_t<double> value) {
|
|
960
|
+
py::buffer_info index_info = index.request();
|
|
961
|
+
py::buffer_info value_info = value.request();
|
|
962
|
+
|
|
963
|
+
const auto* index_ptr = static_cast<HighsInt*>(index_info.ptr);
|
|
964
|
+
const auto* value_ptr = static_cast<double*>(value_info.ptr);
|
|
965
|
+
|
|
966
|
+
if (index_info.size == value_info.size) {
|
|
967
|
+
return cb->setSolution(index_info.size, index_ptr, value_ptr);
|
|
968
|
+
} else
|
|
969
|
+
return HighsStatus::kError;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
PYBIND11_MODULE(_core, m, py::mod_gil_not_used()) {
|
|
973
|
+
// To keep a smaller diff, for reviewers, the declarations are not moved, but
|
|
974
|
+
// keep in mind:
|
|
975
|
+
// C++ enum classes :: don't need .export_values()
|
|
976
|
+
// C++ enums, need .export_values()
|
|
977
|
+
// Quoting [1]:
|
|
978
|
+
// "The enum_::export_values() function exports the enum entries into the
|
|
979
|
+
// parent scope, which should be skipped for newer C++11-style strongly typed
|
|
980
|
+
// enums."
|
|
981
|
+
// [1]: https://pybind11.readthedocs.io/en/stable/classes.html
|
|
982
|
+
py::enum_<ObjSense>(m, "ObjSense", py::module_local())
|
|
983
|
+
.value("kMinimize", ObjSense::kMinimize)
|
|
984
|
+
.value("kMaximize", ObjSense::kMaximize);
|
|
985
|
+
py::enum_<MatrixFormat>(m, "MatrixFormat", py::module_local())
|
|
986
|
+
.value("kColwise", MatrixFormat::kColwise)
|
|
987
|
+
.value("kRowwise", MatrixFormat::kRowwise)
|
|
988
|
+
.value("kRowwisePartitioned", MatrixFormat::kRowwisePartitioned);
|
|
989
|
+
py::enum_<HessianFormat>(m, "HessianFormat", py::module_local())
|
|
990
|
+
.value("kTriangular", HessianFormat::kTriangular)
|
|
991
|
+
.value("kSquare", HessianFormat::kSquare);
|
|
992
|
+
py::enum_<SolutionStatus>(m, "SolutionStatus", py::module_local())
|
|
993
|
+
.value("kSolutionStatusNone", SolutionStatus::kSolutionStatusNone)
|
|
994
|
+
.value("kSolutionStatusInfeasible",
|
|
995
|
+
SolutionStatus::kSolutionStatusInfeasible)
|
|
996
|
+
.value("kSolutionStatusFeasible", SolutionStatus::kSolutionStatusFeasible)
|
|
997
|
+
.export_values();
|
|
998
|
+
py::enum_<BasisValidity>(m, "BasisValidity", py::module_local())
|
|
999
|
+
.value("kBasisValidityInvalid", BasisValidity::kBasisValidityInvalid)
|
|
1000
|
+
.value("kBasisValidityValid", BasisValidity::kBasisValidityValid)
|
|
1001
|
+
.export_values();
|
|
1002
|
+
py::enum_<HighsModelStatus>(m, "HighsModelStatus", py::module_local())
|
|
1003
|
+
.value("kNotset", HighsModelStatus::kNotset)
|
|
1004
|
+
.value("kLoadError", HighsModelStatus::kLoadError)
|
|
1005
|
+
.value("kModelError", HighsModelStatus::kModelError)
|
|
1006
|
+
.value("kPresolveError", HighsModelStatus::kPresolveError)
|
|
1007
|
+
.value("kSolveError", HighsModelStatus::kSolveError)
|
|
1008
|
+
.value("kPostsolveError", HighsModelStatus::kPostsolveError)
|
|
1009
|
+
.value("kModelEmpty", HighsModelStatus::kModelEmpty)
|
|
1010
|
+
.value("kOptimal", HighsModelStatus::kOptimal)
|
|
1011
|
+
.value("kInfeasible", HighsModelStatus::kInfeasible)
|
|
1012
|
+
.value("kUnboundedOrInfeasible", HighsModelStatus::kUnboundedOrInfeasible)
|
|
1013
|
+
.value("kUnbounded", HighsModelStatus::kUnbounded)
|
|
1014
|
+
.value("kObjectiveBound", HighsModelStatus::kObjectiveBound)
|
|
1015
|
+
.value("kObjectiveTarget", HighsModelStatus::kObjectiveTarget)
|
|
1016
|
+
.value("kTimeLimit", HighsModelStatus::kTimeLimit)
|
|
1017
|
+
.value("kIterationLimit", HighsModelStatus::kIterationLimit)
|
|
1018
|
+
.value("kUnknown", HighsModelStatus::kUnknown)
|
|
1019
|
+
.value("kSolutionLimit", HighsModelStatus::kSolutionLimit)
|
|
1020
|
+
.value("kInterrupt", HighsModelStatus::kInterrupt)
|
|
1021
|
+
.value("kMemoryLimit", HighsModelStatus::kMemoryLimit)
|
|
1022
|
+
.value("kHighsInterrupt", HighsModelStatus::kHighsInterrupt);
|
|
1023
|
+
py::enum_<HighsPresolveStatus>(m, "HighsPresolveStatus", py::module_local())
|
|
1024
|
+
.value("kNotPresolved", HighsPresolveStatus::kNotPresolved)
|
|
1025
|
+
.value("kNotReduced", HighsPresolveStatus::kNotReduced)
|
|
1026
|
+
.value("kInfeasible", HighsPresolveStatus::kInfeasible)
|
|
1027
|
+
.value("kUnboundedOrInfeasible",
|
|
1028
|
+
HighsPresolveStatus::kUnboundedOrInfeasible)
|
|
1029
|
+
.value("kReduced", HighsPresolveStatus::kReduced)
|
|
1030
|
+
.value("kReducedToEmpty", HighsPresolveStatus::kReducedToEmpty)
|
|
1031
|
+
.value("kTimeout", HighsPresolveStatus::kTimeout)
|
|
1032
|
+
.value("kNullError", HighsPresolveStatus::kNullError)
|
|
1033
|
+
.value("kOptionsError", HighsPresolveStatus::kOptionsError);
|
|
1034
|
+
py::enum_<HighsBasisStatus>(m, "HighsBasisStatus", py::module_local())
|
|
1035
|
+
.value("kLower", HighsBasisStatus::kLower)
|
|
1036
|
+
.value("kBasic", HighsBasisStatus::kBasic)
|
|
1037
|
+
.value("kUpper", HighsBasisStatus::kUpper)
|
|
1038
|
+
.value("kZero", HighsBasisStatus::kZero)
|
|
1039
|
+
.value("kNonbasic", HighsBasisStatus::kNonbasic);
|
|
1040
|
+
py::enum_<HighsVarType>(m, "HighsVarType", py::module_local())
|
|
1041
|
+
.value("kContinuous", HighsVarType::kContinuous)
|
|
1042
|
+
.value("kInteger", HighsVarType::kInteger)
|
|
1043
|
+
.value("kSemiContinuous", HighsVarType::kSemiContinuous)
|
|
1044
|
+
.value("kSemiInteger", HighsVarType::kSemiInteger)
|
|
1045
|
+
.value("kImplicitInteger", HighsVarType::kImplicitInteger);
|
|
1046
|
+
py::enum_<HighsOptionType>(m, "HighsOptionType", py::module_local())
|
|
1047
|
+
.value("kBool", HighsOptionType::kBool)
|
|
1048
|
+
.value("kInt", HighsOptionType::kInt)
|
|
1049
|
+
.value("kDouble", HighsOptionType::kDouble)
|
|
1050
|
+
.value("kString", HighsOptionType::kString);
|
|
1051
|
+
py::enum_<HighsInfoType>(m, "HighsInfoType", py::module_local())
|
|
1052
|
+
.value("kInt64", HighsInfoType::kInt64)
|
|
1053
|
+
.value("kInt", HighsInfoType::kInt)
|
|
1054
|
+
.value("kDouble", HighsInfoType::kDouble);
|
|
1055
|
+
py::enum_<HighsStatus>(m, "HighsStatus", py::module_local())
|
|
1056
|
+
.value("kError", HighsStatus::kError)
|
|
1057
|
+
.value("kOk", HighsStatus::kOk)
|
|
1058
|
+
.value("kWarning", HighsStatus::kWarning);
|
|
1059
|
+
py::enum_<HighsLogType>(m, "HighsLogType", py::module_local())
|
|
1060
|
+
.value("kInfo", HighsLogType::kInfo)
|
|
1061
|
+
.value("kDetailed", HighsLogType::kDetailed)
|
|
1062
|
+
.value("kVerbose", HighsLogType::kVerbose)
|
|
1063
|
+
.value("kWarning", HighsLogType::kWarning)
|
|
1064
|
+
.value("kError", HighsLogType::kError);
|
|
1065
|
+
py::enum_<IisStrategy>(m, "IisStrategy", py::module_local())
|
|
1066
|
+
.value("kIisStrategyMin", IisStrategy::kIisStrategyMin)
|
|
1067
|
+
.value("kIisStrategyLight", IisStrategy::kIisStrategyLight)
|
|
1068
|
+
.value("kIisStrategyFromRay", IisStrategy::kIisStrategyFromRay)
|
|
1069
|
+
.value("kIisStrategyFromLp", IisStrategy::kIisStrategyFromLp)
|
|
1070
|
+
.value("kIisStrategyIrreducible", IisStrategy::kIisStrategyIrreducible)
|
|
1071
|
+
.value("kIisStrategyColPriority", IisStrategy::kIisStrategyColPriority)
|
|
1072
|
+
.value("kIisStrategyRelaxation", IisStrategy::kIisStrategyRelaxation)
|
|
1073
|
+
.value("kIisStrategyMax", IisStrategy::kIisStrategyMax)
|
|
1074
|
+
.export_values();
|
|
1075
|
+
|
|
1076
|
+
py::enum_<IisBoundStatus>(m, "IisBoundStatus", py::module_local())
|
|
1077
|
+
.value("kIisBoundStatusDropped", IisBoundStatus::kIisBoundStatusDropped)
|
|
1078
|
+
.value("kIisBoundStatusNull", IisBoundStatus::kIisBoundStatusNull)
|
|
1079
|
+
.value("kIisBoundStatusFree", IisBoundStatus::kIisBoundStatusFree)
|
|
1080
|
+
.value("kIisBoundStatusLower", IisBoundStatus::kIisBoundStatusLower)
|
|
1081
|
+
.value("kIisBoundStatusUpper", IisBoundStatus::kIisBoundStatusUpper)
|
|
1082
|
+
.value("kIisBoundStatusBoxed", IisBoundStatus::kIisBoundStatusBoxed)
|
|
1083
|
+
.export_values();
|
|
1084
|
+
|
|
1085
|
+
py::enum_<IisStatus>(m, "IisStatus", py::module_local())
|
|
1086
|
+
.value("kIisStatusNotInConflict", IisStatus::kIisStatusNotInConflict)
|
|
1087
|
+
.value("kIisStatusMaybeInConflict", IisStatus::kIisStatusMaybeInConflict)
|
|
1088
|
+
.value("kIisStatusInConflict", IisStatus::kIisStatusInConflict)
|
|
1089
|
+
.export_values();
|
|
1090
|
+
|
|
1091
|
+
py::enum_<HighsDebugLevel>(m, "HighsDebugLevel", py::module_local())
|
|
1092
|
+
.value("kHighsDebugLevelNone", HighsDebugLevel::kHighsDebugLevelNone)
|
|
1093
|
+
.value("kHighsDebugLevelCheap", HighsDebugLevel::kHighsDebugLevelCheap)
|
|
1094
|
+
.value("kHighsDebugLevelCostly", HighsDebugLevel::kHighsDebugLevelCostly)
|
|
1095
|
+
.value("kHighsDebugLevelExpensive",
|
|
1096
|
+
HighsDebugLevel::kHighsDebugLevelExpensive)
|
|
1097
|
+
.value("kHighsDebugLevelMin", HighsDebugLevel::kHighsDebugLevelMin)
|
|
1098
|
+
.value("kHighsDebugLevelMax", HighsDebugLevel::kHighsDebugLevelMax)
|
|
1099
|
+
.export_values();
|
|
1100
|
+
// Classes
|
|
1101
|
+
py::class_<HighsSparseMatrix>(m, "HighsSparseMatrix", py::module_local())
|
|
1102
|
+
.def(py::init<>())
|
|
1103
|
+
.def_readwrite("format_", &HighsSparseMatrix::format_)
|
|
1104
|
+
.def_readwrite("num_col_", &HighsSparseMatrix::num_col_)
|
|
1105
|
+
.def_readwrite("num_row_", &HighsSparseMatrix::num_row_)
|
|
1106
|
+
.def_readwrite("start_", &HighsSparseMatrix::start_)
|
|
1107
|
+
.def_readwrite("p_end_", &HighsSparseMatrix::p_end_)
|
|
1108
|
+
.def_readwrite("index_", &HighsSparseMatrix::index_)
|
|
1109
|
+
.def_readwrite("value_", &HighsSparseMatrix::value_);
|
|
1110
|
+
py::class_<HighsLpMods>(m, "HighsLpMods", py::module_local());
|
|
1111
|
+
py::class_<HighsScale>(m, "HighsScale", py::module_local());
|
|
1112
|
+
py::class_<HighsLp>(m, "HighsLp", py::module_local())
|
|
1113
|
+
.def(py::init<>())
|
|
1114
|
+
.def_readwrite("num_col_", &HighsLp::num_col_)
|
|
1115
|
+
.def_readwrite("num_row_", &HighsLp::num_row_)
|
|
1116
|
+
.def_property("col_cost_", make_readonly_ptr(&HighsLp::col_cost_),
|
|
1117
|
+
make_setter_ptr(&HighsLp::col_cost_))
|
|
1118
|
+
.def_readwrite("col_lower_", &HighsLp::col_lower_)
|
|
1119
|
+
.def_readwrite("col_upper_", &HighsLp::col_upper_)
|
|
1120
|
+
.def_readwrite("row_lower_", &HighsLp::row_lower_)
|
|
1121
|
+
.def_readwrite("row_upper_", &HighsLp::row_upper_)
|
|
1122
|
+
.def_readwrite("a_matrix_", &HighsLp::a_matrix_)
|
|
1123
|
+
.def_readwrite("sense_", &HighsLp::sense_)
|
|
1124
|
+
.def_readwrite("offset_", &HighsLp::offset_)
|
|
1125
|
+
.def_readwrite("model_name_", &HighsLp::model_name_)
|
|
1126
|
+
.def_readwrite("col_names_", &HighsLp::col_names_)
|
|
1127
|
+
.def_readwrite("row_names_", &HighsLp::row_names_)
|
|
1128
|
+
.def_readwrite("integrality_", &HighsLp::integrality_)
|
|
1129
|
+
.def_readwrite("scale_", &HighsLp::scale_)
|
|
1130
|
+
.def_readwrite("is_scaled_", &HighsLp::is_scaled_)
|
|
1131
|
+
.def_readwrite("is_moved_", &HighsLp::is_moved_)
|
|
1132
|
+
.def_readwrite("mods_", &HighsLp::mods_);
|
|
1133
|
+
py::class_<HighsHessian>(m, "HighsHessian", py::module_local())
|
|
1134
|
+
.def(py::init<>())
|
|
1135
|
+
.def_readwrite("dim_", &HighsHessian::dim_)
|
|
1136
|
+
.def_readwrite("format_", &HighsHessian::format_)
|
|
1137
|
+
.def_readwrite("start_", &HighsHessian::start_)
|
|
1138
|
+
.def_readwrite("index_", &HighsHessian::index_)
|
|
1139
|
+
.def_readwrite("value_", &HighsHessian::value_);
|
|
1140
|
+
py::class_<HighsModel>(m, "HighsModel", py::module_local())
|
|
1141
|
+
.def(py::init<>())
|
|
1142
|
+
.def_readwrite("lp_", &HighsModel::lp_)
|
|
1143
|
+
.def_readwrite("hessian_", &HighsModel::hessian_);
|
|
1144
|
+
py::class_<HighsInfo>(m, "HighsInfo", py::module_local())
|
|
1145
|
+
.def(py::init<>())
|
|
1146
|
+
.def_readwrite("valid", &HighsInfo::valid)
|
|
1147
|
+
.def_readwrite("mip_node_count", &HighsInfo::mip_node_count)
|
|
1148
|
+
.def_readwrite("simplex_iteration_count",
|
|
1149
|
+
&HighsInfo::simplex_iteration_count)
|
|
1150
|
+
.def_readwrite("ipm_iteration_count", &HighsInfo::ipm_iteration_count)
|
|
1151
|
+
.def_readwrite("qp_iteration_count", &HighsInfo::qp_iteration_count)
|
|
1152
|
+
.def_readwrite("crossover_iteration_count",
|
|
1153
|
+
&HighsInfo::crossover_iteration_count)
|
|
1154
|
+
.def_readwrite("pdlp_iteration_count", &HighsInfo::pdlp_iteration_count)
|
|
1155
|
+
.def_readwrite("primal_solution_status",
|
|
1156
|
+
&HighsInfo::primal_solution_status)
|
|
1157
|
+
.def_readwrite("dual_solution_status", &HighsInfo::dual_solution_status)
|
|
1158
|
+
.def_readwrite("basis_validity", &HighsInfo::basis_validity)
|
|
1159
|
+
.def_readwrite("objective_function_value",
|
|
1160
|
+
&HighsInfo::objective_function_value)
|
|
1161
|
+
.def_readwrite("mip_dual_bound", &HighsInfo::mip_dual_bound)
|
|
1162
|
+
.def_readwrite("mip_gap", &HighsInfo::mip_gap)
|
|
1163
|
+
.def_readwrite("max_integrality_violation",
|
|
1164
|
+
&HighsInfo::max_integrality_violation)
|
|
1165
|
+
.def_readwrite("num_primal_infeasibilities",
|
|
1166
|
+
&HighsInfo::num_primal_infeasibilities)
|
|
1167
|
+
.def_readwrite("max_primal_infeasibility",
|
|
1168
|
+
&HighsInfo::max_primal_infeasibility)
|
|
1169
|
+
.def_readwrite("sum_primal_infeasibilities",
|
|
1170
|
+
&HighsInfo::sum_primal_infeasibilities)
|
|
1171
|
+
.def_readwrite("num_dual_infeasibilities",
|
|
1172
|
+
&HighsInfo::num_dual_infeasibilities)
|
|
1173
|
+
.def_readwrite("max_dual_infeasibility",
|
|
1174
|
+
&HighsInfo::max_dual_infeasibility)
|
|
1175
|
+
.def_readwrite("sum_dual_infeasibilities",
|
|
1176
|
+
&HighsInfo::sum_dual_infeasibilities)
|
|
1177
|
+
.def_readwrite("num_relative_primal_infeasibilities",
|
|
1178
|
+
&HighsInfo::num_relative_primal_infeasibilities)
|
|
1179
|
+
.def_readwrite("max_relative_primal_infeasibility",
|
|
1180
|
+
&HighsInfo::max_relative_primal_infeasibility)
|
|
1181
|
+
.def_readwrite("num_relative_dual_infeasibilities",
|
|
1182
|
+
&HighsInfo::num_relative_dual_infeasibilities)
|
|
1183
|
+
.def_readwrite("max_relative_dual_infeasibility",
|
|
1184
|
+
&HighsInfo::max_relative_dual_infeasibility)
|
|
1185
|
+
.def_readwrite("num_primal_residual_errors",
|
|
1186
|
+
&HighsInfo::num_primal_residual_errors)
|
|
1187
|
+
.def_readwrite("max_primal_residual_error",
|
|
1188
|
+
&HighsInfo::max_primal_residual_error)
|
|
1189
|
+
.def_readwrite("num_dual_residual_errors",
|
|
1190
|
+
&HighsInfo::num_dual_residual_errors)
|
|
1191
|
+
.def_readwrite("max_dual_residual_error",
|
|
1192
|
+
&HighsInfo::max_dual_residual_error)
|
|
1193
|
+
.def_readwrite("num_relative_primal_residual_errors",
|
|
1194
|
+
&HighsInfo::num_relative_primal_residual_errors)
|
|
1195
|
+
.def_readwrite("max_relative_primal_residual_error",
|
|
1196
|
+
&HighsInfo::max_relative_primal_residual_error)
|
|
1197
|
+
.def_readwrite("num_relative_dual_residual_errors",
|
|
1198
|
+
&HighsInfo::num_relative_dual_residual_errors)
|
|
1199
|
+
.def_readwrite("max_relative_dual_residual_error",
|
|
1200
|
+
&HighsInfo::max_relative_dual_residual_error)
|
|
1201
|
+
.def_readwrite("num_complementarity_violations",
|
|
1202
|
+
&HighsInfo::num_complementarity_violations)
|
|
1203
|
+
.def_readwrite("max_complementarity_violation",
|
|
1204
|
+
&HighsInfo::max_complementarity_violation)
|
|
1205
|
+
.def_readwrite("primal_dual_objective_error",
|
|
1206
|
+
&HighsInfo::primal_dual_objective_error)
|
|
1207
|
+
.def_readwrite("primal_dual_integral",
|
|
1208
|
+
&HighsInfo::primal_dual_integral);
|
|
1209
|
+
py::class_<HighsOptions>(m, "HighsOptions", py::module_local())
|
|
1210
|
+
.def(py::init<>())
|
|
1211
|
+
.def_readwrite("presolve", &HighsOptions::presolve)
|
|
1212
|
+
.def_readwrite("solver", &HighsOptions::solver)
|
|
1213
|
+
.def_readwrite("parallel", &HighsOptions::parallel)
|
|
1214
|
+
.def_readwrite("run_crossover", &HighsOptions::run_crossover)
|
|
1215
|
+
.def_readwrite("time_limit", &HighsOptions::time_limit)
|
|
1216
|
+
.def_readwrite("read_solution_file", &HighsOptions::read_solution_file)
|
|
1217
|
+
.def_readwrite("read_basis_file", &HighsOptions::read_basis_file)
|
|
1218
|
+
.def_readwrite("write_model_file", &HighsOptions::write_model_file)
|
|
1219
|
+
.def_readwrite("solution_file", &HighsOptions::solution_file)
|
|
1220
|
+
.def_readwrite("write_basis_file", &HighsOptions::write_basis_file)
|
|
1221
|
+
.def_readwrite("random_seed", &HighsOptions::random_seed)
|
|
1222
|
+
.def_readwrite("ranging", &HighsOptions::ranging)
|
|
1223
|
+
.def_readwrite("infinite_cost", &HighsOptions::infinite_cost)
|
|
1224
|
+
.def_readwrite("infinite_bound", &HighsOptions::infinite_bound)
|
|
1225
|
+
.def_readwrite("small_matrix_value", &HighsOptions::small_matrix_value)
|
|
1226
|
+
.def_readwrite("large_matrix_value", &HighsOptions::large_matrix_value)
|
|
1227
|
+
.def_readwrite("kkt_tolerance", &HighsOptions::kkt_tolerance)
|
|
1228
|
+
.def_readwrite("primal_feasibility_tolerance",
|
|
1229
|
+
&HighsOptions::primal_feasibility_tolerance)
|
|
1230
|
+
.def_readwrite("dual_feasibility_tolerance",
|
|
1231
|
+
&HighsOptions::dual_feasibility_tolerance)
|
|
1232
|
+
.def_readwrite("primal_residual_tolerance", &HighsOptions::primal_residual_tolerance)
|
|
1233
|
+
.def_readwrite("dual_residual_tolerance", &HighsOptions::dual_residual_tolerance)
|
|
1234
|
+
.def_readwrite("optimality_tolerance", &HighsOptions::optimality_tolerance)
|
|
1235
|
+
.def_readwrite("objective_bound", &HighsOptions::objective_bound)
|
|
1236
|
+
.def_readwrite("objective_target", &HighsOptions::objective_target)
|
|
1237
|
+
.def_readwrite("threads", &HighsOptions::threads)
|
|
1238
|
+
.def_readwrite("user_objective_scale", &HighsOptions::user_objective_scale)
|
|
1239
|
+
.def_readwrite("user_bound_scale", &HighsOptions::user_bound_scale)
|
|
1240
|
+
.def_readwrite("highs_debug_level", &HighsOptions::highs_debug_level)
|
|
1241
|
+
.def_readwrite("highs_analysis_level",
|
|
1242
|
+
&HighsOptions::highs_analysis_level)
|
|
1243
|
+
.def_readwrite("simplex_strategy", &HighsOptions::simplex_strategy)
|
|
1244
|
+
.def_readwrite("simplex_scale_strategy",
|
|
1245
|
+
&HighsOptions::simplex_scale_strategy)
|
|
1246
|
+
.def_readwrite("simplex_crash_strategy",
|
|
1247
|
+
&HighsOptions::simplex_crash_strategy)
|
|
1248
|
+
.def_readwrite("simplex_dual_edge_weight_strategy",
|
|
1249
|
+
&HighsOptions::simplex_dual_edge_weight_strategy)
|
|
1250
|
+
.def_readwrite("simplex_primal_edge_weight_strategy",
|
|
1251
|
+
&HighsOptions::simplex_primal_edge_weight_strategy)
|
|
1252
|
+
.def_readwrite("simplex_iteration_limit",
|
|
1253
|
+
&HighsOptions::simplex_iteration_limit)
|
|
1254
|
+
.def_readwrite("simplex_update_limit",
|
|
1255
|
+
&HighsOptions::simplex_update_limit)
|
|
1256
|
+
.def_readwrite("simplex_min_concurrency",
|
|
1257
|
+
&HighsOptions::simplex_min_concurrency)
|
|
1258
|
+
.def_readwrite("simplex_max_concurrency",
|
|
1259
|
+
&HighsOptions::simplex_max_concurrency)
|
|
1260
|
+
.def_readwrite("log_file", &HighsOptions::log_file)
|
|
1261
|
+
.def_readwrite("write_model_to_file", &HighsOptions::write_model_to_file)
|
|
1262
|
+
.def_readwrite("write_solution_to_file",
|
|
1263
|
+
&HighsOptions::write_solution_to_file)
|
|
1264
|
+
.def_readwrite("write_solution_style",
|
|
1265
|
+
&HighsOptions::write_solution_style)
|
|
1266
|
+
.def_readwrite("glpsol_cost_row_location", &HighsOptions::glpsol_cost_row_location)
|
|
1267
|
+
.def_readwrite("write_presolved_model_file", &HighsOptions::write_presolved_model_file)
|
|
1268
|
+
.def_readwrite("output_flag", &HighsOptions::output_flag)
|
|
1269
|
+
.def_readwrite("log_to_console", &HighsOptions::log_to_console)
|
|
1270
|
+
.def_readwrite("timeless_log", &HighsOptions::timeless_log)
|
|
1271
|
+
.def_readwrite("ipm_optimality_tolerance", &HighsOptions::ipm_optimality_tolerance)
|
|
1272
|
+
.def_readwrite("ipm_iteration_limit", &HighsOptions::ipm_iteration_limit)
|
|
1273
|
+
.def_readwrite("pdlp_scaling_mode", &HighsOptions::pdlp_scaling_mode)
|
|
1274
|
+
.def_readwrite("pdlp_iteration_limit", &HighsOptions::pdlp_iteration_limit)
|
|
1275
|
+
.def_readwrite("pdlp_cupdlpc_restart_method", &HighsOptions::pdlp_cupdlpc_restart_method)
|
|
1276
|
+
.def_readwrite("pdlp_optimality_tolerance", &HighsOptions::pdlp_optimality_tolerance)
|
|
1277
|
+
.def_readwrite("qp_iteration_limit", &HighsOptions::qp_iteration_limit)
|
|
1278
|
+
.def_readwrite("qp_nullspace_limit", &HighsOptions::qp_nullspace_limit)
|
|
1279
|
+
.def_readwrite("qp_regularization_value", &HighsOptions::qp_regularization_value)
|
|
1280
|
+
.def_readwrite("mip_heuristic_run_feasibility_jump", &HighsOptions::mip_heuristic_run_feasibility_jump)
|
|
1281
|
+
.def_readwrite("mip_heuristic_run_rins", &HighsOptions::mip_heuristic_run_rins)
|
|
1282
|
+
.def_readwrite("mip_heuristic_run_rens", &HighsOptions::mip_heuristic_run_rens)
|
|
1283
|
+
.def_readwrite("mip_heuristic_run_root_reduced_cost", &HighsOptions::mip_heuristic_run_root_reduced_cost)
|
|
1284
|
+
.def_readwrite("mip_heuristic_run_zi_round", &HighsOptions::mip_heuristic_run_zi_round)
|
|
1285
|
+
.def_readwrite("mip_heuristic_run_shifting", &HighsOptions::mip_heuristic_run_shifting)
|
|
1286
|
+
.def_readwrite("blend_multi_objectives", &HighsOptions::blend_multi_objectives)
|
|
1287
|
+
// Advanced options
|
|
1288
|
+
.def_readwrite("log_dev_level", &HighsOptions::log_dev_level)
|
|
1289
|
+
.def_readwrite("log_githash", &HighsOptions::log_githash)
|
|
1290
|
+
.def_readwrite("solve_relaxation", &HighsOptions::solve_relaxation)
|
|
1291
|
+
.def_readwrite("allow_unbounded_or_infeasible",
|
|
1292
|
+
&HighsOptions::allow_unbounded_or_infeasible)
|
|
1293
|
+
.def_readwrite("allowed_matrix_scale_factor",
|
|
1294
|
+
&HighsOptions::allowed_matrix_scale_factor)
|
|
1295
|
+
.def_readwrite("ipx_dualize_strategy",
|
|
1296
|
+
&HighsOptions::ipx_dualize_strategy)
|
|
1297
|
+
.def_readwrite("simplex_dualize_strategy",
|
|
1298
|
+
&HighsOptions::simplex_dualize_strategy)
|
|
1299
|
+
.def_readwrite("simplex_permute_strategy",
|
|
1300
|
+
&HighsOptions::simplex_permute_strategy)
|
|
1301
|
+
.def_readwrite("simplex_price_strategy",
|
|
1302
|
+
&HighsOptions::simplex_price_strategy)
|
|
1303
|
+
.def_readwrite("mip_detect_symmetry", &HighsOptions::mip_detect_symmetry)
|
|
1304
|
+
.def_readwrite("mip_max_nodes", &HighsOptions::mip_max_nodes)
|
|
1305
|
+
.def_readwrite("mip_max_stall_nodes", &HighsOptions::mip_max_stall_nodes)
|
|
1306
|
+
.def_readwrite("mip_max_leaves", &HighsOptions::mip_max_leaves)
|
|
1307
|
+
.def_readwrite("mip_max_improving_sols",
|
|
1308
|
+
&HighsOptions::mip_max_improving_sols)
|
|
1309
|
+
.def_readwrite("mip_lp_age_limit", &HighsOptions::mip_lp_age_limit)
|
|
1310
|
+
.def_readwrite("mip_pool_age_limit", &HighsOptions::mip_pool_age_limit)
|
|
1311
|
+
.def_readwrite("mip_pool_soft_limit", &HighsOptions::mip_pool_soft_limit)
|
|
1312
|
+
.def_readwrite("mip_pscost_minreliable",
|
|
1313
|
+
&HighsOptions::mip_pscost_minreliable)
|
|
1314
|
+
.def_readwrite("mip_min_cliquetable_entries_for_parallelism",
|
|
1315
|
+
&HighsOptions::mip_min_cliquetable_entries_for_parallelism)
|
|
1316
|
+
.def_readwrite("mip_report_level", &HighsOptions::mip_report_level)
|
|
1317
|
+
.def_readwrite("mip_feasibility_tolerance",
|
|
1318
|
+
&HighsOptions::mip_feasibility_tolerance)
|
|
1319
|
+
.def_readwrite("mip_rel_gap", &HighsOptions::mip_rel_gap)
|
|
1320
|
+
.def_readwrite("mip_abs_gap", &HighsOptions::mip_abs_gap)
|
|
1321
|
+
.def_readwrite("mip_heuristic_effort",
|
|
1322
|
+
&HighsOptions::mip_heuristic_effort)
|
|
1323
|
+
.def_readwrite("mip_min_logging_interval",
|
|
1324
|
+
&HighsOptions::mip_min_logging_interval);
|
|
1325
|
+
py::class_<Highs>(m, "_Highs", py::module_local())
|
|
1326
|
+
.def(py::init<>())
|
|
1327
|
+
.def("version", &Highs::version)
|
|
1328
|
+
.def("versionMajor", &Highs::versionMajor)
|
|
1329
|
+
.def("versionMinor", &Highs::versionMinor)
|
|
1330
|
+
.def("versionPatch", &Highs::versionPatch)
|
|
1331
|
+
.def("githash", &Highs::githash)
|
|
1332
|
+
.def("clear", &Highs::clear)
|
|
1333
|
+
.def("clearModel", &Highs::clearModel)
|
|
1334
|
+
.def("clearSolver", &Highs::clearSolver)
|
|
1335
|
+
.def("passModel", &highs_passModel)
|
|
1336
|
+
.def("passModel", &highs_passModelPointers)
|
|
1337
|
+
.def("passModel", &highs_passLp)
|
|
1338
|
+
.def("passModel", &highs_passLpPointers)
|
|
1339
|
+
.def("passHessian", &highs_passHessian)
|
|
1340
|
+
.def("passHessian", &highs_passHessianPointers)
|
|
1341
|
+
.def("addLinearObjective", &highs_addLinearObjective)
|
|
1342
|
+
.def("getNumLinearObjectives", &Highs::getNumLinearObjectives)
|
|
1343
|
+
.def("getLinearObjective", &Highs::getLinearObjective)
|
|
1344
|
+
.def("clearLinearObjectives", &Highs::clearLinearObjectives)
|
|
1345
|
+
.def("passColName", &Highs::passColName)
|
|
1346
|
+
.def("passRowName", &Highs::passRowName)
|
|
1347
|
+
.def("readModel", &Highs::readModel)
|
|
1348
|
+
.def("readBasis", &Highs::readBasis)
|
|
1349
|
+
.def("writeBasis", &Highs::writeBasis)
|
|
1350
|
+
.def("postsolve", &highs_postsolve)
|
|
1351
|
+
.def("postsolve", &highs_mipPostsolve)
|
|
1352
|
+
.def("run", &Highs::run, py::call_guard<py::gil_scoped_release>())
|
|
1353
|
+
.def_static("resetGlobalScheduler", &Highs::resetGlobalScheduler)
|
|
1354
|
+
.def(
|
|
1355
|
+
"feasibilityRelaxation",
|
|
1356
|
+
[](Highs& self, double global_lower_penalty,
|
|
1357
|
+
double global_upper_penalty, double global_rhs_penalty,
|
|
1358
|
+
py::object local_lower_penalty, py::object local_upper_penalty,
|
|
1359
|
+
py::object local_rhs_penalty) {
|
|
1360
|
+
std::vector<double> llp, lup, lrp;
|
|
1361
|
+
const double* llp_ptr = nullptr;
|
|
1362
|
+
const double* lup_ptr = nullptr;
|
|
1363
|
+
const double* lrp_ptr = nullptr;
|
|
1364
|
+
|
|
1365
|
+
if (!local_lower_penalty.is_none()) {
|
|
1366
|
+
llp = local_lower_penalty.cast<std::vector<double>>();
|
|
1367
|
+
llp_ptr = llp.data();
|
|
1368
|
+
}
|
|
1369
|
+
if (!local_upper_penalty.is_none()) {
|
|
1370
|
+
lup = local_upper_penalty.cast<std::vector<double>>();
|
|
1371
|
+
lup_ptr = lup.data();
|
|
1372
|
+
}
|
|
1373
|
+
if (!local_rhs_penalty.is_none()) {
|
|
1374
|
+
lrp = local_rhs_penalty.cast<std::vector<double>>();
|
|
1375
|
+
lrp_ptr = lrp.data();
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return self.feasibilityRelaxation(
|
|
1379
|
+
global_lower_penalty, global_upper_penalty, global_rhs_penalty,
|
|
1380
|
+
llp_ptr, lup_ptr, lrp_ptr);
|
|
1381
|
+
},
|
|
1382
|
+
py::arg("global_lower_penalty"), py::arg("global_upper_penalty"),
|
|
1383
|
+
py::arg("global_rhs_penalty"),
|
|
1384
|
+
py::arg("local_lower_penalty") = py::none(),
|
|
1385
|
+
py::arg("local_upper_penalty") = py::none(),
|
|
1386
|
+
py::arg("local_rhs_penalty") = py::none())
|
|
1387
|
+
.def("getIis", &highs_getIis)
|
|
1388
|
+
.def("presolve", &Highs::presolve,
|
|
1389
|
+
py::call_guard<py::gil_scoped_release>())
|
|
1390
|
+
.def("writeSolution", &highs_writeSolution)
|
|
1391
|
+
.def("readSolution", &Highs::readSolution)
|
|
1392
|
+
.def("setOptionValue",
|
|
1393
|
+
static_cast<HighsStatus (Highs::*)(const std::string&, const bool)>(
|
|
1394
|
+
&Highs::setOptionValue))
|
|
1395
|
+
.def("setOptionValue",
|
|
1396
|
+
static_cast<HighsStatus (Highs::*)(const std::string&, const int)>(
|
|
1397
|
+
&Highs::setOptionValue))
|
|
1398
|
+
.def(
|
|
1399
|
+
"setOptionValue",
|
|
1400
|
+
static_cast<HighsStatus (Highs::*)(const std::string&, const double)>(
|
|
1401
|
+
&Highs::setOptionValue))
|
|
1402
|
+
.def("setOptionValue",
|
|
1403
|
+
static_cast<HighsStatus (Highs::*)(
|
|
1404
|
+
const std::string&, const std::string&)>(&Highs::setOptionValue))
|
|
1405
|
+
.def("readOptions", &Highs::readOptions)
|
|
1406
|
+
.def("passOptions", &Highs::passOptions)
|
|
1407
|
+
.def("getOptions", &Highs::getOptions)
|
|
1408
|
+
.def("getOptionValue", &highs_getOptionValue)
|
|
1409
|
+
// .def("getOptionName", &highs_getOptionName)
|
|
1410
|
+
.def("getOptionType", &highs_getOptionType)
|
|
1411
|
+
.def("resetOptions", &Highs::resetOptions)
|
|
1412
|
+
.def("writeOptions", &highs_writeOptions)
|
|
1413
|
+
// .def("getBoolOptionValues", &highs_getBoolOptionValues)
|
|
1414
|
+
// .def("getIntOptionValues", &highs_getIntOptionValues)
|
|
1415
|
+
// .def("getDoubleOptionValues", &highs_getDoubleOptionValues)
|
|
1416
|
+
// .def("getStringOptionValues", &highs_getStringOptionValues)
|
|
1417
|
+
.def("getInfo", &Highs::getInfo)
|
|
1418
|
+
.def("getInfoValue", &highs_getInfoValue)
|
|
1419
|
+
.def("getInfoType", &highs_getInfoType)
|
|
1420
|
+
.def("writeInfo", &Highs::writeInfo)
|
|
1421
|
+
.def("getInfinity", &Highs::getInfinity)
|
|
1422
|
+
.def("getRunTime", &Highs::getRunTime)
|
|
1423
|
+
.def("getPresolvedLp", &Highs::getPresolvedLp)
|
|
1424
|
+
// .def("getPresolvedModel", &Highs::getPresolvedModel)
|
|
1425
|
+
// .def("getPresolveLog", &Highs::getPresolveLog)
|
|
1426
|
+
.def("getLp", &Highs::getLp)
|
|
1427
|
+
.def("getModel", &Highs::getModel)
|
|
1428
|
+
.def("getSolution", &Highs::getSolution)
|
|
1429
|
+
.def("getSavedMipSolutions", &Highs::getSavedMipSolutions)
|
|
1430
|
+
.def("getBasis", &Highs::getBasis)
|
|
1431
|
+
// &highs_getModelStatus not needed once getModelStatus(const bool
|
|
1432
|
+
// scaled_model) disappears from, Highs.h
|
|
1433
|
+
.def("getModelStatus", &highs_getModelStatus) //&Highs::getModelStatus)
|
|
1434
|
+
.def("getModelPresolveStatus", &Highs::getModelPresolveStatus)
|
|
1435
|
+
.def("getRanging", &highs_getRanging)
|
|
1436
|
+
.def("getObjectiveValue", &Highs::getObjectiveValue)
|
|
1437
|
+
.def("getDualObjectiveValue", &Highs::getDualObjectiveValue)
|
|
1438
|
+
.def("getBasicVariables", &highs_getBasicVariables)
|
|
1439
|
+
.def("getBasisInverseRow", &highs_getBasisInverseRow)
|
|
1440
|
+
.def("getBasisInverseRowSparse", &highs_getBasisInverseRowSparse)
|
|
1441
|
+
.def("getBasisInverseCol", &highs_getBasisInverseCol)
|
|
1442
|
+
.def("getBasisInverseColSparse", &highs_getBasisInverseColSparse)
|
|
1443
|
+
.def("getBasisSolve", &highs_getBasisSolve)
|
|
1444
|
+
.def("getBasisSolveSparse", &highs_getBasisSolveSparse)
|
|
1445
|
+
.def("getBasisTransposeSolve", &highs_getBasisTransposeSolve)
|
|
1446
|
+
.def("getBasisTransposeSolveSparse", &highs_getBasisTransposeSolveSparse)
|
|
1447
|
+
.def("getReducedRow", &highs_getReducedRow)
|
|
1448
|
+
.def("getReducedRowSparse", &highs_getReducedRowSparse)
|
|
1449
|
+
.def("getReducedColumn", &highs_getReducedColumn)
|
|
1450
|
+
.def("getReducedColumnSparse", &highs_getReducedColumnSparse)
|
|
1451
|
+
.def("getFixedLp", &highs_getFixedLp)
|
|
1452
|
+
.def("getDualRayExist", &highs_getDualRayExist)
|
|
1453
|
+
.def("getDualRay", &highs_getDualRay)
|
|
1454
|
+
.def("getDualUnboundednessDirectionExist",
|
|
1455
|
+
&highs_getDualUnboundednessDirectionExist)
|
|
1456
|
+
.def("getDualUnboundednessDirection",
|
|
1457
|
+
&highs_getDualUnboundednessDirection)
|
|
1458
|
+
.def("getPrimalRayExist", &highs_getPrimalRayExist)
|
|
1459
|
+
.def("getPrimalRay", &highs_getPrimalRay)
|
|
1460
|
+
.def("getNumCol", &Highs::getNumCol)
|
|
1461
|
+
.def("getNumRow", &Highs::getNumRow)
|
|
1462
|
+
.def("getNumNz", &Highs::getNumNz)
|
|
1463
|
+
.def("getHessianNumNz", &Highs::getHessianNumNz)
|
|
1464
|
+
.def("getObjectiveSense", &highs_getObjectiveSense)
|
|
1465
|
+
.def("getObjectiveOffset", &highs_getObjectiveOffset)
|
|
1466
|
+
|
|
1467
|
+
.def("getCol", &highs_getCol)
|
|
1468
|
+
.def("getColEntries", &highs_getColEntries)
|
|
1469
|
+
.def("getColIntegrality", &highs_getColIntegrality)
|
|
1470
|
+
.def("getRow", &highs_getRow)
|
|
1471
|
+
.def("getRowEntries", &highs_getRowEntries)
|
|
1472
|
+
|
|
1473
|
+
.def("getCols", &highs_getCols)
|
|
1474
|
+
.def("getColsEntries", &highs_getColsEntries)
|
|
1475
|
+
|
|
1476
|
+
.def("getRows", &highs_getRows)
|
|
1477
|
+
.def("getRowsEntries", &highs_getRowsEntries)
|
|
1478
|
+
|
|
1479
|
+
.def("getColName", &highs_getColName)
|
|
1480
|
+
.def("getColByName", &highs_getColByName)
|
|
1481
|
+
.def("getRowName", &highs_getRowName)
|
|
1482
|
+
.def("getRowByName", &highs_getRowByName)
|
|
1483
|
+
|
|
1484
|
+
.def("writeModel", &Highs::writeModel)
|
|
1485
|
+
.def("writePresolvedModel", &Highs::writePresolvedModel)
|
|
1486
|
+
.def("writeIisModel", &Highs::writeIisModel)
|
|
1487
|
+
.def("crossover", &Highs::crossover)
|
|
1488
|
+
.def("changeObjectiveSense", &Highs::changeObjectiveSense)
|
|
1489
|
+
.def("changeObjectiveOffset", &Highs::changeObjectiveOffset)
|
|
1490
|
+
.def("changeColIntegrality", &Highs::changeColIntegrality)
|
|
1491
|
+
.def("changeColCost", &Highs::changeColCost)
|
|
1492
|
+
.def("changeColBounds", &Highs::changeColBounds)
|
|
1493
|
+
.def("changeRowBounds", &Highs::changeRowBounds)
|
|
1494
|
+
.def("changeCoeff", &Highs::changeCoeff)
|
|
1495
|
+
.def("addRows", &highs_addRows)
|
|
1496
|
+
.def("addRow", &highs_addRow)
|
|
1497
|
+
.def("addCol", &highs_addCol)
|
|
1498
|
+
.def("addCols", &highs_addCols)
|
|
1499
|
+
.def("addVar", &highs_addVar)
|
|
1500
|
+
.def("addVars", &highs_addVars)
|
|
1501
|
+
.def("ensureColwise", &Highs::ensureColwise)
|
|
1502
|
+
.def("ensureRowwise", &Highs::ensureRowwise)
|
|
1503
|
+
.def("changeColsCost", &highs_changeColsCost)
|
|
1504
|
+
.def("changeColsBounds", &highs_changeColsBounds)
|
|
1505
|
+
.def("changeColsIntegrality", &highs_changeColsIntegrality)
|
|
1506
|
+
.def("changeRowsBounds", &highs_changeRowsBounds)
|
|
1507
|
+
.def("deleteCols", &highs_deleteCols)
|
|
1508
|
+
.def("deleteVars", &highs_deleteCols) // alias
|
|
1509
|
+
.def("deleteRows", &highs_deleteRows)
|
|
1510
|
+
.def("setSolution", &highs_setSolution)
|
|
1511
|
+
.def("setSolution", &highs_setSparseSolution)
|
|
1512
|
+
.def("setBasis", &highs_setBasis)
|
|
1513
|
+
.def("setBasis", &highs_setLogicalBasis)
|
|
1514
|
+
.def("modelStatusToString", &Highs::modelStatusToString)
|
|
1515
|
+
.def("solutionStatusToString", &Highs::solutionStatusToString)
|
|
1516
|
+
.def("basisStatusToString", &Highs::basisStatusToString)
|
|
1517
|
+
.def("basisValidityToString", &Highs::basisValidityToString)
|
|
1518
|
+
.def("setCallback", &highs_setCallback)
|
|
1519
|
+
.def("startCallback",
|
|
1520
|
+
static_cast<HighsStatus (Highs::*)(const HighsCallbackType)>(
|
|
1521
|
+
&Highs::startCallback))
|
|
1522
|
+
.def("stopCallback",
|
|
1523
|
+
static_cast<HighsStatus (Highs::*)(const HighsCallbackType)>(
|
|
1524
|
+
&Highs::stopCallback))
|
|
1525
|
+
.def("startCallbackInt", static_cast<HighsStatus (Highs::*)(const int)>(
|
|
1526
|
+
&Highs::startCallback))
|
|
1527
|
+
.def("stopCallbackInt", static_cast<HighsStatus (Highs::*)(const int)>(
|
|
1528
|
+
&Highs::stopCallback));
|
|
1529
|
+
|
|
1530
|
+
py::class_<HighsIis>(m, "HighsIis", py::module_local())
|
|
1531
|
+
.def(py::init<>())
|
|
1532
|
+
.def("clear", &HighsIis::clear)
|
|
1533
|
+
.def_readwrite("valid_", &HighsIis::valid_)
|
|
1534
|
+
.def_readwrite("status_", &HighsIis::status_)
|
|
1535
|
+
.def_readwrite("strategy_", &HighsIis::strategy_)
|
|
1536
|
+
.def_readwrite("col_index_", &HighsIis::col_index_)
|
|
1537
|
+
.def_readwrite("row_index_", &HighsIis::row_index_)
|
|
1538
|
+
.def_readwrite("col_bound_", &HighsIis::col_bound_)
|
|
1539
|
+
.def_readwrite("row_bound_", &HighsIis::row_bound_)
|
|
1540
|
+
.def_readwrite("col_status_", &HighsIis::col_status_)
|
|
1541
|
+
.def_readwrite("row_status_", &HighsIis::row_status_)
|
|
1542
|
+
.def_readwrite("info_", &HighsIis::info_)
|
|
1543
|
+
.def_readwrite("model_", &HighsIis::model_);
|
|
1544
|
+
|
|
1545
|
+
// structs
|
|
1546
|
+
py::class_<HighsSolution>(m, "HighsSolution", py::module_local())
|
|
1547
|
+
.def(py::init<>())
|
|
1548
|
+
.def_readwrite("value_valid", &HighsSolution::value_valid)
|
|
1549
|
+
.def_readwrite("dual_valid", &HighsSolution::dual_valid)
|
|
1550
|
+
.def_readwrite("col_value", &HighsSolution::col_value)
|
|
1551
|
+
.def_readwrite("col_dual", &HighsSolution::col_dual)
|
|
1552
|
+
.def_readwrite("row_value", &HighsSolution::row_value)
|
|
1553
|
+
.def_readwrite("row_dual", &HighsSolution::row_dual);
|
|
1554
|
+
py::class_<HighsObjectiveSolution>(m, "HighsObjectiveSolution",
|
|
1555
|
+
py::module_local())
|
|
1556
|
+
.def(py::init<>())
|
|
1557
|
+
.def_readwrite("objective", &HighsObjectiveSolution::objective)
|
|
1558
|
+
.def_readwrite("col_value", &HighsObjectiveSolution::col_value);
|
|
1559
|
+
py::class_<HighsBasis>(m, "HighsBasis", py::module_local())
|
|
1560
|
+
.def(py::init<>())
|
|
1561
|
+
.def_readwrite("valid", &HighsBasis::valid)
|
|
1562
|
+
.def_readwrite("alien", &HighsBasis::alien)
|
|
1563
|
+
.def_readwrite("was_alien", &HighsBasis::was_alien)
|
|
1564
|
+
.def_readwrite("debug_id", &HighsBasis::debug_id)
|
|
1565
|
+
.def_readwrite("debug_update_count", &HighsBasis::debug_update_count)
|
|
1566
|
+
.def_readwrite("debug_origin_name", &HighsBasis::debug_origin_name)
|
|
1567
|
+
.def_readwrite("col_status", &HighsBasis::col_status)
|
|
1568
|
+
.def_readwrite("row_status", &HighsBasis::row_status);
|
|
1569
|
+
py::class_<HighsRangingRecord>(m, "HighsRangingRecord", py::module_local())
|
|
1570
|
+
.def(py::init<>())
|
|
1571
|
+
.def_readwrite("value_", &HighsRangingRecord::value_)
|
|
1572
|
+
.def_readwrite("objective_", &HighsRangingRecord::objective_)
|
|
1573
|
+
.def_readwrite("in_var_", &HighsRangingRecord::in_var_)
|
|
1574
|
+
.def_readwrite("ou_var_", &HighsRangingRecord::ou_var_);
|
|
1575
|
+
py::class_<HighsRanging>(m, "HighsRanging", py::module_local())
|
|
1576
|
+
.def(py::init<>())
|
|
1577
|
+
.def_readwrite("valid", &HighsRanging::valid)
|
|
1578
|
+
.def_readwrite("col_cost_up", &HighsRanging::col_cost_up)
|
|
1579
|
+
.def_readwrite("col_cost_dn", &HighsRanging::col_cost_dn)
|
|
1580
|
+
.def_readwrite("col_bound_up", &HighsRanging::col_bound_up)
|
|
1581
|
+
.def_readwrite("col_bound_dn", &HighsRanging::col_bound_dn)
|
|
1582
|
+
.def_readwrite("row_bound_up", &HighsRanging::row_bound_up)
|
|
1583
|
+
.def_readwrite("row_bound_dn", &HighsRanging::row_bound_dn);
|
|
1584
|
+
py::class_<HighsIisInfo>(m, "HighsIisInfo", py::module_local())
|
|
1585
|
+
.def(py::init<>())
|
|
1586
|
+
.def_readwrite("num_lp_solved", &HighsIisInfo::num_lp_solved)
|
|
1587
|
+
.def_readwrite("sum_simplex_iteration_counts", &HighsIisInfo::sum_simplex_iteration_counts)
|
|
1588
|
+
.def_readwrite("min_simplex_iteration_count", &HighsIisInfo::min_simplex_iteration_count)
|
|
1589
|
+
.def_readwrite("max_simplex_iteration_count", &HighsIisInfo::max_simplex_iteration_count)
|
|
1590
|
+
.def_readwrite("sum_simplex_times", &HighsIisInfo::sum_simplex_times)
|
|
1591
|
+
.def_readwrite("min_simplex_time", &HighsIisInfo::min_simplex_time)
|
|
1592
|
+
.def_readwrite("max_simplex_time", &HighsIisInfo::max_simplex_time);
|
|
1593
|
+
py::class_<HighsLinearObjective>(m, "HighsLinearObjective",
|
|
1594
|
+
py::module_local())
|
|
1595
|
+
.def(py::init<>())
|
|
1596
|
+
.def_readwrite("weight", &HighsLinearObjective::weight)
|
|
1597
|
+
.def_readwrite("offset", &HighsLinearObjective::offset)
|
|
1598
|
+
.def_readwrite("coefficients", &HighsLinearObjective::coefficients)
|
|
1599
|
+
.def_readwrite("abs_tolerance", &HighsLinearObjective::abs_tolerance)
|
|
1600
|
+
.def_readwrite("rel_tolerance", &HighsLinearObjective::rel_tolerance)
|
|
1601
|
+
.def_readwrite("priority", &HighsLinearObjective::priority);
|
|
1602
|
+
// constants
|
|
1603
|
+
m.attr("kHighsInf") = kHighsInf;
|
|
1604
|
+
m.attr("kHighsIInf") = kHighsIInf;
|
|
1605
|
+
m.attr("kHighsUndefined") = kHighsUndefined;
|
|
1606
|
+
|
|
1607
|
+
m.attr("HIGHS_VERSION_MAJOR") = HIGHS_VERSION_MAJOR;
|
|
1608
|
+
m.attr("HIGHS_VERSION_MINOR") = HIGHS_VERSION_MINOR;
|
|
1609
|
+
m.attr("HIGHS_VERSION_PATCH") = HIGHS_VERSION_PATCH;
|
|
1610
|
+
|
|
1611
|
+
// Submodules
|
|
1612
|
+
py::module_ simplex_constants =
|
|
1613
|
+
m.def_submodule("simplex_constants", "Submodule for simplex constants");
|
|
1614
|
+
|
|
1615
|
+
py::enum_<SimplexStrategy>(simplex_constants, "SimplexStrategy",
|
|
1616
|
+
py::module_local())
|
|
1617
|
+
.value("kSimplexStrategyMin", SimplexStrategy::kSimplexStrategyMin)
|
|
1618
|
+
.value("kSimplexStrategyChoose", SimplexStrategy::kSimplexStrategyChoose)
|
|
1619
|
+
.value("kSimplexStrategyDual", SimplexStrategy::kSimplexStrategyDual)
|
|
1620
|
+
.value("kSimplexStrategyDualPlain",
|
|
1621
|
+
SimplexStrategy::kSimplexStrategyDualPlain)
|
|
1622
|
+
.value("kSimplexStrategyDualTasks",
|
|
1623
|
+
SimplexStrategy::kSimplexStrategyDualTasks)
|
|
1624
|
+
.value("kSimplexStrategyDualMulti",
|
|
1625
|
+
SimplexStrategy::kSimplexStrategyDualMulti)
|
|
1626
|
+
.value("kSimplexStrategyPrimal", SimplexStrategy::kSimplexStrategyPrimal)
|
|
1627
|
+
.value("kSimplexStrategyMax", SimplexStrategy::kSimplexStrategyMax)
|
|
1628
|
+
.value("kSimplexStrategyNum", SimplexStrategy::kSimplexStrategyNum)
|
|
1629
|
+
.export_values();
|
|
1630
|
+
py::enum_<SimplexUnscaledSolutionStrategy>(
|
|
1631
|
+
simplex_constants, "SimplexUnscaledSolutionStrategy", py::module_local())
|
|
1632
|
+
.value(
|
|
1633
|
+
"kSimplexUnscaledSolutionStrategyMin",
|
|
1634
|
+
SimplexUnscaledSolutionStrategy::kSimplexUnscaledSolutionStrategyMin)
|
|
1635
|
+
.value(
|
|
1636
|
+
"kSimplexUnscaledSolutionStrategyNone",
|
|
1637
|
+
SimplexUnscaledSolutionStrategy::kSimplexUnscaledSolutionStrategyNone)
|
|
1638
|
+
.value("kSimplexUnscaledSolutionStrategyRefine",
|
|
1639
|
+
SimplexUnscaledSolutionStrategy::
|
|
1640
|
+
kSimplexUnscaledSolutionStrategyRefine)
|
|
1641
|
+
.value("kSimplexUnscaledSolutionStrategyDirect",
|
|
1642
|
+
SimplexUnscaledSolutionStrategy::
|
|
1643
|
+
kSimplexUnscaledSolutionStrategyDirect)
|
|
1644
|
+
.value(
|
|
1645
|
+
"kSimplexUnscaledSolutionStrategyMax",
|
|
1646
|
+
SimplexUnscaledSolutionStrategy::kSimplexUnscaledSolutionStrategyMax)
|
|
1647
|
+
.value(
|
|
1648
|
+
"kSimplexUnscaledSolutionStrategyNum",
|
|
1649
|
+
SimplexUnscaledSolutionStrategy::kSimplexUnscaledSolutionStrategyNum)
|
|
1650
|
+
.export_values();
|
|
1651
|
+
py::enum_<SimplexSolvePhase>(simplex_constants, "SimplexSolvePhase",
|
|
1652
|
+
py::module_local())
|
|
1653
|
+
.value("kSolvePhaseMin", SimplexSolvePhase::kSolvePhaseMin)
|
|
1654
|
+
.value("kSolvePhaseError", SimplexSolvePhase::kSolvePhaseError)
|
|
1655
|
+
.value("kSolvePhaseExit", SimplexSolvePhase::kSolvePhaseExit)
|
|
1656
|
+
.value("kSolvePhaseUnknown", SimplexSolvePhase::kSolvePhaseUnknown)
|
|
1657
|
+
.value("kSolvePhaseOptimal", SimplexSolvePhase::kSolvePhaseOptimal)
|
|
1658
|
+
.value("kSolvePhase1", SimplexSolvePhase::kSolvePhase1)
|
|
1659
|
+
.value("kSolvePhase2", SimplexSolvePhase::kSolvePhase2)
|
|
1660
|
+
.value("kSolvePhasePrimalInfeasibleCleanup",
|
|
1661
|
+
SimplexSolvePhase::kSolvePhasePrimalInfeasibleCleanup)
|
|
1662
|
+
.value("kSolvePhaseOptimalCleanup",
|
|
1663
|
+
SimplexSolvePhase::kSolvePhaseOptimalCleanup)
|
|
1664
|
+
.value("kSolvePhaseTabooBasis", SimplexSolvePhase::kSolvePhaseTabooBasis)
|
|
1665
|
+
.value("kSolvePhaseMax", SimplexSolvePhase::kSolvePhaseMax)
|
|
1666
|
+
.export_values();
|
|
1667
|
+
py::enum_<SimplexEdgeWeightStrategy>(
|
|
1668
|
+
simplex_constants, "SimplexEdgeWeightStrategy", py::module_local())
|
|
1669
|
+
.value("kSimplexEdgeWeightStrategyMin",
|
|
1670
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategyMin)
|
|
1671
|
+
.value("kSimplexEdgeWeightStrategyChoose",
|
|
1672
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategyChoose)
|
|
1673
|
+
.value("kSimplexEdgeWeightStrategyDantzig",
|
|
1674
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategyDantzig)
|
|
1675
|
+
.value("kSimplexEdgeWeightStrategyDevex",
|
|
1676
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategyDevex)
|
|
1677
|
+
.value("kSimplexEdgeWeightStrategySteepestEdge",
|
|
1678
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategySteepestEdge)
|
|
1679
|
+
.value("kSimplexEdgeWeightStrategyMax",
|
|
1680
|
+
SimplexEdgeWeightStrategy::kSimplexEdgeWeightStrategyMax)
|
|
1681
|
+
.export_values();
|
|
1682
|
+
py::enum_<SimplexPriceStrategy>(simplex_constants, "SimplexPriceStrategy",
|
|
1683
|
+
py::module_local())
|
|
1684
|
+
.value("kSimplexPriceStrategyMin",
|
|
1685
|
+
SimplexPriceStrategy::kSimplexPriceStrategyMin)
|
|
1686
|
+
.value("kSimplexPriceStrategyCol",
|
|
1687
|
+
SimplexPriceStrategy::kSimplexPriceStrategyCol)
|
|
1688
|
+
.value("kSimplexPriceStrategyRow",
|
|
1689
|
+
SimplexPriceStrategy::kSimplexPriceStrategyRow)
|
|
1690
|
+
.value("kSimplexPriceStrategyRowSwitch",
|
|
1691
|
+
SimplexPriceStrategy::kSimplexPriceStrategyRowSwitch)
|
|
1692
|
+
.value("kSimplexPriceStrategyRowSwitchColSwitch",
|
|
1693
|
+
SimplexPriceStrategy::kSimplexPriceStrategyRowSwitchColSwitch)
|
|
1694
|
+
.value("kSimplexPriceStrategyMax",
|
|
1695
|
+
SimplexPriceStrategy::kSimplexPriceStrategyMax)
|
|
1696
|
+
.export_values();
|
|
1697
|
+
py::enum_<SimplexPivotalRowRefinementStrategy>(
|
|
1698
|
+
simplex_constants, "SimplexPivotalRowRefinementStrategy",
|
|
1699
|
+
py::module_local())
|
|
1700
|
+
.value("kSimplexInfeasibilityProofRefinementMin",
|
|
1701
|
+
SimplexPivotalRowRefinementStrategy::
|
|
1702
|
+
kSimplexInfeasibilityProofRefinementMin)
|
|
1703
|
+
.value("kSimplexInfeasibilityProofRefinementNo",
|
|
1704
|
+
SimplexPivotalRowRefinementStrategy::
|
|
1705
|
+
kSimplexInfeasibilityProofRefinementNo)
|
|
1706
|
+
.value("kSimplexInfeasibilityProofRefinementUnscaledLp",
|
|
1707
|
+
SimplexPivotalRowRefinementStrategy::
|
|
1708
|
+
kSimplexInfeasibilityProofRefinementUnscaledLp)
|
|
1709
|
+
.value("kSimplexInfeasibilityProofRefinementAlsoScaledLp",
|
|
1710
|
+
SimplexPivotalRowRefinementStrategy::
|
|
1711
|
+
kSimplexInfeasibilityProofRefinementAlsoScaledLp)
|
|
1712
|
+
.value("kSimplexInfeasibilityProofRefinementMax",
|
|
1713
|
+
SimplexPivotalRowRefinementStrategy::
|
|
1714
|
+
kSimplexInfeasibilityProofRefinementMax)
|
|
1715
|
+
.export_values();
|
|
1716
|
+
py::enum_<SimplexPrimalCorrectionStrategy>(
|
|
1717
|
+
simplex_constants, "SimplexPrimalCorrectionStrategy", py::module_local())
|
|
1718
|
+
.value(
|
|
1719
|
+
"kSimplexPrimalCorrectionStrategyNone",
|
|
1720
|
+
SimplexPrimalCorrectionStrategy::kSimplexPrimalCorrectionStrategyNone)
|
|
1721
|
+
.value("kSimplexPrimalCorrectionStrategyInRebuild",
|
|
1722
|
+
SimplexPrimalCorrectionStrategy::
|
|
1723
|
+
kSimplexPrimalCorrectionStrategyInRebuild)
|
|
1724
|
+
.value("kSimplexPrimalCorrectionStrategyAlways",
|
|
1725
|
+
SimplexPrimalCorrectionStrategy::
|
|
1726
|
+
kSimplexPrimalCorrectionStrategyAlways)
|
|
1727
|
+
.export_values();
|
|
1728
|
+
py::enum_<SimplexNlaOperation>(simplex_constants, "SimplexNlaOperation",
|
|
1729
|
+
py::module_local())
|
|
1730
|
+
.value("kSimplexNlaNull", SimplexNlaOperation::kSimplexNlaNull)
|
|
1731
|
+
.value("kSimplexNlaBtranFull", SimplexNlaOperation::kSimplexNlaBtranFull)
|
|
1732
|
+
.value("kSimplexNlaPriceFull", SimplexNlaOperation::kSimplexNlaPriceFull)
|
|
1733
|
+
.value("kSimplexNlaBtranBasicFeasibilityChange",
|
|
1734
|
+
SimplexNlaOperation::kSimplexNlaBtranBasicFeasibilityChange)
|
|
1735
|
+
// .value("kSimplexNlaPriceBasicFeasibilityChange",
|
|
1736
|
+
// /khighsSimplexNlaOperation::kSimplexNlaPriceBasicFeasibilityChange)
|
|
1737
|
+
.value("kSimplexNlaBtranEp", SimplexNlaOperation::kSimplexNlaBtranEp)
|
|
1738
|
+
.value("kSimplexNlaPriceAp", SimplexNlaOperation::kSimplexNlaPriceAp)
|
|
1739
|
+
.value("kSimplexNlaFtran", SimplexNlaOperation::kSimplexNlaFtran)
|
|
1740
|
+
.value("kSimplexNlaFtranBfrt", SimplexNlaOperation::kSimplexNlaFtranBfrt)
|
|
1741
|
+
.value("kSimplexNlaFtranDse", SimplexNlaOperation::kSimplexNlaFtranDse)
|
|
1742
|
+
.value("kSimplexNlaBtranPse", SimplexNlaOperation::kSimplexNlaBtranPse)
|
|
1743
|
+
.value("kNumSimplexNlaOperation",
|
|
1744
|
+
SimplexNlaOperation::kNumSimplexNlaOperation)
|
|
1745
|
+
.export_values();
|
|
1746
|
+
py::enum_<EdgeWeightMode>(simplex_constants, "EdgeWeightMode",
|
|
1747
|
+
py::module_local())
|
|
1748
|
+
.value("kDantzig", EdgeWeightMode::kDantzig)
|
|
1749
|
+
.value("kDevex", EdgeWeightMode::kDevex)
|
|
1750
|
+
.value("kSteepestEdge", EdgeWeightMode::kSteepestEdge)
|
|
1751
|
+
.value("kCount", EdgeWeightMode::kCount);
|
|
1752
|
+
|
|
1753
|
+
py::module_ callbacks = m.def_submodule("cb", "Callback interface submodule");
|
|
1754
|
+
// Types for interface
|
|
1755
|
+
py::enum_<HighsCallbackType>(callbacks, "HighsCallbackType",
|
|
1756
|
+
py::module_local())
|
|
1757
|
+
.value("kCallbackMin", HighsCallbackType::kCallbackMin)
|
|
1758
|
+
.value("kCallbackLogging", HighsCallbackType::kCallbackLogging)
|
|
1759
|
+
.value("kCallbackSimplexInterrupt",
|
|
1760
|
+
HighsCallbackType::kCallbackSimplexInterrupt)
|
|
1761
|
+
.value("kCallbackIpmInterrupt", HighsCallbackType::kCallbackIpmInterrupt)
|
|
1762
|
+
.value("kCallbackMipSolution", HighsCallbackType::kCallbackMipSolution)
|
|
1763
|
+
.value("kCallbackMipImprovingSolution",
|
|
1764
|
+
HighsCallbackType::kCallbackMipImprovingSolution)
|
|
1765
|
+
.value("kCallbackMipLogging", HighsCallbackType::kCallbackMipLogging)
|
|
1766
|
+
.value("kCallbackMipInterrupt", HighsCallbackType::kCallbackMipInterrupt)
|
|
1767
|
+
.value("kCallbackMipGetCutPool",
|
|
1768
|
+
HighsCallbackType::kCallbackMipGetCutPool)
|
|
1769
|
+
.value("kCallbackMipDefineLazyConstraints",
|
|
1770
|
+
HighsCallbackType::kCallbackMipDefineLazyConstraints)
|
|
1771
|
+
.value("kCallbackMipUserSolution",
|
|
1772
|
+
HighsCallbackType::kCallbackMipUserSolution)
|
|
1773
|
+
.value("kCallbackMax", HighsCallbackType::kCallbackMax)
|
|
1774
|
+
.value("kNumCallbackType", HighsCallbackType::kNumCallbackType)
|
|
1775
|
+
.export_values();
|
|
1776
|
+
// Classes
|
|
1777
|
+
py::class_<HighsCallbackOutput>(callbacks, "HighsCallbackOutput",
|
|
1778
|
+
py::module_local())
|
|
1779
|
+
.def(py::init<>())
|
|
1780
|
+
.def_readwrite("log_type", &HighsCallbackOutput::log_type)
|
|
1781
|
+
.def_readwrite("running_time", &HighsCallbackOutput::running_time)
|
|
1782
|
+
.def_readwrite("simplex_iteration_count",
|
|
1783
|
+
&HighsCallbackOutput::simplex_iteration_count)
|
|
1784
|
+
.def_readwrite("ipm_iteration_count",
|
|
1785
|
+
&HighsCallbackOutput::ipm_iteration_count)
|
|
1786
|
+
.def_readwrite("pdlp_iteration_count",
|
|
1787
|
+
&HighsCallbackOutput::pdlp_iteration_count)
|
|
1788
|
+
.def_readwrite("objective_function_value",
|
|
1789
|
+
&HighsCallbackOutput::objective_function_value)
|
|
1790
|
+
.def_readwrite("mip_node_count", &HighsCallbackOutput::mip_node_count)
|
|
1791
|
+
.def_readwrite("mip_primal_bound", &HighsCallbackOutput::mip_primal_bound)
|
|
1792
|
+
.def_readwrite("mip_dual_bound", &HighsCallbackOutput::mip_dual_bound)
|
|
1793
|
+
.def_readwrite("mip_gap", &HighsCallbackOutput::mip_gap)
|
|
1794
|
+
.def_property_readonly(
|
|
1795
|
+
"mip_solution", make_readonly_ptr(&HighsCallbackOutput::mip_solution))
|
|
1796
|
+
.def_readwrite("cutpool_num_col", &HighsCallbackOutput::cutpool_num_col)
|
|
1797
|
+
.def_readwrite("cutpool_num_cut", &HighsCallbackOutput::cutpool_num_cut)
|
|
1798
|
+
.def_property_readonly(
|
|
1799
|
+
"cutpool_start",
|
|
1800
|
+
make_readonly_ptr(&HighsCallbackOutput::cutpool_start))
|
|
1801
|
+
.def_property_readonly(
|
|
1802
|
+
"cutpool_index",
|
|
1803
|
+
make_readonly_ptr(&HighsCallbackOutput::cutpool_index))
|
|
1804
|
+
.def_property_readonly(
|
|
1805
|
+
"cutpool_value",
|
|
1806
|
+
make_readonly_ptr(&HighsCallbackOutput::cutpool_value))
|
|
1807
|
+
.def_property_readonly(
|
|
1808
|
+
"cutpool_lower",
|
|
1809
|
+
make_readonly_ptr(&HighsCallbackOutput::cutpool_lower))
|
|
1810
|
+
.def_property_readonly(
|
|
1811
|
+
"cutpool_upper",
|
|
1812
|
+
make_readonly_ptr(&HighsCallbackOutput::cutpool_upper));
|
|
1813
|
+
|
|
1814
|
+
py::class_<HighsCallbackInput>(callbacks, "HighsCallbackInput",
|
|
1815
|
+
py::module_local())
|
|
1816
|
+
.def(py::init<>())
|
|
1817
|
+
.def_readwrite("user_interrupt", &HighsCallbackInput::user_interrupt)
|
|
1818
|
+
.def_readwrite("user_has_solution",
|
|
1819
|
+
&HighsCallbackInput::user_has_solution)
|
|
1820
|
+
.def_property_readonly(
|
|
1821
|
+
"user_solution",
|
|
1822
|
+
make_readonly_ptr(&HighsCallbackInput::user_solution))
|
|
1823
|
+
.def("setSolution", highs_setcbSolution)
|
|
1824
|
+
.def("setSolution", highs_setcbSparseSolution)
|
|
1825
|
+
.def("repairSolution", &HighsCallbackInput::repairSolution);
|
|
1826
|
+
}
|