Constraint to share NO member of a list? #1071
Closed
hotungkhanh
started this conversation in
General
Replies: 1 comment 6 replies
-
Think about the problem differently. When you have lists, you immediately loose incrementality, and therefore performance. Write your constraint in a way that it counts the number of units per student. If the number is more than 1, penalize. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We are trying to use Timefold to solve a Timetabling problem.
Currently, we have the 2 classes, Unit and Student. Unit is a @PlanningEntity.
Each unit has a list of students, and each student has a list of units.
We are trying to write a constraint, so that no 2 Units that have the same student can overlap.
However, we can't seem to find a method to compare 2 lists to see if they share a member.
Can anyone please help us with this?
Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions