Page 1 of 1

Setting rules for break times

Posted: Wed Nov 16, 2016 2:59 pm
by frank.essenberger
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?

Regards
Frank Essenberger

Re: Setting rules for break times

Posted: Wed Nov 16, 2016 3:13 pm
by Bernd Welter
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:

Code: Select all

<RegulationsBase xsi:type="DriverRegulations" id="1" beginningOfCalendarWeek="0">
	<breakIntervals breakPeriod="3000"><!-- 0:50 minutes each break /-->
		<wrappedIntervals>
			<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" />
		</wrappedIntervals>
	</breakIntervals>
	<breakRule xsi:nil="true" />
	<dailyRestRule xsi:nil="true" />
	<weeklyRestRule xsi:nil="true" />
	<workingRule xsi:nil="true" />
</RegulationsBase>
and for the vehicle:

Code: Select all

<Vehicle_3 ..] id="1" [..]>
	<wrappedOperatingIntervals xmlns="http://xtour.xserver.ptvag.com">
		<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" />
	</wrappedOperatingIntervals>
[..]
	<driverSettings breakRuleActive="false" dailyRestRuleActive="false" regulationsId="1" 
remainingPeriods="" weeklyRestRuleActive="false" workingRuleActive="false" 
xmlns="http://xtour.xserver.ptvag.com">
		<maximumTourPeriodRestriction xsi:nil="true" />
	</driverSettings>
[..]
</Vehicle_3>
Here is the result
As you can see in the grid the server places an optimal 0:50 minutes break within each operating interval.
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

Re: Setting rules for break times

Posted: Mon Mar 01, 2021 3:31 pm
by i.kobeissy
Hello Bernd,

Is it possible to force multiple breaks using the breakIntervals ?

Regards

Re: Setting rules for break times

Posted: Mon Mar 01, 2021 3:41 pm
by Bernd Welter
Hello Ibrahim,

In xTour1? Yes, but they have to have equal length...

A 30min break between 10:00 and 11:00 and another30min break between 15:00 and 16:00 is possible.

But a 30min break between 10:00 and 11:00 and a 45min break between 15:00 and 16:0 is not possible.

Best regards from Germany,

Bernd

Re: Setting rules for break times

Posted: Tue Mar 02, 2021 7:02 am
by i.kobeissy
Yes we're using xTour1. Thanks for your answer