jump-dev / HiGHS.jl

A Julia interface to the HiGHS solver
https://highs.dev
MIT License
97 stars 13 forks source link

Error reported on TimeLimit settings parameter #122

Closed sambuddhac closed 1 year ago

sambuddhac commented 1 year ago

I get the following error when I have the TimeLimit parameter set to Inf:

ERROR: LoadError: MathOptInterface.SetAttributeNotAllowed{MathOptInterface.RawOptimizerAttribute}: Setting attribute MathOptInterface.RawOptimizerAttribute("time_limit") cannot be performed: 

Invalid value `Inf::String` for option "time_limit".

 You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.

So, I set it to false. I then get this error:


ERROR: LoadError: MathOptInterface.SetAttributeNotAllowed{MathOptInterface.RawOptimizerAttribute}: Setting attribute MathOptInterface.RawOptimizerAttribute("time_limit") cannot be performed: 

Invalid value `false::Bool` for option "time_limit".

 You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
odow commented 1 year ago

It looks like you set the String value "Inf", not the Float64 value Inf.

For the second error, you can't set the time limit to false. It needs a Float64, not a Bool.

odow commented 1 year ago

Closing because this is not a bug in HiGHS.