sys

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: GPL-3.0 Imports: 18 Imported by: 1

Documentation

Overview

Package sys provides all ECS systems (sub-models) for the beecs model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeCohorts

type AgeCohorts struct {
	// contains filtered or unexported fields
}

AgeCohorts moves all cohort-based age classes to the next day's cohort. It also handles transition from eggs to larvae, larvae to pupae and pupae to in-hive bees. It does not handle transition from in-hive bees to foragers.

func (*AgeCohorts) Finalize

func (s *AgeCohorts) Finalize(w *ecs.World)

func (*AgeCohorts) Initialize

func (s *AgeCohorts) Initialize(w *ecs.World)

func (*AgeCohorts) Update

func (s *AgeCohorts) Update(w *ecs.World)

type BroodCare

type BroodCare struct {
	// contains filtered or unexported fields
}

BroodCare calculates and applies brood mortality based on food or nursing shortage.

func (*BroodCare) Finalize

func (s *BroodCare) Finalize(w *ecs.World)

func (*BroodCare) Initialize

func (s *BroodCare) Initialize(w *ecs.World)

func (*BroodCare) Update

func (s *BroodCare) Update(w *ecs.World)

type CalcAff

type CalcAff struct {
	// contains filtered or unexported fields
}

CalcAff calculates the age of first foraging, based on population structure and stores of the hive.

func (*CalcAff) Finalize

func (s *CalcAff) Finalize(w *ecs.World)

func (*CalcAff) Initialize

func (s *CalcAff) Initialize(w *ecs.World)

func (*CalcAff) Update

func (s *CalcAff) Update(w *ecs.World)

type CalcForagingPeriod

type CalcForagingPeriod struct {
	// contains filtered or unexported fields
}

func (*CalcForagingPeriod) Finalize

func (s *CalcForagingPeriod) Finalize(w *ecs.World)

func (*CalcForagingPeriod) Initialize

func (s *CalcForagingPeriod) Initialize(w *ecs.World)

func (*CalcForagingPeriod) Update

func (s *CalcForagingPeriod) Update(w *ecs.World)

type CountPopulation

type CountPopulation struct {
	// contains filtered or unexported fields
}

CountPopulation counts the population per developmental stage. Results are written to a globals.PopulationStats resource.

func (*CountPopulation) Finalize

func (s *CountPopulation) Finalize(w *ecs.World)

func (*CountPopulation) Initialize

func (s *CountPopulation) Initialize(w *ecs.World)

func (*CountPopulation) Update

func (s *CountPopulation) Update(w *ecs.World)

type EggLaying

type EggLaying struct {
	// contains filtered or unexported fields
}

EggLaying produces new worker and drone eggs, based on seasonal egg laying capacity and available nurse bees.

func (*EggLaying) Finalize

func (s *EggLaying) Finalize(w *ecs.World)

func (*EggLaying) Initialize

func (s *EggLaying) Initialize(w *ecs.World)

func (*EggLaying) Update

func (s *EggLaying) Update(w *ecs.World)

type FixedTermination

type FixedTermination struct {
	// contains filtered or unexported fields
}

FixedTermination terminates the simulation after the number of ticks given in params.Termination.MaxTicks.

func (*FixedTermination) Finalize

func (s *FixedTermination) Finalize(w *ecs.World)

Finalize the system

func (*FixedTermination) Initialize

func (s *FixedTermination) Initialize(w *ecs.World)

func (*FixedTermination) Update

func (s *FixedTermination) Update(w *ecs.World)

type Foraging

type Foraging struct {
	// contains filtered or unexported fields
}

Foraging performs the complete foraging process of each day. It potentially performs multiple foraging rounds per day.

func (*Foraging) Finalize

func (s *Foraging) Finalize(w *ecs.World)

func (*Foraging) Initialize

func (s *Foraging) Initialize(w *ecs.World)

func (*Foraging) Update

func (s *Foraging) Update(w *ecs.World)

type HoneyConsumption

type HoneyConsumption struct {
	// contains filtered or unexported fields
}

HoneyConsumption calculates the daily honey consumption and removes it from the honey store in globals.Stores.

func (*HoneyConsumption) Finalize

func (s *HoneyConsumption) Finalize(w *ecs.World)

func (*HoneyConsumption) Initialize

func (s *HoneyConsumption) Initialize(w *ecs.World)

func (*HoneyConsumption) Update

func (s *HoneyConsumption) Update(w *ecs.World)

type InitCohorts

type InitCohorts struct {
	// contains filtered or unexported fields
}

InitCohorts initializes and adds the resources globals.Eggs, globals.Larvae, globals.Pupae and globals.InHive.

func (*InitCohorts) Finalize

func (s *InitCohorts) Finalize(w *ecs.World)

func (*InitCohorts) Initialize

