Commit c1b55618 authored by Mohcine Chraibi's avatar Mohcine Chraibi

Refactor contructor of AgentSource

parent 05ca3da0
......@@ -34,19 +34,15 @@
#include <iostream>
AgentsSource::AgentsSource(int id, const std::string& caption,int max_agents,int group_id,int frequency)
AgentsSource::AgentsSource(int id, const std::string& caption,int max_agents,int group_id,int frequency):
_id(id), _frequency(frequency), _maxAgents(max_agents), _groupID(group_id), _caption(caption)
{
_id=id;
_caption=caption;
_maxAgents=max_agents;
_groupID=group_id;
_frequency=frequency;
_agentsGenerated=0;
_boundaries[0] = 0;
_boundaries[1] = 0;
_boundaries[2] = 0;
_boundaries[3] = 0;
_agents.clear();
_boundaries[0] = 0;
_boundaries[1] = 0;
_boundaries[2] = 0;
_boundaries[3] = 0;
}
AgentsSource::~AgentsSource()
......
......@@ -78,7 +78,7 @@ void AgentsSourcesManager::Run()
//it might be better to use a timer
_isCompleted = false;
bool finished = false;
long updateFrequency = 2; // 1 = second
long updateFrequency = 2; // @todo: get from inifile
do
{
int current_time = (int)Pedestrian::GetGlobalTime();
......
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