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
bff89e48
Commit
bff89e48
authored
Nov 06, 2017
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass Matrix by reference
HUGE performace boost
parent
827c693f
Pipeline
#5117
passed with stages
in 1 minute and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
methods/Method_A.cpp
methods/Method_A.cpp
+1
-1
methods/PedData.cpp
methods/PedData.cpp
+2
-2
methods/PedData.h
methods/PedData.h
+2
-2
No files found.
methods/Method_A.cpp
View file @
bff89e48
...
@@ -123,7 +123,7 @@ void Method_A::WriteFile_N_t(string data)
...
@@ -123,7 +123,7 @@ void Method_A::WriteFile_N_t(string data)
string
file_N_t
=
"Flow_NT_"
+
_trajName
+
"_id_"
+
_measureAreaId
+
".dat"
;
string
file_N_t
=
"Flow_NT_"
+
_trajName
+
"_id_"
+
_measureAreaId
+
".dat"
;
if
(
_plotTimeSeries
)
if
(
_plotTimeSeries
)
{
{
string
parameters_N_t
=
"python
\"
"
+
_scriptsLocation
+
"/_Plot_N_t.py
\"
-p
\"
"
+
METHOD_A_LOCATION
+
"
\"
-n "
+
file_N_t
;
string
parameters_N_t
=
"python
3
\"
"
+
_scriptsLocation
+
"/_Plot_N_t.py
\"
-p
\"
"
+
METHOD_A_LOCATION
+
"
\"
-n "
+
file_N_t
;
int
res
=
system
(
parameters_N_t
.
c_str
());
int
res
=
system
(
parameters_N_t
.
c_str
());
Log
->
Write
(
"INFO:
\t
Plotting N-t diagram! Status: %d"
,
res
);
Log
->
Write
(
"INFO:
\t
Plotting N-t diagram! Status: %d"
,
res
);
}
}
...
...
methods/PedData.cpp
View file @
bff89e48
...
@@ -567,7 +567,7 @@ vector<int> PedData::GetIdInFrame(int frame, const vector<int>& ids, double zPos
...
@@ -567,7 +567,7 @@ vector<int> PedData::GetIdInFrame(int frame, const vector<int>& ids, double zPos
return
IdInFrame
;
return
IdInFrame
;
}
}
double
PedData
::
GetInstantaneousVelocity
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
ub
::
matrix
<
double
>
Xcor
,
ub
::
matrix
<
double
>
Ycor
)
const
double
PedData
::
GetInstantaneousVelocity
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
const
ub
::
matrix
<
double
>
&
Xcor
,
const
ub
::
matrix
<
double
>
&
Ycor
)
const
{
{
std
::
string
vcmp
=
_vComp
(
ID
,
Tnow
);
std
::
string
vcmp
=
_vComp
(
ID
,
Tnow
);
double
v
=
0.0
;
double
v
=
0.0
;
...
@@ -628,7 +628,7 @@ double PedData::GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID
...
@@ -628,7 +628,7 @@ double PedData::GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID
return
fabs
(
v
);
return
fabs
(
v
);
}
}
double
PedData
::
GetInstantaneousVelocity1
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
ub
::
matrix
<
double
>
Xcor
,
ub
::
matrix
<
double
>
Ycor
)
const
double
PedData
::
GetInstantaneousVelocity1
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
const
ub
::
matrix
<
double
>
&
Xcor
,
const
ub
::
matrix
<
double
>
&
Ycor
)
const
{
{
std
::
string
vcmp
=
_vComp
(
ID
,
Tnow
);
// the vcmp is the angle from 0 to 360
std
::
string
vcmp
=
_vComp
(
ID
,
Tnow
);
// the vcmp is the angle from 0 to 360
if
(
vcmp
==
"X+"
)
if
(
vcmp
==
"X+"
)
...
...
methods/PedData.h
View file @
bff89e48
...
@@ -81,8 +81,8 @@ private:
...
@@ -81,8 +81,8 @@ private:
bool
InitializeVariables
(
const
std
::
string
&
filename
);
bool
InitializeVariables
(
const
std
::
string
&
filename
);
bool
InitializeVariables
(
TiXmlElement
*
xRootNode
);
bool
InitializeVariables
(
TiXmlElement
*
xRootNode
);
void
CreateGlobalVariables
(
int
numPeds
,
int
numFrames
);
void
CreateGlobalVariables
(
int
numPeds
,
int
numFrames
);
double
GetInstantaneousVelocity
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
ub
::
matrix
<
double
>
Xcor
,
ub
::
matrix
<
double
>
Ycor
)
const
;
double
GetInstantaneousVelocity
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
const
ub
::
matrix
<
double
>
&
Xcor
,
const
ub
::
matrix
<
double
>
&
Ycor
)
const
;
double
GetInstantaneousVelocity1
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
ub
::
matrix
<
double
>
Xcor
,
ub
::
matrix
<
double
>
Ycor
)
const
;
double
GetInstantaneousVelocity1
(
int
Tnow
,
int
Tpast
,
int
Tfuture
,
int
ID
,
int
*
Tfirst
,
int
*
Tlast
,
const
ub
::
matrix
<
double
>
&
Xcor
,
const
ub
::
matrix
<
double
>
&
Ycor
)
const
;
private:
private:
...
...
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