Comments (5)
Looks like you need set_optimizer_attribute(m, "max_wall_time", 1.0)
. Ipopt uses different methods to set options, so we rely on the type passed by the user to infer which method to call. If you pass the wrong type, this error occurs.
from ipopt.jl.
Thanks that works. The Ipopt docs say it must be an int, using an int sets it with the ipopt.jl
function ipopt.AddIpoptIntOption
, and the error message says it must be an int so it is quite confusing that the solution is to make it a float? Although, I appreciate that ipopt.jl
has to infer what ipopt
is after so I'm not sure how this situation could be improved.
Also, set_time_limit_sec(m, 20.0)
doesn't work and doesn't give an error, I guess this may be a JuMP issue?
from ipopt.jl.
The Ipopt docs say it must be an int
Where?
Also, set_time_limit_sec(m, 20.0) doesn't work and doesn't give an error
It sets the max_cpu_time
attribute, because when the code was written, max_wall_time
didn't exist:
Lines 240 to 254 in e5f978c
from ipopt.jl.
Sorry, I miss-read the docs and presumed the error message would be in agreement with the docs, it seems the docs don't specify any types. But the error message does state Int. I'm unsure on the aforementioned inference mechanism, but perhaps there could be a try: int; except: float
kind of methodology? Providing a function an int, the c call then being inferred, and then receiving an error saying the function requires an int seems like a process which could be improved.
I see, I haven't previously set that attribute manually. However, in my experience set_time_limit_sec
has no bearing on the run time of an ipopt model, I've set it to 20
and had ipopt run for over 600 seconds. Sorry I'm unsure on how to easily make a minimum working example of this
from ipopt.jl.
My experience is to generally be against hacks like the try-catch
, because it leads to small incompatibilities between Ipopt via MOI and Ipopt the C library. If you're using Ipopt, and you choose to set a solver-specific attribute like max_wall_time
, there's a bit of overhead on the user to figure out the correct option.
Note that when you use the solver-independent option set_time_limit_sec
we promote things automatically.
from ipopt.jl.
Related Issues (20)
- Only evaluate QP callbacks if needed HOT 1
- Problem with HSL solvers since updating to MacOS 13.0 HOT 3
- double free or corruption (out) error HOT 20
- Linking full hsl library to Ipopt.jl on ubuntu HOT 19
- julia 0.6.0 install Ipopt cannot connect to mumps dependency HOT 2
- Add support for GetIpoptCurrentViolations
- Incorrect number of Hessian structure (nonzero entries) HOT 10
- Does Ipopt.jl support giving hessian matrix in JuMP directly, without using the C_wrapper? HOT 2
- pointer being freed was not allocated HOT 33
- Invalid number in NLP function or derivative detected. HOT 8
- Issue with non-negative variable tolerance. HOT 2
- does not allow Ipopt_jll current version HOT 2
- Add some pre-built "debugging" callbacks HOT 1
- Crash on Windows when optimizing with SPRAL_jll HOT 11
- Using Ipopt in parallel threads HOT 4
- "double free or corruption" when providing duplicate hessian entries via MathOptInterface HOT 4
- Parsing an NLP HOT 1
- Ipopt does not print in Jupyter notebooks HOT 4
- Get number of iterations after optimization HOT 3
- Add way to change AD backend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipopt.jl.