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

From: C A <slaphead99_at_...32...>
Date: Sat, 6 Feb 2010 11:22:19 +0000
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?
 
Cheers!

 
 		 	   		  
_________________________________________________________________
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
Received on Sat Feb 06 2010 - 11:22:31 CET

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