Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GBE::GRadiatingAgent Class Reference

Periodically radiates an influence. More...

#include <GRadiatingAgent.h>

Inheritance diagram for GBE::GRadiatingAgent:

Inheritance graph
[legend]
Collaboration diagram for GBE::GRadiatingAgent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GRadiatingAgent (double fraction, double min_energy_amount, double max_energy_amount, unsigned long msleep=100, QObject *parent=NULL, const char *name=NULL)
virtual ~GRadiatingAgent ()
virtual void setActiveElementData (bool element_active, double sense_distance, double sense_distance_detail)
virtual void run ()

Protected Attributes

double Fraction
double MinEnergyAmount
double MaxEnergyAmount
unsigned long Msleep
bool ActiveElement
double SenseDistance
double SenseDistanceDetail

Detailed Description

Periodically radiates an influence.

Radiates a fraction (Fraction) of the own energy as influence every few milliseconds (according to the Msleep attribute). If the element has a form then a GPositionalInfluence is used, otherwise a GElementInfluence.

A range can be specified in which the agent should keep the element's energy amount. If the energy amount is below the minimum then no influence is emitted. If the energy amount is above the maximum then more energy is emitted to get down to the maximum amount.

See also:
GPositionalInfluence.


Constructor & Destructor Documentation

GBE::GRadiatingAgent::GRadiatingAgent double  fraction,
double  min_energy_amount,
double  max_energy_amount,
unsigned long  msleep = 100,
QObject *  parent = NULL,
const char *  name = NULL
 

Constructor. Allows for paramter initialisation.

GBE::GRadiatingAgent::~GRadiatingAgent  )  [virtual]
 

Destructor.


Member Function Documentation

void GBE::GRadiatingAgent::run  )  [virtual]
 

Periodically radiates an influence.

See also:
Msleep.

Reimplemented from GCS::GAgent.

void GBE::GRadiatingAgent::setActiveElementData bool  element_active,
double  sense_distance,
double  sense_distance_detail
[virtual]
 

Sets the sense distances for active elements.

See also:
GActiveElementInfluence


Member Data Documentation

bool GBE::GRadiatingAgent::ActiveElement [protected]
 

If set to true, GActiveElementInfluence is radiated instead of GPositionalInfluence.

double GBE::GRadiatingAgent::Fraction [protected]
 

If current energy amount is between MinEnergyAmount and MaxEnergyAmount then this fraction of own energy amount is emitted

double GBE::GRadiatingAgent::MaxEnergyAmount [protected]
 

If current energy amount is greater than MaxEnergyAmount the agent will emit just as much to reach MaxEnergyAmount.

double GBE::GRadiatingAgent::MinEnergyAmount [protected]
 

The agent won't radiate any influence if current energy amount is less than MinEnergyAmount.

unsigned long GBE::GRadiatingAgent::Msleep [protected]
 

Determines the time between which influences are radiated.

double GBE::GRadiatingAgent::SenseDistance [protected]
 

Sets sense distance for equal hierarchy level

double GBE::GRadiatingAgent::SenseDistanceDetail [protected]
 

Sets sense distance for lower hierarchy level


The documentation for this class was generated from the following files:
Generated on Thu Oct 21 21:18:15 2004 for G System by doxygen 1.3.6