#include <iso_flock_target_parameter_behavior.h>
Inherits iso::flock::Behavior.
Inheritance diagram for iso::flock::TargetParameterBehavior:


Public Member Functions | |
| TargetParameterBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString) | |
| create behavior | |
| TargetParameterBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException) | |
| create behavior | |
| ~TargetParameterBehavior () | |
| destructor | |
| virtual Behavior * | create (const base::String &pBehaviorName, Agent *pAgent) const throw (FlockException) |
| create copy of behavior | |
| virtual Behavior * | create (const base::String &pInputParameterString, const base::String &pOutputParameterString) const |
| create copy of behavior | |
| void | act () |
| perform behavior | |
Protected Attributes | |
| Parameter * | mInputPar |
| Parameter * | mOutputPar |
| input parameter | |
| Parameter * | mTargetPar |
| output parameter | |
| Parameter * | mAdaptPar |
| target parameter | |
| Parameter * | mAmountPar |
| adapt parameter | |
| Parameter * | mAbsPar |
| behavior amount parameter | |
| math::Vector< real > | mDiffValues |
| treat differences as absolute values | |
values of an input parameter towards those of a target parameter
This behavior shifts the values of an input parameter towards those of a target parameter
The internal adapt parameter controls for each dimension how far the values are shifted: 0: no shift at all, 1: full shift
The internal amount parameter controls for all dimensions how far the values are shifted: 0: no shift at all, 1: full shift
The effect of the amount and adapt parameters is combined
The internal absolute parameter controls is the shiting happens towards absolute or non absolute values
Input Parameter:
type: InputParameter dim: nD neighbors: ignore
Output Parameter:
type: OutputParameter dim: nD neighbors: ignore
Internal Parameter:
name: xxx_target dim: nD defaultValue: 0.0
name: xxx_adapt dim: nD defaultValue: 1.0
name: xxx_amount dim: 1D defaultValue: 0.1
name: xxx_absolute dim: 1D defaultValue: 0.0
Created by Daniel Bisig on 4/21/07.
| TargetParameterBehavior::TargetParameterBehavior | ( | const base::String & | pInputParameterString, | |
| const base::String & | pOutputParameterString | |||
| ) |
create behavior
| pInputParameterString | input parameter string (parameters are space separated) | |
| pOutputParameterString | output paramaters are space separated) |
| TargetParameterBehavior::TargetParameterBehavior | ( | Agent * | pAgent, | |
| const base::String & | pBehaviorName, | |||
| const base::String & | pInputParameterString, | |||
| const base::String & | pOutputParameterString | |||
| ) | throw (FlockException) |
create behavior
| pAgent | agent this behavior belongs to | |
| pBehaviorName | name of behavior | |
| pInputParameterString | input parameter string (parameters are space separated) | |
| pOutputParameterString | output paramaters are space separated) |
| FlockException | wrong number of type of parameters |
| TargetParameterBehavior::~TargetParameterBehavior | ( | ) |
destructor
| Behavior * TargetParameterBehavior::create | ( | const base::String & | pBehaviorName, | |
| Agent * | pAgent | |||
| ) | const throw (FlockException) [virtual] |
create copy of behavior
| pAgent | agent this behavior belongs to | |
| pBehaviorName | name of behavior |
| FlockException | wrong number of type of parameters |
Implements iso::flock::Behavior.
| Behavior * TargetParameterBehavior::create | ( | const base::String & | pInputParameterString, | |
| const base::String & | pOutputParameterString | |||
| ) | const [virtual] |
create copy of behavior
| pInputParameterString | input parameter string | |
| pOutputParameterString | output parameter string |
Implements iso::flock::Behavior.
| void TargetParameterBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::TargetParameterBehavior::mInputPar [protected] |
Parameter* iso::flock::TargetParameterBehavior::mOutputPar [protected] |
input parameter
Parameter* iso::flock::TargetParameterBehavior::mTargetPar [protected] |
output parameter
Parameter* iso::flock::TargetParameterBehavior::mAdaptPar [protected] |
target parameter
Parameter* iso::flock::TargetParameterBehavior::mAmountPar [protected] |
adapt parameter
Parameter* iso::flock::TargetParameterBehavior::mAbsPar [protected] |
behavior amount parameter
math::Vector<real> iso::flock::TargetParameterBehavior::mDiffValues [protected] |
treat differences as absolute values
1.5.1