-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating a profile query for a day? #12
Comments
Hello, it is nice to read that you are using the library! You can indeed produce the temporal distance profile for a day. To do this, the next steps would be: to find the date that you are interested in, and find the start and end time (universal time) of that date. Then generate transit connections (get_transit_connections) and walk network (get_walk_network) and pass these to the routing engine (MultiObjectivePseudoCSAProfiler) and run(). Pass the required data to the node profile analyzer (NodeProfileAnalyzerTimeAndVehLegs) which will be able to produce the plots. You can find an example here: Let us know if you have further questions! |
Great, thank you. I've generated the profiles, but after going through the code can't figure out how to query for the Pareto-optimal journeys given a departure time and a start and end stop. Here's what I've done so far: G = gtfs.GTFS('/tmp/gtfs.db')
start = datetime(year=2017, month=1, day=1, hour=0, minute=0, second=0).timestamp()
end = datetime(year=2017, month=1, day=2, hour=0, minute=0, second=0).timestamp()
tcon = get_transit_connections(G, start, end)
wnet = get_walk_network(G)
stops = G.stops().stop_I.values.tolist()
router = MultiObjectivePseudoCSAProfiler(tcon, stops, walk_network=wnet, verbose=True)
router.run()
profiles = router.stop_profiles Sorry if this is not how the library is meant to be used! |
Note: Now you are using all stops as your target(s), which probably is not what you have intended. (Stops is now a list of all the integer stop identifiers, but you probably would like to use only one node as the target) Nonetheless, the router.stop_profiles should now be a dictionary mapping the integer stop identifiers (for the origins) to NodeProfileMultiObjective -objects. From these objects, you can get the final Pareto-optimal journey alternatives using the get_final_optimal_labels() -method. So you could try out something like
|
Hi, thank you for writing this library! I've been playing around with it a bit and am wondering if it's possible to generate multi-criteria profiles for a day with this library? I've managed to load my GTFS data and OSM walk network data into a GTFS object, but am not sure what to do next.
The text was updated successfully, but these errors were encountered: