Dear friend,how to write equations in the condition of the binary varible equal to 1 in GAMS,thanks very much~
Dear friend,how to write equations in the condition of the binary varible equal to 1 in GAMS,thanks very much~
Dear friend,
Hi!
I have some troubles in writing equations in the condition of the binary varible,here is the the problem:
the j is the index of consumers,and the t is the index of the time,v is the binary varible to describle the state of the shifted load,and the Q1(j,t) is the capacity of shifted load.
I try to write some equations following to express if v(j,t) eq 1,then [Q1(j,t)=g=-Q1_max(j) && Q1(j,t)=l=0],if v(j,t)=0,then [Q1(j,t)=g=0 && Q1(j,t)=l=Q1_min(j)],however,the equations are wrong,I wonder how to correct it,thank you,friend~
DRcondition(j,t).. if v(j,t) eq 1,then Q1(j,t)=g=-Q1_max(j);
DRcondition1(j,t).. if v(j,t) eq 1,then Q1(j,t)=l=0;
DRcondition2(j,t).. if v(j,t)=0,then Q1(j,t)=g=0;
DRcondition3(j,t).. if v(j,t)=0,then Q1(j,t)=l=Q1_min(j);
Best wishes to you,
River
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: Dear friend,how to write equations in the condition of the binary varible equal to 1 in GAMS,thanks very much~
Hi River,
Try this two constraints:
Const_1(j,t).. Q1(j,t) =G= -Q1_max(j)*v(j,t);
Const_2(j,t).. Q1(j,t) =L= Q1_min(j)*[1 - v(j,t)];
Cheers,
Pedro
On Fri, Feb 26, 2016 at 2:48 PM, wrote:
Dear friend,
Hi!
I have some troubles in writing equations in the condition of the binary varible,here is the the problem:
the j is the index of consumers,and the t is the index of the time,v is the binary varible to describle the state of the shifted load,and the Q1(j,t) is the capacity of shifted load.
I try to write some equations following to express if v(j,t) eq 1,then [Q1(j,t)=g=-Q1_max(j) && Q1(j,t)=l=0],if v(j,t)=0,then [Q1(j,t)=g=0 && Q1(j,t)=l=Q1_min(j)],however,the equations are wrong,I wonder how to correct it,thank you,friend~
DRcondition(j,t).. if v(j,t) eq 1,then Q1(j,t)=g=-Q1_max(j);
DRcondition1(j,t).. if v(j,t) eq 1,then Q1(j,t)=l=0;
DRcondition2(j,t).. if v(j,t)=0,then Q1(j,t)=g=0;
DRcondition3(j,t).. if v(j,t)=0,then Q1(j,t)=l=Q1_min(j);
Best wishes to you,
River
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
--
PEDRO JAVIER RAMÃREZ TORREALBA
Mobile: +44-(0)75-8069-3119
London, UNITED KINGDOM
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: Dear friend,how to write equations in the condition of the binary varible equal to 1 in GAMS,thanks very much~
Dear Pedro:
Thanks for your suggestion I have adopted,which the results are reasonable in GAMS,thank you very much!~
Best wishes,
River
On Friday, February 26, 2016 at 11:32:10 PM UTC+8, PowerChile wrote:
Hi River,
Try this two constraints:
Const_1(j,t).. Q1(j,t) =G= -Q1_max(j)*v(j,t);
Const_2(j,t).. Q1(j,t) =L= Q1_min(j)*[1 - v(j,t)];
Cheers,
Pedro
On Fri, Feb 26, 2016 at 2:48 PM, wrote:
Dear friend,
Hi!
I have some troubles in writing equations in the condition of the binary varible,here is the the problem:
the j is the index of consumers,and the t is the index of the time,v is the binary varible to describle the state of the shifted load,and the Q1(j,t) is the capacity of shifted load.
I try to write some equations following to express if v(j,t) eq 1,then [Q1(j,t)=g=-Q1_max(j) && Q1(j,t)=l=0],if v(j,t)=0,then [Q1(j,t)=g=0 && Q1(j,t)=l=Q1_min(j)],however,the equations are wrong,I wonder how to correct it,thank you,friend~
DRcondition(j,t).. if v(j,t) eq 1,then Q1(j,t)=g=-Q1_max(j);
DRcondition1(j,t).. if v(j,t) eq 1,then Q1(j,t)=l=0;
DRcondition2(j,t).. if v(j,t)=0,then Q1(j,t)=g=0;
DRcondition3(j,t).. if v(j,t)=0,then Q1(j,t)=l=Q1_min(j);
Best wishes to you,
River
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
--
PEDRO JAVIER RAMÃREZ TORREALBA
Mobile: +44-(0)75-8069-3119
London, UNITED KINGDOM
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.