Commit 740dd556 authored by Ulrich Kemloh's avatar Ulrich Kemloh

Cleaning output messages

parent 692843a6
...@@ -48,7 +48,6 @@ void AgentsSourcesManager::Run() ...@@ -48,7 +48,6 @@ void AgentsSourcesManager::Run()
for (const auto& src : _sources) for (const auto& src : _sources)
{ {
src->GenerateAgentsAndAddToPool(src->GetMaxAgents(), _building); src->GenerateAgentsAndAddToPool(src->GetMaxAgents(), _building);
cout<<"generation: "<<src->GetPoolSize()<<endl;
} }
//first call ignoring the return value //first call ignoring the return value
...@@ -75,10 +74,9 @@ void AgentsSourcesManager::Run() ...@@ -75,10 +74,9 @@ void AgentsSourcesManager::Run()
//cout<<"TIME:"<<current_time<<endl; //cout<<"TIME:"<<current_time<<endl;
finished=ProcessAllSources(); finished=ProcessAllSources();
_lastUpdateTime = current_time; _lastUpdateTime = current_time;
cout << "source size: " << _sources.size() << endl; //cout << "source size: " << _sources.size() << endl;
} }
//wait some time //wait some time
//cout<<"sleepinp..."<<endl;
//std::this_thread::sleep_for(std::chrono::milliseconds(1)); //std::this_thread::sleep_for(std::chrono::milliseconds(1));
} while (!finished); } while (!finished);
Log->Write("INFO:\tTerminating agent manager thread"); Log->Write("INFO:\tTerminating agent manager thread");
...@@ -88,14 +86,14 @@ void AgentsSourcesManager::Run() ...@@ -88,14 +86,14 @@ void AgentsSourcesManager::Run()
bool AgentsSourcesManager::ProcessAllSources() const bool AgentsSourcesManager::ProcessAllSources() const
{ {
bool empty=true; bool empty=true;
//cout<<"src size: "<<_sources.size()<<endl;
for (const auto& src : _sources) for (const auto& src : _sources)
{ {
//cout<<"size: "<<src->GetPoolSize()<<endl;//exit(0);
if (src->GetPoolSize()) if (src->GetPoolSize())
{ {
vector<Pedestrian*> peds; vector<Pedestrian*> peds;
src->RemoveAgentsFromPool(peds,src->GetFrequency()); src->RemoveAgentsFromPool(peds,src->GetFrequency());
Log->Write("INFO:\tSource %d generating %d agents (%d remaining)",src->GetId(),peds.size(),src->GetPoolSize());
ComputeBestPositionRandom(src.get(), peds); ComputeBestPositionRandom(src.get(), peds);
//todo: compute the optimal position for insertion using voronoi //todo: compute the optimal position for insertion using voronoi
...@@ -133,7 +131,7 @@ void AgentsSourcesManager::ComputeBestPositionVoronoi(AgentsSource* src, ...@@ -133,7 +131,7 @@ void AgentsSourcesManager::ComputeBestPositionVoronoi(AgentsSource* src,
&& (bounds[1] <= pos._y && pos._y <= bounds[2])) && (bounds[1] <= pos._y && pos._y <= bounds[2]))
{ {
iter = peds.erase(iter); iter = peds.erase(iter);
cout << "removing..." << endl; cout << "removing (testing only)..." << endl;
exit(0); exit(0);
} else } else
{ {
...@@ -401,7 +399,6 @@ void AgentsSourcesManager::SortPositionByDensity(std::vector<Point>& positions, ...@@ -401,7 +399,6 @@ void AgentsSourcesManager::SortPositionByDensity(std::vector<Point>& positions,
_building->GetGrid()->GetNeighbourhood(pt,neighbours); _building->GetGrid()->GetNeighbourhood(pt,neighbours);
//density in pers per m2 //density in pers per m2
double density = 0.0; double density = 0.0;
//double radius_square=0.56*0.56;
double radius_square=0.40*0.40; double radius_square=0.40*0.40;
for(const auto& p: neighbours) for(const auto& p: neighbours)
......
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
/** /**
* disable copying * disable copying
*/ */
//AgentsSourcesManager(const AgentsSourcesManager& ) = delete; AgentsSourcesManager(const AgentsSourcesManager& ) = delete;
/** /**
* Destructor * Destructor
......
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