|
81 | 81 | " An enhanced force-based model where agents experience centrifugal forces \n", |
82 | 82 | " to better simulate realistic avoidance behavior.\n", |
83 | 83 | "\n", |
| 84 | + "5. [**Warp Driver (WD):**](https://www.jupedsim.org/stable/pedestrian_models/warp_driver_model.html) \n", |
| 85 | + " The WarpDriver model computes collision-free velocities using **probabilistic collision fields**.\n", |
| 86 | + "\n", |
84 | 87 | "> **Note:** \n", |
85 | 88 | "> All models are utilized with their default parameter settings as defined in **JuPedSim**." |
86 | 89 | ] |
|
165 | 168 | " orientation=orientation,\n", |
166 | 169 | " )\n", |
167 | 170 | " )\n", |
| 171 | + " elif agent_parameters == jps.WarpDriverModelAgentParameters:\n", |
| 172 | + " simulation.add_agent(\n", |
| 173 | + " agent_parameters(\n", |
| 174 | + " journey_id=journey_id,\n", |
| 175 | + " stage_id=exit_id,\n", |
| 176 | + " desired_speed=v0,\n", |
| 177 | + " position=pos,\n", |
| 178 | + " orientation=orientation,\n", |
| 179 | + " )\n", |
| 180 | + " )\n", |
168 | 181 | " else:\n", |
169 | 182 | " simulation.add_agent(\n", |
170 | 183 | " agent_parameters(\n", |
|
318 | 331 | "metadata": {}, |
319 | 332 | "outputs": [], |
320 | 333 | "source": [ |
321 | | - "model = \"CFM\"\n", |
| 334 | + "model = \"CSM\"\n", |
322 | 335 | "trajectory_file = f\"{model}.sqlite\"\n", |
323 | 336 | "simulation = initialize_simulation(\n", |
324 | 337 | " jps.CollisionFreeSpeedModelV2(),\n", |
|
455 | 468 | ")" |
456 | 469 | ] |
457 | 470 | }, |
| 471 | + { |
| 472 | + "cell_type": "markdown", |
| 473 | + "id": "7d100502", |
| 474 | + "metadata": {}, |
| 475 | + "source": [ |
| 476 | + "### WD Simulation" |
| 477 | + ] |
| 478 | + }, |
| 479 | + { |
| 480 | + "cell_type": "code", |
| 481 | + "execution_count": null, |
| 482 | + "id": "05a71037", |
| 483 | + "metadata": {}, |
| 484 | + "outputs": [], |
| 485 | + "source": [ |
| 486 | + "model = \"WD\"\n", |
| 487 | + "trajectory_file = f\"{model}.sqlite\"\n", |
| 488 | + "simulation = initialize_simulation(\n", |
| 489 | + " jps.WarpDriverModel(),\n", |
| 490 | + " jps.WarpDriverModelAgentParameters,\n", |
| 491 | + " geometry,\n", |
| 492 | + " goals,\n", |
| 493 | + " positions,\n", |
| 494 | + " speeds,\n", |
| 495 | + " trajectory_file,\n", |
| 496 | + ")\n", |
| 497 | + "times_dict[model] = run_simulation(simulation, max_iterations=5000)\n", |
| 498 | + "trajectories, walkable_area = read_sqlite_file(trajectory_file)\n", |
| 499 | + "animate(\n", |
| 500 | + " trajectories,\n", |
| 501 | + " walkable_area,\n", |
| 502 | + " title_note=model,\n", |
| 503 | + " every_nth_frame=5,\n", |
| 504 | + " width=width,\n", |
| 505 | + " height=height,\n", |
| 506 | + ")" |
| 507 | + ] |
| 508 | + }, |
458 | 509 | { |
459 | 510 | "cell_type": "markdown", |
460 | 511 | "id": "884203af-0af3-474e-a4a9-646ab3988478", |
|
548 | 599 | "metadata": {}, |
549 | 600 | "outputs": [], |
550 | 601 | "source": [ |
551 | | - "model = \"CFM\"\n", |
| 602 | + "model = \"CSM\"\n", |
552 | 603 | "trajectory_file = f\"{model}.sqlite\"\n", |
553 | 604 | "simulation = initialize_simulation(\n", |
554 | 605 | " jps.CollisionFreeSpeedModelV2(),\n", |
|
685 | 736 | ")" |
686 | 737 | ] |
687 | 738 | }, |
| 739 | + { |
| 740 | + "cell_type": "markdown", |
| 741 | + "id": "d0452c7c", |
| 742 | + "metadata": {}, |
| 743 | + "source": [ |
| 744 | + "### WD Simulation" |
| 745 | + ] |
| 746 | + }, |
| 747 | + { |
| 748 | + "cell_type": "code", |
| 749 | + "execution_count": null, |
| 750 | + "id": "a2383398", |
| 751 | + "metadata": {}, |
| 752 | + "outputs": [], |
| 753 | + "source": [ |
| 754 | + "model = \"WD\"\n", |
| 755 | + "trajectory_file = f\"{model}.sqlite\"\n", |
| 756 | + "simulation = initialize_simulation(\n", |
| 757 | + " jps.WarpDriverModel(),\n", |
| 758 | + " jps.WarpDriverModelAgentParameters,\n", |
| 759 | + " geometry,\n", |
| 760 | + " goals,\n", |
| 761 | + " positions,\n", |
| 762 | + " speeds,\n", |
| 763 | + " trajectory_file,\n", |
| 764 | + ")\n", |
| 765 | + "times_dict[model] = run_simulation(simulation, max_iterations=2000)\n", |
| 766 | + "trajectories, walkable_area = read_sqlite_file(trajectory_file)\n", |
| 767 | + "animate(\n", |
| 768 | + " trajectories,\n", |
| 769 | + " walkable_area,\n", |
| 770 | + " title_note=model,\n", |
| 771 | + " every_nth_frame=5,\n", |
| 772 | + " width=width,\n", |
| 773 | + " height=height,\n", |
| 774 | + ")" |
| 775 | + ] |
| 776 | + }, |
688 | 777 | { |
689 | 778 | "cell_type": "markdown", |
690 | 779 | "id": "6f9f6b1f", |
|
755 | 844 | "metadata": {}, |
756 | 845 | "outputs": [], |
757 | 846 | "source": [ |
758 | | - "model = \"CFM\"\n", |
| 847 | + "model = \"CSM\"\n", |
759 | 848 | "trajectory_file = f\"{model}.sqlite\"\n", |
760 | 849 | "simulation = initialize_simulation(\n", |
761 | 850 | " jps.CollisionFreeSpeedModelV2(),\n", |
|
892 | 981 | ")" |
893 | 982 | ] |
894 | 983 | }, |
| 984 | + { |
| 985 | + "cell_type": "markdown", |
| 986 | + "id": "2f2300e2", |
| 987 | + "metadata": {}, |
| 988 | + "source": [ |
| 989 | + "### WD Simulation" |
| 990 | + ] |
| 991 | + }, |
| 992 | + { |
| 993 | + "cell_type": "code", |
| 994 | + "execution_count": null, |
| 995 | + "id": "39c35073", |
| 996 | + "metadata": {}, |
| 997 | + "outputs": [], |
| 998 | + "source": [ |
| 999 | + "model = \"WD\"\n", |
| 1000 | + "trajectory_file = f\"{model}.sqlite\"\n", |
| 1001 | + "simulation = initialize_simulation(\n", |
| 1002 | + " jps.WarpDriverModel(),\n", |
| 1003 | + " jps.WarpDriverModelAgentParameters,\n", |
| 1004 | + " geometry,\n", |
| 1005 | + " goals,\n", |
| 1006 | + " positions,\n", |
| 1007 | + " speeds,\n", |
| 1008 | + " trajectory_file,\n", |
| 1009 | + ")\n", |
| 1010 | + "times_dict[model] = run_simulation(simulation, max_iterations=2000)\n", |
| 1011 | + "trajectories, walkable_area = read_sqlite_file(trajectory_file)\n", |
| 1012 | + "animate(\n", |
| 1013 | + " trajectories,\n", |
| 1014 | + " walkable_area,\n", |
| 1015 | + " title_note=model,\n", |
| 1016 | + " every_nth_frame=5,\n", |
| 1017 | + " width=width,\n", |
| 1018 | + " height=height,\n", |
| 1019 | + ")" |
| 1020 | + ] |
| 1021 | + }, |
895 | 1022 | { |
896 | 1023 | "cell_type": "markdown", |
897 | 1024 | "id": "a9848f9e", |
|
979 | 1106 | "metadata": {}, |
980 | 1107 | "outputs": [], |
981 | 1108 | "source": [ |
982 | | - "model = \"CFM\"\n", |
| 1109 | + "model = \"CSM\"\n", |
983 | 1110 | "trajectory_file = f\"{model}.sqlite\"\n", |
984 | 1111 | "simulation = initialize_simulation(\n", |
985 | 1112 | " jps.CollisionFreeSpeedModelV2(),\n", |
|
1116 | 1243 | ")" |
1117 | 1244 | ] |
1118 | 1245 | }, |
| 1246 | + { |
| 1247 | + "cell_type": "markdown", |
| 1248 | + "id": "bc217db4", |
| 1249 | + "metadata": {}, |
| 1250 | + "source": [ |
| 1251 | + "### WD Simulation" |
| 1252 | + ] |
| 1253 | + }, |
| 1254 | + { |
| 1255 | + "cell_type": "code", |
| 1256 | + "execution_count": null, |
| 1257 | + "id": "86433347", |
| 1258 | + "metadata": {}, |
| 1259 | + "outputs": [], |
| 1260 | + "source": [ |
| 1261 | + "model = \"WD\"\n", |
| 1262 | + "trajectory_file = f\"{model}.sqlite\"\n", |
| 1263 | + "simulation = initialize_simulation(\n", |
| 1264 | + " jps.WarpDriverModel(),\n", |
| 1265 | + " jps.WarpDriverModelAgentParameters,\n", |
| 1266 | + " geometry,\n", |
| 1267 | + " goals,\n", |
| 1268 | + " positions,\n", |
| 1269 | + " speeds,\n", |
| 1270 | + " trajectory_file,\n", |
| 1271 | + ")\n", |
| 1272 | + "times_dict[model] = run_simulation(simulation, max_iterations=2000)\n", |
| 1273 | + "trajectories, walkable_area = read_sqlite_file(trajectory_file)\n", |
| 1274 | + "animate(\n", |
| 1275 | + " trajectories,\n", |
| 1276 | + " walkable_area,\n", |
| 1277 | + " title_note=model,\n", |
| 1278 | + " every_nth_frame=5,\n", |
| 1279 | + " width=width,\n", |
| 1280 | + " height=height,\n", |
| 1281 | + ")" |
| 1282 | + ] |
| 1283 | + }, |
1119 | 1284 | { |
1120 | 1285 | "cell_type": "markdown", |
1121 | 1286 | "id": "79db3354", |
|
1216 | 1381 | "metadata": {}, |
1217 | 1382 | "outputs": [], |
1218 | 1383 | "source": [ |
1219 | | - "model = \"CFM\"\n", |
| 1384 | + "model = \"CSM\"\n", |
1220 | 1385 | "trajectory_file = f\"{model}.sqlite\"\n", |
1221 | 1386 | "simulation = initialize_simulation(\n", |
1222 | 1387 | " jps.CollisionFreeSpeedModelV2(),\n", |
|
1355 | 1520 | }, |
1356 | 1521 | { |
1357 | 1522 | "cell_type": "markdown", |
1358 | | - "id": "1e079ea8-adf1-46a6-940c-020b5ccc5acd", |
| 1523 | + "id": "439f95b5", |
| 1524 | + "metadata": {}, |
| 1525 | + "source": [ |
| 1526 | + "### WD Simulation" |
| 1527 | + ] |
| 1528 | + }, |
| 1529 | + { |
| 1530 | + "cell_type": "code", |
| 1531 | + "execution_count": null, |
| 1532 | + "id": "37bee8bf", |
| 1533 | + "metadata": {}, |
| 1534 | + "outputs": [], |
| 1535 | + "source": [ |
| 1536 | + "model = \"WD\"\n", |
| 1537 | + "trajectory_file = f\"{model}.sqlite\"\n", |
| 1538 | + "simulation = initialize_simulation(\n", |
| 1539 | + " jps.WarpDriverModel(),\n", |
| 1540 | + " jps.WarpDriverModelAgentParameters,\n", |
| 1541 | + " geometry,\n", |
| 1542 | + " goals,\n", |
| 1543 | + " positions,\n", |
| 1544 | + " speeds,\n", |
| 1545 | + " trajectory_file,\n", |
| 1546 | + ")\n", |
| 1547 | + "times_dict[model] = run_simulation(simulation, max_iterations=2000)\n", |
| 1548 | + "trajectories, walkable_area = read_sqlite_file(trajectory_file)\n", |
| 1549 | + "animate(\n", |
| 1550 | + " trajectories,\n", |
| 1551 | + " walkable_area,\n", |
| 1552 | + " title_note=model,\n", |
| 1553 | + " every_nth_frame=5,\n", |
| 1554 | + " width=width,\n", |
| 1555 | + " height=height,\n", |
| 1556 | + ")" |
| 1557 | + ] |
| 1558 | + }, |
| 1559 | + { |
| 1560 | + "cell_type": "markdown", |
| 1561 | + "id": "987b5e9f", |
1359 | 1562 | "metadata": {}, |
1360 | 1563 | "source": [ |
1361 | 1564 | "### Evacuation times" |
|
0 commit comments