Commit a722a20b authored by Thomas's avatar Thomas
Browse files

reserve orcaLines memory

parent c8a9e6bf
......@@ -180,6 +180,7 @@ void Agent::computeNewVelocity2()
void Agent::computeNewVelocity()
{
std::vector<Line> orcaLines_;
orcaLines_.reserve(obstacleNeighbors_.size() + agentNeighbors_.size());
/* Create obstacle ORCA lines. */
for(std::vector<std::pair<float, Dart> >::iterator it = obstacleNeighbors_.begin();
......
......@@ -5,8 +5,8 @@ Simulator::Simulator() : globalTime_(0.0f), timeStep_(0.2f)
srand(10);
envMap_.init();
std::cout << "setup scenario" << std::endl;
importAgents("myAgents.pos");
// setupScenario(700);
// importAgents("myAgents.pos");
setupScenario(700);
// addPathsToAgents();
unsigned nbAgents = agents_.size();
......
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