Question: Ordering of fleet-related policies

Aperta
#771 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Inizia dalla sezione “order of operations” della specifica della policy e dal comportamento delle regole di conteggio descritto in questo issue. Esamina la documentazione e la discussione circostanti sulla policy per determinare se più regole di conteggio vengono valutate in modo indipendente; il lavoro è completato quando la specifica definisce chiaramente la gestione prevista e il relativo impatto sulla compatibilità.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Policy
Need for clarification

in the policy spec, it is quite clearly described that ordering of rules within a policy is used to model precedence of one rule over the other.
While this is comparatively easy to understand for policies addressing an individual device (time and speed rules), this is not intuitive for policies addressing an operators fleet (count): If a policy defines two rules, providers can violate both with the same fleet at the same time – and I'd expect both violations to be reported.

A quick example (illustrative):

      {
        "name": "Mobility Caps: Company 1",
        "description": "Caps for Company 1, year 2023",
        "policy_id": "1",
        "provider_ids": ["1"],
        "rules": [
          {
            "name": "Prevent down town being overloaded",
            "rule_id": "8a61de66-d9fa-4cba-a38d-5d948e2373fe",
            "rule_type": "count",
            "rule_units": "devices",
            "geographies": [
              "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14"
            ],
            "vehicle_types": [
              "bicycle",
              "scooter"
            ],
            "maximum": 2000
          },
          {
            "name": "Ensure fair competition within the operational area",
            "rule_id": "57d47e74-6aef-4f41-b0c5-79bb35aa5b9d",
            "rule_type": "count",
            "rule_units": "devices",
            "geographies": [
              "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49"
            ],
            "vehicle_types": [
              "bicycle",
              "scooter"
            ],
            "maximum": 4000
          }
        ]
      }

Although a provider may comply to the first rule and not flood down town with vehicles, there could still be too many devices within the whole district.

Describe the solution you'd like

I'd expect all rules with type count to be evaluated within a policy – and not interrupt the assessment after the first match.

Is this a breaking change

Currently, there is no explicit information about handling count-based policies/rules, but there is general precedence included in the spec, so I'd judge this

  • Yes, breaking
Impacted Spec

For which spec is this feature being requested?

  • policy
Describe alternatives you've considered

We could also split up count rules into own policies. However, this would make it more tricky to lifecycle them: They could have different dates as well as the need to be published individually.

Lingua principale
Nessun dato sulla lingua
Stelle
753
Fork
255
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openmobilityfoundation/mobility-data-specification

Tutte le issue di openmobilityfoundation/mobility-data-specification

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.