Repo

City Science's SATURN test model of the town of Exmouth in Devon.

rules.json 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. {
  2. "config": [
  3. {
  4. "categories": [
  5. {
  6. "conditions": [
  7. {
  8. "appliesTo": "every",
  9. "arg": 2,
  10. "field": "normal",
  11. "op": "equal",
  12. "select": "target.nlanes"
  13. },
  14. {
  15. "appliesTo": "every",
  16. "arg": 97,
  17. "field": "speed_ff",
  18. "op": "equal",
  19. "select": "target.speed_flow"
  20. },
  21. {
  22. "appliesTo": "every",
  23. "arg": 76,
  24. "field": "speed_cap",
  25. "op": "equal",
  26. "select": "target.speed_flow"
  27. }
  28. ],
  29. "name": "A Road 60mph"
  30. },
  31. {
  32. "conditions": [
  33. {
  34. "appliesTo": "every",
  35. "arg": 1,
  36. "field": "normal",
  37. "op": "equal",
  38. "select": "target.nlanes"
  39. },
  40. {
  41. "appliesTo": "every",
  42. "arg": 87,
  43. "field": "speed_ff",
  44. "op": "equal",
  45. "select": "target.speed_flow"
  46. },
  47. {
  48. "appliesTo": "every",
  49. "arg": 45,
  50. "field": "speed_cap",
  51. "op": "equal",
  52. "select": "target.speed_flow"
  53. }
  54. ],
  55. "name": "A Road 60mph"
  56. },
  57. {
  58. "conditions": [
  59. {
  60. "appliesTo": "every",
  61. "arg": 1,
  62. "field": "normal",
  63. "op": "ge",
  64. "select": "target.nlanes"
  65. },
  66. {
  67. "appliesTo": "every",
  68. "arg": 2,
  69. "field": "normal",
  70. "op": "le",
  71. "select": "target.nlanes"
  72. },
  73. {
  74. "appliesTo": "every",
  75. "arg": 80,
  76. "field": "speed_ff",
  77. "op": "equal",
  78. "select": "target.speed_flow"
  79. },
  80. {
  81. "appliesTo": "every",
  82. "arg": 61,
  83. "field": "speed_cap",
  84. "op": "equal",
  85. "select": "target.speed_flow"
  86. }
  87. ],
  88. "name": "A Road 50mph"
  89. },
  90. {
  91. "conditions": [
  92. {
  93. "appliesTo": "every",
  94. "arg": 1,
  95. "field": "normal",
  96. "op": "equal",
  97. "select": "target.nlanes"
  98. },
  99. {
  100. "appliesTo": "every",
  101. "arg": 64,
  102. "field": "speed_ff",
  103. "op": "equal",
  104. "select": "target.speed_flow"
  105. },
  106. {
  107. "appliesTo": "every",
  108. "arg": 25,
  109. "field": "speed_cap",
  110. "op": "equal",
  111. "select": "target.speed_flow"
  112. }
  113. ],
  114. "name": "A Road 40mph"
  115. },
  116. {
  117. "conditions": [
  118. {
  119. "appliesTo": "every",
  120. "arg": 2,
  121. "field": "normal",
  122. "op": "equal",
  123. "select": "target.nlanes"
  124. },
  125. {
  126. "appliesTo": "every",
  127. "arg": 64,
  128. "field": "speed_ff",
  129. "op": "equal",
  130. "select": "target.speed_flow"
  131. },
  132. {
  133. "appliesTo": "every",
  134. "arg": 35,
  135. "field": "speed_cap",
  136. "op": "equal",
  137. "select": "target.speed_flow"
  138. }
  139. ],
  140. "name": "A Road 40mph"
  141. },
  142. {
  143. "conditions": [
  144. {
  145. "appliesTo": "every",
  146. "arg": 1,
  147. "field": "normal",
  148. "op": "equal",
  149. "select": "target.nlanes"
  150. },
  151. {
  152. "appliesTo": "every",
  153. "arg": 45,
  154. "field": "speed_ff",
  155. "op": "equal",
  156. "select": "target.speed_flow"
  157. },
  158. {
  159. "appliesTo": "every",
  160. "arg": 25,
  161. "field": "speed_cap",
  162. "op": "equal",
  163. "select": "target.speed_flow"
  164. }
  165. ],
  166. "name": "A Road 30mph"
  167. },
  168. {
  169. "conditions": [
  170. {
  171. "appliesTo": "every",
  172. "arg": 1,
  173. "field": "normal",
  174. "op": "equal",
  175. "select": "target.nlanes"
  176. },
  177. {
  178. "appliesTo": "every",
  179. "arg": 87,
  180. "field": "speed_ff",
  181. "op": "equal",
  182. "select": "target.speed_flow"
  183. },
  184. {
  185. "appliesTo": "every",
  186. "arg": 45,
  187. "field": "speed_cap",
  188. "op": "equal",
  189. "select": "target.speed_flow"
  190. }
  191. ],
  192. "name": "B Road 60mph"
  193. },
  194. {
  195. "conditions": [
  196. {
  197. "appliesTo": "every",
  198. "arg": 1,
  199. "field": "normal",
  200. "op": "equal",
  201. "select": "target.nlanes"
  202. },
  203. {
  204. "appliesTo": "every",
  205. "arg": 78,
  206. "field": "speed_ff",
  207. "op": "equal",
  208. "select": "target.speed_flow"
  209. },
  210. {
  211. "appliesTo": "every",
  212. "arg": 45,
  213. "field": "speed_cap",
  214. "op": "equal",
  215. "select": "target.speed_flow"
  216. }
  217. ],
  218. "name": "B Road 50mph"
  219. },
  220. {
  221. "conditions": [
  222. {
  223. "appliesTo": "every",
  224. "arg": 1,
  225. "field": "normal",
  226. "op": "equal",
  227. "select": "target.nlanes"
  228. },
  229. {
  230. "appliesTo": "every",
  231. "arg": 61,
  232. "field": "speed_ff",
  233. "op": "equal",
  234. "select": "target.speed_flow"
  235. },
  236. {
  237. "appliesTo": "every",
  238. "arg": 25,
  239. "field": "speed_cap",
  240. "op": "equal",
  241. "select": "target.speed_flow"
  242. }
  243. ],
  244. "name": "B Road 40mph"
  245. },
  246. {
  247. "conditions": [
  248. {
  249. "appliesTo": "every",
  250. "arg": 1,
  251. "field": "normal",
  252. "op": "equal",
  253. "select": "target.nlanes"
  254. },
  255. {
  256. "appliesTo": "every",
  257. "arg": 47,
  258. "field": "speed_ff",
  259. "op": "equal",
  260. "select": "target.speed_flow"
  261. },
  262. {
  263. "appliesTo": "every",
  264. "arg": 30,
  265. "field": "speed_cap",
  266. "op": "equal",
  267. "select": "target.speed_flow"
  268. }
  269. ],
  270. "name": "B Road 30mph"
  271. },
  272. {
  273. "conditions": [
  274. {
  275. "appliesTo": "every",
  276. "arg": 2,
  277. "field": "normal",
  278. "op": "equal",
  279. "select": "target.nlanes"
  280. },
  281. {
  282. "appliesTo": "every",
  283. "arg": 104,
  284. "field": "speed_ff",
  285. "op": "equal",
  286. "select": "target.speed_flow"
  287. },
  288. {
  289. "appliesTo": "every",
  290. "arg": 77,
  291. "field": "speed_cap",
  292. "op": "equal",
  293. "select": "target.speed_flow"
  294. }
  295. ],
  296. "name": "Motorway D2M"
  297. },
  298. {
  299. "conditions": [
  300. {
  301. "appliesTo": "every",
  302. "arg": 3,
  303. "field": "normal",
  304. "op": "equal",
  305. "select": "target.nlanes"
  306. },
  307. {
  308. "appliesTo": "every",
  309. "arg": 109,
  310. "field": "speed_ff",
  311. "op": "equal",
  312. "select": "target.speed_flow"
  313. },
  314. {
  315. "appliesTo": "every",
  316. "arg": 83,
  317. "field": "speed_cap",
  318. "op": "equal",
  319. "select": "target.speed_flow"
  320. }
  321. ],
  322. "name": "Motorway D3M"
  323. },
  324. {
  325. "conditions": [
  326. {
  327. "appliesTo": "every",
  328. "arg": 4,
  329. "field": "normal",
  330. "op": "equal",
  331. "select": "target.nlanes"
  332. },
  333. {
  334. "appliesTo": "every",
  335. "arg": 109,
  336. "field": "speed_ff",
  337. "op": "equal",
  338. "select": "target.speed_flow"
  339. },
  340. {
  341. "appliesTo": "every",
  342. "arg": 83,
  343. "field": "speed_cap",
  344. "op": "equal",
  345. "select": "target.speed_flow"
  346. }
  347. ],
  348. "name": "Motorway D4M"
  349. }
  350. ],
  351. "rules": [
  352. {
  353. "category": "motorway",
  354. "conditions": [
  355. {
  356. "arg": 110,
  357. "field": "speed",
  358. "op": "gt"
  359. }
  360. ],
  361. "message": "Motorway speed should be more than 110 km/hr",
  362. "severity": "warning"
  363. },
  364. {
  365. "category": "flared link",
  366. "conditions": [
  367. {
  368. "arg": 500,
  369. "field": "distance",
  370. "op": "gt"
  371. }
  372. ],
  373. "message": "Flared links should be at least 500m long",
  374. "severity": "warning"
  375. }
  376. ],
  377. "type": "links"
  378. },
  379. {
  380. "categories": [
  381. {
  382. "conditions": [
  383. {
  384. "arg": [
  385. 5,
  386. 2
  387. ],
  388. "field": "jtype",
  389. "op": "in"
  390. },
  391. {
  392. "arg": 5,
  393. "field": "roundabout.jcir",
  394. "op": "lt"
  395. }
  396. ],
  397. "name": "mini-roundabout"
  398. },
  399. {
  400. "conditions": [
  401. {
  402. "arg": [
  403. 5,
  404. 2
  405. ],
  406. "field": "jtype",
  407. "op": "in"
  408. },
  409. {
  410. "arg": [
  411. 5,
  412. 10
  413. ],
  414. "field": "roundabout.jcir",
  415. "op": "between"
  416. },
  417. {
  418. "arg": 2,
  419. "field": "nlanes.normal",
  420. "op": "lt",
  421. "select": "target.links"
  422. }
  423. ],
  424. "name": "medium-roundabout"
  425. },
  426. {
  427. "conditions": [
  428. {
  429. "arg": 5,
  430. "field": "jtype",
  431. "op": "equal"
  432. },
  433. {
  434. "arg": 1,
  435. "field": "nlanes.normal",
  436. "op": "gt",
  437. "select": "target.links"
  438. }
  439. ],
  440. "name": "big-roundabout"
  441. }
  442. ],
  443. "rules": [],
  444. "type": "nodes"
  445. },
  446. {
  447. "categories": [
  448. {
  449. "conditions": [
  450. {
  451. "arg": "priority",
  452. "field": "model",
  453. "op": "eq",
  454. "select": "target.bnode"
  455. }
  456. ],
  457. "name": "priority"
  458. }
  459. ],
  460. "rules": [],
  461. "type": "turns"
  462. },
  463. {
  464. "categories": [
  465. {
  466. "conditions": [
  467. {
  468. "appliesTo": "some",
  469. "arg": [
  470. "external_node"
  471. ],
  472. "field": "type",
  473. "op": "in",
  474. "select": "[target.anode, target.bnode]"
  475. }
  476. ],
  477. "name": "externals"
  478. }
  479. ],
  480. "rules": [
  481. {
  482. "category": "all",
  483. "conditions": [
  484. {
  485. "arg": [
  486. "zone",
  487. "external_node",
  488. "buffer"
  489. ],
  490. "field": "type",
  491. "op": "in",
  492. "select": "[target.anode, target.bnode]"
  493. }
  494. ],
  495. "message": "Centroids connectors only connect zones to externals",
  496. "severity": "error"
  497. }
  498. ],
  499. "type": "connectors"
  500. }
  501. ]
  502. }