In PTV xTour Server 1.16, some of the data structures have been refactored in order to implement more powerful time calculation mechanisms. The following sections show all structural changes that have been made. Each section contains two UML diagrams which illustrate the changes between the two versions. Coloured elements have the following meanings:
Colour | Meaning |
---|---|
Red | Removed classes or attributes |
green | New classes or attributes |
With PTV xTour Server 1.16 the type TimeEvent has been replaced by the type TourEvent. The new data type is quite similar to the old type. It has the same two attributes startTime and period to describe the time the event refers to.
The attribute type has been split into the two different values descriptions and violations. Similar to the old API, these fields are arrays of String and contain values of the new enumerations TourEventDescription and TourEventViolation.
In addition TourEvent holds two more attributes: logisticPointId and tourIndex. LogisticPointId refers to the LogisticPoint (Depot or TransportPoint) where this event takes place. For events like DRIVING that occur between two logistic points this value is -1. The second new attribute is tourIndex which points to the tour within the chain starting with 0. This value helps assigning a TourEvent to a tour.
The following two diagrams show the differences between PTV xTour Server 1.14 and PTV xTour Server 1.16.
In PTV xTour Server 1.16 the Break- and RestRules have been completely redesigned. The 1.14 approach comprised two classes BreakRule and RestRule which defined all driver regulations. These classes were connected to a vehicle and also included attributes which specified remaining periods from previous tours. A drawback of this approach is that driver regulations must be specified for each vehicle. Therefore identical regulations cannot be shared by multiple vehicles. In addition the old regulations were restricted to rules on a daily basis. Weekly- or biweekly regulations could not be specified.
With PTV xTour Server 1.16 we present a new design for this. Regulations are now globally specified and connected to the PlanningParamsobject. Each regulation (=> class RegulationBase) has a unique id. This id can be referenced within the type DriverSettings which specifies individual settings for each vehicle.
RegulationBase is an abstract class and can be subclassed for other regulation types in the future. With version 1.16 there is one implementation called DriverRegulations which is based on regulations according the European Union and German working rules. See Section 2 for details for DriverRegulations.
The following classes have been removed:
Class | Replacement |
---|---|
RemainingPeriods | single string |
BreakRule | regulations in PlanningParams |
RestRule | regulations in PlanningParams |
RemainingPeriodsInterpretation | - |
TimeEvent | TourEvents |
TimeEventType | TourEventDescriptions and TourEventViolations |
The following attributes have been removed:
Class | Attribute | Replacement |
---|---|---|
Restrictions | maxWastedPeriodPerTour | - |
Restrictions | maxWastedPeriodPerTourPoint | - |
TourPointResult | idlePeriod | - |
TourPointResult | wastedPeriod | - |
AbstractTourResult | idlePeriod | - |
AbstractTourResult | wastedPeriod | - |
BaseVehicle | treatServiceAsWorkingPeriod | - |
TourViolation | TOUR_POINT_SERVICE_PERIOD | - |
TourViolation | MAX_WASTED_PERIOD_PER_TOUR | - |
TourViolation | MAX_WASTED_PERIOD_PER_TOUR_POINT | - |
TourPointViolation | SERVICE_PERIOD | - |
TourPointViolation | MAX_WASTED_PERIO | - |
ChainResult | timeEvents | tourEvents |
ChainResult | remainigRestPeriods | remainingPeriods |
ChainResult | remainigBreakPeriods | remainingPeriods |
SequencingPlanResult | timeEvents | tourEvents |
SequencingPlanResult | remainigRestPeriods | remainingPeriods |
SequencingPlanResult | remainigBreakPeriods | remainingPeriods |
The following classes have been added:
RegulationsBase
DriverRegulations
BreakRule (new)
DailyRestRule
WeeklyRestRule
WorkingRule
BreakIntervals
DriverSettings
TourEvent
TourEventViolation
TourEventDescription
The following attributes have been added to existing classes:
Class | Attribute | Replaces |
---|---|---|
ChainResult | tourEvents | timeEvents |
ChainResult | remainingPeriods | reaminingRestPeriods and remainingBreakPeriods |
SequencingPlanResult | tourEvents | timeEvents |
SequencingPlanResult | remainingPeriods | reaminingRestPeriods and remainingBreakPeriods |
AbstractTourResult | remainingPeriods | - |
With PTV xTour Server 1.16 the old break and rest rules have been redesigned. The new settings are globally specified as a subclass of RegulationsBase. In PTV xTour Server 1.16 there is one implementation called DriverRegulations which is based on regulations according to the European Union and German working rules. The first four attributes beginningOfCalendarWeek,breakRule, dailyRestRule and weeklyRestRule can be used to set up regulations in accordance with the European Union. These attributes should be used in conjunction. The attribute workingRule can be used to set rules according to the German working regulation and can be used in addition to the EU settings. If in doubt, set up the EU rules and leave out the working rule.
The last attribute is called breakIntervals and can be used as an additional constraint if a specific break should be taken in several intervals.
In detail, DriverRegulations has the following attributes:
beginningOfCalendarWeek: Specifies the time in seconds to mark Monday 00:00 o'clock. This value is important because some of the rest rules rely on calendar weeks.
We strongly recommend to use Unix time (number of seconds that have elapsed since midnight Coordinated Universal Time, 1 January 1970) for all time values within xTour. Hence, this value should be set to Monday the 5th January 1970 (=345600) and then use absolute time values for all operating and opening intervals.
drivingPeriod: 4h 30min (16200s)
breakPeriod1: 15min (900s)
breakPeriod2: 30min (1800s)
regularRestPeriod: 11h (39600s)
firstSplitRestPeriod: 3h (10800s)
secondSplitRestPeriod: 9h (32400s)
reducedRestPeriod: 9h (32400s)
numberOfReducedRestPeriods: 3
regularDrivingPeriod: 9h (32400s)
extendedDrivingPeriod: 10h (36000s)
numberOfExtendedDrivingPeriods: 2
maximumPeriodBetweenEndOfDailyRests: 24h (86400s)
maximumPeriodBetweenWeeklyRests: 6d (518400s)
maximumWeeklyDrivingPeriod: 56h (201600s)
maximumBiweeklyDrivingPeriod: 90h (324000s)
weeklyRestPeriod: 45h (162000s)
breakPeriod: 30m (1800s)
extendedBreakPeriod: 45m (2700s)
maxWorkingPeriodWithoutBreak: 6h (21600s)
maxWorkingPeriodWithoutExtendedBreak: 9h (32400s)
minPartialBreakLength: 15m (900s)
maxWorkingPeriodWithoutDailyRest: 8h - 10h (28000s - 36000s)
maxWorkingPeriodPerWeek: 48h - 60h (172800s - 216000s)
dailyRestPeriod: 11h (39600s)
breakIntervals: Parameters needed to follow the specified break intervals. Each breakPeriod must be taken in each given interval.
To use the globally specified regulations a vehicle must specify a new attribute of type DriverSettings. This type points to a specific regulation with its regulationsId attribute. In addition each rule within this regulation can be activated or deactivated. To consider remaining periods from previous tours the attribute remainingPeriods can be set.
Here are the attributes in detail:
regulationsId: Points to the regulations to be used. Values must be greater than 0.
breakRuleActive: True if the break rule is active.
dailyRestRuleActive: True if the daily rest rule is active.
weeklyRestRuleActive: True if the weekly rest rule is active.
workingRuleActive: True if rule for working hours is active.
remainingPeriods: Encoded remaining periods of a driver's former trips.
Copyright © 2025 PTV Logistics GmbH All rights reserved. | Imprint