def METHOD_NAME(self, distance: float) -> float:
    """
    Ensures the frontline conflict is never located within the minimum distance
    constant of either end control point.
    """
    if (distance > self.route_length / 2) and (
        distance + FRONTLINE_MIN_CP_DISTANCE > self.route_length
    ):
        distance = self.route_length - FRONTLINE_MIN_CP_DISTANCE
    elif (distance < self.route_length / 2) and (
        distance < FRONTLINE_MIN_CP_DISTANCE
    ):
        distance = FRONTLINE_MIN_CP_DISTANCE
    return distance