Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentSpec ¶
type AgentSpec struct { Uuid uuid.UUID `json:"uuid"` Actions map[b.SimTime]uuid.UUID `json:"actions"` Activations map[b.SimTime]map[uuid.UUID]float64 `json:"activations"` Deltas map[uuid.UUID]float64 `json:"deltas"` Friends map[uuid.UUID]float64 `json:"friends"` }
func NewAgentSpecFromAgent ¶
type BehaviourSpec ¶
func (*BehaviourSpec) ToBehaviour ¶
func (spec *BehaviourSpec) ToBehaviour() *b.Behaviour
type BeliefSpec ¶
type BeliefSpec struct { Name string `json:"name"` Uuid uuid.UUID `json:"uuid"` Perceptions map[uuid.UUID]float64 `json:"perceptions"` Relationships map[uuid.UUID]float64 `json:"relationships"` }
func (*BeliefSpec) LinkBeliefRelationships ¶
func (spec *BeliefSpec) LinkBeliefRelationships(beliefs []*b.Belief)
type Configuration ¶
type Configuration struct { // The behaviours in the simulation. Behaviours []*b.Behaviour // The beliefs in the simulation. Beliefs []*b.Belief // The agents in the simulation. Agents []*b.Agent // The PerformanceRelationships in the simulation. Prs PerformanceRelationships // The start time of the simulation. StartTime b.SimTime // The end time of the simulation (inclusive). EndTime b.SimTime // The output file. OutputFile *os.File // Whether to serialize the full state of agents, or just summary stats. FullOutput bool }
Configuration defines the configuration of the simulation.
type OutputSpec ¶
type OutputSpec struct { MeanActivation map[uuid.UUID]float64 `json:"meanActivation"` SDActivation map[uuid.UUID]float64 `json:"sdActivation"` MedianActivation map[uuid.UUID]float64 `json:"medianActivation"` NonzeroActivationCount map[uuid.UUID]uint64 `json:"nonzeroActivationCount"` NPerformers map[uuid.UUID]uint64 `json:"nPerformers"` }
func NewOutputSpec ¶
func NewOutputSpec() *OutputSpec
type OutputSpecs ¶
type OutputSpecs struct {
Data map[b.SimTime]OutputSpec `json:"data"`
}
type PerformanceRelationships ¶
PerformanceRelationships defines the relationship which defines how holding a belief affects the probability of performing a behaviour.
The value should be in the range [-1,+1]
func PRSSpecToPerformanceRelationships ¶
func PRSSpecToPerformanceRelationships( prss []PerformanceRelationshipSpec, beliefs map[uuid.UUID]*b.Belief, behaviours map[uuid.UUID]*b.Behaviour, ) PerformanceRelationships
PRSSpecToPerformanceRelationships converts a slice of PerformanceRelationshipSpecs (i.e., what was read from JSON) to PerformanceRelationships.
This takes the Beliefs (using a map from their UUID to the object) and Behaviours (using a map from their UUID to the object).
Click to show internal directories.
Click to hide internal directories.