Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPScore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JuPedSim
JPScore
Commits
b2c5ba31
Commit
b2c5ba31
authored
Jan 18, 2013
by
Ulrich Kemloh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning, documenting, refactoring
Comments are now using the doxygen format. german-->english
parent
07f7d253
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
4563 additions
and
4145 deletions
+4563
-4145
Doxyfile
Doxyfile
+1
-1
IO/IODispatcher.cpp
IO/IODispatcher.cpp
+5
-5
IO/IODispatcher.h
IO/IODispatcher.h
+3
-3
Simulation.cpp
Simulation.cpp
+101
-88
Simulation.h
Simulation.h
+79
-42
general/ArgumentParser.h
general/ArgumentParser.h
+5
-1
general/Macros.h
general/Macros.h
+1
-1
main.cpp
main.cpp
+1
-1
outputfiles/trajectories.xml
outputfiles/trajectories.xml
+3753
-3721
routing/AccessPoint.cpp
routing/AccessPoint.cpp
+61
-62
routing/AccessPoint.h
routing/AccessPoint.h
+17
-19
routing/DTriangulation.cpp
routing/DTriangulation.cpp
+2
-0
routing/DTriangulation.h
routing/DTriangulation.h
+41
-8
routing/DirectionStrategy.h
routing/DirectionStrategy.h
+3
-5
routing/DummyRouter.h
routing/DummyRouter.h
+0
-1
routing/GlobalRouter.cpp
routing/GlobalRouter.cpp
+93
-97
routing/GlobalRouter.h
routing/GlobalRouter.h
+59
-29
routing/QuickestPathRouter.cpp
routing/QuickestPathRouter.cpp
+40
-40
routing/QuickestPathRouter.h
routing/QuickestPathRouter.h
+3
-6
routing/Router.cpp
routing/Router.cpp
+0
-3
routing/Router.h
routing/Router.h
+61
-12
testings/makeBottleneckInifile.py
testings/makeBottleneckInifile.py
+34
-0
testings/makeBottlenecks.py
testings/makeBottlenecks.py
+26
-0
testings/run_flow.py
testings/run_flow.py
+174
-0
No files found.
Doxyfile
View file @
b2c5ba31
...
...
@@ -734,7 +734,7 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*
EXCLUDE_PATTERNS =
EXCLUDE_PATTERNS =
*/testings/* */scripts/* */samples/* */inputfiles/* */outputfiles/* */Debug/* */Release/* */build/* */MCD/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
...
...
IO/IODispatcher.cpp
View file @
b2c5ba31
...
...
@@ -531,20 +531,20 @@ void IODispatcher::WriteFooter() {
Write
(
"</trajectoriesDataset>
\n
"
);
}
Trajectories
::
Trajectories
()
:
Trajectories
FLAT
::
TrajectoriesFLAT
()
:
IODispatcher
()
{
}
void
Trajectories
::
WriteHeader
(
int
nPeds
,
int
fps
,
Building
*
building
)
{
void
Trajectories
FLAT
::
WriteHeader
(
int
nPeds
,
int
fps
,
Building
*
building
)
{
}
void
Trajectories
::
WriteGeometry
(
Building
*
building
)
{
void
Trajectories
FLAT
::
WriteGeometry
(
Building
*
building
)
{
}
void
Trajectories
::
WriteFrame
(
int
frameNr
,
Building
*
building
)
{
void
Trajectories
FLAT
::
WriteFrame
(
int
frameNr
,
Building
*
building
)
{
char
tmp
[
CLENGTH
]
=
""
;
for
(
int
roomindex
=
0
;
roomindex
<
building
->
GetAnzRooms
();
roomindex
++
)
{
...
...
@@ -563,7 +563,7 @@ void Trajectories::WriteFrame(int frameNr, Building* building) {
}
}
void
Trajectories
::
WriteFooter
()
{
void
Trajectories
FLAT
::
WriteFooter
()
{
}
IO/IODispatcher.h
View file @
b2c5ba31
...
...
@@ -75,12 +75,12 @@ public:
};
class
Trajectories
:
public
IODispatcher
{
class
Trajectories
FLAT
:
public
IODispatcher
{
public:
Trajectories
();
virtual
~
Trajectories
(){};
Trajectories
FLAT
();
virtual
~
Trajectories
FLAT
(){};
virtual
void
WriteHeader
(
int
nPeds
,
int
fps
,
Building
*
building
);
virtual
void
WriteGeometry
(
Building
*
building
);
...
...
Simulation.cpp
View file @
b2c5ba31
/**
* @file Simulation.cpp
* @date Created on: Dec 15, 2010
* Copyright (C) <2009-2011>
*
* @section LICENSE
* This file is part of JuPedSim.
*
* JuPedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* JuPedSim is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* \section description
* The Simulation class represents a simulation of pedestrians
* based on a certain model in a specific scenario. A simulation is defined by
* various parameters and functions.
*
*/
#include "Simulation.h"
/************************************************
// Konstruktoren
************************************************/
Simulation
::
Simulation
()
{
pActionPt
=
0
;
// on or off, wird für GCFM benötigt
pNPeds
=
0
;
// number of pedestrians, Default 10
pTmax
=
0
;
pDt
=
0
;
pBuilding
=
NULL
;
pDistribution
=
NULL
;
pDirection
=
NULL
;
pModel
=
NULL
;
pSolver
=
NULL
;
iod
=
new
IODispatcher
();
pTrajectories
=
new
Trajectories
();
fps
=
1
;
_nPeds
=
0
;
// number of pedestrians, Default 10
_tmax
=
0
;
_deltaT
=
0
;
_building
=
NULL
;
_distribution
=
NULL
;
_direction
=
NULL
;
_model
=
NULL
;
_solver
=
NULL
;
_iod
=
new
IODispatcher
();
_fps
=
1
;
}
Simulation
::~
Simulation
()
{
delete
pBuilding
;
delete
pDistribution
;
delete
pDirection
;
delete
pModel
;
delete
pSolver
;
delete
iod
;
delete
pTrajectories
;
delete
_building
;
delete
_distribution
;
delete
_direction
;
delete
_model
;
delete
_solver
;
delete
_iod
;
}
/************************************************
...
...
@@ -36,8 +56,8 @@ Simulation::~Simulation() {
************************************************/
int
Simulation
::
SetNPeds
(
int
i
)
{
return
pN
Peds
=
i
;
void
Simulation
::
SetPedsNumber
(
int
i
)
{
_n
Peds
=
i
;
}
...
...
@@ -46,21 +66,15 @@ int Simulation::SetNPeds(int i) {
************************************************/
int
Simulation
::
Get
NPeds
()
const
{
return
pN
Peds
;
int
Simulation
::
Get
PedsNumber
()
const
{
return
_n
Peds
;
}
Building
*
Simulation
::
GetBuilding
()
const
{
return
pB
uilding
;
return
_b
uilding
;
}
/************************************************
// Sonstige-Funktionen
************************************************/
/* bekommt alle Konsolenoptionen vom ArgumentParser
* und setzt die entsprechenden Parameter in der Simulation
* */
void
Simulation
::
InitArgs
(
ArgumentParser
*
args
)
{
char
tmp
[
CLENGTH
];
string
s
=
"Parameter:
\n
"
;
...
...
@@ -96,7 +110,7 @@ void Simulation::InitArgs(ArgumentParser* args) {
{
OutputHandler
*
travisto
=
new
TraVisToHandler
(
args
->
GetHostname
(),
args
->
GetPort
());
iod
->
AddIO
(
travisto
);
_
iod
->
AddIO
(
travisto
);
break
;
}
case
FORMAT_XML_BIN
:
...
...
@@ -129,7 +143,7 @@ void Simulation::InitArgs(ArgumentParser* args) {
case
FORMAT_XML_PLAIN
:
{
OutputHandler
*
tofile
=
new
FileHandler
(
args
->
GetTrajectoriesFile
().
c_str
());
iod
->
AddIO
(
tofile
);
_
iod
->
AddIO
(
tofile
);
break
;
}
case
FORMAT_XML_BIN
:
...
...
@@ -141,8 +155,11 @@ void Simulation::InitArgs(ArgumentParser* args) {
case
FORMAT_PLAIN
:
{
Log
->
Write
(
"INFO:
\t
Format plain not yet supported
\n
"
);
OutputHandler
*
file
=
new
FileHandler
(
"./Trajektorien.dat"
);
pTrajectories
->
AddIO
(
file
);
OutputHandler
*
file
=
new
FileHandler
(
args
->
GetTrajectoriesFile
().
c_str
());
if
(
_iod
)
delete
_iod
;
_iod
=
new
TrajectoriesFLAT
();
_iod
->
AddIO
(
file
);
exit
(
0
);
break
;
}
...
...
@@ -157,36 +174,36 @@ void Simulation::InitArgs(ArgumentParser* args) {
}
pD
istribution
=
new
PedDistributor
(
args
->
GetV0Mu
(),
args
->
GetV0Sigma
(),
args
->
GetBmaxMu
(),
_d
istribution
=
new
PedDistributor
(
args
->
GetV0Mu
(),
args
->
GetV0Sigma
(),
args
->
GetBmaxMu
(),
args
->
GetBmaxSigma
(),
args
->
GetBminMu
(),
args
->
GetBminSigma
(),
args
->
GetAtauMu
(),
args
->
GetAtauSigma
(),
args
->
GetAminMu
(),
args
->
GetAminSigma
(),
args
->
GetTauMu
(),
args
->
GetTauSigma
());
s
.
append
(
pD
istribution
->
writeParameter
());
pD
istribution
->
InitDistributor
(
args
->
GetPersonsFilename
());
s
.
append
(
_d
istribution
->
writeParameter
());
_d
istribution
->
InitDistributor
(
args
->
GetPersonsFilename
());
//
Richtungswahl zum Ziel
//
define how the navigation line is crossed
int
direction
=
args
->
GetExitStrategy
();
sprintf
(
tmp
,
"
\t
Richtung zum Ausgang: %d
\n
"
,
direction
);
s
.
append
(
tmp
);
switch
(
direction
)
{
case
1
:
pD
irection
=
new
DirectionMiddlePoint
();
_d
irection
=
new
DirectionMiddlePoint
();
break
;
case
2
:
pD
irection
=
new
DirectionMinSeperation
();
_d
irection
=
new
DirectionMinSeperation
();
break
;
case
3
:
pD
irection
=
new
DirectionMinSeperationShorterLine
();
_d
irection
=
new
DirectionMinSeperationShorterLine
();
break
;
case
4
:
pD
irection
=
new
DirectionInRangeBottleneck
();
_d
irection
=
new
DirectionInRangeBottleneck
();
break
;
}
pModel
=
new
GCFMModel
(
pD
irection
,
args
->
GetNuPed
(),
args
->
GetNuWall
(),
args
->
GetDistEffMaxPed
(),
_model
=
new
GCFMModel
(
_d
irection
,
args
->
GetNuPed
(),
args
->
GetNuWall
(),
args
->
GetDistEffMaxPed
(),
args
->
GetDistEffMaxWall
(),
args
->
GetIntPWidthPed
(),
args
->
GetIntPWidthWall
(),
args
->
GetMaxFPed
(),
args
->
GetMaxFWall
());
s
.
append
(
"
\t
Model: GCFMModel
\n
"
);
s
.
append
(
pM
odel
->
writeParameter
());
s
.
append
(
_m
odel
->
writeParameter
());
// ODE solver
int
solver
=
args
->
GetSolver
();
...
...
@@ -194,24 +211,24 @@ void Simulation::InitArgs(ArgumentParser* args) {
s
.
append
(
tmp
);
switch
(
solver
)
{
case
1
:
pSolver
=
new
EulerSolverLC
(
pM
odel
);
_solver
=
new
EulerSolverLC
(
_m
odel
);
break
;
case
2
:
pSolver
=
new
VelocityVerletSolver
(
pM
odel
);
_solver
=
new
VelocityVerletSolver
(
_m
odel
);
break
;
case
3
:
pSolver
=
new
LeapfrogSolver
(
pM
odel
);
_solver
=
new
LeapfrogSolver
(
_m
odel
);
break
;
}
pT
max
=
args
->
GetTmax
();
sprintf
(
tmp
,
"
\t
t_max: %f
\n
"
,
pT
max
);
_t
max
=
args
->
GetTmax
();
sprintf
(
tmp
,
"
\t
t_max: %f
\n
"
,
_t
max
);
s
.
append
(
tmp
);
pDt
=
args
->
Getdt
();
sprintf
(
tmp
,
"
\t
dt: %f
\n
"
,
pDt
);
_deltaT
=
args
->
Getdt
();
sprintf
(
tmp
,
"
\t
dt: %f
\n
"
,
_deltaT
);
s
.
append
(
tmp
);
fps
=
args
->
Getfps
();
sprintf
(
tmp
,
"
\t
fps: %f
\n
"
,
fps
);
_
fps
=
args
->
Getfps
();
sprintf
(
tmp
,
"
\t
fps: %f
\n
"
,
_
fps
);
s
.
append
(
tmp
);
// Routing
...
...
@@ -280,19 +297,19 @@ void Simulation::InitArgs(ArgumentParser* args) {
// IMPORTANT: do not change the order in the following..
pB
uilding
=
new
Building
();
pB
uilding
->
SetRoutingEngine
(
routingEngine
);
_b
uilding
=
new
Building
();
_b
uilding
->
SetRoutingEngine
(
routingEngine
);
sprintf
(
tmp
,
"
\t
Geometrie: [%s]
\n
"
,
args
->
GetGeometryFilename
().
c_str
());
s
.
append
(
tmp
);
Log
->
Write
(
"INFO:
\t
"
+
s
);
pB
uilding
->
LoadBuilding
(
args
->
GetGeometryFilename
());
pB
uilding
->
AddSurroundingRoom
();
pB
uilding
->
InitGeometry
();
// create the polygones
_b
uilding
->
LoadBuilding
(
args
->
GetGeometryFilename
());
_b
uilding
->
AddSurroundingRoom
();
_b
uilding
->
InitGeometry
();
// create the polygones
pB
uilding
->
LoadTrafficInfo
(
args
->
GetTrafficFile
());
_b
uilding
->
LoadTrafficInfo
(
args
->
GetTrafficFile
());
pB
uilding
->
LoadRoutingInfo
(
args
->
GetRoutingFile
());
_b
uilding
->
LoadRoutingInfo
(
args
->
GetRoutingFile
());
/////////
...
...
@@ -311,18 +328,18 @@ void Simulation::InitArgs(ArgumentParser* args) {
////////
pNPeds
=
pDistribution
->
Distribute
(
pB
uilding
);
_nPeds
=
_distribution
->
Distribute
(
_b
uilding
);
// initialise the routing engine before doing any other things
routingEngine
->
Init
(
pB
uilding
);
pBuilding
->
InitPhiAllPeds
(
pDt
);
routingEngine
->
Init
(
_b
uilding
);
_building
->
InitPhiAllPeds
(
_deltaT
);
//using linkedcells
if
(
args
->
GetLinkedCells
()){
s
.
append
(
"
\t
using Linked-Cells
\n
"
);
pB
uilding
->
InitGrid
(
args
->
GetLinkedCellSize
());
_b
uilding
->
InitGrid
(
args
->
GetLinkedCellSize
());
}
else
{
pB
uilding
->
InitGrid
(
-
1
);
_b
uilding
->
InitGrid
(
-
1
);
}
...
...
@@ -330,45 +347,41 @@ void Simulation::InitArgs(ArgumentParser* args) {
if
(
args
->
GetPathwayFile
()
!=
""
){
char
name
[
30
]
=
""
;
sprintf
(
name
,
"%s_p0"
,
args
->
GetPathwayFile
().
c_str
());
pB
uilding
->
InitSavePedPathway
(
name
);
_b
uilding
->
InitSavePedPathway
(
name
);
}
//pBuilding->WriteToErrorLog();
}
/* Eigentliche Simulation
* Rückgabewert:
* - Evakuierungszeit
* */
int
Simulation
::
RunSimulation
()
{
int
frameNr
=
1
;
// Frame Number
int
writeInterval
=
(
int
)
((
1.
/
fps
)
/
pDt
+
0.5
);
int
writeInterval
=
(
int
)
((
1.
/
_fps
)
/
_deltaT
+
0.5
);
writeInterval
=
(
writeInterval
<=
0
)
?
1
:
writeInterval
;
// mustn't be <= 0
double
t
;
// writing the header
iod
->
WriteHeader
(
pNPeds
,
fps
,
pB
uilding
);
iod
->
WriteGeometry
(
pB
uilding
);
iod
->
WriteFrame
(
0
,
pB
uilding
);
_iod
->
WriteHeader
(
_nPeds
,
_fps
,
_b
uilding
);
_iod
->
WriteGeometry
(
_b
uilding
);
_iod
->
WriteFrame
(
0
,
_b
uilding
);
//first initialisation needed by the linked-cells
Update
();
// main program loop
for
(
t
=
0
;
t
<
pTmax
&&
GetNPeds
()
>
0
;
++
frameNr
)
{
t
=
0
+
(
frameNr
-
1
)
*
pDt
;
for
(
t
=
0
;
t
<
_tmax
&&
_nPeds
>
0
;
++
frameNr
)
{
t
=
0
+
(
frameNr
-
1
)
*
_deltaT
;
// solve ODE: berechnet Kräfte und setzt neue Werte für x und v
pSolver
->
solveODE
(
t
,
t
+
pDt
,
pB
uilding
);
_solver
->
solveODE
(
t
,
t
+
_deltaT
,
_b
uilding
);
// gucken ob Fußgänger in neuen Räumen/Unterräumen
Update
();
// ggf. Ausgabe für TraVisTo
if
(
frameNr
%
writeInterval
==
0
)
{
iod
->
WriteFrame
(
frameNr
/
writeInterval
,
pB
uilding
);
_iod
->
WriteFrame
(
frameNr
/
writeInterval
,
_b
uilding
);
}
// if (frameNr % 1000 == 0) {
// cout<<" \r";
...
...
@@ -377,7 +390,7 @@ int Simulation::RunSimulation() {
// }
}
// writing the footer
iod
->
WriteFooter
();
_
iod
->
WriteFooter
();
//return the evacuation time
return
(
int
)
t
;
...
...
@@ -387,18 +400,18 @@ int Simulation::RunSimulation() {
* ob Fußgänger von einem Raum in einen anderen gesetzt
* werden müßen
* */
// TODO: make the building class more independent by moving the update routing here.
void
Simulation
::
Update
()
{
pB
uilding
->
Update
();
_b
uilding
->
Update
();
// Neue Anzahl von Fußgänger, falls jemand ganz raus geht
SetNPeds
(
pBuilding
->
GetAllPedestrians
().
size
()
);
_nPeds
=
_building
->
GetAllPedestrians
().
size
(
);
// update the general time
Pedestrian
::
SetGlobalTime
(
Pedestrian
::
GetGlobalTime
()
+
pDt
);
Pedestrian
::
SetGlobalTime
(
Pedestrian
::
GetGlobalTime
()
+
_deltaT
);
//update the cells position
//if (pLinkedCells){
pB
uilding
->
UpdateGrid
();
_b
uilding
->
UpdateGrid
();
//}
}
Simulation.h
View file @
b2c5ba31
/*Simulation.h:
The Simulation class represents a simulation of pedestrians
based on a certain model in a specific scenario. A simulation is defined by
various parameters and functions.
Copyright (C) <2009-2010> <Jonas Mehlich and Mohcine Chraibi>
This file is part of OpenPedSim.
OpenPedSim is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
OpenPedSim is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
/**
* @file Simulation.h
* @date Created on: Dec 15, 2010
* Copyright (C) <2009-2011>
*
* @section LICENSE
* This file is part of JuPedSim.
*
* JuPedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* JuPedSim is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* \section description
* The Simulation class represents a simulation of pedestrians
* based on a certain model in a specific scenario. A simulation is defined by
* various parameters and functions.
*
*/
#ifndef SIMULATION_H_
...
...
@@ -43,36 +49,67 @@ extern OutputHandler* Log;
class
Simulation
{
private:
int
pActionPt
;
// on or off
int
pNPeds
;
// number of pedestrians
double
pTmax
;
// Maximale Simulationszeit
double
pDt
;
// Zeitschritt
double
fps
;
// framerate
Building
*
pBuilding
;
// Geometrie mit Rooms, SubRooms und Wänden
PedDistributor
*
pDistribution
;
// verteilt die Fußgänger zu Beginn der Simulation
DirectionStrategy
*
pDirection
;
// gibt die Richtungswahl zum Ziel an
ForceModel
*
pModel
;
// das verwendete Kraftmodell (im Moment nur GCFM)
ODESolver
*
pSolver
;
// Löser für die ODE
IODispatcher
*
iod
;
Trajectories
*
pTrajectories
;
///Number of pedestrians in the simulation
int
_nPeds
;
///Maximum simulation time
double
_tmax
;
/// time step
double
_deltaT
;
/// frame rate for the trajectories
double
_fps
;
/// building object
Building
*
_building
;
///initial distribution of the pedestrians
PedDistributor
*
_distribution
;
/// door crossing strategy for the pedestrians
DirectionStrategy
*
_direction
;
/// Force model to use
ForceModel
*
_model
;
/// differential equation solver
ODESolver
*
_solver
;
/// writing the trajectories to file
IODispatcher
*
_iod
;
public:
// Konstruktor
Simulation
();
virtual
~
Simulation
();
// Setter-Funktionen
int
SetNPeds
(
int
i
);
// Getter-Funktionen
int
GetNPeds
()
const
;
/**
* Initialize the number of agents in the simulation
*/
void
SetPedsNumber
(
int
i
);
/**
* Initialize the number of agents in the simulation
*/
int
GetPedsNumber
()
const
;
/**
* Returns the number of agents when running on a distributed system (MPI)
* NOT IMPLEMENTED
*/
int
GetNPedsGlobal
()
const
;
/**
* @return the building object containing all geometry elements
*/
Building
*
GetBuilding
()
const
;
// Sonstige-Funktionen
/**
* Read parameters from the argument parser class.
*/
void
InitArgs
(
ArgumentParser
*
args
);
int
InitSimulation
();
/**
*
* @return the total simulated/evacuation time
*/
int
RunSimulation
();
void
Update
();
// update the complete system
void
DistributeDestinations
();
//assign the pedestrians their final destinations
void
InitRoutineClearing
();
// set some parameters specific to routine clearing
/**
* Update the pedestrians states: positions, velocity, route
*/
void
Update
();
};
...
...
general/ArgumentParser.h
View file @
b2c5ba31
...
...
@@ -145,10 +145,14 @@ public:
const
FileFormat
&
GetFileFormat
()
const
;
/**
* Parse the commands passed to the command line
* specially looks for the initialization file
*/
void
ParseArgs
(
int
argc
,
char
**
argv
);
/**
*
p
arse the initialization file
*
P
arse the initialization file
* @param inifile
*/
void
ParseIniFile
(
string
inifile
);
...
...
general/Macros.h
View file @
b2c5ba31
...
...
@@ -37,7 +37,7 @@
// zur Versionskontrolle beim Geometrieformat
#define VERSION 0.40
#define JPS_VERSION "
1.1
"
#define JPS_VERSION "
0.4
"
// Länge von char vectoren zur Ausgabe
#define CLENGTH 1000
...
...
main.cpp
View file @
b2c5ba31
...
...
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
//some output
double
execTime
=
difftime
(
endtime
,
starttime
);
char
tmp
[
CLENGTH
];
sprintf
(
tmp
,
"
\n
Pedestrians [%d] threads [%d]"
,
sim
.
Get
NPeds
(),
sprintf
(
tmp
,
"
\n
Pedestrians [%d] threads [%d]"
,
sim
.
Get
PedsNumber
(),
args
->
GetMaxOpenMPThreads
());
Log
->
Write
(
tmp
);
sprintf
(
tmp
,
"
\n
Exec Time [s] : %.2f"
,
execTime
);
...
...
outputfiles/trajectories.xml
View file @
b2c5ba31
This diff is collapsed.
Click to expand it.
routing/AccessPoint.cpp
View file @
b2c5ba31
...
...
@@ -6,20 +6,20 @@
* Copyright (C) <2009-2010>
*
* @section LICENSE
* This file is part of
Open
PedSim.
* This file is part of
Ju
PedSim.
*
*
Open
PedSim is free software: you can redistribute it and/or modify
*
Ju
PedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
*
Open
PedSim is distributed in the hope that it will be useful,
*
Ju
PedSim is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with
Open
PedSim. If not, see <http://www.gnu.org/licenses/>.
* along with
Ju
PedSim. If not, see <http://www.gnu.org/licenses/>.
*
* @section DESCRIPTION
*
...
...
@@ -34,20 +34,20 @@ using namespace std;
AccessPoint
::
AccessPoint
(
int
id
,
double
center
[
2
],
double
radius
)
{
pID
=
id
;
pC
enter
[
0
]
=
center
[
0
];
pC
enter
[
1
]
=
center
[
1
];
pR
adius
=
radius
;
pF
inalDestination
=
false
;
pR
oom1ID
=-
1
;
pR
oom2ID
=-
1
;
pC
onnectingAPs
.
clear
();
pM
apDestToDist
.
clear
();
_id
=
id
;
_c
enter
[
0
]
=
center
[
0
];
_c
enter
[
1
]
=
center
[
1
];
_r
adius
=
radius
;
_f
inalDestination
=
false
;
_r
oom1ID
=-
1
;
_r
oom2ID
=-
1
;
_c
onnectingAPs
.
clear
();
_m
apDestToDist
.
clear
();
pCentre
=
Point
(
center
[
0
],
center
[
1
]);
pT
ransitPedestrians
=
vector
<
Pedestrian
*>
();
pC
onnectingAPs
=
vector
<
AccessPoint
*>
();
pI
sClosed
=
0
;
pN
avLine
=
NULL
;