%% time over cost 

number(0..4).

desire(L):- literal(L).

desire(cost1).
isor(cost1, taxiAvl(home), taxiAvl(school)).

desire(cost2).
isor(cost2, cost1, taxiAvl(station)).

desire(cost3).
isnegation(cost3, cost2).

desire(cost).
always(cost, cost3).

desire(otaxi).
happen(otaxi, taxi(home, school)).

desire(time).
eventually(time, otaxi).

w(D, 1):- desire(D), satisfy(D, 0).
w(D, 0):- desire(D), not satisfy(D, 0).

maxw(D, 2):- desire(D).

preference(cost_time).

w(cost_time, N):- 
     number(N), number(N1), number(N2), 
     w(time, N1), w(cost, N2), 
     N = 2*N2 + N1.

maxw(cost_time, 4).

%occ(walk(home, station), 0).
%occ(train(station, school), 1).

#weight w(cost_time, N) = N. 

maximize [w(cost_time, 0) = 0, w(cost_time, 1) = 1,
          w(cost_time, 2) = 2, w(cost_time, 3) = 3,
          w(cost_time, 4) = 4] .

hide preference(_).
hide maxw(_,_).
hide w(_, _).
hide number(_).