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

Cleaning output messages

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