How to only display a specific parameter?

Hi Friends,


If you have created a parameter param(i,j,s) where set i /1*500/ s /s1*s200/ and wanted to just display it for s22 ,for example, how did you do that?

I’ve tried to run display param(i,j,"s22") but it doesn’t work. Is there a way to do that?

Also using a loop in GAMS is fast or slow? I mean, should I avoid using loop as much as possible?

If you want to browse and filter the data interactively, I recommend GAMS Studio (https://www.gams.com/41/docs/T_STUDIO.html). Create a GDX file with your data (execute_unload ‘data.gdx’:wink: and open this in the Studio (https://www.gams.com/41/docs/T_STUDIO.html#STUDIO_GDX_VIEWER). This allows you to filter on the dimensions, sort, and all kind of things. If you do need the data as part of the listing file with a display, you need to assign first the slice you are interested in and display this since display can only display entire symbols:

parameter paramSlice;
paramSlice(i,j,'s22') = param(i,j,"s22");
display paramSlice;

-Michael

Many Manyu Many thanks Michael. I’ve never heard of that before. Thanks!