diff --git a/examples/QueueSwitcher.osn b/examples/QueueSwitcher.osn index 4ced8f6..f7ee43e 100644 --- a/examples/QueueSwitcher.osn +++ b/examples/QueueSwitcher.osn @@ -1,25 +1,23 @@ -// Blocked Take Over Request Scenario +// Next Queue Switcher Scenario Scenario QueueSwitcher: - Act QueueSwitcher(rightcount=30,rightspeed=10km/h,latpos=0.3,latpostime=1s,blinktime=-2s): + Act QueueSwitcher($rightcount=30,$rightspeed=10km/h,$latpos=0.3,$latpostime=1s,$blinktime=2s): @init: CreateVehicle(Ego,EgoProto,xyz=0m|0m|0m,speed=30km/h) CreateVehicle(Front,FrontProto,xyz=0m|Ego.y+100m|0m,speed=30km/h) - repeat n in [1:$rightcount] by 1: + repeat $n in [1:$rightcount] by 1: CreateVehicle(RightQueue$n,RightQueueProto,xyz=5m|Ego.y+$n*15m|0m,speed=$rightspeed) @Headway(Ego,Front) >= 2s % OnceOnly: - select next_queue in RightQueue* with DistanceBeforePassing(next_queue,Ego)>15m minimize Distance(next_queue,Ego): + select $next_queue in RightQueue* with DistanceBeforePassing($next_queue,Ego)>15m minimize Distance($next_queue,Ego): @Distance($next_queue,Ego) < 10m: LateralChange($next_queue,x=-$latpos,t=$latpostime) Delay(2s) SetLight($next_queue,LeftTurnIndicator) Delay($blinktime) - LangeChange($next_queue,lane=+1,model=...) - LaneChange(Blocker,lane=+1,model=Sinusoidal(time=5s)) - SpeedChange(Blocker,SpeedToReach(Blocker,Ego,Accident.y-180m)) + LangeChange($next_queue,lane=+1,model=Sinusoidal(time=5s)) Prototypes: EgoProto: Vehicle(geometry="mycar.obj",color="blue")