Repo

Browse Source

Add rules.json file to exmouth

Used in the classify page and currently added via the cached-data
mechanism, this file is likely to be modified and persisted
in the future. Moving to exmouth so the cadence cached-data
mechanism can be reduced to prevent it being overwritten.
master^2
Ed Campbell 1 month ago
parent
commit
e3c31d3d17
2 changed files with 505 additions and 0 deletions
  1. 502
    0
      rules.json
  2. 3
    0
      stats-config.json

+ 502
- 0
rules.json View File

@@ -0,0 +1,502 @@
{
"config": [
{
"categories": [
{
"conditions": [
{
"appliesTo": "every",
"arg": 2,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 97,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 76,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 60mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 87,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 45,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 60mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "ge",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 2,
"field": "normal",
"op": "le",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 80,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 61,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 50mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 64,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 25,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 40mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 2,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 64,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 35,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 40mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 45,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 25,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "A Road 30mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 87,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 45,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "B Road 60mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 78,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 45,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "B Road 50mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 61,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 25,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "B Road 40mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 1,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 47,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 30,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "B Road 30mph"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 2,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 104,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 77,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "Motorway D2M"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 3,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 109,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 83,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "Motorway D3M"
},
{
"conditions": [
{
"appliesTo": "every",
"arg": 4,
"field": "normal",
"op": "equal",
"select": "target.nlanes"
},
{
"appliesTo": "every",
"arg": 109,
"field": "speed_ff",
"op": "equal",
"select": "target.speed_flow"
},
{
"appliesTo": "every",
"arg": 83,
"field": "speed_cap",
"op": "equal",
"select": "target.speed_flow"
}
],
"name": "Motorway D4M"
}
],
"rules": [
{
"category": "motorway",
"conditions": [
{
"arg": 110,
"field": "speed",
"op": "gt"
}
],
"message": "Motorway speed should be more than 110 km/hr",
"severity": "warning"
},
{
"category": "flared link",
"conditions": [
{
"arg": 500,
"field": "distance",
"op": "gt"
}
],
"message": "Flared links should be at least 500m long",
"severity": "warning"
}
],
"type": "links"
},
{
"categories": [
{
"conditions": [
{
"arg": [
5,
2
],
"field": "jtype",
"op": "in"
},
{
"arg": 5,
"field": "roundabout.jcir",
"op": "lt"
}
],
"name": "mini-roundabout"
},
{
"conditions": [
{
"arg": [
5,
2
],
"field": "jtype",
"op": "in"
},
{
"arg": [
5,
10
],
"field": "roundabout.jcir",
"op": "between"
},
{
"arg": 2,
"field": "nlanes.normal",
"op": "lt",
"select": "target.links"
}
],
"name": "medium-roundabout"
},
{
"conditions": [
{
"arg": 5,
"field": "jtype",
"op": "equal"
},
{
"arg": 1,
"field": "nlanes.normal",
"op": "gt",
"select": "target.links"
}
],
"name": "big-roundabout"
}
],
"rules": [],
"type": "nodes"
},
{
"categories": [
{
"conditions": [
{
"arg": "priority",
"field": "model",
"op": "eq",
"select": "target.bnode"
}
],
"name": "priority"
}
],
"rules": [],
"type": "turns"
},
{
"categories": [
{
"conditions": [
{
"appliesTo": "some",
"arg": [
"external_node"
],
"field": "type",
"op": "in",
"select": "[target.anode, target.bnode]"
}
],
"name": "externals"
}
],
"rules": [
{
"category": "all",
"conditions": [
{
"arg": [
"zone",
"external_node",
"buffer"
],
"field": "type",
"op": "in",
"select": "[target.anode, target.bnode]"
}
],
"message": "Centroids connectors only connect zones to externals",
"severity": "error"
}
],
"type": "connectors"
}
]
}

+ 3
- 0
stats-config.json View File

@@ -3,6 +3,9 @@
"output_comparison": {
"cached": "output_comparison.json"
},
"rules": {
"cached": "rules.json"
},
"demand": {
"file": "ExmouthRandMatrix.UFM",
"args": {"filetype": "ufm", "userclasses": ["car"]}

Loading…
Cancel
Save