mobility-data-specification
mobility-data-specification copied to clipboard
Specify rules for different time intervals than weekly
If I want to express a policy / rule, that, for example, parking is prohibited every 3rd Wednesday each month (because there might be a market, for example), how could that be done?
Another example would be to prohibit parking on the 15th of each month.
The current spec allow to define a weekday and a time interval, which doesn't allow these cases.
Impacted Spec
policy
In cases like these, you would write individual Policy items for each day that is affected. For a monthly event, you could cover a year in advance with twelve Policies. Or if you prefer to have only one related Policy at a time, each month you would obsolete the prior Policy for the 15th of this month with the 15th of next month. It is more verbose than a single Policy, but it means that we are not adding the complexities of a full calendar application. You can also put a human-readable description in the description field.
The ability to express such nuance as a Policy author can be embodied in an editor application which hides the JSON details from the user. I believe Ride Report has one, and others are in development.
So this is currently possible with Policy. Does it need an implementation example in the spec? Or does the spec need to change to make this clearer/easier? Now would be a good time for either as we are working on Policy changes for MDS 2.0.
Thanks for the answer, @marie-x, and your question, @schnuerle. In fact, a clarification in the spec could help to understand how to handle those cases. An actual example could be a little too verbose due to the number of policies needed.
But wouldn't a new version of the spec be a good time for adding some more fields to make this easier? I can imagine to add a kind of 'multiplier', so that one could make the rule repeat all, for example, 2 weeks. This would not quite cover my example from the first post, but would handle at least those cases when an event occurs in a regular interval. If we would add a selection for 'day', 'week' and 'month', it would be possible to define 'every 3rd Wednesday', which is quite near to my initial question.