時間の制約があるウェイポイントシーケンスの最適化

ユーザーストーリー

デュースブルクルールトから出発し、デュースブルクヘフェンに近い目的地に到着しますが、このルートを利用するには、ジェツォルヴェリン、コケレイゾルヴェリン、ミュールハイムを訪れる必要があります。 ドライバーは最速のルートを必要としています。

リクエスト

次のリクエスト例を検討してください

ベアラートークン
| apiKey
curl -H "Authorization: Bearer TOKEN_HERE" "https://wps.hereapi.com/v8/findsequence2?departure=2015-05-04T8:00:00%2b01:00&mode=fastest;car;traffic:disabled&start=DuisburgRuhrort;51.4541,6.7406&destination1=ZecheZollverein;51.486,7.0459;acc:mo09:00:00%2b01:00%7cmo10:00:00%2b01:00;st:60&destination2=KokereiZollverein;51.4879,7.0337;acc:mo10:30:00%2b01:00%7cmo12:00:00%2b01:00;st:600&destination3=MuehlheimRuhrHbf;51.432,6.886;acc:mo08:00:00%2b01:00%7cmo09:00:00%2b01:00;st:60&end=DuisburgHafen;51.4576,6.7717&improveFor=TIME"
curl "https://wps.hereapi.com/v8/findsequence2?departure=2015-05-04T8:00:00%2b01:00&mode=fastest;car;traffic:disabled&start=DuisburgRuhrort;51.4541,6.7406&destination1=ZecheZollverein;51.486,7.0459;acc:mo09:00:00%2b01:00%7cmo10:00:00%2b01:00;st:60&destination2=KokereiZollverein;51.4879,7.0337;acc:mo10:30:00%2b01:00%7cmo12:00:00%2b01:00;st:600&destination3=MuehlheimRuhrHbf;51.432,6.886;acc:mo08:00:00%2b01:00%7cmo09:00:00%2b01:00;st:60&end=DuisburgHafen;51.4576,6.7717&improveFor=TIME&apikey=APIKEY_HERE"

制約条件の場所 :

  • acc - 目的地を訪問可能なアクセス時間 ( サービス時間の設定が必要 )
  • st - Waypointsでのサービス時間 ( 秒 )

詳細については 、 API リファレンスを参照してください。

レスポンス

{
    "results" : [{
            "waypoints" : [{
                    "id" : "DuisburgRuhrort",
                    "lat" : 51.4541,
                    "lng" : 6.7406,
                    "sequence" : 0,
                    "estimatedArrival" : null,
                    "estimatedDeparture" : "2015-05-04T08:00:00+01:00",
                    "fulfilledConstraints" : []
                }, {
                    "id" : "MuehlheimRuhrHbf",
                    "lat" : 51.432,
                    "lng" : 6.886,
                    "sequence" : 1,
                    "estimatedArrival" : "2015-05-04T08:14:45+01:00",
                    "estimatedDeparture" : "2015-05-04T08:15:45+01:00",
                    "fulfilledConstraints" : [
                        "acc:mo08:00:00+01:00|mo09:00:00+01:00;st:60"
                    ]
                }, {
                    "id" : "ZecheZollverein",
                    "lat" : 51.486,
                    "lng" : 7.0459,
                    "sequence" : 2,
                    "estimatedArrival" : "2015-05-04T08:37:03+01:00",
                    "estimatedDeparture" : "2015-05-04T09:01:00+01:00",
                    "fulfilledConstraints" : [
                        "acc:mo09:00:00+01:00|mo10:00:00+01:00;st:60"
                    ]
                }, {
                    "id" : "KokereiZollverein",
                    "lat" : 51.4879,
                    "lng" : 7.0337,
                    "sequence" : 3,
                    "estimatedArrival" : "2015-05-04T09:04:33+01:00",
                    "estimatedDeparture" : "2015-05-04T10:40:00+01:00",
                    "fulfilledConstraints" : [
                        "acc:mo10:30:00+01:00|mo12:00:00+01:00;st:600"
                    ]
                }, {
                    "id" : "DuisburgHafen",
                    "lat" : 51.4576,
                    "lng" : 6.7717,
                    "sequence" : 4,
                    "estimatedArrival" : "2015-05-04T11:03:51+01:00",
                    "estimatedDeparture" : null,
                    "fulfilledConstraints" : []
                }
            ],
            "distance" : "60054",
            "time" : "11031",
            "interconnections" : [{
                    "fromWaypoint" : "DuisburgRuhrort",
                    "toWaypoint" : "MuehlheimRuhrHbf",
                    "distance" : 14002.0,
                    "time" : 885.0
                }, {
                    "fromWaypoint" : "MuehlheimRuhrHbf",
                    "toWaypoint" : "ZecheZollverein",
                    "distance" : 17797.0,
                    "time" : 1278.0
                }, {
                    "fromWaypoint" : "ZecheZollverein",
                    "toWaypoint" : "KokereiZollverein",
                    "distance" : 1488.0,
                    "time" : 213.0
                }, {
                    "fromWaypoint" : "KokereiZollverein",
                    "toWaypoint" : "DuisburgHafen",
                    "distance" : 26767.0,
                    "time" : 1431.0
                }
            ],
            "description" : "Targeted best time; without traffic"
        }
    ],
    "processingTimeDesc" : "993ms",
    "responseCode" : "200",
    "warnings" : null,
    "requestId" : null
}

」に一致する結果は 件です

    」に一致する結果はありません