def correct_gear_mvl_v1(velocity, acceleration, gear, mvl, max_gear,
    min_gear, plateau_acceleration):
    """
    Corrects the gear predicted according to upper and lower bound velocity
    limits.

    :param velocity:
        Vehicle velocity [km/h].
    :type velocity: float

    :param acceleration:
        Vehicle acceleration [m/s2].
    :type acceleration: float

    :param gear:
        Predicted vehicle gear [-].
    :type gear: int

    :param max_gear:
        Maximum gear [-].
    :type max_gear: int

    :param min_gear:
        Minimum gear [-].
    :type min_gear: int

    :param plateau_acceleration:
        Maximum acceleration to be at constant velocity [m/s2].
    :type plateau_acceleration: float

    :param mvl:
        Matrix velocity limits (upper and lower bound) [km/h].
    :type mvl: OrderedDict

    :return:
        A gear corrected according to upper bound engine speed [-].
    :rtype: int
    """
    if abs(acceleration) < plateau_acceleration:
        while mvl[gear][1] < velocity and gear < max_gear:
            gear += 1
        while mvl[gear][0] > velocity and gear > min_gear:
            gear -= 1
    return gear
