Proposal: Adopt policy rate structure from CDS
@jiffyclub ci sta già lavorando.
Dal 30/8/2024.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend-api-design
Direzione di ricerca
Inizia esaminando la specifica della policy interessata e confrontando la sua struttura delle regole con la regola CDS collegata e le definizioni delle tariffe. Controlla la discussione in #662 e la cronologia della pull request collegata #817; il lavoro sarà completato quando saranno risolte le implicazioni del breaking change della proposta e la direzione finale dello schema della policy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
In MDS at the moment, if you have a tiered parking fees policy (e.g. $10 / hour for the first hour, $5 / hour for hours 2 - 5, $3 / hour for hours 6 onward) you have to create multiple rules in your policy for each of those different time ranges (see examples). This has the weird of effect of making it so that different rules in the policy match the same time and space only for the purpose of describing what happens based on the duration of the event.
Describe the solution you'd like
I think it's more understandable to be able to have a single rule that matches an event and to be able to reference the monetary consequence for that from the one rule instead of it depending on aggregating monetary consequences from multiple other rules. Indeed, that's what CDS does, allowing a rule to contain an array of rates so that it's the different rate objects that apply to different parts of the event instead of different rules. When evaluating the policy you can find that an event (or portion of an event) matches the rule and directly reference the rate structure to find the monetary consequence of that match.
My proposal is that MDS adopt the Rate object from CDS and allow rules of any type to contain an array of Rates, the same way that CDS does. Even outside of my specific complaint about tiered pricing structures in MDS, I think it'd be best if MDS and CDS had the same structures around this to make it easier to evaluate policies in both MDS and CDS. (This also ties into #662, I think we should remove the "rate" rule type and allow attaching rates to any rule.)
Is this a breaking change
- Yes, breaking
Impacted Spec
policy
Describe alternatives you've considered
None
Additional context
None
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 753
- Fork
- 255
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openmobilityfoundation/mobility-data-specification
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
openmobilityfoundation/mobility-data-specification#994 · 4 reazioni ·
-
Policy
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
openmobilityfoundation/mobility-data-specification#996 · 1 reazione ·
-
Move Provider/Agency List out of MDS repoForse di nuovo libera @schnuerle l’ha presa 37 giorni fa e non c’è nessuna pull request aperta. Apertaidentifier change
openmobilityfoundation/mobility-data-specification#995 · 1 assegnatario ·
-
Agency Provider
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
openmobilityfoundation/mobility-data-specification#993 · 1 commento ·
-
Agency Delivery Policy Provider
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di openmobilityfoundation/mobility-data-specification
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
G-nn-r/lg_heatpump#52 ·
-
area: core bug priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
griffinwork40/agent-afk#4872 ·
I maintainer di solito rispondono entro 1 giorno
-
fleet size/m
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sipyourdrink-ltd/bernstein#7517 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
BUG-MERGE-TO-HDR-RESULT-NAMEForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
storytold/photocraft#14025 ·
I maintainer di solito rispondono entro 1 giorno