Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time and date #17

Closed
michaeldouble07 opened this issue Mar 28, 2022 · 4 comments
Closed

Time and date #17

michaeldouble07 opened this issue Mar 28, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@michaeldouble07
Copy link

Hi, is there a way to put in time_of_day or some kind of day and time for the origins? Such as a Wednesday at 8 pm, or using Unix time converted to milliseconds?

@mmorang
Copy link
Collaborator

mmorang commented Mar 28, 2022

Yes, definitely. You can set the time of day for the OD Cost Matrix, which will be interpreted as the start time for all origins.

If you just want to hard-code something for your specific analysis, you can change it in the od_config.py file:
image

Use a datetime.datetime(). You can set a specific date, or you can specify a generic weekday or "today." For one of these generic weekdays, you have to use our special reserved dates in 1899/1900. I just noticed that those are not documented in the solver object documentation (something I will fix for the next release), but the list of those dates is included in the Make OD Cost Matrix Analysis Layer documentation for the time_of_day parameter and is the same.
image

If you want to make it a user parameter, you will need to add a parameter to the script tool definition and pass it all the way through the stack like how it's already done for travel mode, cutoff, and number of destinations to find.

Setting a time of day will not have an impact on the OD Cost Matrix results unless the impedance attribute being used has some time-dependent properties, for example, if you're using traffic or public transit data.

@michaeldouble07
Copy link
Author

Thanks for the info, but is it possible for you to add this feature, so that we can change the time with the tool? I would be using this for using the traffic data, that is why I would need it. I would greatly appreciate if you could add this change. I have no experience with creating tool's, that is why I am asking.

@mmorang
Copy link
Collaborator

mmorang commented Mar 28, 2022

I'll see what I can do.

@mmorang
Copy link
Collaborator

mmorang commented Mar 29, 2022

Okay, the tool code has been updated to expose time of day as a user parameter. You can download the update from https://github.com/Esri/large-network-analysis-tools/releases/ or clone the repo.

@mmorang mmorang closed this as completed Mar 29, 2022
@mmorang mmorang added the enhancement New feature or request label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants