Revised 2006-09-03 DMB
Generated Wed Dec 8 14:18:59 2010 by make_actions_html

Return to the Index  |  The Events File  |  The Analyze File


List of Actions

Action Categories

There is a large library of actions available for scheduling as events. Additionally, all of these actions can be used within analyze scripts. Below you will find a listing of the high level groupings of these actions, along with detailed sections for each them.

Print
Print actions are the primary way of saving data from an Avida experiments.
Population
Population actions modify the state of the population, and will actually change the course of the run.
Environment
Actions that allow user to change properties of the environment, including resources.
Save and Load
Actions that allow for saving and loading large data sets, such as full populations.
Landscape Analysis
Actions that use data from the current state of Avida, process it and then output the results.
Driver
Actions that allow user to control program execution, including experiment termination.

For a brief overview of writing a new action, please see Creating an Action below.

 

Alphabetical Listing of Available Actions

AnalyzeLandscape
AnalyzePopulation
AssignRandomCellData
AttackDen
AvidianConjugation
CalcConsensus
ChangeEnvironment
CompeteDemes
CompeteDemes_AttackKillAndEnergyConserve
CompeteDemesByEnergyDistribution
CompeteDemesByNetwork
CompeteDemesByTaskCount
CompeteDemesByTaskCountAndEfficiency
CompeteOrganisms
ConnectCells
CopyDeme
CountMultipleOpinions
CountOpinions
DecayPoints
DelayedDemeEvent
DelayedDemeEventsPerSlots
DeletionLandscape
DemeBalanceTwoTasks
DemeReactionDiversity
DemeResourceThresholdPredicate
Desynchronization
DiffuseHGTGenomeFragments
DisconnectCells
DistributeData
DistributeDataCheaply
DistributeDataEfficiently
DivideDemes
DumpCellDataGrid
DumpClassificationIDGrid
DumpDonorGrid
DumpEnergyGrid
DumpExecutionRatioGrid
DumpFitnessGrid
DumpGenotypeColorGrid
DumpHostTaskGrid
DumpLandscape
DumpMemory
DumpParasiteTaskGrid
DumpPhenotypeIDGrid
DumpReactionGrid
DumpReceiverGrid
DumpSleepGrid
DumpTaskGrid
Echo
Exit
ExitAveGeneration
ExitAveLineageLabelGreater
ExitAveLineageLabelLess
ExitDemeReplications
ExitElapsedTime
Flash
FlushTopNavTrace
FullLandscape
HillClimb
Inject
InjectAll
InjectAllRandomRepro
InjectDemes
InjectDemesFromNest
InjectDemesRandom
InjectGroup
InjectModuloDemes
InjectParasite
InjectParasitePair
InjectRandom
InjectRange
InjectResource
InjectScaledResource
InjectSequence
InjectSequenceWDivMutRate
InsertionLandscape
IteratedConsensus
JoinGridCol
JoinGridRow
KillFractionInSequence
KillFractionInSequence_PopLimit
KillInstLimit
KillInstPair
KillNBelowResourceThreshold
KillProb
KillRate
KillRectangle
KillWithinRadiusBelowResourceThreshold
KillWithinRadiusBelowResourceThresholdTestAll
KillWithinRadiusMeanBelowResourceThreshold
LoadPopulation
MeasureDemeNetworks
MixPopulation
ModMutProb
MutationalNeighborhood
NewTrial
OutflowScaledResource
PairTestLandscape
Pause
PrecalcLandscape
Pred_DemeEventMoveBetweenTargets
Pred_DemeEventMoveCenter
Pred_DemeEventNUniqueIndividualsMovedIntoTarget
PredictNuLandscape
PredictWLandscape
PrintAgePolyethismData
PrintAveNumTasks
PrintAverageData
PrintAvgDemeTasksExeData
PrintAvgTreatableDemeTasksExeData
PrintAvgUntreatableDemeTasksExeData
PrintCCladeCounts
PrintCCladeFitnessHistogram
PrintCCladeRelativeFitnessHistogram
PrintCellData
PrintCellVisitsData
PrintCompetitionData
PrintConsensusData
PrintCountData
PrintCurrentMeanDemeDensity
PrintCurrentOpinions
PrintCurrentReactionData
PrintCurrentReactionRewardData
PrintCurrentTaskCounts
PrintData
PrintDebug
PrintDemeAllStats
PrintDemeAverageData
PrintDemeCompetitionData
PrintDemeCurrentTaskExeData
PrintDemeDonorStats
PrintDemeEnergyDistributionStats
PrintDemeEnergySharingStats
PrintDemeFoundersData
PrintDemeGlobalResources
PrintDemeMigrationSuicidePoints
PrintDemeNetworkData
PrintDemeNetworkTopology
PrintDemeOrgReactionData
PrintDemeOrgTasksData
PrintDemeOrgTasksExeData
PrintDemeReactionData
PrintDemeReactionDiversityReplicationData
PrintDemeReplicationData
PrintDemeResourceStats
PrintDemeResourceThresholdPredicate
PrintDemeSpacialEnergyStats
PrintDemeSpacialSleepStats
PrintDemeStats
PrintDemesTotalAvgEnergy
PrintDemeTasksData
PrintDemeTasksExeData
PrintDemeTestamentStats
PrintDemeTreatableCount
PrintDemeTreatableReplicationData
PrintDemeUntreatableReplicationData
PrintDepthHistogram
PrintDetailedFitnessData
PrintDetailedSynchronizationData
PrintDirectReciprocityData
PrintDivideMutData
PrintDominantData
PrintDominantGenotype
PrintDominantGroupGenotypes
PrintDominantForagerGenotypes
PrintDonationStats
PrintDynamicMaxMinData
PrintEditDistance
PrintErrorData
PrintExtendedTimeData
PrintFlowRateTuples
PrintGeneticDistanceData
PrintGenomicSiteEntropy
PrintGenotypeAbundanceHistogram
PrintGermlineData
PrintGroupIds
PrintGroupsFormedData
PrintHGTData
PrintHostPhenotypeData
PrintHostTasksData
PrintInstructionAbundanceHistogram
PrintInstructionData
PrintInternalTasksData
PrintInternalTasksQualData
PrintInterruptData
PrintLineageCounts
PrintLineageTotals
PrintLogFitnessHistogram
PrintMarketData
PrintMessageData
PrintMessageLog
PrintMigrationData
PrintMiniTraces
PrintMicroTraces
PrintMultiProcessData
PrintMutationRateData
PrintNewReactionData
PrintNewTasksData
PrintNewTasksDataPlus
PrintNumOrgsInDeme
PrintNumOrgsKilledData
PrintOpinionsSetPerDeme
PrintParasiteData
PrintParasitePhenotypeData
PrintParasiteTasksData
PrintPerDemeGenPerFounderData
PrintPerDemeReactionData
PrintPerDemeTasksData
PrintPerDemeTasksExeData
PrintPhenotypeData
PrintPhenotypeStatus
PrintPhenotypicPlasticity
PrintPlasticGenotypeSummary
PrintPopulationDistanceData
PrintPredicatedMessages
PrintProfilingData
PrintReactionData
PrintReactionExeData
PrintReactionRewardData
PrintRelativeFitnessHistogram
PrintReproData
PrintReputationData
PrintResourceData
PrintResourceLocData
PrintResWallLocData
PrintSenseData
PrintSenseExeData
PrintShadedAltruists
PrintSimpleConsensusData
PrintSleepData
PrintSpeciesAbundanceHistogram
PrintStatsData
PrintStringMatchData
PrintSynchronizationData
PrintTaskProbHistogram
PrintTasksData
PrintTasksExeData
PrintTaskSnapshot
PrintTasksQualData
PrintTimeData
PrintTopNavTrace
PrintTotalsData
PrintVarianceData
PrintViableTasksData
RandomLandscape
RemovePredators
ReplaceFromGermline
ReplicateDemes
ResetDemes
SampleLandscape
SaveDemeFounders
SaveFlameData
SavePopulation
SerialTransfer
SetCellResource
SetConfig
SetDemeResource
SetDemeResourceInflow
SetDemeResourceOutflow
SetEnvironmentInputs
SetEnvironmentRandomMask
SetFracDemeTreatable
SetGradientResource
SetGradientInflow
SetGradientOutflow
SetGradientConeInflow
SetGradientConeOutflow
SetGradientPlatInflow
SetGradientPlatOutflow
SetGradPlatVarInflow
SetMigrationRate
SetMutProb
SetNumInstBefore0Energy
SetOptimizeMinMax
SetPopCapEnforcement
SetPeriodicResource
SetPredatoryResource
SetProbabilisticResource
SetReactionInst
SetReactionMaxTaskCount
SetReactionMinTaskCount
SetReactionTask
SetReactionValue
SetReactionValueMult
SetResource
SetResourceInflow
SetResourceOutflow
SetSeasonalResource
SetSeasonalResource10Kyears_1To_1
SetSeasonalResource1Kyears_1To_1
SetTaskArgDouble
SetTaskArgInt
SetTaskArgString
SetVerbose
SeverGridCol
SeverGridRow
StopFastForward
SwapCells
Synchronization
TestDominant
TherapyDecayDemeResource
TherapyStructuralNumInst
TherapyStructuralRatioDistBetweenNearest
ToggleFitnessValley
ToggleRewardInstruction
TrackAllMessages
UnitFitness
VERBOSE
ZeroMuts
ZeroResources

 

