AMPL output saving

1,642 views
Skip to first unread message

Md. Noor-E- Alam

unread,
Sep 6, 2011, 5:30:16 PM9/6/11
to am...@googlegroups.com
Hi All:
 
I am using AMPL/CPLEX to run my model.I want to save the number of branch-and-bound nodes, cuts and total number of simplex iterations in a text file. I am wandering is there any print option available in AMPL to save the output appears in command prompt including those stat.
 
Best Regards
 
Noor
 

victor.z...@gmail.com

unread,
Sep 9, 2011, 5:48:20 AM9/9/11
to am...@googlegroups.com
You can redirect the solver output to a file as follows:

   solve > out;

where 'out' is the filename which you can change.
Also there is a solver message from the solution file which is reported using different means. For CPLEX it looks like 

  CPLEX 12.2.0.0: optimal solution; objective 42
  0 dual simplex iterations (0 in phase I)

It is stored in the solve_message parameter and can be printed to a file as well:

  print solve_message >> out;

Then you can parse the file containing the solver (CPLEX) output to extract all necessary information.

HTH,
Victor 


--
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.
For more options, visit this group at http://groups.google.com/group/ampl?hl=en.

Reply all
Reply to author
Forward
0 new messages