Getting "info" after optimization using IPOPT

400 views
Skip to first unread message

Huckleberry Febbo

unread,
Aug 17, 2016, 1:22:53 PM8/17/16
to julia-opt
Hello,

I am a new user running IPOPT using JuMP and julia and I am having some difficulty getting some of the output information from IPOPT, for instance, I want the CPU time and the number of iterations. I see this data when I run IPOPT pop up on the screen, but I would like to store it in a variable. I tried to use some of the options here:


for instance, I tried: 
mdl     = Model(solver = IpoptSolver(print_level=3,print_info_string,"yes",....

but I get


I tried several of these options with similar results. Any thoughts on how I can do this?

Another issue is that maybe this information is already in a variable and I do not know about it. This is because I do not know how to see what is in the "workspace" ( I am a MATLAB user ). Is there a way to see what variables are in the workspace in julia?

Thanks,
Huck

Tony Kelman

unread,
Aug 17, 2016, 2:00:36 PM8/17/16
to julia-opt
Hi Huck,

The first one has what should be an easy answer, just change `print_info_string,"yes"` to `print_info_string="yes"`

You can call whos() to get the variables in your workspace.

-Tony

Huckleberry Febbo

unread,
Aug 17, 2016, 2:29:15 PM8/17/16
to juli...@googlegroups.com
Tony,

Thank you for the quick response. 

Opps! 

I am still having a bit of trouble with this, I managed to get a text file that outputs all of the information, but I was hoping to simply get some sort of a variable with the information to it so that I can simply save the optimization information with my results. For instance, when I use IPOPT in MATLAB, I call it like:

  [x info] = ipopt(x0,funcs,options);

and there are several things stored in the info structure ( I am interested in status, cpu time and the number of iterations) 

I tried using whos(), but I don't see anything that may have these pieces of info.

Any ideas?

Thanks again,
Huck


--
You received this message because you are subscribed to a topic in the Google Groups "julia-opt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/julia-opt/3Xz-lEdZsF8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to julia-opt+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.



--
Sincerely,

Huckleberry Febbo

Miles Lubin

unread,
Aug 17, 2016, 2:36:21 PM8/17/16
to julia-opt
The Ipopt C interface which we use from Julia simply doesn't expose that information. Someone would need to extend that interface.

Huckleberry Febbo

unread,
Aug 17, 2016, 3:44:26 PM8/17/16
to juli...@googlegroups.com
Miles,

Thank you for letting me know. 

Huck

Tony Kelman

unread,
Aug 17, 2016, 4:12:31 PM8/17/16
to julia-opt
I'd recommend you set an output_file and turn up the file_print_level, then you could post-process that log file.
To unsubscribe from this group and all its topics, send an email to julia-opt+...@googlegroups.com.



--
Sincerely,

Huckleberry Febbo

--
You received this message because you are subscribed to a topic in the Google Groups "julia-opt" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/julia-opt/3Xz-lEdZsF8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to julia-opt+...@googlegroups.com.



--
Sincerely,

Huckleberry Febbo

Huckleberry Febbo

unread,
Aug 17, 2016, 5:53:00 PM8/17/16
to juli...@googlegroups.com
Tony,

That is good advice, thank you.

Huck

To unsubscribe from this group and all its topics, send an email to julia-opt+unsubscribe@googlegroups.com.



--
Sincerely,

Huckleberry Febbo

Reply all
Reply to author
Forward
0 new messages