Driver Actions

These actions control the driver object responsible for executing the current run.

 

Environment Actions

Events that allow user to change environment properties, such as resources and reaction parameters.

 

Landscape Analysis Actions

Landscape analysis actions perform various types mutation studies to calculate properties of the fitness landscape for a particular genome. When scheduled as an event during a run, these actions will typically perform analysis on the dominant genotype. In analyze mode, analysis is performed on the entire currently selected batch.

These actions are often very computationally intensive, thus will take a long time to compute. In order to take advantage of increasingly available multi-processor/multi-core systems, a number of these actions have been enhanced to make use of multiple threads to parallize work. Set the configuration setting MT_CONCURRENCY to the number of logical processors available to make use of all processor resources for these compuations.

 

Population Actions

Population events modify the state of the population, and will actually change the course of the run. There are a wide variety of these.

 

Print Actions

Output events are the primary way of saving data from an Avida experiments. The main two types are continuous output, which append to a single file every time the event is trigged, and singular output, which produce a single, complete file for each trigger.

 

Save Load Actions

 

Creating an Action

The action source code is contained in the source/action directory. Each of the individual action categories has its own source code files (e.g. Landcape Actions are located in the LandscapeActions files).

Each action is derrived from the cAction class. Briefly, to get an action to work you must create a child class that has a Process and GetDescription function defined as well as a constructor. You must also register this new class with the action library.

