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
JPSreport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
JuPedSim
JPSreport
Commits
f6bb29e8
Verified
Commit
f6bb29e8
authored
Feb 22, 2019
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init method I
parent
bfc4ed47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
19 deletions
+58
-19
Analysis.cpp
Analysis.cpp
+14
-2
general/ArgumentParser.cpp
general/ArgumentParser.cpp
+42
-17
general/ArgumentParser.h
general/ArgumentParser.h
+2
-0
No files found.
Analysis.cpp
View file @
f6bb29e8
...
...
@@ -140,7 +140,7 @@ void Analysis::InitArgs(ArgumentParser* args)
}
}
if
(
args
->
GetIsMethodC
())
{
if
(
args
->
GetIsMethodC
())
{
_DoesUseMethodC
=
true
;
vector
<
int
>
Measurement_Area_IDs
=
args
->
GetAreaIDforMethodC
();
for
(
unsigned
int
i
=
0
;
i
<
Measurement_Area_IDs
.
size
();
i
++
)
...
...
@@ -150,7 +150,7 @@ void Analysis::InitArgs(ArgumentParser* args)
_plotTimeseriesC
=
args
->
GetIsPlotTimeSeriesC
();
}
if
(
args
->
GetIsMethodD
())
{
if
(
args
->
GetIsMethodD
())
{
_DoesUseMethodD
=
true
;
vector
<
int
>
Measurement_Area_IDs
=
args
->
GetAreaIDforMethodD
();
for
(
unsigned
int
i
=
0
;
i
<
Measurement_Area_IDs
.
size
();
i
++
)
...
...
@@ -162,6 +162,18 @@ void Analysis::InitArgs(ArgumentParser* args)
_IndividualFDFlags
=
args
->
GetIndividualFDFlags
();
_plotTimeseriesD
=
args
->
GetIsPlotTimeSeriesD
();
}
if
(
args
->
GetIsMethodI
())
{
_DoesUseMethodI
=
true
;
vector
<
int
>
Measurement_Area_IDs
=
args
->
GetAreaIDforMethodI
();
for
(
unsigned
int
i
=
0
;
i
<
Measurement_Area_IDs
.
size
();
i
++
)
{
_areaForMethod_I
.
push_back
(
dynamic_cast
<
MeasurementArea_B
*>
(
args
->
GetMeasurementArea
(
Measurement_Area_IDs
[
i
])));
}
_StartFramesMethodI
=
args
->
GetStartFramesMethodI
();
_StopFramesMethodI
=
args
->
GetStopFramesMethodI
();
_IndividualFDFlags
=
args
->
GetIndividualFDFlags
();
_plotTimeseriesI
=
args
->
GetIsPlotTimeSeriesI
();
}
_deltaF
=
args
->
GetDelatT_Vins
();
_cutByCircle
=
args
->
GetIsCutByCircle
();
...
...
general/ArgumentParser.cpp
View file @
f6bb29e8
...
...
@@ -483,23 +483,6 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
{
areaB
->
_zPos
=
10000001.0
;
}
// get bounding box
// loading geometry is done in analysis.cpp
// so this is done twice, which is not nice.
// For big geometries it could be slow.
Building
*
building
=
new
Building
();
building
->
LoadGeometry
(
GetGeometryFilename
().
string
());
building
->
InitGeometry
();
building
->
AddSurroundingRoom
();
// this is a big reactagle
// slightly bigger than the
// geometry boundaries
double
geo_minX
=
building
->
_xMin
;
double
geo_minY
=
building
->
_yMin
;
double
geo_maxX
=
building
->
_xMax
;
double
geo_maxY
=
building
->
_yMax
;
Log
->
Write
(
"INFO:
\t
Bounding box:
\n
\t\t
minX = %.2f
\n
\t\t
maxX = %.2f
\n
\t\t
minY = %.2f
\n\t\t
maxY = %.2f"
,
geo_minX
,
geo_maxX
,
geo_minY
,
geo_maxY
);
std
::
map
<
int
,
polygon_2d
>
geoPoly
;
polygon_2d
poly
;
Log
->
Write
(
"INFO:
\t
Measure area id <%d> with type <%s>"
,
areaB
->
_id
,
areaB
->
_type
.
c_str
());
...
...
@@ -517,6 +500,24 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
if
(
num_verteces
==
0
)
// big bounding box
{
Log
->
Write
(
"
\t
WARNING: NO measure area points given (%d). default BB!!"
,
num_verteces
);
// get bounding box
// loading geometry is done in analysis.cpp
// so this is done twice, which is not nice.
// For big geometries it could be slow.
Building
*
building
=
new
Building
();
building
->
LoadGeometry
(
GetGeometryFilename
().
string
());
building
->
InitGeometry
();
building
->
AddSurroundingRoom
();
// this is a big reactagle
// slightly bigger than the
// geometry boundaries
double
geo_minX
=
building
->
_xMin
;
double
geo_minY
=
building
->
_yMin
;
double
geo_maxX
=
building
->
_xMax
;
double
geo_maxY
=
building
->
_yMax
;
Log
->
Write
(
"INFO:
\t
Bounding box:
\n
\t\t
minX = %.2f
\n
\t\t
maxX = %.2f
\n
\t\t
minY = %.2f
\n\t\t
maxY = %.2f"
,
geo_minX
,
geo_maxX
,
geo_minY
,
geo_maxY
);
//1
double
box_px
=
geo_minX
*
M2CM
;
double
box_py
=
geo_minY
*
M2CM
;
...
...
@@ -1182,6 +1183,10 @@ bool ArgumentParser::GetIsMethodD() const
{
return
_isMethodD
;
}
bool
ArgumentParser
::
GetIsMethodI
()
const
{
return
_isMethodI
;
}
bool
ArgumentParser
::
GetIsCutByCircle
()
const
{
...
...
@@ -1227,6 +1232,11 @@ vector<bool> ArgumentParser::GetIsPlotTimeSeriesD() const
return
_isPlotTimeSeriesD
;
}
vector
<
bool
>
ArgumentParser
::
GetIsPlotTimeSeriesI
()
const
{
return
_isPlotTimeSeriesI
;
}
bool
ArgumentParser
::
GetIsOneDimensional
()
const
{
return
_isOneDimensional
;
...
...
@@ -1278,16 +1288,31 @@ vector<int> ArgumentParser::GetAreaIDforMethodD() const
return
_areaIDforMethodD
;
}
vector
<
int
>
ArgumentParser
::
GetAreaIDforMethodI
()
const
{
return
_areaIDforMethodI
;
}
vector
<
int
>
ArgumentParser
::
GetStartFramesMethodD
()
const
{
return
_start_frames_MethodD
;
}
vector
<
int
>
ArgumentParser
::
GetStartFramesMethodI
()
const
{
return
_start_frames_MethodI
;
}
vector
<
int
>
ArgumentParser
::
GetStopFramesMethodD
()
const
{
return
_stop_frames_MethodD
;
}
vector
<
int
>
ArgumentParser
::
GetStopFramesMethodI
()
const
{
return
_stop_frames_MethodI
;
}
vector
<
bool
>
ArgumentParser
::
GetIndividualFDFlags
()
const
{
return
_individual_FD_flags
;
...
...
general/ArgumentParser.h
View file @
f6bb29e8
...
...
@@ -136,10 +136,12 @@ public:
bool
GetIsMethodB
()
const
;
bool
GetIsMethodC
()
const
;
bool
GetIsMethodD
()
const
;
bool
GetIsMethodI
()
const
;
std
::
vector
<
int
>
GetAreaIDforMethodA
()
const
;
std
::
vector
<
int
>
GetAreaIDforMethodB
()
const
;
std
::
vector
<
int
>
GetAreaIDforMethodC
()
const
;
std
::
vector
<
int
>
GetAreaIDforMethodD
()
const
;
std
::
vector
<
int
>
GetAreaIDforMethodI
()
const
;
std
::
vector
<
int
>
GetStartFramesMethodD
()
const
;
std
::
vector
<
int
>
GetStopFramesMethodD
()
const
;
std
::
vector
<
int
>
GetStartFramesMethodI
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment