Supporting units of time with varying durations #77
Replies: 8 comments 13 replies
-
@schnuerle brought up a good point: How are we handling this in MDS? Is there an analogous use case that we could learn from? Or, as @schnuerle hinted at, is this a problem that is unique to curb usage? |
Beta Was this translation helpful? Give feedback.
-
I added a new field here called "rate_unit_period". I think this can get at the solution. Let me know your thoughts. I feel like I may be missing something though. |
Beta Was this translation helpful? Give feedback.
-
Would |
Beta Was this translation helpful? Give feedback.
-
If |
Beta Was this translation helpful? Give feedback.
-
I would spell out exactly what fields from |
Beta Was this translation helpful? Give feedback.
-
I've got a new pass at this solution that I feel good about. Please review today if you can, especially @zanebclark. It clarifies how rate_unit_period works, and provides a link to an example in code. Please review example too. I had added some language about how 'calendar' only typically works for units a week or larger, but really they can work for smaller units. Like in the example I created, it can apply to all day parking, where you pay a flat fee for the day regardless of when you start parking that day. Same could happen with an hour time slot, eg, you pay for only from when you start to the start of the next hour to allow turn over or reservations maybe. Note too that even though 'calendar' the word isn't exactly right for units an hour or less since they are less than a calendar day, I think the term still applies and I could not find a more generic term that applies to all time units. |
Beta Was this translation helpful? Give feedback.
-
@schnuerle I like how this flows. I do have one question/concern, would this be able to incorporate an extension of your parking? Say you park for 2 hours but can now add on another 2 hours after that. |
Beta Was this translation helpful? Give feedback.
-
Here is the latest conversations about this inline with the code: And where the latest changes are for you all to review in the large description for https://github.com/openmobilityfoundation/curb-data-specification/tree/release-1.0.0/curbs#rate |
Beta Was this translation helpful? Give feedback.
-
@michael-danko-passport brought up a good point around the discussion of #72. What is a
month
,quarter
, oryear
? All three of these units of time differ in duration from one unit to the next. How do we address this on the backend? It seems as though there's value in allowing for such a unit of time. @HenryEspinosa talked about selling permits on the basis of a month. His organization would also need to define the wordmonth
at the time of sale. Is it a "rolling" month (e.g. from the 17th of one month to the 17th of the next month), a calendar month, or something else entirely?Proposals (not mutually exclusive):
month
and supportrolling_month
andcalendar_month
. Forrolling_month
, the start of the month-long period would be determined by the Policytime_span
.start_date
or the smallest value in thedays_of_month
array (or require a single day of month in thedays_of_month
array). Forcalendar_month
, we could use only the month of the Policytime_span
.start_date
or the first month to occur in themonths
array (or require a single month in themonths
array). This gets a bit complex.Rate
is defined asminute
orhour
, it's pretty clear that we expect this rate to start and stop automatically as specificuser_classes
park. In the case of @HenryEspinosa's permit example, there is a pre-arranged party with a pre-arranged timeframe and a pre-arranged rate that (correct me if I'm wrong, @HenryEspinosa) is expressed as a lump sum. We could introduce arate_unit
enum that is intended to reflect a lump sum. For example,fixed
. The rate for the permit (in this example) would be expressed as a lump sum and would expire per the terms of the Policytime_span
Beta Was this translation helpful? Give feedback.
All reactions