How to include an additional dimension into equations?

Hey,

I have a question about how to include an additional dimension into my equations.

Is it possible to include a dimension, in this case t (for time) only on the right side of the equation
and not on the left? It is not correct in mathematically terms, is it? But I´m having problems with my
GAMS code if I include the dimension into every variable/parameter.

If my equation is the following, for instance:
PS_0(i,j) = qs0(i,j)*p0(i) - costs_0(i,j) ;

In this case only qs0, p0 and a are defined by t.
I have seen equations like this:
PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;

But I am not sure what sum exactly means in that case.
I would be grateful for any help!

Thanks in advance!



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/_vxBDULYD5oJ.
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.

Hello

I didn’t understand exactly what do you mean by “include an additional dimension”, but I’ll try to explain the equations you wrote:

PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;
notice that in the right hand side, you have:
qs0(t,i,j)
costs_0(i,j,t)
which are on domain of “i,j and t”. However they are inside a summation, I mean, after you perform a summation on index “t”, you’ll “eliminate this dimension/index and on the RHS you’ll end up with equations that are on “i” and “j” domain only. So, in the left hand side " PS_0(i,j)” is in the “i,j” domain.
I hope you have understood the issue.

Regards



2012/11/6 frances

Hey,

I have a question about how to include an additional dimension into my equations.

Is it possible to include a dimension, in this case t (for time) only on the right side of the equation
and not on the left? It is not correct in mathematically terms, is it? But I´m having problems with my
GAMS code if I include the dimension into every variable/parameter.

If my equation is the following, for instance:
PS_0(i,j) = qs0(i,j)*p0(i) - costs_0(i,j) ;

In this case only qs0, p0 and a are defined by t.
I have seen equations like this:
PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;

But I am not sure what sum exactly means in that case.
I would be grateful for any help!

Thanks in advance!



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/_vxBDULYD5oJ.
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.



\

Edson Valle
edsoncv@gmail.com


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.

Hey,

thanks for your answer!
I meant, that qs0,qd0 and p0 are dependent on time, j and i…like you said, they are on domain of i,j and t.

So do I just eliminate t by performing the summation? Because thats what I want…
Or do I calculate something else by performing the summation?

I think the problem ist that I don´t really understand what the summation is for.

Regards!



Am Dienstag, 6. November 2012 10:52:36 UTC+1 schrieb frances:

Hey,

I have a question about how to include an additional dimension into my equations.

Is it possible to include a dimension, in this case t (for time) only on the right side of the equation
and not on the left? It is not correct in mathematically terms, is it? But I´m having problems with my
GAMS code if I include the dimension into every variable/parameter.

If my equation is the following, for instance:
PS_0(i,j) = qs0(i,j)*p0(i) - costs_0(i,j) ;

In this case only qs0, p0 and a are defined by t.
I have seen equations like this:
PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;

But I am not sure what sum exactly means in that case.
I would be grateful for any help!

Thanks in advance!



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/5tGA3HlsGl0J.
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.

Hello
bellow are my answers.

2012/11/6 frances

Hey,

thanks for your answer!
I meant, that qs0,qd0 and p0 are dependent on time, j and i…like you said, they are on domain of i,j and t.

So do I just eliminate t by performing the summation? Because thats what I want…

Yes, you eliminate the domain “t” using a summation.


Or do I calculate something else by performing the summation?

I think the problem ist that I don´t really understand what the summation is for.


Well, I suggest first to take a good reading in GAMS manual to understand the sets and all other operators in GAMS. Try to read all manual, not just the set chapter.
After it, I suppose that you’ll understand your model .
Regards


Regards!



Am Dienstag, 6. November 2012 10:52:36 UTC+1 schrieb frances:

Hey,

I have a question about how to include an additional dimension into my equations.

Is it possible to include a dimension, in this case t (for time) only on the right side of the equation
and not on the left? It is not correct in mathematically terms, is it? But I´m having problems with my
GAMS code if I include the dimension into every variable/parameter.

If my equation is the following, for instance:
PS_0(i,j) = qs0(i,j)*p0(i) - costs_0(i,j) ;

In this case only qs0, p0 and a are defined by t.
I have seen equations like this:
PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;

But I am not sure what sum exactly means in that case.
I would be grateful for any help!

Thanks in advance!



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/5tGA3HlsGl0J.

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.



\

Edson Valle
edsoncv@gmail.com


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.

Hello,

thanks for your answer!
I meant that qs0,qd0 and p0 are dependent on t, j and i…like you wrote, they are on domain i,j, and t.

So do I just eliminate t by performing the summation? Because that is what I want to do…
Or do I calculate something else by performing the summation?

I think the problem is that I don´t really get what the summation is for.

Regards!

Am Dienstag, 6. November 2012 12:01:32 UTC+1 schrieb Edsoncv:

Hello

I didn’t understand exactly what do you mean by “include an additional dimension”, but I’ll try to explain the equations you wrote:

PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;
notice that in the right hand side, you have:
qs0(t,i,j)
costs_0(i,j,t)
which are on domain of “i,j and t”. However they are inside a summation, I mean, after you perform a summation on index “t”, you’ll “eliminate this dimension/index and on the RHS you’ll end up with equations that are on “i” and “j” domain only. So, in the left hand side " PS_0(i,j)” is in the “i,j” domain.
I hope you have understood the issue.

Regards



2012/11/6 frances

Hey,

I have a question about how to include an additional dimension into my equations.

Is it possible to include a dimension, in this case t (for time) only on the right side of the equation
and not on the left? It is not correct in mathematically terms, is it? But I´m having problems with my
GAMS code if I include the dimension into every variable/parameter.

If my equation is the following, for instance:
PS_0(i,j) = qs0(i,j)*p0(i) - costs_0(i,j) ;

In this case only qs0, p0 and a are defined by t.
I have seen equations like this:
PS_0(i,j) = sum(t, qs0(t,i,j)*p0(i,t)) -sum(t, costs_0(i,j,t)) ;

But I am not sure what sum exactly means in that case.
I would be grateful for any help!

Thanks in advance!



\

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



\

Edson Valle
eds...@gmail.com


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/yHTxUGMn-OQJ.
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.