Commit 03e4a1ce authored by Mohcine Chraibi's avatar Mohcine Chraibi

Small changes

parent 20884fdf
......@@ -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();
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment