Revised 2006-09-03 DMB
Generated Tue May 27 15:04:24 2008 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
apocalypse
ChangeEnvironment
compete_demes
CompeteDemes
CompeteOrganisms
compete_organisms
connect_cells
ConnectCells
copy_deme
CopyDeme
DelayedDemeEvent
DeletionLandscape
detail_parasite_pop
detail_pop
detail_sex_pop
DisconnectCells
disconnect_cells
DivideDemes
DumpCellDataGrid
dump_donor_grid
DumpDonorGrid
DumpEnergyGrid
DumpExecutionRatioGrid
dump_fitness_grid
DumpFitnessGrid
dump_genotype_grid
DumpGenotypeIDGrid
dump_historic_pop
dump_historic_sex_pop
DumpLandscape
DumpLineageGrid
dump_memory
DumpMemory
dump_phenotype_grid
DumpPhenotypeIDGrid
dump_pop
DumpPopulation
dump_receiver_grid
DumpReceiverGrid
DumpSleepGrid
dump_task_grid
DumpTaskGrid
Echo
echo
exit
Exit
ExitAveGeneration
ExitAveLineageLabelGreater
ExitAveLineageLabelLess
ExitElapsedTime
exit_if_ave_lineage_label_larger
exit_if_ave_lineage_label_smaller
FullLandscape
genetic_distance_pop_dump
HillClimb
inject
Inject
inject_all
InjectAll
inject_all_random_repro
InjectAllRandomRepro
InjectDemes
InjectParasite
InjectParasitePair
InjectRandom
inject_random
InjectRange
inject_range
InjectResource
inject_resource
inject_scaled_resource
InjectScaledResource
inject_sequence
InjectSequence
InjectSequenceWDivMutRate
InsertionLandscape
join_grid_col
join_grid_row
JoinGridCol
JoinGridRow
KillProb
KillRate
KillRectangle
kill_rectangle
LoadClone
load_clone
load_dump_file
LoadPopulation
ModMutProb
MutationalNeighborhood
new_trial
NewTrial
outflow_scaled_resource
OutflowScaledResource
PairTestLandscape
PrecalcLandscape
PredictNuLandscape
PredictWLandscape
print_average_data
PrintAverageData
PrintCCladeCounts
PrintCCladeFitnessHistogram
PrintCCladeRelativeFitnessHistogram
PrintCellVisitsData
PrintCompetitionData
print_count_data
PrintCountData
PrintCurrentReactionData
print_data
PrintData
PrintDebug
print_deme_stats
PrintDemeAllStats
PrintDemeAverageData
PrintDemeDonorStats
PrintDemeFoundersData
PrintDemeOrgReactionData
PrintDemeOrgTasksData
PrintDemeOrgTasksExeData
PrintDemeReactionData
PrintDemeReplicationData
PrintDemeResourceStats
PrintDemeSpacialEnergyStats
PrintDemeSpacialSleepStats
PrintDemeStats
PrintDemeTasksData
PrintDemeTasksExeData
print_depth_histogram
PrintDepthHistogram
print_detailed_fitness_data
PrintDetailedFitnessData
print_divide_mut_data
PrintDivideMutData
print_dom
print_dom_parasite
print_dominant_data
PrintDominantData
PrintDominantGenotype
PrintDominantParasiteGenotype
print_donation_stats
print_error_data
PrintErrorData
print_genetic_distance_data
PrintGeneticDistanceData
PrintGenomicSiteEntropy
print_genotype_abundance_histogram
print_genotype_map
PrintGenotypeAbundanceHistogram
PrintGenotypeMap
print_genotypes
PrintGenotypes
PrintGermlineData
print_instruction_abundance_histogram
print_instruction_data
PrintInstructionAbundanceHistogram
PrintInstructionData
print_lineage_counts
print_lineage_totals
PrintLineageCounts
PrintLineageTotals
PrintLogFitnessHistogram
print_market_data
PrintMarketData
print_mutation_rate_data
PrintMutationRateData
print_number_phenotypes
PrintParasiteData
PrintPerDemeGenPerFounderData
PrintPerDemeReactionData
PrintPerDemeTasksData
PrintPerDemeTasksExeData
print_phenotype_status
PrintPhenotypeData
PrintPhenotypeStatus
PrintPhenotypicPlasticity
PrintPopulationDistanceData
PrintReactionData
PrintReactionRewardData
PrintRelativeFitnessHistogram
print_resource_data
PrintResourceData
PrintSenseData
PrintSenseExeData
PrintSleepData
print_species_abundance_histogram
PrintSpeciesAbundanceHistogram
print_stats_data
PrintStatsData
print_tasks_data
print_tasks_exe_data
print_tasks_qual_data
PrintTasksData
PrintTasksExeData
PrintTaskSnapshot
PrintTasksQualData
print_time_data
PrintTimeData
print_totals_data
PrintTotalsData
print_tree_depths
PrintTreeDepths
print_variance_data
PrintVarianceData
print_viable_tasks_data
PrintViableTasksData
RandomLandscape
rate_kill
replicate_demes
ReplicateDemes
reset_demes
ResetDemes
SampleLandscape
save_clone
SaveClone
SaveDemeFounders
SaveHistoricPopulation
SaveHistoricSexPopulation
SaveParasitePopulation
SavePopulation
SaveSexPopulation
SerialTransfer
serial_transfer
SetCellResource
SetEnvironmentInputs
SetEnvironmentRandomMask
SetMigrationRate
SetMutProb
SetNumInstBefore0Energy
SetOptimizeMinMax
SetPeriodicResource
set_reaction_inst
set_reaction_value
set_reaction_value_mult
SetReactionInst
SetReactionMaxTaskCount
SetReactionMinTaskCount
SetReactionTask
SetReactionValue
SetReactionValueMult
SetResource
set_resource
SetResourceInflow
SetResourceOutflow
SetTaskArgDouble
SetTaskArgInt
SetTaskArgString
SetVerbose
sever_grid_col
sever_grid_row
SeverGridCol
SeverGridRow
StopFastForward
swap_cells
SwapCells
task_snapshot
test_dom
TestDominant
ToggleFitnessValley
ToggleRewardInstruction
VERBOSE
zero_muts
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