How to contain the "display"-command

View: New views
3 Messages — Rating Filter:   Alert me  

How to contain the "display"-command

by bastiu. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello guys,

my problem is, that i want to display a variable x, but under the condition that it is greater than 0. There are many solutions, but in 90% x=0. I don´t want to display these solutions. The command in the *.gen-file is "printf "Die Flussstaerken der Routen betragen:\n";
display x;" Maybe you can help me...

Thanks a lot

Basti

[AMPL 2855] Re: How to contain the "display"-command

by Paul A. Rubin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Look into the "omit_zero_cols" and "omit_zero_rows" options.

/Paul


On Oct 1, 10:09 am, "bastiu." <ungla...@...> wrote:

> Hello guys,
>
> my problem is, that i want to display a variable x, but under the condition
> that it is greater than 0. There are many solutions, but in 90% x=0. I don´t
> want to display these solutions. The command in the *.gen-file is "printf
> "Die Flussstaerken der Routen betragen:\n";
> display x;" Maybe you can help me...
>
> Thanks a lot
>
> Basti
> --
> View this message in context:http://www.nabble.com/How-to-contain-the-%22display%22-command-tp2569...
> Sent from the AMPL mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [AMPL 2855] Re: How to contain the "display"-command

by bastiu. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It works! Thanks a lot!!!

Basti