Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] getSpeed vs. getFollowSpeed

Hello,
your perception is correct. However, traci comes before vehicle movements so getSpeed returns the prior value and getFollowSpeed actually does predict the value that will be computed in the current step. Sumo-gui shows values that correspond to the output-stage at the end of the simulation loop.
This means you can still use the value of getFollowSpeed to influence the future vehicle behavior at the time of the traci call.
See https://sumo.dlr.de/docs/Developer/Implementation_Notes/Simulation_Loop.html

regards,
Jakob

Am Mo., 4. Mai 2020 um 01:56 Uhr schrieb Bae, Jong In <jbae42@xxxxxxxxxx>:
hello,

I am trying to understand the difference between getSpeed and getFollowSpeed.
Based on the definition, it seems like getSpeed returns the speed from the current time step whereas getFollowSpeed returns the speed for the next timestep (calculated by the carFollowingmodel).

However, when I printed both speeds it seems like getFollowSpeed returned the current time step's speed and getSpeed returned the speed from the last time step.
I attached a screenshot that shows both getSpeed and getFollowSpeed printed in command window and the current status of the vehicle in simulation.

The first highlighted speed is the 'getFollowSpeed' and the second highlighted speed is the current speed of the vehicle (in simulation).

If 'getFollowSpeed' doesn't return the next timestep's speed, is there any way in SUMO to predict the next timestep's speed?

Thank you,


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top