-
Notifications
You must be signed in to change notification settings - Fork 10
Description
When I pass constraints like this:
const constraints = [ //list of non overlapping constraints
['Tennis', 'Climbing'],
['Handstands', 'Climbing'],
['Trapeze', 'Tennis'],
['Tennis', 'Handstands', 'Trapeze']
]
All works fine. But if I pass functions, like this:
const constraints = [ //list of non overlapping constraints
['Tennis', 'Climbing'],
['Handstands', 'Climbing'],
['Trapeze', 'Tennis'],
['Tennis', 'Handstands', 'Trapeze'],
(timetable) => timetable['8:00'].indexOf('Climbing') !== -1 ? ['Climbing'] : [],
(timetable) => timetable['10:00'].indexOf('Tennis') !== -1 ? ['Climbing'] : [],
(timetable) => timetable['9:00'].indexOf('Trapeze') !== -1 ? ['Climbing'] : []
]
I have several "undefined" allocated in the slots.
Of course, the values are differents, this is a example.
I have 200+ constraints.
If I use just the arrays constraints, all works fine.
Any Idea?