func (s *InitCohorts) Initialize(w *ecs.World)

func (*InitCohorts) Update

func (s *InitCohorts) Update(w *ecs.World)

type InitForagingPeriod added in v0.2.0

type InitForagingPeriod struct {
	// contains filtered or unexported fields
}

func (*InitForagingPeriod) Finalize added in v0.2.0

func (s *InitForagingPeriod) Finalize(w *ecs.World)

func (*InitForagingPeriod) Initialize added in v0.2.0

func (s *InitForagingPeriod) Initialize(w *ecs.World)

func (*InitForagingPeriod) Update added in v0.2.0

func (s *InitForagingPeriod) Update(w *ecs.World)

type InitPatchesList

type InitPatchesList struct{}

InitPatchesList initializes flower patches based on the information in params.InitialPatches.

func (*InitPatchesList) Finalize

func (s *InitPatchesList) Finalize(w *ecs.World)

func (*InitPatchesList) Initialize

func (s *InitPatchesList) Initialize(w *ecs.World)

func (*InitPatchesList) Update

func (s *InitPatchesList) Update(w *ecs.World)

type InitPopulation

type InitPopulation struct{}

InitPopulation creates initial forager squadrons, based on the settings in params.InitialPopulation.

func (*InitPopulation) Finalize

func (s *InitPopulation) Finalize(w *ecs.World)

func (*InitPopulation) Initialize

func (s *InitPopulation) Initialize(w *ecs.World)

func (*InitPopulation) Update

func (s *InitPopulation) Update(w *ecs.World)

type InitStore

type InitStore struct{}

InitStore initializes and adds globals.Stores according to the settings in params.InitialStores.

func (*InitStore) Finalize

func (s *InitStore) Finalize(w *ecs.World)

func (*InitStore) Initialize

func (s *InitStore) Initialize(w *ecs.World)

func (*InitStore) Update

func (s *InitStore) Update(w *ecs.World)

type MortalityCohorts

type MortalityCohorts struct {
	// contains filtered or unexported fields
}

MortalityCohorts applies background mortality to all cohort-based development stages (i.e. all except foragers).

func (*MortalityCohorts) Finalize

func (s *MortalityCohorts) Finalize(w *ecs.World)

func (*MortalityCohorts) Initialize

func (s *MortalityCohorts) Initialize(w *ecs.World)

func (*MortalityCohorts) Update

func (s *MortalityCohorts) Update(w *ecs.World)

type MortalityForagers

type MortalityForagers struct {
	// contains filtered or unexported fields
}

MortalityForagers applies worker mortality, including

func (*MortalityForagers) Finalize

func (s *MortalityForagers) Finalize(w *ecs.World)

func (*MortalityForagers) Initialize

func (s *MortalityForagers) Initialize(w *ecs.World)

func (*MortalityForagers) Update

func (s *MortalityForagers) Update(w *ecs.World)

type Pause

type Pause struct {
	Steps int64
	// contains filtered or unexported fields
}

Pause the simulation at the given simulation step.

func (*Pause) Finalize

func (s *Pause) Finalize(w *ecs.World)

Finalize the system

func (*Pause) Initialize

func (s *Pause) Initialize(w *ecs.World)

Initialize the system

func (*Pause) Update

func (s *Pause) Update(w *ecs.World)

Update the system

type PollenConsumption

type PollenConsumption struct {
	// contains filtered or unexported fields
}

PollenConsumption calculates the daily pollen consumption and removes it from the pollen store in globals.Stores.

func (*PollenConsumption) Finalize

func (s *PollenConsumption) Finalize(w *ecs.World)

func (*PollenConsumption) Initialize

func (s *PollenConsumption) Initialize(w *ecs.World)

func (*PollenConsumption) Update

func (s *PollenConsumption) Update(w *ecs.World)

type ReplenishPatches

type ReplenishPatches struct {
	// contains filtered or unexported fields
}

ReplenishPatches resets and replenishes flower patches to their current maximum nectar and pollen.

func (*ReplenishPatches) Finalize

func (s *ReplenishPatches) Finalize(w *ecs.World)

func (*ReplenishPatches) Initialize

func (s *ReplenishPatches) Initialize(w *ecs.World)

func (*ReplenishPatches) Update

func (s *ReplenishPatches) Update(w *ecs.World)

type TransitionForagers

type TransitionForagers struct {
	// contains filtered or unexported fields
}

TransitionForagers transitions all in-hive bees of age equal or above globals.AgeFirstForaging.Aff to forager squadrons.

func (*TransitionForagers) Finalize

func (s *TransitionForagers) Finalize(w *ecs.World)

func (*TransitionForagers) Initialize

func (s *TransitionForagers) Initialize(w *ecs.World)

func (*TransitionForagers) Update

func (s *TransitionForagers) Update(w *ecs.World)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL