github.com/hzck/speedroute@v0.0.0-20201115191102-403b7d0e443f/algorithm/tests/complex/three_nodes_visited_requirement.json (about) 1 { 2 "name": "Three nodes visited requirement", 3 "description": "Example graph where three nodes other than START and END has to be visited before collecting a required reward needed to get to END.", 4 "testing": "Node count functionality and required reward.", 5 "visual": "TODO", 6 "rewards": [ 7 { 8 "id": "REQUIRED_NODE" 9 }, 10 { 11 "id": "NODES_VISITED_COUNT" 12 } 13 ], 14 "nodes": [ 15 { 16 "id": "START" 17 }, 18 { 19 "id": "END" 20 }, 21 { 22 "id": "1", 23 "rewards": [ 24 { 25 "rewardId": "NODES_VISITED_COUNT" 26 } 27 ] 28 }, 29 { 30 "id": "2", 31 "rewards": [ 32 { 33 "rewardId": "NODES_VISITED_COUNT" 34 } 35 ] 36 }, 37 { 38 "id": "3", 39 "rewards": [ 40 { 41 "rewardId": "NODES_VISITED_COUNT" 42 } 43 ] 44 }, 45 { 46 "id": "4", 47 "rewards": [ 48 { 49 "rewardId": "NODES_VISITED_COUNT" 50 }, 51 { 52 "rewardId": "REQUIRED_NODE" 53 } 54 ] 55 }, 56 { 57 "id": "5", 58 "rewards": [ 59 { 60 "rewardId": "NODES_VISITED_COUNT" 61 } 62 ] 63 }, 64 { 65 "id": "6", 66 "rewards": [ 67 { 68 "rewardId": "NODES_VISITED_COUNT" 69 } 70 ] 71 } 72 ], 73 "edges": [ 74 { 75 "from": "START", 76 "to": "1", 77 "weights": [ 78 { 79 "time": "1" 80 } 81 ] 82 }, 83 { 84 "from": "1", 85 "to": "START", 86 "weights": [ 87 { 88 "time": "1" 89 } 90 ] 91 }, 92 { 93 "from": "START", 94 "to": "2", 95 "weights": [ 96 { 97 "time": "2" 98 } 99 ] 100 }, 101 { 102 "from": "2", 103 "to": "START", 104 "weights": [ 105 { 106 "time": "2" 107 } 108 ] 109 }, 110 { 111 "from": "START", 112 "to": "3", 113 "weights": [ 114 { 115 "time": "3" 116 } 117 ] 118 }, 119 { 120 "from": "3", 121 "to": "START", 122 "weights": [ 123 { 124 "time": "3" 125 } 126 ] 127 }, 128 { 129 "from": "2", 130 "to": "3", 131 "weights": [ 132 { 133 "time": "4" 134 } 135 ] 136 }, 137 { 138 "from": "3", 139 "to": "2", 140 "weights": [ 141 { 142 "time": "4" 143 } 144 ] 145 }, 146 { 147 "from": "2", 148 "to": "1", 149 "weights": [ 150 { 151 "time": "5" 152 } 153 ] 154 }, 155 { 156 "from": "1", 157 "to": "2", 158 "weights": [ 159 { 160 "time": "5" 161 } 162 ] 163 }, 164 { 165 "from": "4", 166 "to": "1", 167 "weights": [ 168 { 169 "time": "6" 170 } 171 ] 172 }, 173 { 174 "from": "1", 175 "to": "4", 176 "weights": [ 177 { 178 "time": "6", 179 "requirements": [ 180 { 181 "rewardId": "NODES_VISITED_COUNT", 182 "quantity": 3 183 } 184 ] 185 } 186 ] 187 }, 188 { 189 "from": "5", 190 "to": "1", 191 "weights": [ 192 { 193 "time": "7" 194 } 195 ] 196 }, 197 { 198 "from": "1", 199 "to": "5", 200 "weights": [ 201 { 202 "time": "7" 203 } 204 ] 205 }, 206 { 207 "from": "4", 208 "to": "2", 209 "weights": [ 210 { 211 "time": "8" 212 } 213 ] 214 }, 215 { 216 "from": "2", 217 "to": "4", 218 "weights": [ 219 { 220 "time": "8", 221 "requirements": [ 222 { 223 "rewardId": "NODES_VISITED_COUNT", 224 "quantity": 3 225 } 226 ] 227 } 228 ] 229 }, 230 { 231 "from": "5", 232 "to": "2", 233 "weights": [ 234 { 235 "time": "9" 236 } 237 ] 238 }, 239 { 240 "from": "2", 241 "to": "5", 242 "weights": [ 243 { 244 "time": "9" 245 } 246 ] 247 }, 248 { 249 "from": "6", 250 "to": "2", 251 "weights": [ 252 { 253 "time": "10" 254 } 255 ] 256 }, 257 { 258 "from": "2", 259 "to": "6", 260 "weights": [ 261 { 262 "time": "10" 263 } 264 ] 265 }, 266 { 267 "from": "5", 268 "to": "3", 269 "weights": [ 270 { 271 "time": "11" 272 } 273 ] 274 }, 275 { 276 "from": "3", 277 "to": "5", 278 "weights": [ 279 { 280 "time": "11" 281 } 282 ] 283 }, 284 { 285 "from": "6", 286 "to": "3", 287 "weights": [ 288 { 289 "time": "12" 290 } 291 ] 292 }, 293 { 294 "from": "3", 295 "to": "6", 296 "weights": [ 297 { 298 "time": "12" 299 } 300 ] 301 }, 302 { 303 "from": "6", 304 "to": "5", 305 "weights": [ 306 { 307 "time": "13" 308 } 309 ] 310 }, 311 { 312 "from": "5", 313 "to": "6", 314 "weights": [ 315 { 316 "time": "13" 317 } 318 ] 319 }, 320 { 321 "from": "4", 322 "to": "5", 323 "weights": [ 324 { 325 "time": "14" 326 } 327 ] 328 }, 329 { 330 "from": "5", 331 "to": "4", 332 "weights": [ 333 { 334 "time": "14", 335 "requirements": [ 336 { 337 "rewardId": "NODES_VISITED_COUNT", 338 "quantity": 3 339 } 340 ] 341 } 342 ] 343 }, 344 { 345 "from": "END", 346 "to": "6", 347 "weights": [ 348 { 349 "time": "15" 350 } 351 ] 352 }, 353 { 354 "from": "6", 355 "to": "END", 356 "weights": [ 357 { 358 "time": "15", 359 "requirements": [ 360 { 361 "rewardId": "REQUIRED_NODE" 362 } 363 ] 364 } 365 ] 366 }, 367 { 368 "from": "END", 369 "to": "5", 370 "weights": [ 371 { 372 "time": "16" 373 } 374 ] 375 }, 376 { 377 "from": "5", 378 "to": "END", 379 "weights": [ 380 { 381 "time": "16", 382 "requirements": [ 383 { 384 "rewardId": "REQUIRED_NODE" 385 } 386 ] 387 } 388 ] 389 }, 390 { 391 "from": "END", 392 "to": "4", 393 "weights": [ 394 { 395 "time": "17", 396 "requirements": [ 397 { 398 "rewardId": "NODES_VISITED_COUNT", 399 "quantity": 3 400 } 401 ] 402 } 403 ] 404 }, 405 { 406 "from": "4", 407 "to": "END", 408 "weights": [ 409 { 410 "time": "17", 411 "requirements": [ 412 { 413 "rewardId": "REQUIRED_NODE" 414 } 415 ] 416 } 417 ] 418 } 419 ], 420 "startId": "START", 421 "endId": "END" 422 }