Minor correction for QueueSwitcher example
This commit is contained in:
@ -1,25 +1,23 @@
|
|||||||
// Blocked Take Over Request Scenario
|
// Next Queue Switcher Scenario
|
||||||
|
|
||||||
Scenario QueueSwitcher:
|
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:
|
@init:
|
||||||
CreateVehicle(Ego,EgoProto,xyz=0m|0m|0m,speed=30km/h)
|
CreateVehicle(Ego,EgoProto,xyz=0m|0m|0m,speed=30km/h)
|
||||||
CreateVehicle(Front,FrontProto,xyz=0m|Ego.y+100m|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)
|
CreateVehicle(RightQueue$n,RightQueueProto,xyz=5m|Ego.y+$n*15m|0m,speed=$rightspeed)
|
||||||
|
|
||||||
@Headway(Ego,Front) >= 2s % OnceOnly:
|
@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:
|
@Distance($next_queue,Ego) < 10m:
|
||||||
LateralChange($next_queue,x=-$latpos,t=$latpostime)
|
LateralChange($next_queue,x=-$latpos,t=$latpostime)
|
||||||
Delay(2s)
|
Delay(2s)
|
||||||
SetLight($next_queue,LeftTurnIndicator)
|
SetLight($next_queue,LeftTurnIndicator)
|
||||||
Delay($blinktime)
|
Delay($blinktime)
|
||||||
LangeChange($next_queue,lane=+1,model=...)
|
LangeChange($next_queue,lane=+1,model=Sinusoidal(time=5s))
|
||||||
LaneChange(Blocker,lane=+1,model=Sinusoidal(time=5s))
|
|
||||||
SpeedChange(Blocker,SpeedToReach(Blocker,Ego,Accident.y-180m))
|
|
||||||
|
|
||||||
Prototypes:
|
Prototypes:
|
||||||
EgoProto: Vehicle(geometry="mycar.obj",color="blue")
|
EgoProto: Vehicle(geometry="mycar.obj",color="blue")
|
||||||
|
|||||||
Reference in New Issue
Block a user