Page 1 of 1

Error "ExactTimeConsiderationAtArrival mode can not ..."

Posted: Wed Feb 08, 2023 1:10 pm
by Uwe Schuster
I have just got a xServer 2 CalculateRoute request from a "customer" that leads to the error:
ExactTimeConsiderationAtArrival mode can not be used if TourRestrictions are requested.
The reason seems to be the combination of ExactTimeConsiderationAtArrival and tourRestrictions. From my POV I do not see a use case and see this as some kind of "see there is an error and I made no mistake" report to me.

My idea to solve the issue was to remove tourRestrictions from the request (or better to say not to add it) if ExactTimeConsiderationAtArrival is active. However I still got the same error response. It turned out that TOUR_EVENT caused the issue.

Question:
Can someone give me a pointer to the documentation that says that the combination of ExactTimeConsiderationAtArrival and tourRestrictions is not possible?

Dev Hint:
Unless it is another error I would appreciate if the error would contain TOUR_EVENT.

Requests snippets:
Request snippet 1: (with ExactTimeConsiderationAtArrival and tourRestrictions)

Code: Select all

{
  "routeOptions": {
    "timeConsideration": {
      "$type": "ExactTimeConsiderationAtArrival",
      "referenceTime": "2023-02-08T00:00:00"
    },
    "tourRestrictions": {
      "configurableWorkingHours": {
        "breakRule": {
          "breakTime": 901.0,
          "maximumDrivingTimeBetweenBreaks": 3601.0
        },
        "dailyRestRule": {
          "dailyRestTime": 10801.0,
          "maximumDrivingTimeBetweenDailyRests": 7201.0,
          "dailyRestPosition": "ANYWHERE"
        }
      }
    }
  },
  "resultFields": {
    "eventTypes": [
      "ROUTE_VIOLATION_EVENT", "TOUR_EVENT"
    ]
  }
}
-> Response "ExactTimeConsiderationAtArrival mode can not be used if TourRestrictions are requested."

Request snippet 2: (with ExactTimeConsiderationAtArrival and w/o tourRestrictions, but TOUR_EVENT)

Code: Select all

{
  "routeOptions": {
    "timeConsideration": {
      "$type": "ExactTimeConsiderationAtArrival",
      "referenceTime": "2023-02-08T00:00:00"
    }
  },
  "resultFields": {
    "eventTypes": [
      "ROUTE_VIOLATION_EVENT", "TOUR_EVENT"
    ]
  }
}
-> Response "ExactTimeConsiderationAtArrival mode can not be used if TourRestrictions are requested."

A message that includes "eventTypes TOUR_EVENT" is appreciated!

Request snippet 3: (with ExactTimeConsiderationAtArrival and w/o tourRestrictions and TOUR_EVENT)

Code: Select all

{
  "routeOptions": {
    "timeConsideration": {
      "$type": "ExactTimeConsiderationAtArrival",
      "referenceTime": "2023-02-08T00:00:00"
    }
  },
  "resultFields": {
    "eventTypes": [
      "ROUTE_VIOLATION_EVENT"
    ]
  }
}
-> Route will be calculated

Re: Error "ExactTimeConsiderationAtArrival mode can not ..."

Posted: Wed Feb 08, 2023 6:09 pm
by Bernd Welter
Hello Uwe,

you are dealing with the thread Determine the latest departure times of stations.

This is known and I'll forward your post to DEV.

Bernd

Re: Error "ExactTimeConsiderationAtArrival mode can not ..."

Posted: Thu Feb 09, 2023 10:06 am
by Bernd Welter
So here's some feedback from DEV I'd like to share. Summarized I'd say:
You are right - as often the messages could be more "clearly" - we will look into this and discuss how to improve them. Sometimes it is challenging to handle all "invalid combinations" with a message that explicitly explains the underlying reasons. And sometimes combinations sound to be meaningful/possible from a functional/business perspective but haven't been implemented due to other reasons (prio/ressources).

What we want to let you know is that you might benefit from this technical concept article about TourCalculation. Maybe this gives you more insights into the subtopic.