(:- (travel-cost-info ?a ?from ?to ?cost slow)
CASE1
((capacity ?a ?cap) (distance ?from ?to ?dist)
(slow-burn ?a ?burn) (eval (< ?cap (* ?dist ?burn))) (assign ?cost most-positive-fixnum))
CASE2
((distance ?from ?to ?dist) (fuel ?a ?fuel)
(slow-burn ?a ?burn) (eval (>= ?fuel (* ?dist ?burn))) (assign ?cost (float (/
(+ *tc*
(* *fc*
(* ?dist ?burn)))
1))))
CASE3
((capacity ?a ?cap)(distance ?from ?to ?dist)
(slow-burn ?a ?burn) (assign ?cost (float (/
(+ (* *tc* 2)
(* *fc*
(* ?dist ?burn)))
1)))))
(:- (travel-cost-info ?a ?from ?to ?cost fast)
CASE1
((capacity ?a ?cap) (distance ?from ?to ?dist)
(fast-burn ?a ?burn) (eval (< ?cap (* ?dist ?burn)))
(assign ?cost most-positive-fixnum))
CASE2
((distance ?from ?to ?dist) (fuel ?a ?fuel)
(zoom-limit ?a ?limit) (onboard ?a ?num) (eval (< ?num ?limit)) (fast-burn ?a ?burn) (eval (>= ?fuel (* ?dist ?burn))) (assign ?cost (float (/
(+ *tc*
(* *fc*
(* ?dist ?burn)))
1))))
CASE3
((capacity ?a ?cap)(distance ?from ?to ?dist)
(fast-burn ?a ?burn) (zoom-limit ?a ?limit) (onboard ?a ?num) (eval (< ?num ?limit)) (assign ?cost (float (/
(+ (* *tc* 2)
(* *fc*
(* ?dist ?burn)))
1)))))