Commit 2164c3a5 authored by LOPEZ GANDIA Axel's avatar LOPEZ GANDIA Axel

Default values to range

parent 75cefaeb
......@@ -118,6 +118,7 @@ CostFunctionValues FOEAvoidance::GetCostFunctionGradient(Agent* agent, WorldBase
void FOEAvoidance::parseParameters(const CostFunctionParameters & params)
{
range_ = 30;
CostFunction::parseParameters(params);
}
......
......@@ -84,6 +84,7 @@ CostFunctionValues PowerLaw::GetCostFunctionGradient(Agent* agent, WorldBase * w
void PowerLaw::parseParameters(const CostFunctionParameters & params)
{
range_ = 100;
CostFunction::parseParameters(params);
params.ReadFloat("tau0", tau0);
}
......
......@@ -77,6 +77,7 @@ CostFunctionValues SocialForcesAvoidance::GetCostFunctionGradient(Agent* agent,
void SocialForcesAvoidance::parseParameters(const CostFunctionParameters & params)
{
range_ = 2;
CostFunction::parseParameters(params);
params.ReadFloat("sigma", sigma);
}
......
......@@ -154,6 +154,7 @@ CostFunctionValues TtcaDca::GetCostFunctionGradient(Agent* agent, WorldBase * wo
void TtcaDca::parseParameters(const CostFunctionParameters & params)
{
range_ = 50;
CostFunction::parseParameters(params);
params.ReadFloat("sigmaTtca", sigTtca_);
params.ReadFloat("sigmaDca", sigDca_);
......
......@@ -80,6 +80,7 @@ CostFunctionValues SocialForces::GetCostFunctionGradient(Agent* agent, WorldBase
void SocialForces::parseParameters(const CostFunctionParameters & params)
{
range_ = 100;
CostFunction::parseParameters(params);
params.ReadFloat("AtractionForce", AtractorForce);
params.ReadFloat("RepulsionForce", RepulsionForce);
......
......@@ -45,8 +45,6 @@ CostFunction::~CostFunction() {
}
void CostFunction::parseParameters(const CostFunctionParameters & params) {
coefficient_ = 1; //Default values
range_ = 100;
params.ReadFloat("coeff", coefficient_);
params.ReadFloat("range", range_);
}
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