mobility-data-specification
mobility-data-specification copied to clipboard
Feature: Limit rules for to a particular duration
Motivation
There are restrictions to usage of public curb which vary over the year. E. g. in Germany, there is the famous Oktoberfest (which we'll be assuming to happen in October during the course of this issue, though it's not ;) ). Currently, the policy features the ability to be limited to a particular duration. However, the rule inside a policy does not. Therefore, if an agency currently wants to publish special set of rules which will be valid starting and ending within an already known timeframe, the agency needs to
- terminate the current policy before start of the additional rules
- create a new policy which includes the additional rules at the very top
- re-install the original policy after the end of the period
This is error prone, hard to visualize on a UI and tricky for operators.
Solution proposal
The rule could feature a duration property as per ISO_8601. This would not only allow to define a duration, but also recurring intervals.
Adding the duration to the rule of the same policy does not largely increase complexity as it is only respected during auditing.
Is this a breaking change
This is not breaking in the sense of technical breaking changes. However, those new restrictions to a rule would create effort at the provider's end => a major version bump is probably necessary.
Impacted Spec
For which spec is this feature being requested?
policy
Describe alternatives you've considered
Another option was to add a relationship between policies (e. g. "this special policy extends the following one"). If a rule from a special policy is applicable, the rules of the extended policy would not be evaluated. However, this idea was discarded as it introduces a new level of complexity.
/cc @marie-x @avatarneil
In CDS there's the concept of Policy priority which could be a way forward given #731
Moving to a future release so we can review a PR once created.