运筹系列43:优化求解器HiGHS介绍
Posted IE06
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了运筹系列43:优化求解器HiGHS介绍相关的知识,希望对你有一定的参考价值。
1. 介绍
官网https://www.maths.ed.ac.uk/hall/HiGHS/介绍如下:
HiGHS is high performance serial and parallel software for solving large-scale sparse linear programming (LP), mixed-integer programming (MIP) and quadratic programming (QP) models, developed in C++11, with interfaces to C, C#, FORTRAN, Julia and Python.
HiGHS is based on the high performance dual revised simplex implementation (HSOL) and its parallel variant (PAMI) developed by Qi Huangfu. Features such as presolve, crash and advanced basis start have been added by Julian Hall and Ivet Galabova. The QP solver and original language interfaces were written by Michael Feldmeier. Leona Gottwald wrote the MIP solver. The software engineering of HiGHS was developed by Ivet Galabova.
- 可求解线性规划/混合整数规划/二次规划
- 有C, C#, FORTRAN, Julia和Python借口
- 核心是并行的对偶改进单纯形法
参数如下
--model_file arg File of model to solve.
--presolve arg Presolve: "choose" by default - "on"/"off" are alternatives.
--solver arg Solver: "choose" by default - "simplex"/"ipm" are alternatives.
--parallel arg Parallel solve: "choose" by default - "on"/"off" are alternatives.
--run_crossover arg Run crossover after IPM: "on" by default - "choose"/"off" are alternatives.
--time_limit arg Run time limit (seconds - double).
--options_file arg File containing HiGHS options.
--solution_file arg File for writing out model solution.
--write_model_file arg File for writing out model.
--random_seed arg Seed to initialize random number generation.
--ranging arg Report cost, bound, RHS and basic solution ranging in any solution file: "off" by default - "on" is alternatives.
--read_solution_file File of solution to be read
2. 在python和Julia中使用
在Julia中配合JuMP使用即可:
using JuMP
import HiGHS
model = Model(HiGHS.Optimizer)
set_optimizer_attribute(model, "presolve", "on")
set_optimizer_attribute(model, "time_limit", 60.0)
在python中使用下面的方式安装:pip install highspy
以上是关于运筹系列43:优化求解器HiGHS介绍的主要内容,如果未能解决你的问题,请参考以下文章