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.
Post Reply
frank.essenberger
Posts: 12
Joined: Mon Feb 29, 2016 2:26 pm

Setting rules for break times

Post 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
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Setting rules for break times

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
i.kobeissy
Posts: 24
Joined: Wed Jan 31, 2018 1:15 pm

Re: Setting rules for break times

Post by i.kobeissy »

Hello Bernd,

Is it possible to force multiple breaks using the breakIntervals ?

Regards
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Setting rules for break times

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
i.kobeissy
Posts: 24
Joined: Wed Jan 31, 2018 1:15 pm

Re: Setting rules for break times

Post by i.kobeissy »

Yes we're using xTour1. Thanks for your answer
Post Reply