> I'm working on scheduling model which consider the day-off in the allocation. > I need your help because I need to model a constraint as the following: > > var x, y; > param a,b; > > if (x > param a) and (x < param b) then > y = 1; > else > y = 0; > end if; > > do you think is feasible? > Thanks in advance for your help. >
x >= a - M1 * (y - 1) x <= b + M2 * (y - 1) where y is a binary variable, M1 and M2 are "big M's" that should be chosen as small as possible. _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
