Simulation.Interaction Class Reference

An interaction at runtime More...

Public Member Functions

 Interaction (string Name, Dictionary< string, float > SatisfactionRates, float Duration, bool hasPreconditions, Dictionary< string, bool > AllowedSpecies, Dictionary< Needs.NeedSatisfactions, bool > AllowedSatisfactions)
 Create a new interaction instance that will be available at simulation runtime. More...
 
bool CheckPreconditions (AffordanceTreeNode affordanceTreeNode)
 For some interactions to be used conditions need to be fullfilled. More...
 

Properties

string Name [get]
 The unique name of the need. Identifier. More...
 
Dictionary< string, float > SatisfactionRates [get]
 The rate at which each need is decayed or satisfied per second whilst the interaction is performed. More...
 
float Duration [get]
 The duration in seconds of the interaction. More...
 
bool Prolongable [get]
 Whether the interaction can be prolonged for another duration intervall More...
 
bool HasPreconditions [get]
 Whether this interaction has preconditions. Setting this to false can speed up the simulation at the cost of not evaluating preconditions. More...
 
Dictionary< string, bool > SpeciesAllowed [get]
 Which species are allowed to participate this interaction (precondition) More...
 

Detailed Description

An interaction at runtime

Constructor & Destructor Documentation

Simulation.Interaction.Interaction ( string  Name,
Dictionary< string, float >  SatisfactionRates,
float  Duration,
bool  hasPreconditions,
Dictionary< string, bool >  AllowedSpecies,
Dictionary< Needs.NeedSatisfactions, bool >  AllowedSatisfactions 
)

Create a new interaction instance that will be available at simulation runtime.

Parameters
Name
SatisfactionRates
Duration
hasPreconditions
AllowedSpecies
AllowedSatisfactions

Member Function Documentation

bool Simulation.Interaction.CheckPreconditions ( AffordanceTreeNode  affordanceTreeNode)

For some interactions to be used conditions need to be fullfilled.

Parameters
affordanceTreeNodeThe AffordanceTreeNode that wants to use the Interaction
Returns
Whether all preconditions are fullfilled.

Property Documentation

float Simulation.Interaction.Duration
get

The duration in seconds of the interaction.

bool Simulation.Interaction.HasPreconditions
get

Whether this interaction has preconditions. Setting this to false can speed up the simulation at the cost of not evaluating preconditions.

string Simulation.Interaction.Name
get

The unique name of the need. Identifier.

bool Simulation.Interaction.Prolongable
get

Whether the interaction can be prolonged for another duration intervall

Dictionary<string, float> Simulation.Interaction.SatisfactionRates
get

The rate at which each need is decayed or satisfied per second whilst the interaction is performed.

Dictionary<string, bool> Simulation.Interaction.SpeciesAllowed
get

Which species are allowed to participate this interaction (precondition)


The documentation for this class was generated from the following file:
  • Interaction.cs