PTV 开发者路由 API 未应用 OpeningInterval

PTV Developer Routing API OpeningInterval is not applied

我正在尝试使用 Routing API 计算从柏林到罗马的路线,并为罗马的航路点指定了 openingInterval。 未使用 openingInterval,相反,我收到了 openingInterval 的路由违规。

我的要求:

https://api.myptv.com/routing/v1/routes?options[trafficMode]=AVERAGE&options[startTime]=2022-01-25T13:00:00&results=VIOLATION_EVENTS,SCHEDULE_EVENTS

Body:
{
    "waypoints": [
        {
            "offRoad": {
                "latitude": 52.461790,
                "longitude": 13.324184
            }
        },
        {
            "offRoad": {
                "latitude": 41.889511,
                "longitude": 12.381591,
                "openingIntervals": [
                    {
                        "start": "2022-01-25T10:00:00",
                        "end": "2022-01-25T20:00:00"
                    }
                ]
            }
        }
    ]
}

我收到以下回复:

{
    "distance": 1508861,
    "travelTime": 68832,
    "violated": true,
    "events": [
        {
            "latitude": 52.461790044,
            "longitude": 13.324184073,
            "startsAt": "2022-01-25T13:00:00+01:00",
            "distanceFromStart": 0,
            "travelTimeFromStart": 0,
            "countryCode": "DE",
            "utcOffset": 60,
            "schedule": {
                "duration": 0,
                "scheduleTypes": [
                    "SERVICE"
                ]
            }
        },
        {
            "latitude": 41.889511025,
            "longitude": 12.381590967,
            "startsAt": "2022-01-26T08:07:12+01:00",
            "distanceFromStart": 1508861,
            "travelTimeFromStart": 68832,
            "countryCode": "IT",
            "utcOffset": 60,
            "violation": {
                "type": "SCHEDULE",
                "scheduleViolationTypes": [
                    "OPENING_INTERVAL"
                ]
            },
            "schedule": {
                "duration": 0,
                "scheduleTypes": [
                    "SERVICE"
                ]
            }
        }
    ]
}

路线应该在早上 7 点左右到达罗马,必须在那里等待 openingInterval,但路线没有等待就结束了。 我做错了什么?

虽然所有 waypoints 默认情况下始终在您设置 openingIntervals 后立即打开,但航路点将仅在这些时间间隔内打开,否则关闭。 在您的情况下,您将在第二天到达,因为您的路线很长,而您的 openingInterval 指定为同一天。 如果你不知道你是否在开始路线的同一天到达,我建议也添加第二天的openingInterval,就像这样:

{
"waypoints": [
    {
        "offRoad": {
            "latitude": 52.461790,
            "longitude": 13.324184
        }
    },
    {
        "offRoad": {
            "latitude": 41.889511,
            "longitude": 12.381591,
            "openingIntervals": [
                {
                    "start": "2021-01-25T10:00:00",
                    "end": "2021-01-25T20:00:00"
                },
                {
                    "start": "2021-01-26T10:00:00",
                    "end": "2021-01-26T20:00:00"
                }
            ]
        }
    }
]

}