Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP IN PROLOG FINDING PATH

Status
Not open for further replies.
Dec 30, 2010
1
GR
HI,I HAVE THESE DATA
flight(Place1,Place2,departure time,Arrival time,flight code,Day)
flight(paris,milano,6,8,ba4733,mo).
flight(milano,london,9,10,ba4733,mo).
flight(london,athens,10,15,ba4733,mo).

i want to find all paths between 2 places for example
?- route(paris,athens,mo,A).

A = [flight(paris,milano,ba4733,8), flight(milano,london,ba4733,10), flight(london,athens,ba4822,15)] ;



also to flight from place1 to place2 needs Day1=Day2 and Arrival time<=departure time

Can anyone help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top