HELP!!! I checked and rechecked the user manual many times but could find how to code this.

I'm doing a project for worker scheduling and trying to set up a constraint in a mixed integer program that states that for every shift at least one of a specialty worker must be present. For this project workers 3,4, and 5 are in this specialty.

I coded it as:

forall(i in HOURS) sum (j in WORKERS | j>2, j>6) X(i,j) >=1

I'm having to learn this on the fly because XPRESS IVE is the only type of MIP solver at the school that can handle the amount of variables in the project.

I know I've probably asked a super simple question, but this has been driving me crazy!!!

Thanks!!!

You could probably write your constraint as follows:

forall(i in HOURS) sum (j in WORKERS | j>2 and j<6) X(i,j) >=1

or

forall(i in HOURS) sum (j in WORKERS | j>=3 and j<=5) X(i,j) >=1