Skip to content

Commit e2d79ee

Browse files
authored
Updating rule types/units, example link
1 parent a698b85 commit e2d79ee

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

policy/README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Versioning must be implemented as specified in the [Versioning section][versioni
3737

3838
## Background
3939

40-
The goal of this specification is to enable Agencies to create, revise, and publish machine-readable policies, as sets of rules for individual and collective device behavior exhibited by both _mobility as a service_ Providers and riders / users. Examples of policies include:
40+
The goal of this specification is to enable Agencies to create, revise, and publish machine-readable policies, as sets of rules for individual and collective device behavior exhibited by both _mobility as a service_ Providers and riders / users. [Examples](examples.md) of policies include:
4141

4242
- City-wide and localized caps (e.g. "Minimum 500 and maximum 3000 scooters within city boundaries")
4343
- Exclusion zones (e.g. "No scooters are permitted in this district on weekends")
@@ -48,6 +48,8 @@ The goal of this specification is to enable Agencies to create, revise, and publ
4848

4949
The machine-readable format allows Providers to obtain policies and compute compliance where it can be determined entirely by data obtained internally.
5050

51+
**See the [Policy Examples](examples.md) for ways these can be implemented.**
52+
5153
[Top][toc]
5254

5355
## Distribution
@@ -224,7 +226,7 @@ An individual `Rule` object is defined by the following fields:
224226
| `rule_type` | enum | Required | Type of policy (see [Rule Types](#rule-types)) |
225227
| `geographies` | UUID[] | Required | List of Geography UUIDs (non-overlapping) specifying the covered geography |
226228
| `states` | `{ state: event[] }` | Required | [Vehicle state][vehicle-states] to which this rule applies. Optionally provide a list of specific [vehicle events][#vehicle-events] as a subset of a given status for the rule to apply to. An empty list or `null`/absent defaults to "all". |
227-
| `rule_units` | enum | Optional | Measured units of policy (see [Rule Units](#rule-units)) |
229+
| `rule_units` | enum | Required | Measured units of policy (see [Rule Units](#rule-units)) |
228230
| `vehicle_types` | `vehicle_type[]` | Optional | Applicable vehicle types, default "all". |
229231
| `propulsion_types` | `propulsion_type[]` | Optional | Applicable vehicle [propulsion types][propulsion-types], default "all". |
230232
| `minimum` | integer | Optional | Minimum value, if applicable (default 0) |
@@ -243,24 +245,26 @@ An individual `Rule` object is defined by the following fields:
243245

244246
| Name | Description |
245247
| ------- | ------------------------------------------------------------------------------------------------------------- |
246-
| `count` | Fleet counts based on regions. Rule `max`/`min` refers to number of devices. |
248+
| `count` | Fleet counts based on regions. Rule `max`/`min` refers to number of devices in [Rule Units](#rule-units). |
247249
| `time` | Individual limitations on time spent in one or more vehicle-states. Rule `max`/`min` refers to increments of time in [Rule Units](#rule-units). |
248250
| `speed` | Global or local speed limits. Rule `max`/`min` refers to speed in [Rule Units](#rule-units). |
249-
| `rate` | **[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0). Fees or subsidies based on regions and time spent in one or more vehicle-states. Rule `rate_amount` refers to the rate charged according to the [Rate Recurrence](#rate_recurrence). Agencies and Providers must agree on terms of use prior to utilizing the `rate` rule type. |
251+
| `rate` | **[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0). Fees or subsidies based on regions and time spent in one or more vehicle-states. Rule `rate_amount` refers to the rate charged according to the [Rate Recurrences](#rate_recurrences) and the [currency requirements](/general-information.md#costs-and-currencies) in [Rule Units](#rule-units). As this is a beta feature, agencies are strongly advised to consult with providers about how they intended to use the `rate` rule prior to implementation. |
250252
| `user` | Information for users, e.g. about helmet laws. Generally can't be enforced via events and telemetry. |
251253

252254
[Top][toc]
253255

254256
### Rule Units
255257

256-
| Name | Description |
257-
| --------- | ------------------- |
258-
| `seconds` | Seconds |
259-
| `minutes` | Minutes |
260-
| `hours` | Hours |
261-
| `days` | Days |
262-
| `mph` | Miles per hour |
263-
| `kph` | Kilometers per hour |
258+
| Name | Rule Types | Description |
259+
| --------- | -------------- | ------------------- |
260+
| `seconds` | `time` | Seconds |
261+
| `minutes` | `time` | Minutes |
262+
| `hours` | `time` | Hours |
263+
| `days` | `time` | Days |
264+
| `mph` | `speed` | Miles per hour |
265+
| `kph` | `speed` | Kilometers per hour |
266+
| `devices` | `count` | Devices |
267+
| `amount` | `rate` | Cost (in [local currency](/general-information.md#costs-and-currencies)) |
264268

265269
[Top][toc]
266270

0 commit comments

Comments
 (0)