Originally posted by: Observer949
int j=...;
int p=...;
range course=1..j;
range conflict=1..p;
int CourseIDs[course]=...;
{int} CourseConflict[conflict]=...;
{int} ConflictSetIntersection[conflict]=CourseIDs inter CourseConflict;
//Subject to part
forall (p in conflict)
course_only_taught_once:
sum(i in instruct, j in ConflictSetIntersection[p]) x[i][j]<=1;
Is it possible to intersect a set with an array of sets in CPLEX opl? I've posted some of the code above.
#DecisionOptimization#OPLusingCPLEXOptimizer