Defining set element equal to parameter in an equation

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.


I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.

Hi
You have an index t in your equation which is not controlled, so change the equation in eq(k,l,t)
Cheers
Renger

sent from my iPad

On 06 Apr 2015, at 14:02, “shpooja26@gmail.com” wrote:

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.

I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.

Thanks for your reply.But still error remains the same.error says that uncontrolled set has been entered as constant.Can there be any other method of writing the same equation?

On Monday, April 6, 2015 at 5:32:46 PM UTC+5:30, shpo...@gmail.com wrote:

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.


I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.

You should provide us with enough information, so we can reproduce your error.

Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von shpooja26@gmail.com
Gesendet: Monday, April 6, 2015 2:22 PM
An: gamsworld@googlegroups.com
Betreff: Re: Defining set element equal to parameter in an equation



Thanks for your reply.But still error remains the same.error says that uncontrolled set has been entered as constant.Can there be any other method of writing the same equation?

On Monday, April 6, 2015 at 5:32:46 PM UTC+5:30, shpo...@gmail.com wrote:

Hi everyone,

I am a new user of gams.Please help with my problem which I encountered while writing the code.





I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this



eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;



Error is set for ord is not controlled.

Please reply.


\

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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.

Thanks for the reply.
My problem is like this.
P(t,k,l) is a binary variable.t set denotes set of time intervals in a day.k is user1 and l is user item.
m(k,l) denotes the user time which of course has been defined for a day.
Now P(t,k,l) will be 1 when user uses the item i.e time of the day when the user starts using the item.
I have entered the m(k,l) values for different users and items.
I defined eq(k,l) for all values of k and l. such that

P(t,k,l)$(ord(t) eq m(k,l)) =e=1;

errors encountered are
1.uncontrolled set entered as constant
2.set for “ord” is not controlled



On Monday, April 6, 2015 at 5:32:46 PM UTC+5:30, shpo...@gmail.com wrote:

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.


I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.

Did you define the equation as eq(t,k,l)…
If yes, then you write the equation like
Eq(t,k,l)$(ord(t) eq m(k,l)…
P(t,k,l) =e= 1;

sent from my iPad

On 06 Apr 2015, at 18:14, “shpooja26@gmail.com” wrote:

Thanks for the reply.
My problem is like this.
P(t,k,l) is a binary variable.t set denotes set of time intervals in a day.k is user1 and l is user item.
m(k,l) denotes the user time which of course has been defined for a day.
Now P(t,k,l) will be 1 when user uses the item i.e time of the day when the user starts using the item.
I have entered the m(k,l) values for different users and items.
I defined eq(k,l) for all values of k and l. such that

P(t,k,l)$(ord(t) eq m(k,l)) =e=1;

errors encountered are
1.uncontrolled set entered as constant
2.set for “ord” is not controlled

On Monday, April 6, 2015 at 5:32:46 PM UTC+5:30, shpo...@gmail.com wrote:

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.


I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l).. P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.

Yes,it is working now.Thanks for devoting your time for the problem.
Thank you.
On Monday, April 6, 2015 at 5:32:46 PM UTC+5:30, shpo...@gmail.com wrote:

Hi everyone,
I am a new user of gams.Please help with my problem which I encountered while writing the code.


I need to write an equation eq(k,l) such that P(t,k,l) is equal to one when t is equal to parameteric value m(k,l) for all values of k and l.I have written like this

eq (k,l)… P(t,k,l)$(ord(t) eq m(k,l)) =e= 1;

Error is set for ord is not controlled.
Please reply.


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.
For more options, visit https://groups.google.com/d/optout.