简体   繁体   中英

Path generation on a graph with bidirectional weighted edges

I am trying to do a Java implementation of a path generator on a graph with bidirectional weighted edges. The problem consists on give a route to the user based on a list of points of interest (POI) and on the user interests. The user interests, distances and travel time between all POI are already calculated. With these data I was able to create a graph with bidirectional edges where the edge's weight is the travel time between a source and a destination node.

There are some relevant user inputs:

  • the time span in which he wants to travel, ie 30 June at 4 pm to 30 June at 8 pm
  • the starting point (coordinates) of the trip, from where the closest POI is chosen as the trip starting point.

As the weight of the nodes is the travel time between the POI, the result path weight sum can not exceed the time span defined by the user. This will be the stoppage condition, instead of a destination node.

The user interests on a POI are defined on a range between 0 and 5. Ideally, this variable would also be considered on the path calculation, because the user would like to visit the POI with the better score.

This problem was proposed in an academic context and my knowledge in this area is not so good. If you have any suggestion of algorithm or any other idea to solve this problem in a reasonable time, I would be grateful.

Consider the following procedure:

  • While running search accumulate travel-time and interest-score
  • Stop exploring current path if one of those conditions is met:
    • travel-time limit exceeded
    • All POIs visited
  • Keep current path as best path if one of those conditions is met:
    • It is the first path explored
    • Current path has higher interest-score than best path
    • Current path has the same interest-score as best path and shorter travel-time
  • Backtrack to explore another path

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM