Skip to content

Commit d1734b2

Browse files
add rate_recurrence
1 parent 0ddfbd7 commit d1734b2

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

policy/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ An individual `Rule` object is defined by the following fields:
228228
| `minimum` | integer | Optional | Minimum value, if applicable (default 0) |
229229
| `maximum` | integer | Optional | Maximum value, if applicable (default unlimited) |
230230
| `rate_amount` | integer | Optional | The amount of a rate applied when this rule applies, if applicable (default zero). A positive integer rate amount represents a fee, while a negative integer represents a subsidy. Rate amounts are given in the `currency` defined in the [Policy](#policy). |
231+
| `rate_recurrence` | enum | Optional | Recurrence of the rate (see [Rate Recurrences](#rate-recurrences)) |
231232
| `start_time` | ISO 8601 time `hh:mm:ss` | Optional | Beginning time-of-day when the rule is in effect (default 00:00:00). |
232233
| `end_time` | ISO 8601 time `hh:mm:ss` | Optional | Ending time-of-day when the rule is in effect (default 23:59:59). |
233234
| `days` | day[] | Optional | Days `["sun", "mon", "tue", "wed", "thu", "fri", "sat"]` when the rule is in effect (default all) |
@@ -244,20 +245,25 @@ An individual `Rule` object is defined by the following fields:
244245
| `rate` | Fees or subsidies based on regions and time spent in one or more vehicle-states. Rule `rate_amount` refers to the rate in [Rule Units](#rule-units). |
245246
| `user` | Information for users, e.g. about helmet laws. Generally can't be enforced via events and telemetry. |
246247

248+
### Rate Recurrences
249+
250+
| Name | Description |
251+
| --------- | ------------------- |
252+
| `once` | Rule is applied exactly one time to vehicles entering a matching status from a non-matching status. |
253+
| `per_time_unit` | Rule is applied once for time_unit to vehicle entering in or remainining in a matching status. Requires a time_unit to be specified using `rule_units`. |
254+
| `each_time_unit` | Rule is applied for each time_unit to vehicles in the matching status. Requires a time_unit to be specified using `rule_units`. |
255+
256+
247257
### Rule Units
248-
Note that all rates are in the `currency` defined in the [Policy](#policy)
249258

250259
| Name | Description |
251260
| --------- | ------------------- |
252261
| `seconds` | Seconds |
253262
| `minutes` | Minutes |
254263
| `hours` | Hours |
264+
| `days` | Days |
255265
| `mph` | Miles per hour |
256266
| `kph` | Kilometers per hour |
257-
| `rate_per_event` | Rate applied once when the vehicle enters a matching status. |
258-
| `rate_per_minute` | Rate applied for each minute while the vehicle is in the matching status. |
259-
| `rate_per_hour` | Rate applied for each hour while the vehicle is in the matching status. |
260-
| `rate_per_day` | Rate applied once per day if the vehicle is in the matching status at any point. |
261267

262268
### Messages
263269

0 commit comments

Comments
 (0)