Intervals: Consistent reference point in time

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
otsjw
Posts: 11
Joined: Thu Aug 11, 2016 6:05 am
Location: Essex, United Kingdom
Contact:

Intervals: Consistent reference point in time

Post by otsjw »

I understand the intervals are “A time window specified by start time and end time. The attributes must be specified in [sec] from a consistent reference point in time on (for example 0:00 next day or 0:00 1 January 1970).”…but where exactly is ‘the consistent reference point in time’ specified? Do we set that in the server, in our call, or do we not set it at all?

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

Re: Intervals: Consistent reference point in time

Post by Bernd Welter »

Hello Joe,

good question: it's all in your brain... YOU can decide which point in time is the context of the planning call.
E.g.
  • 1.1.1970, 00:00
  • midnight of the current planning week
  • 14.2.2017 = valentine's day
Based on this REFERENCE datetime choosen by you you have to calculate the intervals based on datetime functions.
Important to understand is just that each timestamp statement in the response refers to the same REFERENCE datetime used in the input. So no matter which date you use: just be aware of the context.

I hope the screenshot here demonstrates what I meant.
Three different reference dates - all produce same result ;-)
Three different reference dates - all produce same result ;-)
You can then store your reference date somewhere in your applications configuration and read it within the programm. Or you store it in the database as a CONST each application has to refer to. While you execute the programm and planning calls you have to know 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:
Post Reply