TrueWay VRP

ÜCRETSİZ PREMIUM
Verified
Taraf TrueWay Team | Güncelleyen 4 days ago | Logistics
Popülerlik

8.9 / 10

Gecikme

1,102ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

Time Windows

Rapid account: Andytabrizi
andytabrizi
2 years ago

Hello,

In the Tutorials I see an example that has
"time_windows": [{“earliest”: 900, “latest”: 1500}, {“earliest”: 2100, “latest”: 3600}],

In the About documentation I see that “time” is in seconds.
But for this example that does not make sense to me as the windows are to short.

Is Time just a a “fixed” unit? Meaning it is as we defined it in the call?
So if I wanted to use say “days” as my time window

I might then have 365 days for my year
And pass in windows that are
[{“earliest”: 0, “latest”: 100}, {“earliest”: 200, “latest”: 300}]

To define a window of deliver for the first 100 days and then the 200th to 300th day of my ‘year’ as I define it?

Trying to understand how time windows work

Thanks,
Evan

Rapid account: Trueway
trueway Commented 2 years ago

As I wrote above, The time can be set both in seconds from the starting(from 0), and as absolute time (unix timestamp). It is recognized automatically. Time is considered absolute(unix timestamp) if the value > 1590000000.

Rapid account: Trueway
trueway Commented 2 years ago

The time can be set both in seconds from the starting(from 0), and as absolute time (unix timestamp).
For example:
“time_windows”: [{“earliest”: 900, “latest”: 1500}, {“earliest”: 2100, “latest”: 3600}]
This means that a visit to this location is only allowed between 15 minutes (900 seconds) and 25 minutes (1500 seconds) or between 35 minutes (2100 seconds) and 1 hour (3600 seconds) from the start.
If you want to set the time in time windows in days, you can simply multiply the number of days by the number of seconds in a day (86400).
Then instead:
[{“earliest”: 0, “latest”: 100}, {“earliest”: 200, “latest”: 300}]
you must specify:
[{“earliest”: 0, “latest”: 8640000}, {“earliest”: 17280000, “latest”: 25920000}]
You can also set absolute time (unix timestamp - seconds since Jan 01 1970, UTC). For example, for an interval from <Jul 18 2022 11:46:54> to <Jul 18 2022 12:35:49>:
[{“earliest”: 1658144814, “latest”: 1658147749}]

Regards

Rapid account: Andytabrizi
andytabrizi Commented 2 years ago

Looks like I could use unix time stamps here - can I see an example of that? I guess that would also work. Thus https://www.unixtimestamp.com/

would make me think big number in seconds, ok yeah that must be what is going on.
Thus now is
1658142786

as
SECONDS SINCE JAN 01 1970. (UTC)

Still, why do all the examples have such a “low number” for the number of seconds.

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun