Inequality error

24 views
Skip to first unread message

Louise Ten Harmsen van der Beek

unread,
May 8, 2019, 1:20:26 PM5/8/19
to AIMMS - The Modeling System
Dear everybody,
In my AIMMS program I want to add a constraint which is the following:

(firstShift(i) + 1) <= firstBreak(i) <= (sum[(t), working(i,t)] - 1)

In here, firstShift(i) is defined as a variable as well as firstBreak(i) and working(i,t). I get the following error: 
In an inclusion only the middle term is allowed to contain variables, however in the inclusion 6 <= firstBreak(i) <= sum( t, working(i,t) )  - 1 the right term contains variables.

Does anybody have any idea how to solve this?

Kind regards,
Louise

Mohan

unread,
May 8, 2019, 1:51:18 PM5/8/19
to AIMMS - The Modeling System
Hello Louise,

The error means that you cannot have a constraint as below.

Variable1 <= Variable2 <= Variable3

The second constraint you showed is as below and is allowed.

Constant <= Variable2 <= Variable3

I would suggest you have two different constraints,

Constraint_1 as

firstShift(i) + 1 <= firstBreak(i)

and Constraint_2 as

firstBreak(i) <= sum[(t), working(i, t)] - 1


Reply all
Reply to author
Forward
0 new messages