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

Enhance model validation with maximum time horizon check #77

Merged

Conversation

merschformann
Copy link
Member

@merschformann merschformann commented Dec 9, 2024

Description

Warning

The check for maximum time horizon is technically breaking. The default configured maximum of 1 month (30 days) should not reject any inputs, as the validation only means to detect erroneous inputs.
However, if you are using nextroute for inputs > 1 month planning horizon, we urge you to configure -model.properties.maximumtimehorizon (given in int seconds) to a sufficiently large value. E.g., set it to 5184000 (60 * 24 * 60 * 60), if planning in a 60 day time horizon.

Important

The limit was bumped to 6 months in a follow-up PR to mitigate impact on existing use-cases (#79 ).

Introduced a new option to specify a maximum time horizon for models and added validation to ensure the input data adheres to this constraint.

Changes

  • Added MaximumTimeHorizon option in model.go to specify the maximum time horizon for the model.
    • Configure via the -model.properties.maximumtimehorizon option.
    • Value expected in seconds.
    • Default value is 2592000s / 30 days.
  • Implemented validateTimeHorizon function in validate.go to check if the input data's time horizon exceeds the specified maximum.
  • Modified validate function to include the time horizon validation step.

@merschformann merschformann merged commit ae8e297 into develop Dec 10, 2024
33 checks passed
@merschformann merschformann deleted the feature/eng-5613-limit-maximum-time-horizon-in-nextroute branch December 10, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants