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
03e4a1ce
Commit
03e4a1ce
authored
Aug 12, 2016
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes
parent
20884fdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
main.cpp
main.cpp
+3
-2
pedestrian/AgentsSourcesManager.cpp
pedestrian/AgentsSourcesManager.cpp
+2
-3
No files found.
main.cpp
View file @
03e4a1ce
...
...
@@ -88,9 +88,10 @@ int main(int argc, char** argv)
if
(
sim
.
GetAgentSrcManager
().
GetMaxAgentNumber
())
{
//Start the thread for managing the sources of agents if any
//std::thread t1(sim.GetAgentSrcManager());
std
::
thread
t1
(
&
AgentsSourcesManager
::
Run
,
&
sim
.
GetAgentSrcManager
());
double
simMaxTime
=
configuration
->
GetTmax
();
std
::
thread
t1
(
&
AgentsSourcesManager
::
Run
,
&
sim
.
GetAgentSrcManager
());
//@todo pass simMaxTime to Run
//main thread for the simulation
evacTime
=
sim
.
RunStandardSimulation
(
configuration
->
GetTmax
()
);
evacTime
=
sim
.
RunStandardSimulation
(
simMaxTime
);
//Join the main thread
t1
.
join
();
}
...
...
pedestrian/AgentsSourcesManager.cpp
View file @
03e4a1ce
...
...
@@ -81,12 +81,11 @@ void AgentsSourcesManager::Run()
bool
finished
=
false
;
long
updateFrequency
=
1
;
do
{
{
//@todo: break if max simulation time is reached.
int
current_time
=
(
int
)
Pedestrian
::
GetGlobalTime
();
if
((
current_time
!=
_lastUpdateTime
)
&&
((
current_time
%
updateFrequency
)
==
0
))
{
{
finished
=
ProcessAllSources
();
_lastUpdateTime
=
current_time
;
}
...
...
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