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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: vbx
  • Order by date
  1. vbx

    conected cities

    link(X,C),link(C,Y),X \= Y.
  2. vbx

    Find route in a system

    I was used to C and C++ ,but i had to study prolog in the past 9 days for a school project,so i am not use to it :)
  3. vbx

    Find route in a system

    Ohh yes,I completely forgot about that. It works now PS: glad to be co-nationals :) Thanks for helping a beginer. I am done with the questions for now,sorry for the stress :)
  4. vbx

    Find route in a system

    link(timisoara,cluj,140,360). link(timisoara,bucuresti,200,698). link(timisoara,iasi,110,714). link(craiova,timisoara,90,370). link(brasov,craiova,185,399). link(brasov,bucuresti,190,400). link(bucuresti,galati,200,285). link(bucuresti,sibiu,136,403). link(bucuresti,iasi,195,360)...
  5. vbx

    Find route in a system

    Yes,it takes 4 parameters,there is also Duration.
  6. vbx

    Find route in a system

    How do i use this predicate minimum? If i use it like this in querry,i get "false": short(Ori,Dest,Min):-findall([Path,Lenght],route([Ori],Dest,Path,0,Lenght),List), minimum(List,Min).
  7. vbx

    Find route in a system

    I tried all day but i really don`t have an ideea how to find minumum of a list of lists :( Some help please ?
  8. vbx

    Find route in a system

    Sorry,I ment to put Lenght instead of L: short_path(X,Y,Len):-findall(Lenght,path([X],Y,Path,0,Lenght),List), Lenght < Len. Only one request of help i have,here is my code: minn([H],H). minn([H|T],Min) :- minn(T,Mum),(H < Mum -> Min = H; Min = Mum)...
  9. vbx

    Find route in a system

    I needed to print the path with the lenght less than a lenght i give,something like this: short_path(X,Y,Len):-findall(L,path([X],Y,Path,0,Lenght),List), Lenght < Len. But its not good how i wrote.Can you help me?
  10. vbx

    Find route in a system

    Thank you,it works now,i didnt understand how to call path.i have one more question if you dont mind: how can i change this code to print only the shortest path ?
  11. vbx

    Find route in a system

    Can I ask why do you use for The first parameter,a list ? I am having dificults understanding that. Thanks
  12. vbx

    Find route in a system

    i have read it many times,but i dont understand it, oh(1,2,3) what that does numbers reprsent? and again the arguments of path what are representing? Hope you can explain your code that you post it there,I`ll apreciated.Thanks
  13. vbx

    Find route in a system

    Cann someone help me how to find path of a route in sistem,like: if i have a route from A to B i need to get all the cities that traverse from A to B ? how can thsi be done ? thanks
  14. vbx

    control prolog answers

    If my prolog querry shows me lets says 10 answers,how can i do to make it print only the first 5 of them ? Thanks in advanced
  15. vbx

    conected cities

    If i have this links: link(detroit,toronto). link(chicago,washington). link(denver,sacramento). link(sacramento,chicago). link(toronto,chicago). .................... How can i find witch pair of distinct cities are connected using 2 links ? Any ideea ? Thanks
  16. vbx

    find speed limit

    Ok,i did it like this: speed(X,Y):-link(X,Y,Speed,_),Speed < 100.
  17. vbx

    find speed limit

    I took a look at findall but i onest dont get it,where to put the condition that speedlimit is < 100.
  18. vbx

    find speed limit

    Hello i have a question regarding my project. I have a few clauses link() that take a origin city,destination,spee limit and duration.( Ex:link(Chicago,Detroit,170,6). ). How can I print only the links with the speed below 100 ? How can I querry that ? Thanks in advance.

Part and Inventory Search

Back
Top