setSpeed only lasts for one simulation step and after that the configured car-following model takes over. If you want to set the speed permanently, use the slowDown command
1. setSpeedMode(), setLaneChangeMode() 2. setSpeed(veh, targetSpeed) 3. slowDown(veh, targetSpeed, durationToKeepSpeedInMS) The vehicle will then keep that speed for the given duration. regards, Jakob 2016-11-08 8:54 GMT+01:00 杜伟强 <[email protected]>: > thanke you so much > > like you say,the code works well(see below): > > 1:set speedmode 6,set lanechangemode 0; > > 2:while(true){ > > setspeed(**); > > go one simulation step; > > } > > so can you tell me :why i have to set the speed befor every simulation > step(if i put the setspeed code outside of the whileloop,it will slow down) > > is there any other solution so that i could setspeed only once > > thanks > > -----原始邮件----- > *发件人:*"Jakob Erdmann" <[email protected]> > *发送时间:*2016-11-08 15:25:10 (星期二) > *收件人:* 21609136 <[email protected]> > *抄送:* "[email protected]" <[email protected]> > *主题:* Re: [sumo-user] disable the collision free > > > speedmode 6 and laneChangeMode 0 should do what you want. (i.e. create a > rear-end collision if you use setSpeed() with an unsafe value). If the > vehicle still slows down, send me the zipped scenario so I can look for a > bug. > > regards, > Jakob > > 2016-11-07 15:54 GMT+01:00 21609136 <[email protected]>: > >> >> Hello everyone, >> >> I'm using SUMO 0.28.0 and Traci in my research. In the mean time ,I have >> builde >> d the sumo source code successful by using vs 2012 >> >> I have problem like this : >> >> I use the command *traci.vehicle.setSpeed(vehicle_id,velocity)* to set >> the >> speed of a vehicle. If the vehicle is far enough from the preceding >> vehicle, there is no problem; but when it is close, the vehicle tend to >> slow down. >> >> i have set the speed mode in 6( no Regard safe speed )and the lane change >> mode >> in 0(do no lane change) >> what i want is : >> 1>disable the car following >> 2>disable the lane change >> 3>algorithm is implement in the traci client code >> so what should I do send some traci command or change the sumo source >> code can >> do this >> >> >> Thanks in advance. >> ------------------------------------------------------------ >> ------------------ >> Developer Access Program for Intel Xeon Phi Processors >> Access to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> sumo-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/sumo-user >> > > ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
