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

Now it's possible to do : traci.simulation.getBusStopWaitingIDList #5493

Merged
merged 6 commits into from Apr 23, 2019

Conversation

@tkchouaki
Copy link
Contributor

commented Apr 19, 2019

Hi,
I needed for my project to retreive the IDs of the persons at a bus stop via TraCI. Since it wasn't possible, i added that feature into both SUMO and TraCi's source code.

  • I added the Traci Constant : VAR_BUS_STOP_WAITING_IDS in both SUMO's C++ code and TraCI's python code (making sure to make no conflict)
  • I added the method MSStopingPlace::getTransportables (to retrieve the persons)
  • I added the method Simulation::getBusStopWaitingIDList
  • I added a switch case to the TraCIServerAPI_Simulation::processGet method to handle the new VAR_BUS_STOP_WAITING_IDS constant.
  • I finally added the traci.simulation.getBusStoWaitingIDList method in Traci's Python Code.

Regards,
Tarek CHOUAKI.

tarek chouaki added 6 commits Apr 18, 2019
tarek chouaki
added method MSStoppingPlace::getTransportables
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
tarek chouaki
added method Simulation::getBusStopWaitingIDList
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
tarek chouaki
added constant VAR_BUS_STOP_WAITING_IDS
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
tarek chouaki
Handling VAR_BUS_STOP_WAITING_IDS get requests
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
tarek chouaki
Added constant VAR_BUS_STOP_WAITING_IDS
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
tarek chouaki
Added method simulation.getBusStopWaitingIDList
Signed-off-by: tarek chouaki <tarek.chouaki@irt-systemx.fr>
@behrisch

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2019

Thank you for implementing this! Could you please change the code such that it does not create a list twice. Maybe already the stopping place could return a list of ids?

@namdre

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

I think a method that returns the transportables is cleaner in the long run and the extra list adds negligible overhead.

@namdre namdre merged commit 19e3060 into eclipse:master Apr 23, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
eclipsefdn/eca The author(s) of the pull request is covered by necessary legal agreements in order to proceed!
Details
namdre added a commit that referenced this pull request Apr 23, 2019
namdre added a commit that referenced this pull request Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.