[AMPL 25015] How to change the AMPL results format/organization

Hello dear AMPL community,

I’m currently working on a thesis project, and I would like some little assistance of you. As I “process” or “render” my project, there is one variable of my interest that I would like it to be shown differently, because I need to export that information.

As you can see, it is kind of weirdly organized, and I wanted to know if there’s any command that helps me to organize it in just one column, in order to make it easier to work with.
Besides, I wanted to know if there’s any command/way that allows me to export that variable into a txt.

Thank you so much for your help,
Best regards
Diego Alejandro Escobar
Industrial Engineer Student

To tell AMPL to show a 1-dimensional list of values in one column, set this option before your “display ST;” command:

option display_1col 1000;

When the value of this option (here, 1000) is \geq the number of values to be displayed, then they will appear in one column.

To export the output of “display” to a txt file, add > and the name of the file to the end of the command. For example:

display ST >display.txt;

(If you want to look at the file immediately, you may need to add “close display.txt;” to force the cached file onto your storage device.)