Commit 3c3420a1 authored by BZoennchen's avatar BZoennchen

Merge branch 'master' of https://gitlab.lrz.de/vadere/vadere

parents eb486382 afde08fe
......@@ -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,
......
......@@ -234,6 +234,7 @@ SettingsDialog.chbShowTargets.text=Show Targets
SettingsDialog.chbShowSources.text=Show Sources
SettingsDialog.chbShowAbsorbingAreas.text=Show Absorbing Areas
SettingsDialog.chbShowStairs.text=Show Stairs
SettingsDialog.chbShowMeasurementAreas.text=Show Measurement Areas
ProjectView.btnSnapshot.tooltip=Snapshot
ProjectView.btnPNGSnapshot.tooltip=PNG Snapshot
ProjectView.btnSVGSnapshot.tooltip=SVG Snapshot
......
......@@ -229,6 +229,7 @@ SettingsDialog.chbShowObstacles.text=Hindernisse anzeigen
SettingsDialog.chbShowTargets.text=Ziele anzeigen
SettingsDialog.chbShowSources.text=Quellen anzeigen
SettingsDialog.chbShowAbsorbingAreas.text=Absorbierende Bereiche anzeigen
SettingsDialog.chbShowMeasurementAreas.text=Messbereich anzeigen
SettingsDialog.chbShowStairs.text=Treppen anzeigen
ProjectView.btnSnapshot.tooltip=Snapshot
ProjectView.btnPNGSnapshot.tooltip=PNG-Snapshot
......
......@@ -118,6 +118,10 @@ public class DefaultSimulationConfig extends DefaultConfig {
return showAbsorbingAreas;
}
public boolean isShowMeasurementAreas() {
return showMeasurementArea;
}
public void setShowTargetPotentielFieldMesh(final boolean showTargetPotentielFieldMesh) {
this.showTargetPotentielFieldMesh = showTargetPotentielFieldMesh;
setChanged();
......
......@@ -87,7 +87,7 @@ public class SettingsDialog extends JDialog {
// Layout definition for sub panels
FormLayout additionalLayout = new FormLayout("5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu", // col
"5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"); // rows
"5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"); // rows
FormLayout colorLayout = new FormLayout("5dlu, pref, 2dlu, pref:grow, 2dlu, pref, 2dlu, pref, 5dlu", // col
"5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"); // rows
colorLayeredPane.setLayout(colorLayout);
......@@ -107,6 +107,7 @@ public class SettingsDialog extends JDialog {
JCheckBox chShowTargets = new JCheckBox((Messages.getString("SettingsDialog.chbShowTargets.text")));
JCheckBox chShowSources = new JCheckBox((Messages.getString("SettingsDialog.chbShowSources.text")));
JCheckBox chShowAbsorbingAreas = new JCheckBox((Messages.getString("SettingsDialog.chbShowAbsorbingAreas.text")));
JCheckBox chShowMeasurementAreas = new JCheckBox((Messages.getString("SettingsDialog.chbShowMeasurementAreas.text")));
JCheckBox chShowStairs = new JCheckBox((Messages.getString("SettingsDialog.chbShowStairs.text")));
JCheckBox chShowPedIds = new JCheckBox((Messages.getString("SettingsDialog.chbShowPedestrianIds.text")));
......@@ -147,6 +148,12 @@ public class SettingsDialog extends JDialog {
model.notifyObservers();
});
chShowMeasurementAreas.setSelected(model.config.isShowMeasurementArea());
chShowMeasurementAreas.addItemListener(e -> {
model.config.setShowMeasurementArea(!model.config.isShowMeasurementArea());
model.notifyObservers();
});
chShowStairs.setSelected(model.config.isShowSources());
chShowStairs.addItemListener(e -> {
model.config.setShowStairs(!model.config.isShowStairs());
......@@ -263,7 +270,8 @@ public class SettingsDialog extends JDialog {
additionalLayeredPane.add(chShowSources, cc.xyw(2, 8, 5));
additionalLayeredPane.add(chShowStairs, cc.xyw(2, 10, 5));
additionalLayeredPane.add(chShowAbsorbingAreas, cc.xyw(2, 12, 5));
additionalLayeredPane.add(chShowPedIds, cc.xyw(2, 14, 5));
additionalLayeredPane.add(chShowMeasurementAreas, cc.xyw(2, 14, 5));
additionalLayeredPane.add(chShowPedIds, cc.xyw(2, 16, 5));
JCheckBox chChowLogo = new JCheckBox(Messages.getString("SettingsDialog.chbLogo.text"));
chChowLogo.setSelected(model.config.isShowLogo());
......@@ -271,19 +279,19 @@ public class SettingsDialog extends JDialog {
model.config.setShowLogo(!model.config.isShowLogo());
model.notifyObservers();
});
additionalLayeredPane.add(chChowLogo, cc.xyw(2, 16, 5));
additionalLayeredPane.add(chChowLogo, cc.xyw(2, 18, 5));
additionalLayeredPane.add(new JLabel(Messages.getString("SettingsDialog.lblSnapshotDir.text") + ":"),
cc.xy(2, 18));
cc.xy(2, 20));
JTextField tSnapshotDir = new JTextField(
Preferences.userNodeForPackage(PostVisualisation.class).get("SettingsDialog.snapshotDirectory.path", "."));
tSnapshotDir.setEditable(false);
tSnapshotDir.setPreferredSize(new Dimension(130, 20));
additionalLayeredPane.add(tSnapshotDir, cc.xy(4, 18));
additionalLayeredPane.add(tSnapshotDir, cc.xy(4, 20));
final JButton bSnapshotDir = new JButton(Messages.getString("SettingsDialog.btnEditSnapshot.text"));
bSnapshotDir.addActionListener(new ActionSetSnapshotDirectory("Set Snapshot Directory", model, tSnapshotDir));
additionalLayeredPane.add(bSnapshotDir, cc.xy(6, 18));
additionalLayeredPane.add(bSnapshotDir, cc.xy(6, 22));
final JSpinner spinnerCellWidth = new JSpinner();
final SpinnerNumberModel sModelCellWidth = new SpinnerNumberModel(model.config.getGridWidth(),
......@@ -296,8 +304,8 @@ public class SettingsDialog extends JDialog {
});
additionalLayeredPane.add(new JLabel(Messages.getString("SettingsDialog.lblCellWidth.text") + ":"),
cc.xy(2, 20));
additionalLayeredPane.add(spinnerCellWidth, cc.xy(4, 20));
cc.xy(2, 22));
additionalLayeredPane.add(spinnerCellWidth, cc.xy(4, 22));
mainPanel.add(getAdditionalOptionPanel(), cc.xy(2, 6));
......
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