Commit afde08fe authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Added analysis of evacuation time (of real data) to "TrajectoryMetric.ipynb".

parent b6424114
Pipeline #116168 passed with stages
in 136 minutes and 42 seconds
......@@ -178,7 +178,59 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Helpler method to access parts of the trajectory"
"# Calculate evacution time"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Evacuation time = endTime - startTime"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Real data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Sum up all measured time deltas of a pedestrian to get the final evacuation time\n",
"trajectoriesReal[\"timeDelta\"] = trajectoriesReal[\"endTime\"] - trajectoriesReal[\"startTime\"]\n",
"evacuation_time = trajectoriesReal.groupby([\"pedestrianId\"])[\"timeDelta\"].sum()\n",
"\n",
"print(\"Evacuation time (real data)\")\n",
"print(\"- mean: {:.2f} [s]\".format(evacuation_time.mean()))\n",
"print(\"- std: {:.2f} [s]\".format(evacuation_time.std()))\n",
"print(\"- min: {:.2f} [s]\".format(evacuation_time.min()))\n",
"print(\"- max: {:.2f} [s]\".format(evacuation_time.max()))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simulation data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"TODO: Use `PedestrianEvacuationTimeProcessor` to log evacuation time during simulation and analyze it here."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Helper method to access parts of the trajectory"
]
},
{
......@@ -551,41 +603,6 @@
"pd.DataFrame([[1,2,3,4,5],[6,7,8,9,10]], columns=['pedestrianId','timeStep','x','y','time'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
......@@ -594,22 +611,6 @@
"source": [
"to_postVis(data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"1 in [1,2,3]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
......@@ -628,7 +629,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.7"
}
},
"nbformat": 4,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment