Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option "mip_rel_gap" is unknown #90

Closed
DillonJ opened this issue Feb 23, 2022 · 4 comments
Closed

Option "mip_rel_gap" is unknown #90

DillonJ opened this issue Feb 23, 2022 · 4 comments

Comments

@DillonJ
Copy link

DillonJ commented Feb 23, 2022

According to the readme and browsing the latest HiGHS repo, it looks like option mip_rel_gap is supported.

However:

using JuMP
import HiGHS
model = Model(HiGHS.Optimizer)
set_optimizer_attribute(model, "mip_rel_gap", 0.05)

results in

ERROR:   getOptionIndex: Option "mip_rel_gap" is unknown
ERROR: LoadError: MathOptInterface.UnsupportedAttribute{MathOptInterface.RawParameter}: Attribute MathOptInterface.RawParameter("mip_rel_gap") is not supported by the model.
@odow
Copy link
Member

odow commented Feb 23, 2022

I cannot reproduce. Please check your versions.

(highs) pkg> st
      Status `/private/tmp/highs/Project.toml`
  [87dc4568] HiGHS v0.3.2
  [4076af6c] JuMP v0.22.3

julia> using JuMP

julia> import HiGHS

julia> model = Model(HiGHS.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: HiGHS

julia> set_optimizer_attribute(model, "mip_rel_gap", 0.05)

julia> get_optimizer_attribute(model, "mip_rel_gap")
0.05
(highs) pkg> st
      Status `/private/tmp/highs/Project.toml`
  [87dc4568] HiGHS v1.0.0
  [4076af6c] JuMP v1.0.0-DEV `https://github.com/jump-dev/JuMP.jl.git#master`

julia> using JuMP

julia> import HiGHS

julia> model = Model(HiGHS.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: HiGHS

julia> set_optimizer_attribute(model, "mip_rel_gap", 0.05)

julia> get_optimizer_attribute(model, "mip_rel_gap")
0.05

@DillonJ
Copy link
Author

DillonJ commented Feb 24, 2022

Thanks for looking at this.

I've updated HiGHS, but my version is lower than yours - is this platform related? How do I access HiGHS v 0.3.2?

(@v1.6) pkg> up HiGHS
    Updating registry at `C:\Users\jodyd\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `C:\Users\jodyd\.julia\environments\v1.6\Project.toml`
  No Changes to `C:\Users\jodyd\.julia\environments\v1.6\Manifest.toml`

(@v1.6) pkg> up JuMP
    Updating registry at `C:\Users\jodyd\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `C:\Users\jodyd\.julia\environments\v1.6\Project.toml`
  No Changes to `C:\Users\jodyd\.julia\environments\v1.6\Manifest.toml`

(@v1.6) pkg> st
      Status `C:\Users\jodyd\.julia\environments\v1.6\Project.toml`
  [9961bab8] Cbc v0.8.1
  [e2554f3b] Clp v0.8.4
  [87dc4568] HiGHS v0.2.3
  [4076af6c] JuMP v0.21.10
  [21216c6a] Preferences v1.2.3
  [438e738f] PyCall v1.92.3
  [295af30f] Revise v3.3.2
  [0cda1612] SpineInterface v0.7.6 `C:\Workspace\Spine\SpineInterface.jl`
  [0d8fc150] SpineOpt v0.6.4 `C:\Workspace\Spine\SpineOpt.jl`
  [8fd58aa0] HiGHS_jll v0.3.2+0

@blegat
Copy link
Member

blegat commented Feb 24, 2022

It looks like SpineOpt holds JuMP to v0.21 and prevents it to be updated to v0.22. Either remove it or create a local environment.

@odow
Copy link
Member

odow commented Feb 24, 2022

Closing because this is not a bug in HiGHS.

@odow odow closed this as completed Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants