Re: [eclipse-clp-users] Bugs in http://87.230.22.228/examples/crew.ecl.txt?

From: Kish Shen <kisshen_at_...5...>
Date: Sun, 07 Feb 2010 18:23:38 +0000
C A wrote:
> Hi all, I'm returning to Prolog after a long break. I'd dearly love to become proficient in it but have a bit of a hill to climb at the moment. I am finding any and every example very helpful- thanks to anyone who published their work- every Prolog program is a work of art to me.
>  
> I just wanted to point out that I think there is a problem with the crew.pl example linked from  the main Eclipse website and I wonder if someone (far more proficient than me) could double-check as I've spent a lot of time tyring to work out  whether the problem is me or the program!
>  
> The problem centers around the "two-days-rest" clauses. This works for the data given but when the data approaches the limits of possibilty to satisfy the contraints (maximum crew members etc) the two-days-rest constraint seems to fly out of the cabin window! I know unions are weak these days but... ;-)
>  
> I ran it with this data overnight (it took 5 hours):
>  
>  
> flights(
>   [flight( 1,crew:6,stewards:3,stewardesses:3,french:1,spanish:1,german:1),
>    flight( 2,crew:6,stewards:3,stewardesses:3,french:1,spanish:1,german:1),
>    flight( 3,crew:6,stewards:3,stewardesses:3,french:1,spanish:1,german:1),
>    flight( 4,crew:7,stewards:3,stewardesses:3,french:1,spanish:1,german:1),
>    flight( 5,crew:7,stewards:3,stewardesses:3,french:1,spanish:1,german:1),
>    flight( 6,crew:7,stewards:3,stewardesses:3,french:1,spanish:1,german:1)
>      
>    ]
> ).
>  
> And no solution respected the two_days_off clauses.
>  
> If the problem is my understanding- can someone explain briefly how this constraint can be decided as optional?
>  

Can you show the incorrect solutions? I tried running your data with the 
crew example, and it has not yet produced a solution after nearly a day...

Cheers,

Kish

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Sun Feb 07 2010 - 18:23:49 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST