运筹系列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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值