  
      # No change cost when user is controlling the speed, or when standstill
      prev_accel_constraint = not (reset_state or sm['carState'].standstill)
  
      accel_limits = [A_CRUISE_MIN, get_max_accel(v_ego)]
      accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngleDeg, accel_limits, self.CP)
  
      if reset_state:
        self.v_desired_filter.x = v_ego
        # Clip aEgo to cruise limits to prevent large accelerations when becoming active
        self.a_desired = clip(sm['carState'].aEgo, accel_limits[0], accel_limits[1])
 
</s> remove       self.params[:,0] = MIN_ACCEL
      self.params[:,1] = MAX_ACCEL

 </s> add  </s> remove       self.params[:,0] = MIN_ACCEL
      self.params[:,1] = self.cruise_max_a
 </s> add  </s> remove       v_upper = v_ego + (T_IDXS * self.cruise_max_a * 1.05)
 </s> add       v_upper = v_ego + (T_IDXS * self.max_a * 1.05)
    if self.mpc.mode == 'acc':
      accel_limits = [A_CRUISE_MIN, get_max_accel(v_ego)]
      accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngleDeg, accel_limits, self.CP)
    else:
      accel_limits_turns = [MIN_ACCEL, MAX_ACCEL]
  
      # No change cost when user is controlling the speed, or when standstill
      prev_accel_constraint = not (reset_state or sm['carState'].standstill)
  
    if self.mpc.mode == 'acc':
      accel_limits = [A_CRUISE_MIN, get_max_accel(v_ego)]
      accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngleDeg, accel_limits, self.CP)
    else:
      accel_limits_turns = [MIN_ACCEL, MAX_ACCEL]
    if self.mpc.mode == 'acc':
      accel_limits = [A_CRUISE_MIN, get_max_accel(v_ego)]
      accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngleDeg, accel_limits, self.CP)
    else:
      accel_limits_turns = [MIN_ACCEL, MAX_ACCEL]
  
      if reset_state:
        self.v_desired_filter.x = v_ego
        # Clip aEgo to cruise limits to prevent large accelerations when becoming active
        self.a_desired = clip(sm['carState'].aEgo, accel_limits[0], accel_limits[1])
keep keep keep keep replace replace keep keep keep keep keep
 Add force decel to e2e long (#26448)

* add force decel to e2e

* Update longitudinal_planner.py 
selfdrive/controls/lib/longitudinal_planner.py