Commit e9f93a7c authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

resolve merge conflicts.

parents b33810e8 599a95e0
......@@ -70,7 +70,7 @@ stages:
artifacts:
when: on_failure
paths:
- "log_dir"
- "vadere_logs"
expire_in: 1 week
when: on_success
......
......@@ -2,12 +2,19 @@
**Note:** Before writing into this file, read the guidelines in [Writing Changelog Entries.md](Documentation/contributing/Writing Changelog Entries.md).
## In Progress: v0.7
## In Progress:
### Added
### Changed
## v1.0 (2019-06-13)
### Added
- Open a trajectory file in the stand-alone application `vadere-postvis.jar` via drag and drop from file explorer.
- Scenario elements like obstacles and targets can now be resized using the mouse in the topography creator tab (first, select element via left-click and then move mouse to one of its edges to get the resize handles).
- Draw also Voronoi diagram in `TikeGenerator`.
- Draw also Voronoi diagram in `TikzGenerator`.
- Added new scenario element `AbsorbingArea` to absorb agents immediately.
* The new scenario element can be selected in `TopographyCreator` via the "emergency exit" button.
* The new scenario element is also taken into account by `SettingsDialaog` and `TikzGenerator`.
......@@ -42,9 +49,9 @@
will check for overlapping `ScenarioElements` and check for inconsistence
settings such as missing TargetIDs for sources or inconsistenct speed ranges
for pedestrians. See this
[table](Documentation/changelLogImages/TopographyCheckerMessages.md) for
[table](Documentation/changelog/TopographyCheckerMessages.md) for
supported warnings and erros as well as this
[picture](Documentation/changelLogImages/TopographyChecker.png) to see which
[picture](Documentation/changelog/TopographyChecker.png) to see which
kind of overlap produces erros or warnings.
- `VadereConsole`: Add `--output-dir [on, off]` (default: `on`) switch to `scenario-run`
sub-command. This will will turn the ScenarioChecker on or off for the command
......@@ -69,6 +76,7 @@
* vadere.jar -> vadere-gui.jar
* postvis.jar -> vadere-postvis.jar
* vadere-console.jar -> remained unchanged
- Header in output file have now the following form "[NAME]-PID[ID]". This avoids name conflicts and makes mapping to the relevant processor easy and fast.
- Migration to Java 11 (OpenJDK).
- Removed directory `Documentation/version-control` which contained the Git hooks. The Git hooks are not required anymore. Instead, added `git rev-parse HEAD` to file `VadereSimulator/pom.xml` to create `VadereSimulator/resources/current_commit_hash.txt` during each build via `mvn compile`.
**Note:** The file `current_commit_hash.txt` is created during Maven's validation phase, i.e., before the actual build.
......
# OpenCL Installation (optional but recommended)
Vadere uses computer's video card to speed up some computations. Therefore, following OpenCL components should be installed:
* the OpenCL Installable Client Driver loader also called ICD loader (Opencl.dll for Windows and libOpenCL.so for Linux)
* drivers for your device(s)
Both should be offered by the vendor of your device (often there are also open-source solutions). The device can be a CPU as well as a GPU (recommanded). For example, if you have a NVIDIA GPU instaling your drivers should be enough to install both components.
Vadere will search for the best suiable device which is supported. On a desktop workstation this should be your video card (GPU). If there is no device supporting OpenCL Vadere will use a plain and slower Java-implementation instead.
Please, use following instructions to set up the OpenCL components for your operating system:
* Windows: For further information using OpenCL on Windows read the paragraph Running an OpenCL application [click here](https://streamcomputing.eu/blog/2015-03-16/how-to-install-opencl-on-windows/).
* OS X: OpenCL is pre-installed for OS X.
* Linux: Please refer to the installation manual of your Linux distribution.
* [Sources: OpenCL HowTo](https://wiki.tiker.net/OpenCLHowTo)
* Tips and official packages (Ubuntu):
<details>
* Use the console tool `clinfo` (`sudo apt-get install clinfo`) to see the current status in terminal
* Drivers commonly have the prefix `opencl-icd` (to look at most opencl related packages run `apt search opencl`). Some that may be helpful:
* `beignet-opencl-icd` (OpenCL library for Intel GPUs)
* `mesa-opencl-icd` (free and open source implementation of the OpenCL API)
* `nvidia-opencl-icd`
* `ocl-icd-opencl-dev` (installs opencl development files and can be required for compiling)
* `ocl-icd-libopencl1` (Generic OpenCL ICD Loader)
</details>
* [Intel Driverpack (only driver needed)](https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver)
......@@ -24,13 +24,19 @@ The Vadere framework includes a mesh generator for unstructured high-quality 2D
## Installation
### Download Releases
### Dependencies
* Java 11 or above (OpenJDK recommended -> see the official [Java website](https://jdk.java.net/))
* OpenCL (optional but recommended -> see the [install instructions](https://gitlab.lrz.de/vadere/vadere/tree/master/Documentation/installation/OpenCL-Installation.md) for details)
### Pre-Built Releases
Latest build of master:
* [Windows](http://www.vadere.org/builds/master/vadere.master.windows.zip)
* [Linux](http://www.vadere.org/builds/master/vadere.master.linux.zip)
Stable releases and selected branch-builds are located on [www.vadere.org/releases/](http://www.vadere.org/releases/)
Stable releases and selected branch-builds:
* [www.vadere.org/releases/](http://www.vadere.org/releases/)
The ZIP file contains:
* **README.md** - this README file.
......@@ -38,65 +44,36 @@ The ZIP file contains:
* **vadere-console.jar** - provides the command line version of Vadere and allows easy integration into other applications.
* **VadereModelTests** - contains test scenarios for pedestrian locomotion models. Note: The tests are also useful for a "getting started" (see below "Run Built-In Examples" for details).
To execute the `.jar` files it is highly recommended to use Java 11 (OpenJDK).
### Build from Source
#### Dependencies
* Java 11 (OpenJDK recommended)
* Maven 3.0
* Git
* OpenCL (optional but recommended)
**Note:** Please, ensure that the Git executable can be found in the `PATH` variable of your operating system.
#### Install OpenCL (optional but recommended)
Vadere uses computer's video card to speed up some computations. Therefore, following OpenCL components should be installed:
### Run the Application
* the OpenCL Installable Client Driver loader also called ICD loader (Opencl.dll for Windows and libOpenCL.so for Linux)
* drivers for your device(s)
Open a terminal and enter `path/to/openjdk/java -jar vadere-gui.jar`.
Both should be offered by the vendor of your device (often there are also open-source solutions). The device can be a CPU as well as a GPU (recommanded). For example, if you have a NVIDIA GPU instaling your drivers should be enough to install both components.
Vadere will search for the best suiable device which is supported. On a desktop workstation this should be your video card (GPU). If there is no device supporting OpenCL Vadere will use a plain and slower Java-implementation instead.
### Run Built-In Examples
Please, use following instructions to set up the OpenCL components for your operating system:
With the following steps, you can run a simulation with one of the built-in examples from [VadereModelTests](VadereModelTests):
* Windows: For further information using OpenCL on Windows read the paragraph Running an OpenCL application [click here](https://streamcomputing.eu/blog/2015-03-16/how-to-install-opencl-on-windows/).
* OS X: OpenCL is pre-installed for OS X.
* Linux: Please refer to the installation manual of your Linux distribution.
* [Sources: OpenCL HowTo](https://wiki.tiker.net/OpenCLHowTo)
* Tips and official packages (Ubuntu):
<details>
- Start Vadere
- Click *Project* > *Open*
- Choose `vadere.project` of one of the test projects, e.g. [TestOSM](https://gitlab.lrz.de/vadere/vadere/tree/master/VadereModelTests/TestOSM) and click *open*
- Select tahe scenario on the left and press *run selected scenario*
* Use the console tool `clinfo` (`sudo apt-get install clinfo`) to see the current status in terminal
* Drivers commonly have the prefix `opencl-icd` (to look at most opencl related packages run `apt search opencl`). Some that may be helpful:
* `beignet-opencl-icd` (OpenCL library for Intel GPUs)
* `mesa-opencl-icd` (free and open source implementation of the OpenCL API)
* `nvidia-opencl-icd`
* `ocl-icd-opencl-dev` (installs opencl development files and can be required for compiling)
* `ocl-icd-libopencl1` (Generic OpenCL ICD Loader)
</details>
* [Intel Driverpack (only driver needed)](https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver)
## Build from Source
#### Run the Application
### Dependencies
1. Get the Source: Run `git clone https://gitlab.lrz.de/vadere/vadere.git`.
2. Build the Application: Go to the project directory and run `mvn clean package` (or `mvn clean package -Dmaven.test.skip` if you want to skip the unit tests). This will build `vadere.jar`, `vadere-console.jar` and `postvis.jar`.
3. Start the Application: After building the application, you can start Vadere by running `java -jar VadereGui/target/vadere.jar`.
4. (If you only want to use the Postvisualization-Tool you can do so by running `java -jar VadereGui/target/postvis.jar`).
* Java 11 or above (OpenJDK recommended)
* Maven 3.0
* Git
* OpenCL (optional but recommended)
## Run Built-In Examples
**Note:** Please, ensure that the Git executable can be found in the `PATH` variable of your operating system.
With the following steps, you can run a simulation with one of the built-in examples from [VadereModelTests](VadereModelTests):
### Build Instructions
- start Vadere
- *Project* > *Open*
- choose `vadere.project` of one of the projects e.g. [TestOSM](https://gitlab.lrz.de/vadere/vadere/tree/master/VadereModelTests/TestOSM) and click *open*
- select the scenario on the left and press *run selected scenario*
1. git clone https://gitlab.lrz.de/vadere/vadere.git
2. cd vadere
3. mvn clean
4. mvn -Dmaven.test.skip=true package
## Changelog
......
......@@ -21,7 +21,7 @@ short_timeout_in_seconds = 2 * 60
def parse_command_line_arguments():
parser = argparse.ArgumentParser(description="Run all scenario files.")
parser.add_argument("--scenario", "-s", type=str, nargs="?", help="Run only the given scenario file and not all. E.g. \"VadereModelTests/TestOSM/scenarios/basic_2_density_discrete_ca.scenario\"")
parser.add_argument("scenario", type=str, nargs="?", help="Run only the given scenario file and not all. E.g., \"VadereModelTests/TestOSM/scenarios/basic_2_density_discrete_ca.scenario\"")
args = parser.parse_args()
......@@ -80,13 +80,10 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereSimulator/target/vadere-console.jar", scenario_timeout_in_sec=short_timeout_in_seconds):
output_dir = "output"
log_dir = "log_dir"
log_base_dir = "vadere_logs"
if not os.path.exists(output_dir):
os.makedirs(output_dir)
if not os.path.exists(log_dir):
os.makedirs(log_dir)
makedirs_if_non_existing(output_dir)
makedirs_if_non_existing(log_base_dir)
total_scenario_files = len(scenario_files)
......@@ -98,10 +95,18 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
try:
print("Running scenario file ({}/{}): {}".format(i + 1, total_scenario_files, scenario_file))
# A scenario filename has the form "VadereModelTests/TestOSM/scenarios/chicken_floorfield_ok.scenario"
# Use second-level directory as subdirectory for logging (e.g., "TestOSM").
log_sub_dir = scenario_file.split(os.path.sep)[1]
log_dir = os.path.join(".", log_base_dir, log_sub_dir)
makedirs_if_non_existing(log_dir)
scenario_name = os.path.basename(scenario_file).split('.')[0]
log_file = os.path.join(".", log_dir, scenario_name + ".log")
log_file = os.path.join(log_dir, scenario_name + ".log")
print(log_file)
print(" Log file: " + log_file)
# Measure wall time and not CPU time.
wall_time_start = time.time()
......@@ -124,17 +129,16 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
except subprocess.TimeoutExpired as exception:
print("Scenario file failed: {}".format(scenario_file))
print("-> Reason: timeout after {} s".format(exception.timeout))
failed_summary.append("Scenario file failed: {}".format(scenario_file))
failed_summary.append("-> Reason: timeout after {} s".format(exception.timeout))
failed_scenarios_with_exception.append((scenario_file, exception))
except subprocess.CalledProcessError as exception:
prefix = ""
if "TestOSM" in scenario_file:
prefix = " * OSM * "
print(prefix + "Scenario file failed: {}".format(scenario_file))
print("Scenario file failed: {}".format(scenario_file))
print("-> Reason: non-zero return value {}".format(exception.returncode))
print(" {}".format(read_first_error_linies(exception.stderr)))
failed_summary.append(prefix + "Scenario file failed: {}".format(scenario_file))
failed_summary.append("Scenario file failed: {}".format(scenario_file))
failed_summary.append("-> Reason: non-zero return value {}".format(exception.returncode))
failed_summary.append(" {}".format(read_first_error_linies(exception.stderr)))
......@@ -145,6 +149,10 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
return {"passed": passed_scenarios, "failed": failed_scenarios_with_exception, "failed_summary": failed_summary}
def makedirs_if_non_existing(directory):
if not os.path.exists(directory):
os.makedirs(directory)
def read_first_error_linies(error_byte_string):
err_string_lines = error_byte_string.decode('utf-8').split('\n')
if len(err_string_lines) >= 2:
......
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Note\n",
"You can find the required data on the Nextcloud data/Paperdaten/2019/TGF2019-vadere"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"code_folding": []
},
"metadata": {},
"outputs": [],
"source": [
"# expand the cell of the notebook\n",
"import json\n",
"import gc\n",
"import numpy as np\n",
"import pandas as pd\n",
"import math\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.lines import Line2D\n",
"import seaborn as sns\n",
"import functools\n",
"import operator\n",
"sns.set_context(\"poster\")\n",
"sns.set(style=\"whitegrid\", font_scale=1.8)\n",
"\n",
"\n",
"from IPython.core.display import display, HTML\n",
"display(HTML('<style>.container { width:100% !important; }</style>'))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Convert Vadere trajectories into a DataFrame"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def fs_append(pedestrianId, fs, llist):\n",
" llist.append([pedestrianId, fs['start']['x'], fs['start']['y'], fs['startTime'], fs['end']['x'], fs['end']['y'], fs['endTime']])\n",
" \n",
"def trajectory_append(pedestrianId, trajectory, llist):\n",
" for fs in trajectory:\n",
" fs_append(pedestrianId, fs, llist)\n",
"\n",
"file = \"./data/trajectories_distance.txt\"\n",
"real_file = \"./data/KO/ko-240-120-240/ko-240-120-240_combined_MB.txt\"\n",
"f = open(file, \"r\")\n",
"header = f.readline();\n",
"trajectories = dict({});\n",
"for row in f:\n",
" s = row.split(\" \");\n",
" pedId = int(s[0]);\n",
" footsteps = json.loads(s[1]);\n",
" trajectories[pedId] = footsteps[0]['footSteps'];\n",
"def trajectories_to_dataframe(trajectories):\n",
" llist = []\n",
" for pedId in trajectories:\n",
" trajectory_append(pedId, trajectories[pedId], llist)\n",
" dataframe = pd.DataFrame(llist, columns=['pedestrianId','startX','startY','startTime','endX','endY','endTime'])\n",
" dataframe[\"distance\"] = np.sqrt(np.square(dataframe[\"endX\"] - dataframe[\"startX\"]) + np.square(dataframe[\"endY\"] - dataframe[\"startY\"]))\n",
" dataframe[\"velocity\"] = dataframe[\"distance\"] / (dataframe[\"endTime\"] - dataframe[\"startTime\"])\n",
" return dataframe"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def load_simulation_data(file):\n",
" f = open(file, \"r\")\n",
" header = f.readline();\n",
" trajectories = dict({});\n",
" for row in f:\n",
" s = row.split(\" \");\n",
" pedId = int(s[0]);\n",
" footsteps = json.loads(s[1]);\n",
" trajectories[pedId] = footsteps[0]['footSteps']; \n",
" return trajectories_to_dataframe(trajectories)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Convert experiment data into a DataFrame"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def load_experiment(file):\n",
" fps = 16\n",
" data = pd.read_csv(\n",
" file, \n",
" sep=' ', \n",
" names=['pedestrianId', 'timeStep', 'x', 'y', 'e'], \n",
" index_col=False, \n",
" header=None, \n",
" skiprows=0)\n",
" \n",
" rows = []\n",
" #print(trajectories)\n",
" last_ped_id = None\n",
" lastX = None\n",
" lastY = None\n",
" for row in data.itertuples():\n",
" endX = row.x / 100.0 + 18.7\n",
" endY = row.y / 100.0 + 4.2\n",
" startTime = row.timeStep / fps - 1/fps\n",
" endTime = row.timeStep / fps\n",
" if last_ped_id is None or last_ped_id != row.pedestrianId:\n",
" startX = np.nan\n",
" startY = np.nan\n",
" distance = np.nan\n",
" velocity = np.nan\n",
" else:\n",
" startX = lastX / 100.0 + 18.7\n",
" startY = lastY / 100.0 + 4.2\n",
" distance = np.sqrt(np.square(endX - startX) + np.square(endY - startY))\n",
" velocity = distance / (endTime - startTime)\n",
" rows.append([row.pedestrianId, startX, startY, endX, endY, startTime, endTime, distance, velocity])\n",
" last_ped_id = row.pedestrianId\n",
" lastX = row.x\n",
" lastY = row.y\n",
" \n",
" dataframe = pd.DataFrame(rows, columns=['pedestrianId', 'startX', 'startY', 'endX', 'endY','startTime','endTime','distance','velocity'])\n",
" return dataframe\n",
" \n",
"def get_trajectory(pedId):\n",
" return trajectories[pedId]\n",
"def to_trajectories(data):\n",
" trajectories = dict({})\n",
" trajectory = []\n",
" for i in range(len(data)-1):\n",
" pedId = data['pedestrianId'][i]\n",
" if pedId == data['pedestrianId'][i+1]:\n",
" pedId = data['pedestrianId'][i]\n",
" x1 = data['x'][i]\n",
" y1 = data['y'][i]\n",
" x2 = data['x'][i+1]\n",
" y2 = data['y'][i+1]\n",
" startTime = data['timeStep'][i] \n",
" endTime = data['timeStep'][i+1]\n",
" fs = {'startTime':startTime, 'endTime': endTime, 'start':{'x':x1, 'y':y1}, 'end':{'x':x2, 'y':y2}}\n",
" trajectory.append(fs)\n",
" else:\n",
" trajectories[pedId] = trajectory\n",
" trajectory = []\n",
" pedId = data['pedestrianId'][i]\n",
" return trajectories"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Load all data\n",
"\n",
"The following code loads the experiment data as well as the simulated data and transforms everything into the same format (data frame). The simulated trajectories are cut with respect to the camera bounds of the experiment."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#times = np.linspace(4,10,10)\n",
"#euclid_d(get_trajectory(1), get_trajectory(1), times)\n",
"#to_trajectories(load_experiment(real_file))[1]\n",
"\n",
"trajectories240o050o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-050-240/ko-240-050-240_combined_MB.txt\")\n",
"trajectories240o060o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-060-240/ko-240-060-240_combined_MB.txt\")\n",
"trajectories240o080o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-080-240/ko-240-080-240_combined_MB.txt\")\n",
"trajectories240o100o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-100-240/ko-240-100-240_combined_MB.txt\")\n",
"trajectories240o120o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-120-240/ko-240-120-240_combined_MB.txt\")\n",
"trajectories240o150o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-150-240/ko-240-150-240_combined_MB.txt\")\n",
"trajectories240o240o240 = load_experiment(\"./T-junction-experiment-trajectories-files/KO/ko-240-240-240/ko-240-240-240_combined_MB.txt\")\n",
"\n",
"trajectoriesReal = pd.concat([trajectories240o050o240, trajectories240o060o240, trajectories240o080o240, \n",
" trajectories240o100o240, trajectories240o120o240, trajectories240o150o240, \n",
" trajectories240o240o240], ignore_index=True)\n",
"\n",
"# trajectories starting from left\n",
"cut_minX = trajectoriesReal[trajectoriesReal[\"endX\"] < 15].groupby([\"pedestrianId\"])[\"startX\"].min().max() + 0.12\n",
"\n",
"# trajectories starting from right\n",
"cut_maxX = trajectoriesReal[trajectoriesReal[\"endX\"] > 21].groupby([\"pedestrianId\"])[\"startX\"].max().min() - 0.2\n",
"\n",
"# trajectories ending at top\n",
"cut_maxY = trajectoriesReal.groupby([\"pedestrianId\"])[\"endY\"].max().min() - 0.168\n",
"\n",
"trajectories240o050o240 = cut(trajectories240o050o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o060o240 = cut(trajectories240o060o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o080o240 = cut(trajectories240o080o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o100o240 = cut(trajectories240o100o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o120o240 = cut(trajectories240o120o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o150o240 = cut(trajectories240o150o240, cut_minX, cut_maxX, cut_maxY)\n",
"trajectories240o240o240 = cut(trajectories240o240o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o050o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-050-240.txt\")\n",
"osm_trajectories240o050o240 = cut(osm_trajectories240o050o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o060o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-060-240.txt\")\n",
"osm_trajectories240o060o240 = cut(osm_trajectories240o060o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o080o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-080-240.txt\")\n",
"osm_trajectories240o080o240 = cut(osm_trajectories240o080o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o100o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-100-240.txt\")\n",
"osm_trajectories240o100o240 = cut(osm_trajectories240o100o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o120o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-120-240.txt\")\n",
"osm_trajectories240o120o240 = cut(osm_trajectories240o120o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o150o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-150-240.txt\")\n",
"osm_trajectories240o150o240 = cut(osm_trajectories240o150o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"osm_trajectories240o240o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-OSM-240-240-240.txt\")\n",
"osm_trajectories240o240o240 = cut(osm_trajectories240o240o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"trajectoriesOSM = pd.concat([osm_trajectories240o050o240, osm_trajectories240o060o240, osm_trajectories240o080o240, osm_trajectories240o100o240, osm_trajectories240o120o240, osm_trajectories240o150o240, osm_trajectories240o240o240], ignore_index=True)\n",
"\n",
"bhm_trajectories240o050o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-050-240.txt\")\n",
"bhm_trajectories240o050o240 = cut(bhm_trajectories240o050o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o060o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-060-240.txt\")\n",
"bhm_trajectories240o060o240 = cut(bhm_trajectories240o060o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o080o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-080-240.txt\")\n",
"bhm_trajectories240o080o240 = cut(bhm_trajectories240o080o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o100o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-100-240.txt\")\n",
"bhm_trajectories240o100o240 = cut(bhm_trajectories240o100o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o120o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-120-240.txt\")\n",
"bhm_trajectories240o120o240 = cut(bhm_trajectories240o120o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o150o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-150-240.txt\")\n",
"bhm_trajectories240o150o240 = cut(bhm_trajectories240o150o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"bhm_trajectories240o240o240 = load_simulation_data(\"./T-junction-sim-trajectory-files/trajectories-BHM-240-240-240.txt\")\n",
"bhm_trajectories240o240o240 = cut(bhm_trajectories240o240o240, cut_minX, cut_maxX, cut_maxY)\n",
"\n",
"trajectoriesBHM = pd.concat([bhm_trajectories240o050o240, bhm_trajectories240o060o240, bhm_trajectories240o080o240, \n",
" bhm_trajectories240o100o240, bhm_trajectories240o120o240, bhm_trajectories240o150o240, \n",
" bhm_trajectories240o240o240], ignore_index=True)"
]
},
{
"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",
"copy = trajectoriesReal.copy(deep=True)\n",