$call with arguments

Hello,

I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:

$batinclude test.gms 20130101

How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have

$call ‘gams test’ %1=“20130101”

but this does not actually pass in 20130101 to the %1 within the test.gms code.

Thanks,
Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi all,

I believe the solution to this is to write the $call statement as the following:

$call ‘gams test --var1=20130101’

However, I am now running into problems where, even though I am passing in these variables correctly, some of the code itself contained in test.gms is not being utilized. For instance, I have an execute_unload statement in the test.gms that is not compiling. Perhaps I misunderstand the function of $call – will it run my test.gms code as soon as I use it, or does it compile at the end?

-Brian

On Monday, November 4, 2013 11:17:41 AM UTC-8, Brian wrote:

Hello,

I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:

$batinclude test.gms 20130101

How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have

$call ‘gams test’ %1=“20130101”

but this does not actually pass in 20130101 to the %1 within the test.gms code.

Thanks,
Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gamsworld@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gamsworld@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you Renger,

What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:

$call ‘gams called.gms --myinput=20130101’
$call ‘gams called.gms --myinput=20130102’
$call ‘gams called.gms --myinput=20130103’
$call ‘gams called.gms --myinput=20130104’
$call ‘gams called.gms --myinput=20130105’

And called.gms contains the following:

parameters
test
;
test=%myinput%
execute_unload “file_path”

When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have

$call GDXXRW.exe “file_path”

in my code, which does appear to execute.

Cheers,
Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Brian

It is not very clear what you mean, it doesn’t work. What are you expecting?

Is the gdx file generated and does it only contain the last value? What is the error you see and so on.



If I run this using the following

test=%myinput%

execute_unload “file_path%myinput%”



I have 5 different gdx files with the test parameter and their actual values (these can easily be merged together using gdxmerge).


Cheers



Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 19:10
To: gamsworld@googlegroups.com
Subject: Re: $call with arguments



Thank you Renger,



What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:



$call ‘gams called.gms --myinput=20130101’

$call ‘gams called.gms --myinput=20130102’

$call ‘gams called.gms --myinput=20130103’

$call ‘gams called.gms --myinput=20130104’

$call ‘gams called.gms --myinput=20130105’



And called.gms contains the following:



parameters

test

;

test=%myinput%

execute_unload “file_path”



When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have



$call GDXXRW.exe “file_path”



in my code, which does appear to execute.



Cheers,

Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Renger,

I am expecting a gdx file to be generated each time I use the $call ‘gams called.gdx’ command. So in my example I was hoping to have five different gdx files created. However, no gdx files appear to be generated. No errors are generated, and the program ends normally.

I’ve attached the two files I am using.

Best,
Brian

On Wednesday, November 6, 2013 12:09:54 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian

It is not very clear what you mean, it doesn’t work. What are you expecting?

Is the gdx file generated and does it only contain the last value? What is the error you see and so on.



If I run this using the following

test=%myinput%

execute_unload “file_path%myinput%”



I have 5 different gdx files with the test parameter and their actual values (these can easily be merged together using gdxmerge).


Cheers



Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 19:10
To: gams...@googlegroups.com
Subject: Re: $call with arguments



Thank you Renger,



What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:



$call ‘gams called.gms --myinput=20130101’

$call ‘gams called.gms --myinput=20130102’

$call ‘gams called.gms --myinput=20130103’

$call ‘gams called.gms --myinput=20130104’

$call ‘gams called.gms --myinput=20130105’



And called.gms contains the following:



parameters

test

;

test=%myinput%

execute_unload “file_path”



When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have



$call GDXXRW.exe “file_path”



in my code, which does appear to execute.



Cheers,

Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


test_call.gms (225 Bytes)
test_gams.gms (123 Bytes)

Dear Renger,

I have two decision variable,p_dr(t) and p_imb(t),i need to define when p_dr(t)=0 must be p_imb(t) =0 as a constraint,please guide me how can do this?

thank you


On Wed, Nov 6, 2013 at 3:13 PM, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gamsworld@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Brian

Works fine on my PC. Are you running the files from the Gams-Ide? If yes, the gdx are probably saved in the project directory (or somewhere else).

Try to run the file from a Dos window and check if they are generated (perhaps first remove the directory information and let the gdx files be saved in the actual directory).
Chees

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 22:31
To: gamsworld@googlegroups.com
Subject: Re: $call with arguments



Hi Renger,



I am expecting a gdx file to be generated each time I use the $call ‘gams called.gdx’ command. So in my example I was hoping to have five different gdx files created. However, no gdx files appear to be generated. No errors are generated, and the program ends normally.



I’ve attached the two files I am using.



Best,

Brian

On Wednesday, November 6, 2013 12:09:54 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian

It is not very clear what you mean, it doesn’t work. What are you expecting?

Is the gdx file generated and does it only contain the last value? What is the error you see and so on.



If I run this using the following

test=%myinput%

execute_unload “file_path%myinput%”



I have 5 different gdx files with the test parameter and their actual values (these can easily be merged together using gdxmerge).


Cheers



Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 19:10
To: gams...@googlegroups.com
Subject: Re: $call with arguments



Thank you Renger,



What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:



$call ‘gams called.gms --myinput=20130101’

$call ‘gams called.gms --myinput=20130102’

$call ‘gams called.gms --myinput=20130103’

$call ‘gams called.gms --myinput=20130104’

$call ‘gams called.gms --myinput=20130105’



And called.gms contains the following:



parameters

test

;

test=%myinput%

execute_unload “file_path”



When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have



$call GDXXRW.exe “file_path”



in my code, which does appear to execute.



Cheers,

Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Renger,

