public override bool Equals(object obj)
 {
     if (obj is TurnBehavior)
     {
         TurnBehavior b = (TurnBehavior)obj;
         return(exitPoint.Equals(b.exitPoint) && entryPoint.Equals(b.entryPoint) && maxSpeed == b.maxSpeed);
     }
     else
     {
         return(false);
     }
 }
        /// <summary>
        /// Resume from pause
        /// </summary>
        /// <returns></returns>
        public Behavior Resume(VehicleState currentState, double speed)
        {
            // turn behavior into chute
            TurnBehavior b = new TurnBehavior(this.Final.Lane.LaneId, this.Final.PartitionPath,
                this.Final.PartitionPath.ShiftLateral(this.Final.Lane.Width / 2.0),
                this.Final.PartitionPath.ShiftLateral(-this.Final.Lane.Width / 2.0),
                new ScalarSpeedCommand(1.4), null);

            // return behavior
            return b;
        }
        public UrbanChallenge.Behaviors.Behavior Resume(VehicleState currentState, double speed)
        {
            TurnBehavior turnBehavior = null;
            if(TargetLane != null)
                turnBehavior = new TurnBehavior(TargetLane.LaneId, EndingPath, LeftBound, RightBound, SpeedCommand, this.Interconnect.InterconnectId);
            else
                turnBehavior = new TurnBehavior(null, EndingPath, LeftBound, RightBound, SpeedCommand, this.Interconnect.InterconnectId);

            turnBehavior.TimeStamp = currentState.Timestamp;
            return turnBehavior;
        }