Skip to content
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

Keeping agents in osm map during episode #755

Closed
nicofirst1 opened this issue Oct 15, 2019 · 7 comments
Closed

Keeping agents in osm map during episode #755

nicofirst1 opened this issue Oct 15, 2019 · 7 comments

Comments

@nicofirst1
Copy link

Feature Description

I'm currently using flow to train a MAS system with MADDPG algorithm (here). During the sampling I get this error which is due to the RL agents being removed during the episode.
Since I'm using an imported OSM map neither the MinicityRouter nor the _reroute_if_final_edge are working to prevent the Agents to be deleted from the map.

It would be nice to have a method for doing this on OSM maps too.

@eugenevinitsky
Copy link
Member

Hi @nicofirst1, in terms of a quick fix, would it work to have an inflow of vehicles in your system or do you need there to be a fixed number of vehicles in your system at all times? If the latter, we can push a fix to add such an option to OSM maps.

@nicofirst1
Copy link
Author

Unfortunately I need to have a fixed number of RL vehicles during the episode.

@eugenevinitsky
Copy link
Member

I see. Would it be sufficient to just check if the edge is the final edge in your list of routes and return it to the first element in the route?

@nicofirst1
Copy link
Author

Yes, as long as I have a constant number of agents during the episode.

@nicofirst1
Copy link
Author

Any update on this?

@eugenevinitsky
Copy link
Member

Yep! It'll take a bit longer to get it merged in (need to write unit tests for it) but I've opened a PR #759 that gives an example of how you might do this. Hope that helps!

@eugenevinitsky
Copy link
Member

Hi, I'm closing this for now. Hoping your project got finished up alright!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants