maxDrivingPeriod

This forum deals with any kind of trip optimization based on xTour1, xTour2 and the Developer APIs "RouteOptimization" and "SequenceOptimization". No matter whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Attention: this does not refer to PTV Optiflow SaaS and PTV Developer RouteOptimization Optiflow.
Post Reply
puissancei
Posts: 46
Joined: Wed Jul 05, 2017 10:27 am

maxDrivingPeriod

Post by puissancei »

Hello,

when I put value in StandardParams.restrictions.tourRestrictions.maxDrivingPeriod, xTour systematically returns me unplanned transports but the tour does not exceed the total driving time.

See attachement.

Can you tell me how it works ?
Attachments
xtour-server.log
(112.85 KiB) Downloaded 407 times
User avatar
Bernd Welter
Site Admin
Posts: 2703
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: maxDrivingPeriod

Post by Bernd Welter »

Hello Michel,

sure - the meaning of a constraint is to ensure that a value is not exceeded.
So I assume the question you have is more about "why is the driving time budget not used by almost 100%?", right?

The challenge for the server is of course to find combinations where the goal of a planning is pushed (e.g. depending on the GoalImportance specified in the improvement context: reduce number of unscheduled orders, reduce distance, ...).

Maybe you expect just one more of the unscheduled orders to be scheduled but this could mean to exceed the budget.

So another aspect is "why do orders remain unscheduled?" and this can be caused either by the restrictions (maybe another budget is almost fully utilized or the stop opening times are suboptimal or the vehicles operating times or insufficient skillsets at the vehicles).

The reponse in your logfile gives you some hints: Vehicles 94401/94402 can't add orderId 2000 to the tour because this would exceed the MAX_DRIVING_PERIOD_PER_TOUR set by you:

Code: Select all

<ns4:UnscheduledOrderAnalysisResult status="UNSCHEDULED_DUE_TO_VEHICLES" orderId="2000">
	<ns4:wrappedVehicleViolations>
		<ns4:VehicleViolations trainId="0" trailerId="0" vehicleId="94401">
			<ns4:wrappedViolations>
				<ns0:String>MAX_DRIVING_PERIOD_PER_TOUR</ns0:String>
			</ns4:wrappedViolations>
		</ns4:VehicleViolations>
		<ns4:VehicleViolations trainId="0" trailerId="0" vehicleId="94402">
			<ns4:wrappedViolations>
				<ns0:String>MAX_DRIVING_PERIOD_PER_TOUR</ns0:String>
			</ns4:wrappedViolations>
		</ns4:VehicleViolations>
	</ns4:wrappedVehicleViolations>
</ns4:UnscheduledOrderAnalysisResult>
Our algorithms will always return unviolated results (except for "input tours with violations" which will be mirrored). Sometimes there might be a better solution (e.g. if the orders near the depot are prioritized) which is the price you pay for a heuristic. An example of this effect is described in the following two threads:
https://xserver.ptvgroup.com/forum/view ... 402&p=1025
https://xserver.ptvgroup.com/forum/view ... 403&p=1030

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:
puissancei
Posts: 46
Joined: Wed Jul 05, 2017 10:27 am

Re: maxDrivingPeriod

Post by puissancei »

Hello Bernd,

I saw the log and the reason gave by xtour but the tour does not exceed 2 hours in total (first optim in log).
if I put maxDrivingPeriod = 10h nothing is planned.
User avatar
Bernd Welter
Site Admin
Posts: 2703
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: maxDrivingPeriod

Post by Bernd Welter »

Hello Michel,

the log contains

- request 01: no driving period restricted
- response 04 : all orders scheduled

- request 05 : maxDrivingPeriod="0" ??? :?
- response 07 : nothing planned

I don't understand the problem.
- without restriction we schedule everything
- with meaningless restriction we schedule nothing

That is what I would expect.

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:
puissancei
Posts: 46
Joined: Wed Jul 05, 2017 10:27 am

Re: maxDrivingPeriod

Post by puissancei »

Your post gave me the solution.

It's a bug in my program.

Really really sorry.

Thank you.
Post Reply