Showing the Results Important

138 views
Skip to first unread message

Feras Matar

unread,
Oct 21, 2015, 6:21:19 AM10/21/15
to AMPL Modeling Language
Hi,

I wrote the ampl code. But I have a decion varioble x[i,j] with i =25 and j = 411

so, the total number of variables is 10275 

but the ampl window did show all the ouput (it showed only part of it)

how to export the output to an excel file or text file ?


Thanks

Robert Fourer

unread,
Oct 21, 2015, 7:12:36 PM10/21/15
to am...@googlegroups.com
To redirect command output to a text file, use the ">" operator. The general form is

[command] >[outputfile.txt];

A particular example would be

display x >decision.txt;

There is also a way to send values directly to an Excel file, but that is more complicated; it is described in detail in chapter 10 of the AMPL book, http://ampl.com/BOOK/CHAPTERS/13-tables.pdf, which covers reading and writing to database and spreadsheet files.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages