Calculate a route with charging - reserve

There are situations where adding a reserve charge at the destination is required. The reasons may include the following:

  • The consumption model does not compute energy consumption precisely and user wants to ensure the destination can be reached.
  • It is not possible to charge at the destination. The reserve is needed for the next journey.

There are two optional parameters that can be used for this purpose, both with value 0 by default:

  • ev[minChargeAtDestination] is used only for the destination waypoint.
  • ev[minChargeAtChargingStation] is used for all charging station waypoints.

Waypoints that are neither charging stops nor the destination do not support the corresponding parameter, as there is no use-case for them to have a reserve.

The following example describes a scenario specifying 10% of the maximum charge (8kWh) as minimum charge at a charging station. Additionally, it specifies 50kWh as minimum required charge at the destination. Because of this, there is now an additional charging station close to the destination. The response has three sections.

curl -X GET \
  https://router.hereapi.com/v8/routes?departureTime=any&origin=52.533959,13.404780&ev[connectorTypes]=iec62196Type2Combo&transportMode=car&destination=51.741505,14.352413&return=summary&ev[freeFlowSpeedTable]=0,0.239,27,0.239,45,0.259,60,0.196,75,0.207,90,0.238,100,0.26,110,0.296,120,0.337,130,0.351,250,0.351&ev[trafficSpeedTable]=0,0.349,27,0.319,45,0.329,60,0.266,75,0.287,90,0.318,100,0.33,110,0.335,120,0.35,130,0.36,250,0.36&ev[auxiliaryConsumption]=1.8&ev[ascent]=9&ev[descent]=4.3&ev[makeReachable]=true&ev[initialCharge]=48&ev[maxCharge]=80&ev[chargingCurve]=0,239,32,199,56,167,60,130,64,111,68,83,72,55,76,33,78,17,80,1&ev[maxChargeAfterChargingStation]=72&ev[minChargeAtChargingStation]=8&ev[minChargeAtDestination]=50
{
  "routes": [
    {
      "id": "c8dffbf5-d80d-47b1-a881-75a13365ee47",
      "sections": [
        {
          "id": "27ae0759-0b76-4445-ace6-3eac17dc26bd",
          "type": "vehicle",
          "postActions": [
            {
              "action": "charging",
              "duration": 829,
              "consumablePower": 100,
              "arrivalCharge": 40.9789,
              "targetCharge": 64
            }
          ],
          "departure": {
            "place": {
              "type": "place",
              "location": {
                "lat": 52.5338756,
                "lng": 13.4050139,
                "elv": 91
              },
              "originalLocation": {
                "lat": 52.5339589,
                "lng": 13.4047799
              }
            },
            "charge": 48
          },
          "arrival": {
            "place": {
              "type": "chargingStation",
              "location": {
                "lat": 52.4278437,
                "lng": 13.5197486,
                "elv": 75
              },
              "id": "5103"
            },
            "charge": 40.9789
          },
          "summary": {
            "duration": 2603,
            "length": 17982,
            "consumption": -16,
            "baseDuration": 2603
          },
          "transport": {
            "mode": "car"
          }
        },
        {
          "id": "a3983cff-9402-4522-a74f-f5848005faa0",
          "type": "vehicle",
          "postActions": [
            {
              "action": "charging",
              "duration": 2001,
              "consumablePower": 62,
              "arrivalCharge": 21.5392,
              "targetCharge": 56
            }
          ],
          "departure": {
            "place": {
              "type": "chargingStation",
              "location": {
                "lat": 52.4278437,
                "lng": 13.5197486,
                "elv": 75
              },
              "id": "5103"
            },
            "charge": 64
          },
          "arrival": {
            "place": {
              "type": "chargingStation",
              "location": {
                "lat": 51.7486348,
                "lng": 14.3282201,
                "elv": 116
              },
              "id": "5126"
            },
            "charge": 21.5392
          },
          "summary": {
            "duration": 6043,
            "length": 111088,
            "consumption": 8,
            "baseDuration": 6043
          },
          "transport": {
            "mode": "car"
          }
        },
        {
          "id": "f0c912dd-a0e5-40f4-b060-27ef09df2976",
          "type": "vehicle",
          "departure": {
            "place": {
              "type": "chargingStation",
              "location": {
                "lat": 51.7486348,
                "lng": 14.3282201,
                "elv": 116
              },
              "id": "5126"
            },
            "charge": 56
          },
          "arrival": {
            "place": {
              "type": "place",
              "location": {
                "lat": 51.7412356,
                "lng": 14.3525337,
                "elv": 115
              },
              "originalLocation": {
                "lat": 51.741505,
                "lng": 14.3524129
              }
            },
            "charge": 54.142
          },
          "summary": {
            "duration": 525,
            "length": 4135,
            "consumption": 1.858,
            "baseDuration": 525
          },
          "transport": {
            "mode": "car"
          }
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""