1). If the vehicle has not yet departed or if the route of the vehicle is disconnected, the magic value -1001 is returned. Otherwise the distance should be positive
2). in the vehicle definition, set arrivalSpeed=0. You could send the maximum deceleration to a lower value to get a slower approach (can be done via TraCI as wel). Alternatively, you could use the 'slowDown' command to set a speed time line 3). The step length defaults to 1s but can be configured using the sumo --step-length parameter. Some functions read/return time in ms though (i.e. simulation.getCurrentTime). Beware. 2016-10-18 3:28 GMT+02:00 Ankur Sarker <asar...@g.clemson.edu>: > Hi, > > I am trying to change velocities of vehicles using TraCI. I have some > queries: > > 1. In my simulation, I am getting negative value from getDistance() > function. What would be the possible reason? Followings are my code: > ------------------------------------------------------------ > ------------------------ > vehicles = traci.vehicle.getIDList() > for word in vehicles: > if word == "kang": > distance = traci.vehicle.getDistance("kang") > vel1 = traci.vehicle.getSpeed("kang") > print distance > ------------------------------------------------------------ > -------------------------- > 2. How to let the vehicles stop at the final destination gradually? > > 3. If I use the TraCI in python, what is the simulation step in time? 1 > second? or something else? > ------------------------------------------------------------ > ----------------- > step = 0 > while traci.simulation.getMinExpectedNumber() > 0: > traci.simulationStep() > step+=1 > ------------------------------------------------------------ > -------------------- > > Thanks for your time! > A. Sarker > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > sumo-user mailing list > sumo-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list sumo-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sumo-user