Page 1 of 1

kind request: Setting two variables equal in GAMS

Posted: Wed Jun 06, 2018 2:14 pm
by somang0526
Hi. :)

Hope you are having a good week.

I'm a masters student in simulation modelling. (Distillation column network synthesis)

I would like to set two variables equal to each other in GAMS.

"Flow rates of Mass Separating Agent in Mass Exchange Network" = "Flow rates of Mass Separating Agent in Regeneration Network"

In GAMS, I can rewrite above statement as following:

"FlowMSAsMEN(J,K) =E= FlowMSAsREG(RJ,KR)

but because they have different indices, GAMS does't allow that.

Would you kindly assist me with the syntax? If there are any good way of doing such job in GAMS, Would you please let me know?

Kind regards
Somang Kim.

Re: kind request: Setting two variables equal in GAMS

Posted: Wed Jun 06, 2018 9:29 pm
by Manassaldi
Hi,
what is J, K, RJ and KR?
Can you explain what each set means?

An alternative can be:

eq(J,K,RJ,KR)$(sameas(J,RJ) and sameas(K,KR)).. FlowMSAsMEN(J,K) =E= FlowMSAsREG(RJ,KR);

Bye