BilHim / trafficSimulator

A microscopic traffic simulation in Python
MIT License
351 stars 130 forks source link

Some initial suggestions #5

Open rampallishyam opened 3 years ago

rampallishyam commented 3 years ago

Here is the list of initial suggestions that, I think, can improve this project to a greater extent.

  1. Currently, this project can only handle one vehicle type. If there is a way to handle multiple vehicle types. I think that can be quite interesting.
  2. I see that you create road networks manually. If there is a way to import a road network from the open street map, it can improve the fidelity of this project.
BilHim commented 3 years ago
  1. It is possible to add different types of vehicles. Using a VehicleGenerator, you can customize for example the length of the vehicle, max speed, max acceleration, etc, and also driver-related parameters like reaction time, ... Here is an example: sim.create_gen({ 'vehicle_rate': 20, 'vehicles': [ [1, {"s": 8, "path": [...]}], [1, {"s": 4, "path": [...]}], ... ] })

  2. Concerning OpenStreetMap, I just checked their API and It seems very difficult to implement. But I will look into it further. As an alternative, I'm thinking of creating a GUI to help create and design roads.

rampallishyam commented 3 years ago

Thanks!

  1. I will try with other vehicle types
  2. I think GUI for editing roads is a great way to improve the customizability. I mean instead of using open street map API, I think importing .osm file that you can download from open street map website can be easy to use in my opinion.
rampallishyam commented 3 years ago

What do you think about my previous comment? Do you want any help from me?

rinosimeone commented 3 years ago

Thanks!

1. I will try with other vehicle types

2. I think GUI for editing roads is a great way to improve the customizability. I mean instead of using open street map API, I think importing .osm file that you can download from open street map website can be easy to use in my opinion.

Have you considered Google Maps ? I suppose so...

rampallishyam commented 3 years ago

Thanks!

1. I will try with other vehicle types

2. I think GUI for editing roads is a great way to improve the customizability. I mean instead of using open street map API, I think importing .osm file that you can download from open street map website can be easy to use in my opinion.

Have you condered Google Maps ? I suppose so...

Nope. I haven't as I do not know how. May I request your input here?

rinosimeone commented 3 years ago

Thanks!

1. I will try with other vehicle types

2. I think GUI for editing roads is a great way to improve the customizability. I mean instead of using open street map API, I think importing .osm file that you can download from open street map website can be easy to use in my opinion.

Have you considered Google Maps ? I suppose so...

Nope. I haven't as I do not know how. May I request your input here?

Maybe I am completely mistaken, but: a. to simulate a certain junction, you used PyGame, providing for instance a junction type to use is as a simulation scenario (and I imagine composing one or more end-to-start); my suggestion, using the Google's Maps APIs to be the interface / starting point of the simulation; my idea, integrate the GMaps APIs and using its functions to define a simulation area; b. it is possible also to abstract an area starting from a real one (i.e. a testing ground); c. defined a certain "real" area, use a subset (https://developers.google.com/maps/documentation/roads/snap#demo) or evaluate the scenario in a second moment (i.e. sub-selecting / identifying scenario alternatives (https://developers.google.com/maps/documentation/roads/inspector).

Hope it is clearer now...