tvaLib
Public Member Functions | Public Attributes | List of all members
lib.int.Behaviour Class Reference

Public Member Functions

def __init__ (self, maxSteering, maxAcceleration, minAcceleration=None)
 
def accelerationDistribution (self)
 
def steeringDistribution (self)
 

Public Attributes

 maxSteering
 
 maxAcceleration
 
 minAcceleration
 

Detailed Description

Definition at line 40 of file int.py.

Constructor & Destructor Documentation

◆ __init__()

def lib.int.Behaviour.__init__ (   self,
  maxSteering,
  maxAcceleration,
  minAcceleration = None 
)

Definition at line 41 of file int.py.

41  def __init__(self, maxSteering, maxAcceleration, minAcceleration=None):
42  self.maxSteering = maxSteering
43  self.maxAcceleration = maxAcceleration
44  if(not minAcceleration): self.minAcceleration = -maxAcceleration
45  else: self.minAcceleration = minAcceleration
46 

Member Function Documentation

◆ accelerationDistribution()

def lib.int.Behaviour.accelerationDistribution (   self)

Definition at line 47 of file int.py.

47  def accelerationDistribution(self):
48  return random_triangular(self.minAcceleration, self.maxAcceleration, 0.)

◆ steeringDistribution()

def lib.int.Behaviour.steeringDistribution (   self)

Definition at line 49 of file int.py.

49  def steeringDistribution(self):
50  return random_triangular(-self.maxSteering, self.maxSteering, 0.)
51 

Member Data Documentation

◆ maxAcceleration

lib.int.Behaviour.maxAcceleration

Definition at line 43 of file int.py.

◆ maxSteering

lib.int.Behaviour.maxSteering

Definition at line 42 of file int.py.

◆ minAcceleration

lib.int.Behaviour.minAcceleration

Definition at line 44 of file int.py.


The documentation for this class was generated from the following file: