Search found 59 matches

by Jarenka
1 year ago
Forum: Syntax
Topic: Urgent HELP! , GDX output in a loop uses old variable values
Replies: 7
Views: 1778

Re: Urgent HELP! , GDX output in a loop uses old variable values

Dear, I have a question concerning gdx-output changing path. I am writing a code in a normal *.gms file named LINE2.gms. I press F10 and automatically comes LINE2.gdx file in the same directory. I would like to have this LINE2.gdx file placed in a different directory, for example: ""gdx"". I tried o...
by Jarenka
1 year ago
Forum: Syntax
Topic: Macros containing equations
Replies: 6
Views: 5698

Re: Macros containing equations

I have been trying to use $macro commend instead of repeating the lines (attached file/snipping shot) 23 times. But I cannot make it work. What I need to do is the following: a. first I recalculate a sector using some variables, b. than I save recalculated values in a variable, c. I clean the variab...
by Jarenka
1 year ago
Forum: Syntax
Topic: searching string in set
Replies: 11
Views: 2008

Re: searching string in set

I have sth like this (se attachment). And I tried to apply your code, but it says: "Lags are not allowed on maps".
by Jarenka
1 year ago
Forum: Syntax
Topic: searching string in set
Replies: 11
Views: 2008

Re: searching string in set

I would like to make a loop from 2014 to 2000 - in ascending order, and not from 2000 to 2014.
by Jarenka
1 year ago
Forum: Syntax
Topic: searching string in set
Replies: 11
Views: 2008

Re: searching string in set

Hi, to be able to compare them I think they should be defined as parameters. Another possibility is to use auxiliary parameters. To search for a string in a set, I usually use the "sameas" command. Bye! Yes, thank you ! I used "sameas" command :) Another think is that I want to loop over elements i...
by Jarenka
1 year ago
Forum: Syntax
Topic: searching string in set
Replies: 11
Views: 2008

Re: searching string in set

I have a different problem. I have the following code: set Tid /2000*2020/; singleton set FinalYear /2017/; singleton set StatBank /2017/; if (FinalYear < StatBank, loop( ...); ); I have an error when starting "if" condition. I would like to "compare" the years (elements) of these two singleton sets...
by Jarenka
1 year ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 16360

Re: Looping over file names

Dear, How to modify below code for i.tl in such a way that it does forecasting for (i.tl+1) ? I would like to predict "qpa" for 2018, having value for 2017, and so on... until predicted year 2020. file test / test.txt /; put test; set i / 2017*2020/; loop(i, put test put 'qpa(KVAR,AKM,BKM,ALDER, KOE...
by Jarenka
1 year ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 16360

Re: Looping over file names

Hi Renger,

I have managed to do it for all years: 2008 to 2017 and for two *.txt files.

THANK YOU FOR YOUR HELP !!

Irena
by Jarenka
1 year ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 16360

Re: Looping over file names

Hi Renger,

Thank you for your help!

I have implemented it and did some small changes.
It compiles correctly, but I do not receive values for "qpatpae". "putclose" option does it only for 2010, so I deleted it.
See my code and results in the attachments.
by Jarenka
1 year ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 16360

Re: Looping over file names

Hi, I was trying to understand the looping over the files names, but your conversation simply doesn't say anything to me. My problem is the following: I would like to loop over the years, which are part of the names in the parameters. Here in the attachment is an example for 2008. I would like to lo...