I am indeed running the files from Gams-Ide (23.7.3 WIN 27723.27726 VS8 x86/MS Windows). However, I did a search of my computer and could not find the files that I am attempting to create. I also tried this in Gams-Ide without a path name.

Both methods do work using a Dos window though, so that’s good news! Any suggestions as to why it is not working in Gams-Ide specifically?

Thanks!
-Brian


On Thu, Nov 7, 2013 at 12:24 AM, Renger van Nieuwkoop wrote:

Hi Brian

Works fine on my PC. Are you running the files from the Gams-Ide? If yes, the gdx are probably saved in the project directory (or somewhere else).

Try to run the file from a Dos window and check if they are generated (perhaps first remove the directory information and let the gdx files be saved in the actual directory).
Chees

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 22:31
To: gamsworld@googlegroups.com

Subject: Re: $call with arguments



Hi Renger,



I am expecting a gdx file to be generated each time I use the $call ‘gams called.gdx’ command. So in my example I was hoping to have five different gdx files created. However, no gdx files appear to be generated. No errors are generated, and the program ends normally.



I’ve attached the two files I am using.



Best,

Brian

On Wednesday, November 6, 2013 12:09:54 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian

It is not very clear what you mean, it doesn’t work. What are you expecting?

Is the gdx file generated and does it only contain the last value? What is the error you see and so on.



If I run this using the following

test=%myinput%

execute_unload “file_path%myinput%”



I have 5 different gdx files with the test parameter and their actual values (these can easily be merged together using gdxmerge).


Cheers



Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 19:10
To: gams...@googlegroups.com
Subject: Re: $call with arguments



Thank you Renger,



What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:



$call ‘gams called.gms --myinput=20130101’

$call ‘gams called.gms --myinput=20130102’

$call ‘gams called.gms --myinput=20130103’

$call ‘gams called.gms --myinput=20130104’

$call ‘gams called.gms --myinput=20130105’



And called.gms contains the following:



parameters

test

;

test=%myinput%

execute_unload “file_path”



When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have



$call GDXXRW.exe “file_path”



in my code, which does appear to execute.



Cheers,

Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to a topic in the Google Groups “gamsworld” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gamsworld/3NG1k60FV-w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Brian

It is working in my Gamside. I created a project in the directory with the files and then ran the test_call.gms. All gdx files are in the project directory, so I don’t know what is going on.

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian Kooiman
Sent: Freitag, 8. November 2013 19:45
To: gamsworld@googlegroups.com
Subject: Re: $call with arguments



Hi Renger,



I am indeed running the files from Gams-Ide (23.7.3 WIN 27723.27726 VS8 x86/MS Windows). However, I did a search of my computer and could not find the files that I am attempting to create. I also tried this in Gams-Ide without a path name.



Both methods do work using a Dos window though, so that’s good news! Any suggestions as to why it is not working in Gams-Ide specifically?



Thanks!

-Brian



On Thu, Nov 7, 2013 at 12:24 AM, Renger van Nieuwkoop wrote:

Hi Brian

Works fine on my PC. Are you running the files from the Gams-Ide? If yes, the gdx are probably saved in the project directory (or somewhere else).

Try to run the file from a Dos window and check if they are generated (perhaps first remove the directory information and let the gdx files be saved in the actual directory).
Chees

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 22:31
To: gamsworld@googlegroups.com


Subject: Re: $call with arguments



Hi Renger,



I am expecting a gdx file to be generated each time I use the $call ‘gams called.gdx’ command. So in my example I was hoping to have five different gdx files created. However, no gdx files appear to be generated. No errors are generated, and the program ends normally.



I’ve attached the two files I am using.



Best,

Brian

On Wednesday, November 6, 2013 12:09:54 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian

It is not very clear what you mean, it doesn’t work. What are you expecting?

Is the gdx file generated and does it only contain the last value? What is the error you see and so on.



If I run this using the following

test=%myinput%

execute_unload “file_path%myinput%”



I have 5 different gdx files with the test parameter and their actual values (these can easily be merged together using gdxmerge).


Cheers



Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Mittwoch, 6. November 2013 19:10
To: gams...@googlegroups.com
Subject: Re: $call with arguments



Thank you Renger,



What is the “order of operations” regarding using multiple $call statements in one file? Say I have one file that has the following:



$call ‘gams called.gms --myinput=20130101’

$call ‘gams called.gms --myinput=20130102’

$call ‘gams called.gms --myinput=20130103’

$call ‘gams called.gms --myinput=20130104’

$call ‘gams called.gms --myinput=20130105’



And called.gms contains the following:



parameters

test

;

test=%myinput%

execute_unload “file_path”



When I run something similar to this, the execute_unload does not actually execute. I tried $GDXOUT as well, but that also did not work. However, I also have



$call GDXXRW.exe “file_path”



in my code, which does appear to execute.



Cheers,

Brian

On Tuesday, November 5, 2013 11:20:47 PM UTC-8, Renger van Nieuwkoop wrote:

Hi Brian



You can use

$call ‘gams called.gms --myinput=20130101’



And then use %myinput% in the file “called.gms”



Cheers

Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch

blog.modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Brian
Sent: Montag, 4. November 2013 20:18
To: gams...@googlegroups.com
Subject: $call with arguments



Hello,



I’m trying to use $call with arguments, similar to how one would use $batinclude. If my old $batinclude code was as follows:



$batinclude test.gms 20130101



How could I write comparable $call code. I would like to use $call because I would like the system to do multiple runs completely independent of each other (meaning that $include will not work). So far I have



$call ‘gams test’ %1=“20130101”



but this does not actually pass in 20130101 to the %1 within the test.gms code.



Thanks,

Brian


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.


To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to a topic in the Google Groups “gamsworld” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gamsworld/3NG1k60FV-w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.