So, with that quick review of what must be done, here is a step by step guide to creating an action:

  1. Identify which of the action categories your action should be assigned to. There are six different action categories described above. Each category has a similar means of creating a new action, but do note that some action commands are generated via macros defined at the top of the files. For instance, in the PrintActions file, you will notice a number of STATS_OUT_FILE macros being used to generate rather repetitively coded standard output files. 

  2. Create a new class in the file that follows proper naming conventions. Any class should begin with "cAction" and be followed by the name of the action command you will register with the library. For instance, if we were to create a new command "MyAction", we'd name the class cActionMyAction. Below is a stub for this new action class:

    class cActionMyAction : public cAction
    {
    	private:
    		// Private data members for this action
    	public:
    		cActionMyAction(cWorld* world, const cString& args) : cAction(world, args) { ; }
    		
    		static const cString GetDescription() { return "Arguments: My Arguments"; }
    		
    		void Process(cAvidaContext& ctx)
    		{
    			//Perform whatever processing is needed when the action is triggered.
    		}
    };
    

  3. Define the private data members, constructor, description string in GetDescription, and the Process function. Any arguments that you specify after the action name in the events configuration will be passed to your new class via the args argument in the constructor.

  4. Register the new action with the action library. At the bottom of each action definitions file, there are the commands that register the individual actions with the action library. In the PrintActions.cc file, for instance, this function is called RegisterPrintActions.

    To register our example action "MyAction", we'd write:

    action_lib->Register<cActionMyAction>("MyAction");

  5. Test your action.

  6. Add a ==== Action action name ==== line in source/utils/make_actions_html/actions_source_info file


Return to the Index  |  The Events File  |  The Analyze File