fix a variable ( f(i,j) )

Hello everyone,
I want to thank you all in advance for all your help!

I have a binary variable f(i,j) and i want to fix the values of this variable which will be calculated in the first model and then,use the data for the second model.so i tried to use a parameter :

Parameter ff(i,j) ;

f(i,j).l=ff(i,j) ;


but the second equation will not be solved ( due to error 141 ).


how can i solve this issue? is there any way to fix a binar variable with two sets such as f(i,j) ?


thank you


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi Mohamad



If you send a question and have a Gams error, you should at least add more code, so people can reproduce your error.

Here some thoughts:

Error 141 says that a symbol is neither initialized nor assigned. Probable causes: you did not give a value to the parameter ff(I,j).



If you want to fix variables, you should use .fx and not .l. Furthermore, the syntax is not f(I,j).l but f.l(I,j):



Run your model,



Fix the variable fix:

f.fx(I,j) = f.l(I,j);



Rerun your model with the fixed values



Cheers



Renger


\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch











From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Mohamad Dehghani
Sent: Friday, April 19, 2013 7:24 AM
To: gamsworld@googlegroups.com
Subject: fix a variable ( f(i,j) )



Hello everyone,

I want to thank you all in advance for all your help!



I have a binary variable f(i,j) and i want to fix the values of this variable which will be calculated in the first model and then,use the data for the second model.so i tried to use a parameter :



Parameter ff(i,j) ;



f(i,j).l=ff(i,j) ;





but the second equation will not be solved ( due to error 141 ).





how can i solve this issue? is there any way to fix a binar variable with two sets such as f(i,j) ?





thank you


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?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

oh I’m sorry for the brief description.

Thank you very much for your help



On Apr 19, 2013, at 3:37 PM, Renger van Nieuwkoop wrote:

Hi Mohamad

If you send a question and have a Gams error, you should at least add more code, so people can reproduce your error.
Here some thoughts:
Error 141 says that a symbol is neither initialized nor assigned. Probable causes: you did not give a value to the parameter ff(I,j).

If you want to fix variables, you should use .fx and not .l. Furthermore, the syntax is not f(I,j).l but f.l(I,j):

Run your model,

Fix the variable fix:
f.fx(I,j) = f.l(I,j);

Rerun your model with the fixed values

Cheers

Renger


Modelworks
Gewerbestrasse 16
3600 Thun – Switzerland
+41 79 818 53 73
Info@modelworks.ch

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Mohamad Dehghani
Sent: Friday, April 19, 2013 7:24 AM
To: gamsworld@googlegroups.com
Subject: fix a variable ( f(i,j) )

Hello everyone,
I want to thank you all in advance for all your help!

I have a binary variable f(i,j) and i want to fix the values of this variable which will be calculated in the first model and then,use the data for the second model.so i tried to use a parameter :

Parameter ff(i,j) ;

f(i,j).l=ff(i,j) ;

but the second equation will not be solved ( due to error 141 ).

how can i solve this issue? is there any way to fix a binar variable with two sets such as f(i,j) ?

thank you

To unsubscribe from this group and stop receiving emails from it, send an email togamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
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?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\