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
a8a1414c
Commit
a8a1414c
authored
Jan 09, 2018
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for profile script
parent
e13c3e27
Pipeline
#5905
passed with stages
in 1 minute and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
demos/T-Junction/ini_KO_240_050_240.xml
demos/T-Junction/ini_KO_240_050_240.xml
+7
-8
scripts/_Plot_profiles.py
scripts/_Plot_profiles.py
+17
-12
No files found.
demos/T-Junction/ini_KO_240_050_240.xml
View file @
a8a1414c
...
...
@@ -5,7 +5,7 @@
<!-- trajectories file and format -->
<!-- either a file name or a path location. In the latter case all files in the directory will be used-->
<trajectories
format=
"txt"
unit=
"m"
>
<file
name=
"traj_KO_240_050_240
_x
.txt"
/>
<file
name=
"traj_KO_240_050_240.txt"
/>
<path
location=
"./"
/>
</trajectories>
<!-- give relative path based on the location inifile or give the absolute path- -->
...
...
@@ -37,14 +37,14 @@
</area_L>
</measurement_areas>
<!--
<velocity>
<velocity>
<use_x_component>
true
</use_x_component>
<use_y_component>
true
</use_y_component>
<!-- The time interval that used to calculate instantaneous velocity
of ped i [fr] here v_i = (X(t+frame_step/2) - X(t+frame_step/2))/frame_step. X is location.
of ped i [fr] here v_i = (X(t+frame_step/2) - X(t+frame_step/2))/frame_step. X is location.
-->
<frame_step>
10
</frame_step>
</velocity>
-->
<velocity
frame_step=
"10"
set_movement_direction=
"None"
ignore_backward_movement=
"false"
/>
<!-- frame_step is the time interval that used to calculate instantaneous velocity
of ped i [fr] here v_i = (X(t+frame_step/2) - X(t+frame_step/2))/frame_step. X is location. -->
...
...
@@ -62,19 +62,18 @@
</method_B>
<!-- Method C (Zhang2011a) Classical density and Vel -->
<method_C
enabled=
"
tru
e"
>
<method_C
enabled=
"
fals
e"
>
<measurement_area
id=
"1"
plot_time_series=
"true"
/>
<measurement_area
id=
"2"
plot_time_series=
"true"
/>
</method_C>
<!-- Method D (Zhang2011a) Voronoi density and Vel -->
<method_D
enabled=
"true"
>
<measurement_area
id=
"1"
start_frame=
"None"
stop_frame=
"None"
get_individual_FD=
"false"
plot_time_series=
"true"
/>
<measurement_area
id=
"2"
start_frame=
"500"
stop_frame=
"800"
get_individual_FD=
"false"
plot_time_series=
"true"
/>
<measurement_area
id=
"1"
start_frame=
"500"
stop_frame=
"800"
get_individual_FD=
"false"
plot_time_series=
"true"
/>
<one_dimensional
enabled=
"false"
/>
<cut_by_circle
enabled=
"false"
radius=
"1.0"
edges=
"10"
/>
<output_voronoi_cells
enabled=
"false"
plot_graphs=
"false"
/>
<profiles
enabled=
"
fals
e"
grid_size_x=
"0.20"
grid_size_y=
"0.20"
/>
<profiles
enabled=
"
tru
e"
grid_size_x=
"0.20"
grid_size_y=
"0.20"
/>
</method_D>
</JPSreport>
scripts/_Plot_profiles.py
View file @
a8a1414c
...
...
@@ -22,10 +22,10 @@ def get_parser_args():
'steady state'
)
parser
.
add_argument
(
"-e"
,
"--endsteady"
,
type
=
int
,
required
=
True
,
help
=
'the frame for the ending of '
'steady state'
)
parser
.
add_argument
(
"-x1"
,
"--geominx"
,
type
=
float
,
required
=
True
,
help
=
'the minmum x of the geometry'
)
parser
.
add_argument
(
"-x2"
,
"--geomaxx"
,
type
=
float
,
required
=
True
,
help
=
'the maxmum x of the geometry'
)
parser
.
add_argument
(
"-y1"
,
"--geominy"
,
type
=
float
,
required
=
True
,
help
=
'the minmum y of the geometry'
)
parser
.
add_argument
(
"-y2"
,
"--geomaxy"
,
type
=
float
,
required
=
True
,
help
=
'the maxmum y of the geometry'
)
parser
.
add_argument
(
"-x1"
,
"--geominx"
,
type
=
float
,
required
=
True
,
help
=
'the min
i
mum x of the geometry'
)
parser
.
add_argument
(
"-x2"
,
"--geomaxx"
,
type
=
float
,
required
=
True
,
help
=
'the max
i
mum x of the geometry'
)
parser
.
add_argument
(
"-y1"
,
"--geominy"
,
type
=
float
,
required
=
True
,
help
=
'the min
i
mum y of the geometry'
)
parser
.
add_argument
(
"-y2"
,
"--geomaxy"
,
type
=
float
,
required
=
True
,
help
=
'the max
i
mum y of the geometry'
)
arguments
=
parser
.
parse_args
()
return
arguments
...
...
@@ -66,11 +66,14 @@ if __name__ == '__main__':
ax1
=
fig
.
add_subplot
(
111
,
aspect
=
'1'
)
plt
.
rc
(
"font"
,
size
=
40
)
for
j
in
range
(
beginsteady
,
endsteady
):
density_file
=
os
.
path
.
join
(
pathfile
,
"density"
,
"Prf_d_%s
_id_1_%.5d.dat"
%
(
nametraj
,
j
))
print
(
"loading: %s"
%
density_file
)
density
+=
np
.
loadtxt
(
density_file
)
density_file
=
os
.
path
.
join
(
pathfile
,
"density"
,
"Prf_d_%s_id_1_%.5d.dat"
%
(
nametraj
,
j
))
if
os
.
path
.
exists
(
density_file
):
print
(
"loading: %s"
%
density_file
)
density
+=
np
.
loadtxt
(
density_file
)
else
:
print
(
"WARNING: file not found %s"
%
density_file
)
density
=
density
/
(
endsteady
-
beginsteady
)
...
...
@@ -97,9 +100,11 @@ _id_1_%.5d.dat" % (nametraj, j))
for
j
in
range
(
beginsteady
,
endsteady
):
velocity_file
=
os
.
path
.
join
(
pathfile
,
"velocity"
,
"Prf_v_%s_id_1_%.5d.dat"
%
(
nametraj
,
j
))
print
(
"loading: %s"
%
velocity_file
)
velocity
+=
np
.
loadtxt
(
velocity_file
)
if
os
.
path
.
exists
(
velocity_file
):
print
(
"loading: %s"
%
velocity_file
)
velocity
+=
np
.
loadtxt
(
velocity_file
)
else
:
print
(
"WARNING: file not found %s"
%
velocity_file
)
velocity
=
velocity
/
(
endsteady
-
beginsteady
)
im
=
plt
.
imshow
(
velocity
,
cmap
=
cm
.
jet
,
...
...
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