Setting rules for break times

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.

Setting rules for break times

Postby frank.essenberger » Wed Nov 16, 2016 2:59 pm

Hello everybody,

in our current project we would like to include break times in the planning of the tour. With break times we mean a rule set like this:
On Monday make a break of 30 Minutes sometime between 12:00 and 13:00 (flexible break)
On Tuesday no break
On Wednesday make a break of 60 Minutes between 13:00 and 14:00 (fixed break)

Is it possible to create rules like this?

Frank Essenberger
Posts: 12
Joined: Mon Feb 29, 2016 2:26 pm

Re: Setting rules for break times

Postby Bernd Welter » Wed Nov 16, 2016 3:13 pm

Hello Frank,

the required usecase is almost possible - we provide some approaches but let's say "we match 90%".
Take a look at the DriverRegulations , DriverSettings and the BreakIntervals.

By using the DriverRegulations in combination with BreakIntervals you can specify that the driver should take a break of a given length (e.g. 50 minutes, the length applies to ALL GIVEN INTERVALS - this is where we loose the final 10%) on MON, WED,FRI between 11:00 and 13:00.

With the DriverSettings you have to activate these rules for a specific Vehicle.

Here's an example:

xml code
<RegulationsBase xsi:type="DriverRegulations" id="1" beginningOfCalendarWeek="0">
<breakIntervals breakPeriod="3000"><!-- 0:50 minutes each break /-->
<Interval from="39600" till="46800" /><!-- Monday 11:00 - 13:00 /-->
<Interval from="126000" till="133200" /><!-- Tuesday 11:00 - 13:00 /-->
<Interval from="212400" till="219600" /><!-- and so on /-->
<Interval from="298800" till="306000" />
<Interval from="385200" till="392400" />
<breakRule xsi:nil="true" />
<dailyRestRule xsi:nil="true" />
<weeklyRestRule xsi:nil="true" />
<workingRule xsi:nil="true" />

and for the vehicle:
xml code
<Vehicle_3 ..] id="1" [..]>
<wrappedOperatingIntervals xmlns="">
<Interval from="25200" till="61200" /><!-- MONDAY 07:00 - 17:00 /-->
<Interval from="111600" till="147600" /><!-- TUESDAY 07:00 - 17:00 /-->
<Interval from="198000" till="234000" />
<Interval from="284400" till="320400" />
<Interval from="370800" till="406800" />
<driverSettings breakRuleActive="false" dailyRestRuleActive="false" regulationsId="1"
remainingPeriods="" weeklyRestRuleActive="false" workingRuleActive="false"
<maximumTourPeriodRestriction xsi:nil="true" />

Here is the result
As you can see in the grid the server places an optimal 0:50 minutes break within each operating interval.

Looks great, doesn't it?

Best regards Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1589
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xTourServer