[Oz] timetable - nursery problem
Tobias Mueller
tmueller at ps.uni-sb.de
Thu Jan 14 14:22:08 CET 1999
Dear Roman,
if I understand your code right then your procedure `MaxConsec' is
supposed to state the constraint that every person works atmost
`NConsec' shifts consecutively, right? If you change 'FD.atmost' to
`FD.exactly' then it should have the desired semantics, i.e., every
person works at least a certain number of shifts ('PropagMinConsec').
(To give `MaxConsec' my assumed semantics, you have to make sure that
only one `FD.atmost' succeeds and all the other fail.)
This piece of code ought to get stuck since `Flatten' encounters
constrained variables as it traverses the list and suspends on them. You
can cure the problem by enclosing the invocation of `MaxConsec' with
'thread end' or even better, by writing your own flatten-procedure that
flattens only lists of lists of depth one.
Another comment: Make sure that you stop looping as soon as {Length
Schedule} < Max, since otherwise `PropagMinConsec' fails.
I hope I gave you a couple of useful hints and don't hesitate to contact
me again.
Best regards
-- Tobias
-------------------------------------------------
Tobias Müller, http://www.ps.uni-sb.de/~tmueller/
-
Please send submissions to oz-users at dfki.de,
administriva mail to oz-users-request at dfki.de.
The Oz web site is at http://www.ps.uni-sb.de/oz/.
More information about the mozart-users
mailing list