Commit 73f45814 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

GoalReachingForces and RandomFunction now have a default range of 0, because...

GoalReachingForces and RandomFunction now have a default range of 0, because they do not consider any neighboring objects.
parent c1fd43c3
......@@ -35,7 +35,7 @@
class GoalReachingForce : public ForceBasedFunction
{
public:
GoalReachingForce() : ForceBasedFunction() {}
GoalReachingForce() : ForceBasedFunction() { range_ = 0; }
virtual ~GoalReachingForce() {}
const static std::string GetName() { return "GoalReachingForce"; }
......
......@@ -22,8 +22,6 @@
#include <CostFunctions/RandomFunction.h>
#include <core/agent.h>
RandomFunction::RandomFunction() : CostFunction() {}
float RandomFunction::GetCost(const Vector2D& velocity, Agent* agent, const WorldBase * world) const
{
return agent->ComputeRandomNumber(-1, 1);
......
......@@ -35,7 +35,7 @@
class RandomFunction : public CostFunction
{
public:
RandomFunction();
RandomFunction() : CostFunction() { range_ = 0; }
virtual ~RandomFunction() {}
const static std::string GetName() { return "RandomFunction"; }
......
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