How to use output files as input files

Hi Nicole

Why don’t you just use for every parameter:



Solve model



mymodelpar = mymodelvariable.L; for each parameter you want to change



Solve second model



Or do you mean something else?
Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Nicole Schläfke
Sent: Donnerstag, 3. September 2015 16:14
To: gamsworld
Subject: How to use output files as input files



Hello,

I would like to know how I can use the ouput files as input files. I run my model and I would like to run another model afterwards where I want to use the calculated variables as input parameters. Is this possible and how?
I know, that one version is to save the output in an access database and get it into the second model as include files. But is there another way possible in GAMS?

Nicole


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/d/optout.


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/d/optout.

Hi Renger,

Thanks a lot. I did in that way you said and it works. Perfect.

Cheers,
Nicole


Am Donnerstag, 3. September 2015 16:23:14 UTC+2 schrieb Renger van Nieuwkoop:

Hi Nicole

Why don’t you just use for every parameter:



Solve model



mymodelpar = mymodelvariable.L; for each parameter you want to change



Solve second model



Or do you mean something else?
Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Nicole Schläfke
Sent: Donnerstag, 3. September 2015 16:14
To: gamsworld
Subject: How to use output files as input files



Hello,

I would like to know how I can use the ouput files as input files. I run my model and I would like to run another model afterwards where I want to use the calculated variables as input parameters. Is this possible and how?
I know, that one version is to save the output in an access database and get it into the second model as include files. But is there another way possible in GAMS?

Nicole


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/d/optout.


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/d/optout.

Hi, Renger, I had the same query.

I was wondering if there is a way to reach the variable assigned parameter by a second model when we are solving two models simultaneously (sequentially) and the parameter recently assigned has to be used in the second model. Something like:

Model firstmodel /equations/;
Solve firstmodel…;

mymodelpar = mymodelvar.L;

Model secondmodel /equations2/;



On Thursday, September 3, 2015 at 11:23:14 AM UTC-3, Renger van Nieuwkoop wrote:

Hi Nicole

Why don’t you just use for every parameter:



Solve model



mymodelpar = mymodelvariable.L; for each parameter you want to change



Solve second model



Or do you mean something else?
Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Nicole Schläfke
Sent: Donnerstag, 3. September 2015 16:14
To: gamsworld
Subject: How to use output files as input files



Hello,

I would like to know how I can use the ouput files as input files. I run my model and I would like to run another model afterwards where I want to use the calculated variables as input parameters. Is this possible and how?
I know, that one version is to save the output in an access database and get it into the second model as include files. But is there another way possible in GAMS?

Nicole


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/d/optout.


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/d/optout.

Hi everyone.

This doesn’t seem to work. I don’t think I understood how to do it.



On Monday, September 14, 2015 at 4:43:46 AM UTC-3, Bruno Hannud wrote:

Hi, Renger, I had the same query.

I was wondering if there is a way to reach the variable assigned parameter by a second model when we are solving two models simultaneously (sequentially) and the parameter recently assigned has to be used in the second model. Something like:

Model firstmodel /equations/;
Solve firstmodel…;

mymodelpar = mymodelvar.L;

Model secondmodel /equations2/;



On Thursday, September 3, 2015 at 11:23:14 AM UTC-3, Renger van Nieuwkoop wrote:

Hi Nicole

Why don’t you just use for every parameter:



Solve model



mymodelpar = mymodelvariable.L; for each parameter you want to change



Solve second model



Or do you mean something else?
Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Nicole Schläfke
Sent: Donnerstag, 3. September 2015 16:14
To: gamsworld
Subject: How to use output files as input files



Hello,

I would like to know how I can use the ouput files as input files. I run my model and I would like to run another model afterwards where I want to use the calculated variables as input parameters. Is this possible and how?
I know, that one version is to save the output in an access database and get it into the second model as include files. But is there another way possible in GAMS?

Nicole


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/d/optout.


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/d/optout.

It worked. We have to declare the parameter after the solve statement of the first program, as indicated.

On Tuesday, September 15, 2015 at 6:08:39 AM UTC-3, Bruno Hannud wrote:

Hi everyone.

This doesn’t seem to work. I don’t think I understood how to do it.



On Monday, September 14, 2015 at 4:43:46 AM UTC-3, Bruno Hannud wrote:

Hi, Renger, I had the same query.

I was wondering if there is a way to reach the variable assigned parameter by a second model when we are solving two models simultaneously (sequentially) and the parameter recently assigned has to be used in the second model. Something like:

Model firstmodel /equations/;
Solve firstmodel…;

mymodelpar = mymodelvar.L;

Model secondmodel /equations2/;



On Thursday, September 3, 2015 at 11:23:14 AM UTC-3, Renger van Nieuwkoop wrote:

Hi Nicole

Why don’t you just use for every parameter:



Solve model



mymodelpar = mymodelvariable.L; for each parameter you want to change



Solve second model



Or do you mean something else?
Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Nicole Schläfke
Sent: Donnerstag, 3. September 2015 16:14
To: gamsworld
Subject: How to use output files as input files



Hello,

I would like to know how I can use the ouput files as input files. I run my model and I would like to run another model afterwards where I want to use the calculated variables as input parameters. Is this possible and how?
I know, that one version is to save the output in an access database and get it into the second model as include files. But is there another way possible in GAMS?

Nicole


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/d/optout.


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/d/optout.