/// <summary> /// Constructor /// </summary> public LateralReasoning(ArbiterLane lane, SideObstacleSide sos) { this.lane = lane; this.ForwardMonitor = new ForwardQuadrantMonitor(); this.LateralMonitor = new LateralQuadrantMonitor(sos); this.RearMonitor = new RearQuadrantMonitor(lane, sos); }
/// <summary> /// Constructor /// </summary> /// <param name="leftLateral"></param> /// <param name="rightLateral"></param> public ForwardReasoning(ILateralReasoning leftLateral, ILateralReasoning rightLateral, IFQMPlanable lane) { this.Lane = lane; this.leftLateralReasoning = leftLateral; this.rightLateralReasoning = rightLateral; this.ForwardMonitor = new ForwardQuadrantMonitor(); this.blockageTimer = new Stopwatch(); if (lane is ArbiterLane) { this.RearMonitor = new RearQuadrantMonitor((ArbiterLane)lane, SideObstacleSide.Driver); } else { this.RearMonitor = new RearQuadrantMonitor(((SupraLane)lane).Initial, SideObstacleSide.Driver); } }