参考官网链接:sumo官网关于事故的描述
利用SUMO模拟事故发生基本知识
–collision.mingap-factor 0,当设置为0时,表示当车辆的间隙为0的时候发生碰撞。 --collision.mingap-factor 1,当设置为0时,表示当车辆的间隙小于1m的时候发生碰撞
–collision.check-junctions 0,表示交叉口的碰撞条件设置。
–collision.action ,有四个选项。默认的是teleport,表示将车辆发送到他route的下一个路段,需要修改为none
teleport: (the default): the follower vehicle is moved (teleported) to the next edge on its route
warn: a warning is issued
none: no action is taken
remove: both vehicles are removed from the simulation
–collision.stoptime
如何创建故意发生的碰撞
创建碰撞的一种简单方法是使用TraCI覆盖保存速度(使用TraCI.vehicle.setSpeed)或强制不安全的车道改变。要以这种方式创建碰撞,还需要使用命令speedMode和laneC