Problem in sumproduct

Hi all,
I am new to GAMS.I am working on a formulation which has an equation as follows.

defplus(i,t)…
invuplussorted(i,t) =e= sum(m,yplus(i,m,t)*invuplus(m,t));

where i and m are alias,y(i,m,t) is a binary variable and invuplus(m,t) is a positive variable.invuplussorted(i,t) is the sorted version of invuplus(i,t), for which this equation comes in one of the steps.

While solving the model,GAMS creates wrong equations for the above equation as follows

defplus(101,0)… (0)*yplus(101,101,0) + (0)*yplus(101,102,0) + invuplussorted(101,0) + (0)*invuplus(101,0) + (0)*invuplus(102,0) =E= 0 ; (LHS = 0)

I tried moving index m to the last but the same problem occurs.I don know the cause of this.Could you help me out.?

i am solving it with Dicopt solver for minlp.


Thanks
Haresh


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HwEfHSt2lTEJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Dear haresh

Welcome to our family .

Thanks
A.R.AZAD

From: Hgopala
To: gamsworld@googlegroups.com
Sent: Monday, November 26, 2012 3:48 AM
Subject: Problem in sumproduct

Hi all,
I am new to GAMS.I am working on a formulation which has an equation as follows.

defplus(i,t)…
invuplussorted(i,t) =e= sum(m,yplus(i,m,t)*invuplus(m,t));

where i and m are alias,y(i,m,t) is a binary variable and invuplus(m,t) is a positive variable.invuplussorted(i,t) is the sorted version of invuplus(i,t), for which this equation comes in one of the steps.

While solving the model,GAMS creates wrong equations for the above equation as follows

defplus(101,0)… (0)*yplus(101,101,0) + (0)*yplus(101,102,0) + invuplussorted(101,0) + (0)*invuplus(101,0) + (0)*invuplus(102,0) =E= 0 ; (LHS = 0)

I tried moving index m to the last but the same problem occurs.I don know the cause of this.Could you help me out.?

i am solving it with Dicopt solver for minlp.


Thanks
Haresh

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HwEfHSt2lTEJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

defplus(i,t)…*
invuplussorted(i,t) =e= sum(m,yplus(i,m,t)invuplus(m,t));

While solving the model,GAMS creates wrong equations for the above equation
as follows

defplus(101,0)… (0)*yplus(101,101,0) + (0)*yplus(101,102,0) +
invuplussorted(101,0) + (0)*invuplus(101,0) + (0)*invuplus(102,0) =E= 0 ;
(LHS = 0)
By saying “wrong equations”, does you mean the items in euqtion are not of this form: “yplus(101,101,0)*invuplus(101,0)” ?
Please check whether this paragraph from GAMS User Guide answers you question:

"The nonlinear equations are treated dierently. If the coeffcient of a variable in the equation listing
is enclosed in parentheses, then the corresponding constraint is nonlinear, and the value of the
coeffcient depends on the activity levels of one or more of the variables. The listing is not algebraic,
but shows the partial derivative of each variable evaluated at their current level values. "

HTH,

Yan
Enintech, Inc.




\

Thank you

On Thursday, November 29, 2012 3:40:28 AM UTC-5, Ryan Ren wrote:


\

defplus(i,t)…*
invuplussorted(i,t) =e= sum(m,yplus(i,m,t)invuplus(m,t));

While solving the model,GAMS creates wrong equations for the above equation
as follows

defplus(101,0)… (0)*yplus(101,101,0) + (0)*yplus(101,102,0) +
invuplussorted(101,0) + (0)*invuplus(101,0) + (0)*invuplus(102,0) =E= 0 ;
(LHS = 0)
By saying “wrong equations”, does you mean the items in euqtion are not of this form: “yplus(101,101,0)*invuplus(101,0)” ?
Please check whether this paragraph from GAMS User Guide answers you question:

"The nonlinear equations are treated dierently. If the coeffcient of a variable in the equation listing
is enclosed in parentheses, then the corresponding constraint is nonlinear, and the value of the
coeffcient depends on the activity levels of one or more of the variables. The listing is not algebraic,
but shows the partial derivative of each variable evaluated at their current level values. "

HTH,

Yan
Enintech, Inc.



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/eEyTZLyaXdQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.