Constraint

14 views
Skip to first unread message

blabla

unread,
May 17, 2013, 5:49:21 PM5/17/13
to ai...@googlegroups.com
I have a question about the following constraint:

Index Domain: (i,s)|(val(s)>=3 AND val(s)<=par(i))
Definition: sum[t|(t>=s and t<=s+3 ), Donvar(i,t)]<=4

Thus for all i and s ( of which the largest value that s should take depends also on i) the constraint must hold

However I obtained the following error:
The set "Time" of "t" is not the same as the set "Extra" of "s".

I can only figure out that the error occurs when the necessary condition (t>=s and t<=s+3 ) is included. But I need this condition since the bounds of the sum depend on s ( and thus on i)

Can anyone tell me what this error means and how I can solve it?

Thanks in advance


Guido Diepen

unread,
May 19, 2013, 11:09:39 AM5/19/13
to ai...@googlegroups.com
Hi,

you can't just compare indices of different sets like this unless they share a common rootset. Either make all of your sets a subset of the predefined set Integers if the elements do only represent numbers. Or you can use the val function to get the numerical value of an element or a string.

Guido Diepen
AIMMS Specialist
Reply all
Reply to author
Forward
0 new messages