Simulation.Needs Class Reference

The Needs class provides methods for interacting with the satisfaction levels of agents. More...

Public Types

enum  NeedSatisfactions {
  NeedSatisfactions.Unvalued = 0, NeedSatisfactions.Maximized, NeedSatisfactions.Satisfied, NeedSatisfactions.Uncritical,
  NeedSatisfactions.Critical
}
 Discrete states of satisfaction levels. More...
 

Public Member Functions

 Needs (Species species)
 Constructor More...
 
void SetSpecficSatisfactionLevels (Dictionary< string, float > needLevels)
 Set the level of each need satisfaction to a particular value More...
 
void ApplyChangeRates (Dictionary< string, float > input)
 Apply a specific set of change rates, for example the change rates provided by an interaction. More...
 
void ApplyChangePerSecond ()
 Apply the change per second rates, that is decay (or increase) each need with its default global change per second rate More...
 
Goal GoalToSatisfyLowestNeed ()
 Compute a goal to satisfy the numerically lowest need. More...
 
void RandomizeValues ()
 Set a random value for each need satisfation More...
 
Dictionary< string, Needs.NeedSatisfactionsSatisfactions ()
 The discrete satisfaction states for each need More...
 
float GetValue (string key)
 

Detailed Description

The Needs class provides methods for interacting with the satisfaction levels of agents.

Member Enumeration Documentation

Discrete states of satisfaction levels.

Enumerator
Unvalued 

Unfortunately no discrete value of the need satisfaction levels is available.

Maximized 

The satisfaction level of the need is maximized.

Satisfied 

The need is satisfied, but not yet maximized.

Uncritical 

The need is below the satisfied limit, but not yet critical

Critical 

The need satisfaction level is below or equal to the target value for critical satisfaction.

Constructor & Destructor Documentation

Simulation.Needs.Needs ( Species  species)

Constructor

Parameters
speciesThe species that the agent owning this set of needs belongs to

Member Function Documentation

void Simulation.Needs.ApplyChangePerSecond ( )

Apply the change per second rates, that is decay (or increase) each need with its default global change per second rate

void Simulation.Needs.ApplyChangeRates ( Dictionary< string, float >  input)

Apply a specific set of change rates, for example the change rates provided by an interaction.

Parameters
input
float Simulation.Needs.GetValue ( string  key)

Parameters
keyThe name of the need.
Returns
The satisfaction level for the specified need. NaN if the key is invalid.
Goal Simulation.Needs.GoalToSatisfyLowestNeed ( )

Compute a goal to satisfy the numerically lowest need.

Returns
void Simulation.Needs.RandomizeValues ( )

Set a random value for each need satisfation

Dictionary<string, Needs.NeedSatisfactions> Simulation.Needs.Satisfactions ( )

The discrete satisfaction states for each need

Returns
A dictionary which has the discrete states as values for each need.
void Simulation.Needs.SetSpecficSatisfactionLevels ( Dictionary< string, float >  needLevels)

Set the level of each need satisfaction to a particular value

Parameters
needLevelsThe new satisfaction levels

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