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
7bb3233c
Verified
Commit
7bb3233c
authored
Jul 01, 2019
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.version.fz-juelich.de/jupedsim/jpscore
into develop
parents
297365e3
7aa0c2b1
Pipeline
#22078
failed with stages
in 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
61 deletions
+66
-61
IO/IniFileParser.cpp
IO/IniFileParser.cpp
+64
-61
Utest/makeini.py
Utest/makeini.py
+1
-0
geometry/Building.cpp
geometry/Building.cpp
+1
-0
No files found.
IO/IniFileParser.cpp
View file @
7bb3233c
...
@@ -132,70 +132,73 @@ bool IniFileParser::Parse(std::string iniFile)
...
@@ -132,70 +132,73 @@ bool IniFileParser::Parse(std::string iniFile)
return
false
;
return
false
;
}
}
//logfile
//check the structure of inifile
if
(
xMainNode
->
FirstChild
(
"logfile"
))
{
if
(
xMainNode
->
FirstChild
(
"header"
))
{
_config
->
SetErrorLogFile
(
//logfile
_config
->
GetProjectRootDir
()
+
xMainNode
->
FirstChild
(
"logfile"
)
->
FirstChild
()
->
Value
());
TiXmlNode
*
xHeader
=
xMainNode
->
FirstChild
(
"header"
);
_config
->
SetLog
(
2
);
if
(
xHeader
->
FirstChild
(
"logfile"
))
{
Log
->
Write
(
"INFO:
\t
logfile <%s>"
,
_config
->
GetErrorLogFile
().
c_str
());
_config
->
SetErrorLogFile
(
}
_config
->
GetProjectRootDir
()
+
xHeader
->
FirstChild
(
"logfile"
)
->
FirstChild
()
->
Value
());
_config
->
SetLog
(
2
);
Log
->
Write
(
"INFO:
\t
logfile <%s>"
,
_config
->
GetErrorLogFile
().
c_str
());
Log
->
Write
(
"----
\n
JuPedSim - JPScore
\n
"
);
}
Log
->
Write
(
"Current date : %s %s"
,
__DATE__
,
__TIME__
);
Log
->
Write
(
"Version : %s"
,
JPSCORE_VERSION
);
Log
->
Write
(
"Compiler : %s (%s)"
,
true_cxx
.
c_str
(),
true_cxx_ver
.
c_str
());
Log
->
Write
(
"----
\n
JuPedSim - JPScore
\n
"
);
Log
->
Write
(
"Commit hash : %s"
,
GIT_COMMIT_HASH
);
Log
->
Write
(
"Current date : %s %s"
,
__DATE__
,
__TIME__
);
Log
->
Write
(
"Commit date : %s"
,
GIT_COMMIT_DATE
);
Log
->
Write
(
"Version : %s"
,
JPSCORE_VERSION
);
Log
->
Write
(
"Branch : %s
\n
----
\n
"
,
GIT_BRANCH
);
Log
->
Write
(
"Compiler : %s (%s)"
,
true_cxx
.
c_str
(),
true_cxx_ver
.
c_str
());
Log
->
Write
(
"Commit hash : %s"
,
GIT_COMMIT_HASH
);
Log
->
Write
(
"Commit date : %s"
,
GIT_COMMIT_DATE
);
//seed
Log
->
Write
(
"Branch : %s
\n
----
\n
"
,
GIT_BRANCH
);
if
(
xMainNode
->
FirstChild
(
"seed"
))
{
TiXmlNode
*
seedNode
=
xMainNode
->
FirstChild
(
"seed"
)
->
FirstChild
();
if
(
seedNode
)
{
//seed
const
char
*
seedValue
=
seedNode
->
Value
();
if
(
xHeader
->
FirstChild
(
"seed"
))
{
_config
->
SetSeed
((
unsigned
int
)
atoi
(
seedValue
));
//strtol
TiXmlNode
*
seedNode
=
xHeader
->
FirstChild
(
"seed"
)
->
FirstChild
();
}
if
(
seedNode
)
{
else
{
const
char
*
seedValue
=
seedNode
->
Value
();
_config
->
SetSeed
((
unsigned
int
)
time
(
NULL
));
_config
->
SetSeed
((
unsigned
int
)
atoi
(
seedValue
));
//strtol
}
}
}
else
{
// srand(_config->GetSeed());
_config
->
SetSeed
((
unsigned
int
)
time
(
NULL
));
Log
->
Write
(
"INFO:
\t
random seed <%d>"
,
_config
->
GetSeed
());
}
}
// max simulation time
// srand(_config->GetSeed());
if
(
xMainNode
->
FirstChild
(
"max_sim_time"
))
{
Log
->
Write
(
"INFO:
\t
random seed <%d>"
,
_config
->
GetSeed
());
const
char
*
tmax
=
xMainNode
->
FirstChildElement
(
"max_sim_time"
)
->
FirstChild
()
->
Value
();
// max simulation time
_config
->
SetTmax
(
atof
(
tmax
));
if
(
xHeader
->
FirstChild
(
"max_sim_time"
))
{
Log
->
Write
(
"INFO:
\t
Maximal simulation time <%.2f> seconds"
,
_config
->
GetTmax
());
const
char
*
tmax
=
}
xHeader
->
FirstChildElement
(
"max_sim_time"
)
->
FirstChild
()
->
Value
();
_config
->
SetTmax
(
atof
(
tmax
));
// Progressbar
Log
->
Write
(
"INFO:
\t
Maximal simulation time <%.2f> seconds"
,
_config
->
GetTmax
());
if
(
xMainNode
->
FirstChild
(
"progressbar"
))
{
}
_config
->
SetPRB
(
true
);
Log
->
Write
(
"INFO:
\t
Use Progressbar"
);
// Progressbar
}
if
(
xHeader
->
FirstChild
(
"progressbar"
))
{
_config
->
SetPRB
(
true
);
// geometry file name
Log
->
Write
(
"INFO:
\t
Use Progressbar"
);
if
(
xMainNode
->
FirstChild
(
"geometry"
))
{
}
std
::
string
filename
=
xMainNode
->
FirstChild
(
"geometry"
)
->
FirstChild
()
->
Value
();
_config
->
SetGeometryFile
(
filename
);
// geometry file name
Log
->
Write
(
"INFO:
\t
geometry <%s>"
,
filename
.
c_str
());
if
(
xHeader
->
FirstChild
(
"geometry"
))
{
}
std
::
string
filename
=
xHeader
->
FirstChild
(
"geometry"
)
->
FirstChild
()
->
Value
();
_config
->
SetGeometryFile
(
filename
);
Log
->
Write
(
"INFO:
\t
geometry <%s>"
,
filename
.
c_str
());
//max CPU
}
int
max_threads
=
1
;
//max CPU
int
max_threads
=
1
;
#ifdef _OPENMP
#ifdef _OPENMP
max_threads
=
omp_get_max_threads
();
max_threads
=
omp_get_max_threads
();
#endif
#endif
if
(
xMainNode
->
FirstChild
(
"num_threads"
))
{
if
(
xHeader
->
FirstChild
(
"num_threads"
))
{
TiXmlNode
*
numthreads
=
xMainNode
->
FirstChild
(
"num_threads"
)
->
FirstChild
();
TiXmlNode
*
numthreads
=
xHeader
->
FirstChild
(
"num_threads"
)
->
FirstChild
();
if
(
numthreads
)
{
if
(
numthreads
)
{
#ifdef _OPENMP
#ifdef _OPENMP
omp_set_num_threads
(
xmltoi
(
numthreads
->
Value
()));
omp_set_num_threads
(
xmltoi
(
numthreads
->
Value
()));
#endif
#endif
}
}
}
}
...
...
Utest/makeini.py
View file @
7bb3233c
...
@@ -8,6 +8,7 @@ import sys
...
@@ -8,6 +8,7 @@ import sys
import
time
import
time
import
itertools
import
itertools
import
numpy
as
np
import
numpy
as
np
from
numpy
import
linspace
from
shutil
import
copy2
,
rmtree
,
move
from
shutil
import
copy2
,
rmtree
,
move
try
:
try
:
...
...
geometry/Building.cpp
View file @
7bb3233c
...
@@ -725,6 +725,7 @@ bool Building::InitPlatforms()
...
@@ -725,6 +725,7 @@ bool Building::InitPlatforms()
}
//subroom
}
//subroom
}
//rooms
}
//rooms
return
true
;
}
}
bool
Building
::
InitInsideGoals
()
bool
Building
::
InitInsideGoals
()
{
{
...
...
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