Hello,
I am trying to obtain information such as cpu time and optimal objective value on solving MINLP problems by running Bonmin directly from the terminal on .nl-files. An output .sol file is produced for each solution. However, I am not quite sure how to obtain the information from these files.
I tried running: "ampl -obstub filname.sol" but that gives me a syntax error with the output: "syntax error context: >>> bonmin: <<< Optimal".
How can I resolve this issue?
Any help is greatly appreciated :)
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to am...@googlegroups.com.
To unsubscribe from this group, send email to ampl+uns...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
If you want AMPL to show you the solution that's reported in a .sol file, you need to re-load the model and then use the "solution" command to read in the contents of the file. The general idea is like this:
model trans.mod;
data trans.dat;
solution trans.sol;
display ... >file;
If you don't want to do this interactively you can put all of these commands in a file, say "transout.run", and then execute the file as a script with a command like "ampl transout.run".
If you write a text .nl file then you'll get a text .sol file back, so you can see exactly what's in it. However, as explained in the previous post, it does not contain the objective value or the time.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of shau...@gmail.com
Sent: Sunday, January 27, 2013 8:13 AM
To: am...@googlegroups.com
Subject: [AMPL 6520] Reading .sol file after running Bonmin on .nl file