Closed sambuddhac closed 2 years ago
What versions are you using?
MathOptInterface.RawParameter
This suggests you're trying to use a very old version of MathOptInterface.
set(model::HiGHS.Optimizer, param::MathOptInterface.RawParameter, value::Nothing)
This also suggests you're trying to set a value that is nothing
. What are the values of MyFeasibilityTol
, MyOptimalityTol
, and MyTimeLimit
?
MathOptInterface
version I am using is 0.9.22
and here are the values
Feasib_Tol: 1.0e-07 # Primal feasibility tolerance # [type: double, advanced: false, range: [1e-10, inf], default: 1e-07]
Optimal_Tol: 1.0e-07 # Dual feasibility tolerance # [type: double, advanced: false, range: [1e-10, inf], default: 1e-07]
TimeLimit: Inf
Do you have a reproducible example? I can't reproduce:
julia> import HiGHS
julia> const MOI = HiGHS.MOI
MathOptInterface
julia> model = MOI.OptimizerWithAttributes(
HiGHS.Optimizer,
"primal_feasibility_tolerance" => 1e-7,
"dual_feasibility_tolerance" => 1e-6,
"time_limit" => Inf
)
MathOptInterface.OptimizerWithAttributes(HiGHS.Optimizer, Pair{MathOptInterface.AbstractOptimizerAttribute, Any}[MathOptInterface.RawParameter("primal_feasibility_tolerance") => 1.0e-7, MathOptInterface.RawParameter("dual_feasibility_tolerance") => 1.0e-6, MathOptInterface.RawParameter("time_limit") => Inf])
julia> MOI.instantiate(model)
A HiGHS model with 0 columns and 0 rows.
(hgh) pkg> st
Status `/private/tmp/hgh/Project.toml`
[87dc4568] HiGHS v0.2.3
[b8f27783] MathOptInterface v0.9.22
But also, you should update to JuMP and MOI v1.0.
I have a fix that would at least give a better error message for this: https://github.com/jump-dev/HiGHS.jl/pull/119
But it won't help unless you update to MathOptInterface v1.0.
I'll re-open this until we sort the problem. But my guess is that you're trying to pass some option as nothing
by mistake. This will report a nicer error on the latest release, but we won't be back porting to HiGHS v0.3.2.
Thank you @odow , can you please also tell me the JuMP version I should upgrade to? I'll be in touch, until we fix this problem. Much appreciated.
Okay, I did a fresh build of Project.toml and Manifest.toml with the latest compatible versions. Here is the environment:
[6e4b80f9] BenchmarkTools v1.3.1
[336ed68f] CSV v0.10.4
[9961bab8] Cbc v1.0.1
[e2554f3b] Clp v1.0.1
[aaaa29a8] Clustering v0.14.2
[861a8166] Combinatorics v1.0.2
[a93c6f00] DataFrames v1.3.4
[864edb3b] DataStructures v0.18.13
[41bf760c] DiffEqSensitivity v6.79.0
[b4f34e82] Distances v0.10.7
[e30172f5] Documenter v0.27.19
[35a29f4d] DocumenterTools v0.1.14
[60bf3e95] GLPK v1.0.1
[87dc4568] HiGHS v1.1.3
[b6b21f68] Ipopt v1.0.2
[4076af6c] JuMP v1.1.1
[b8f27783] MathOptInterface v1.6.0
[fdba3010] MathProgBase v0.7.8
[1dea7af3] OrdinaryDiffEq v6.18.1
[8a4e6c94] QuasiMonteCarlo v0.2.9
[731186ca] RecursiveArrayTools v2.31.0
[2913bbd2] StatsBase v0.33.18
[ddb6d928] YAML v0.4.7
[ade2ca70] Dates
[37e2e46d] LinearAlgebra
[9a3f8284] Random
[10745b16] Statistics
But, I still keep on getting the same error.
As a test system, you can run my fork of GenX here:
https://github.com/sambuddhac/GenX
When you are there, please cd inside GenX/Example_Systems/SmallNewEngland/OneZone
and do julia Run.jl
The way it's currently configured, will create the environment and run and in the model creation stage, you can see the error message I am getting. Also, for your convenience (and also as you'll see from the error log) the program floe is from the Run.jl file to GenX/src/model/generate_model.jl
and the code snippets I sent earlier are in the GenX/src/configure_solver/configure_highs.jl
. Also, the settings files are inside the GenX/Example_Systems/SmallNewEngland/OneZone/Settings
folder,
Please let me know if you have more questions and if I can provide further help.
Thank you so very much !!!
PR #120 fixes this. Can you please review and merge PR #120? Thank you very much !!!
Hi, I am facing the following error while trying to run our GenX model written in Julia/JuMP with HiGHS. Can someone please help?
Our code segment consists of a function that looks like this:
This OPTIMIZER is then used to build our model.