Dear All
I am trying to solve the following problem:
Alf Bert Charlie Douggie Ernie and Fred have their birthdays on consecutive
days, but not necessarily in that order.
Douggie’s birthday is as many days before Fred’s as Bert’s is after Fred’s.
Charlie’s birthday is as many days before Fred’s as Bert’s is after Fred’s.
This year, Ernie’s birthday is on a Saturday.
On what day of the week do the birthdays of the other 5 men fall this year?
I am thinking of a domain of 0#6 for each of A B C D E and F.
I have got the constraints {FD.distinct Solution} and E :: 5 (even I can work
that one out!)
How would I combine propagators to model the other constraints? I can see that
I will be working with {FD.modI .. 7} to wrap around the days of the week. I
guess there may be some constrained variables M and N representing the number
of days before and days after, but I am not sure how to combine the constraints
in this problem.
Thanks for your help.
Robert_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users