Commit 1cdd1527 authored by Arash HABIBI's avatar Arash HABIBI
Browse files

obstfixes_coins

parent c8492cd9
......@@ -12,6 +12,7 @@
unsigned int Agent::maxNeighbors_ = 10 ;
unsigned int Agent::maxMovingObstacles_ = 10;
float Agent::averageMaxSpeed_ = 2.0f ;
// float Agent::averageMaxSpeed_ = 20.0f ;
float Agent::neighborDist_ = 10.0f ;
float Agent::neighborDistSq_ = neighborDist_ * neighborDist_ ;
float Agent::radius_ = 1.5f ;
......@@ -562,7 +563,8 @@ void Agent::computeNewVelocity()
//----- forces dues à la répulsion des obstacles en mouvement ----------
VEC3 norm;
double obst_stiffness = 10000.0; // agent-obstacle interaction stiffness
// double obst_stiffness = 10000.0; // agent-obstacle interaction stiffness
double obst_stiffness = 1000.0; // agent-obstacle interaction stiffness
// double obst_damping = 1.0; // agent-obstacle interaction damping
int obst_power = 2; // the power to which elevate the agent-obstacle distance
Obstacle* obst ;
......@@ -608,6 +610,7 @@ void Agent::computeNewVelocity()
//----- forces dues à la répulsion des obstacles fixes ----------
// double fixed_obst_stiffness = 50000.0; // agent-obstacle interaction stiffness
double fixed_obst_stiffness = 50000.0; // agent-obstacle interaction stiffness
// double fixed_obst_damping = 1.0; // agent-obstacle interaction damping
int fixed_obst_power = 1; // the power to which elevate the agent-obstacle distance
......@@ -620,6 +623,7 @@ void Agent::computeNewVelocity()
++it)
{
double dist = it->first;
cerr << "nobst=" << nobst << "dist=" << dist << endl;
// double effective_range = 50*range_;
double effective_range = 10*range_;
float force_value=0.0;
......@@ -639,15 +643,16 @@ void Agent::computeNewVelocity()
norm[0]=vec[1] ;
norm[1]=-vec[0] ;
forces += force_value * norm;
cerr << "force_value = " << force_value << endl;
cerr << "norm=" << norm << endl;
// cerr << "force_value = " << force_value << endl;
// cerr << "norm=" << norm << endl;
nobst++;
}
//----- forces dues à la répulsion des autres agents -------
double ag_stiffness = 200.0; // agent-agent interaction stiffness
// double ag_stiffness = 500.0; // agent-agent interaction stiffness
double ag_stiffness = 50.0; // agent-agent interaction stiffness
double ag_damping = 1.0; // agent-agent interaction damping
double ag_phys_radius_coef = 20.0;
double ag_power = 8; // the power to which elevate the agent-agent distance
......
......@@ -35,7 +35,7 @@ void Simulator::init( float dimension, bool enablePathFinding)
switch (config)
{
case 0 :
setupCircleScenario(1000,20) ;
setupCircleScenario(50,20) ;
break ;
case 1 :
setupCorridorScenario(1000,40) ;
......
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