AnsweredAssumed Answered

Graduate Student learning XPRESS... can anyone let me know how to code a partial discrete summation as a constraint.  I'm trying to code a constraint that states that for all n the sum of a variable(i) from i=3 to i=6 is equal to or less than a constant.

Question asked by dfuqua on Oct 29, 2016
Latest reply on Nov 3, 2016 by Susanne.Heip

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!!!

Outcomes