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
60b744d8
Commit
60b744d8
authored
May 02, 2018
by
Arne Graf
Browse files
Options
Browse Files
Download
Plain Diff
merge ff_to_vtk into dev
parents
13f0a3ea
b0c6c61b
Pipeline
#9259
failed with stages
in 6 minutes and 50 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
4 deletions
+46
-4
IO/IniFileParser.cpp
IO/IniFileParser.cpp
+14
-1
general/Configuration.h
general/Configuration.h
+6
-0
routing/DirectionStrategy.cpp
routing/DirectionStrategy.cpp
+25
-2
routing/ff_router/UnivFFviaFM.cpp
routing/ff_router/UnivFFviaFM.cpp
+1
-1
No files found.
IO/IniFileParser.cpp
View file @
60b744d8
...
...
@@ -1414,7 +1414,8 @@ bool IniFileParser::ParseNodeToSolver(const TiXmlNode& solverNode)
bool
IniFileParser
::
ParseStrategyNodeToObject
(
const
TiXmlNode
&
strategyNode
)
{
string
query
=
"exit_crossing_strategy"
;
string
query
=
"exit_crossing_strategy"
;
if
(
!
strategyNode
.
FirstChild
(
query
.
c_str
()))
{
query
=
"exitCrossingStrategy"
;
Log
->
Write
(
...
...
@@ -1461,6 +1462,18 @@ bool IniFileParser::ParseStrategyNodeToObject(const TiXmlNode& strategyNode)
}
_exit_strat_number
=
pExitStrategy
;
if
(
pExitStrategy
==
8
||
pExitStrategy
==
9
){
_config
->
set_write_VTK_files_direction
(
false
);
if
(
strategyNode
.
FirstChild
(
"write_VTK_files"
))
{
const
char
*
tmp
=
strategyNode
.
FirstChild
(
"write_VTK_files"
)
->
FirstChild
()
->
Value
();
//remark: std::strcmp returns 0 if the strings are equal
bool
tmp_write_VTK
=
!
std
::
strcmp
(
tmp
,
"true"
);
_config
->
set_write_VTK_files_direction
(
tmp_write_VTK
);
}
}
switch
(
pExitStrategy
)
{
case
1
:
_exit_strategy
=
std
::
shared_ptr
<
DirectionStrategy
>
(
new
DirectionMiddlePoint
());
...
...
general/Configuration.h
View file @
60b744d8
...
...
@@ -119,6 +119,7 @@ public:
_has_specific_goals
=
false
;
_write_VTK_files
=
false
;
_exit_strat
=
9
;
_write_VTK_files_direction
=
false
;
//for random numbers
_rdGenerator
=
RandomNumberGenerator
();
...
...
@@ -279,6 +280,10 @@ public:
const
std
::
string
&
GetHostname
()
const
{
return
_hostname
;
};
void
set_write_VTK_files_direction
(
bool
write_VTK_files_direction
)
{
_write_VTK_files_direction
=
write_VTK_files_direction
;}
bool
get_write_VTK_files_direction
()
const
{
return
_write_VTK_files_direction
;}
void
SetHostname
(
std
::
string
hostname
)
{
_hostname
=
hostname
;
};
const
std
::
string
&
GetTrajectoriesFile
()
const
{
return
_trajectoriesFile
;
};
...
...
@@ -387,6 +392,7 @@ private:
//ff router
bool
_has_specific_goals
;
bool
_write_VTK_files
;
bool
_write_VTK_files_direction
;
int
_exit_strat
;
...
...
routing/DirectionStrategy.cpp
View file @
60b744d8
...
...
@@ -404,9 +404,20 @@ void DirectionLocalFloorfield::Init(Building* buildingArg, double stepsize,
newfield
->
setSpeedMode
(
FF_HOMO_SPEED
);
}
newfield
->
addAllTargetsParallel
();
//newfield->writeFF("directionsOfRoom" + std::to_string(roomPair.first) + ".vtk", newfield->getKnownDoorUIDs());
}
end
=
std
::
chrono
::
system_clock
::
now
();
if
(
_building
->
GetConfig
()
->
get_write_VTK_files_direction
())
{
for
(
unsigned
int
i
=
0
;
i
<
_locffviafm
.
size
();
++
i
)
{
auto
iter
=
_locffviafm
.
begin
();
std
::
advance
(
iter
,
i
);
int
roomNr
=
iter
->
first
;
iter
->
second
->
writeFF
(
"direction"
+
std
::
to_string
(
roomNr
)
+
".vtk"
,
iter
->
second
->
getKnownDoorUIDs
());
}
}
end
=
std
::
chrono
::
system_clock
::
now
();
std
::
chrono
::
duration
<
double
>
elapsed_seconds
=
end
-
start
;
Log
->
Write
(
"INFO:
\t
Time to construct FF in DirectionLocalFloorfield: "
+
std
::
to_string
(
elapsed_seconds
.
count
()));
_initDone
=
true
;
...
...
@@ -491,9 +502,21 @@ void DirectionSubLocalFloorfield::Init(Building* buildingArg, double stepsize,
}
floorfield
->
addAllTargetsParallel
();
}
}
end
=
std
::
chrono
::
system_clock
::
now
();
if
(
_building
->
GetConfig
()
->
get_write_VTK_files_direction
())
{
for
(
unsigned
int
i
=
0
;
i
<
_locffviafm
.
size
();
++
i
)
{
auto
iter
=
_locffviafm
.
begin
();
std
::
advance
(
iter
,
i
);
int
roomNr
=
iter
->
first
;
iter
->
second
->
writeFF
(
"direction"
+
std
::
to_string
(
roomNr
)
+
".vtk"
,
iter
->
second
->
getKnownDoorUIDs
());
}
}
end
=
std
::
chrono
::
system_clock
::
now
();
std
::
chrono
::
duration
<
double
>
elapsed_seconds
=
end
-
start
;
Log
->
Write
(
"INFO:
\t
Taken time: "
+
std
::
to_string
(
elapsed_seconds
.
count
()));
...
...
routing/ff_router/UnivFFviaFM.cpp
View file @
60b744d8
...
...
@@ -1527,7 +1527,7 @@ void UnivFFviaFM::writeFF(const std::string& filename, std::vector<int> targetID
int
numTotal
=
numX
*
numY
;
//std::cerr << numTotal << " numTotal" << std::endl;
//std::cerr << grid->GetnPoints() << " grid" << std::endl;
file
.
open
(
filename
);
file
.
open
(
_configuration
->
GetProjectRootDir
()
+
filename
);
file
<<
"# vtk DataFile Version 3.0"
<<
std
::
endl
;
file
<<
"Testdata: Fast Marching: Test: "
<<
std
::
endl
;
...
...
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