Class scanCSD
- All Implemented Interfaces:
Runnable,IBS.HasIBS,IBS.HasIBS.CPairs,MilestoneListener,Features,Features.Pairs,Features.Payoffs,HasDistribution,HasDistribution.Strategy,HasHistogram,HasHistogram.Degree,HasHistogram.Fitness,HasHistogram.Strategy,HasMean,HasMean.Fitness,HasMean.Traits,HasPop2D,HasPop2D.Fitness,HasPop2D.Traits,HasPop3D,HasPop3D.Fitness,HasPop3D.Traits,CLOProvider
- Author:
- Christoph Hauert
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Continuous
Continuous.Benefits, Continuous.Costs, Continuous.Traits2PayoffNested classes/interfaces inherited from interface Features
Features.Groups, Features.Multispecies, Features.Pairs, Features.Payoffs, Features.StaticNested classes/interfaces inherited from interface HasDistribution
HasDistribution.StrategyNested classes/interfaces inherited from interface HasHistogram
HasHistogram.Degree, HasHistogram.Fitness, HasHistogram.StatisticsProbability, HasHistogram.StatisticsStationary, HasHistogram.StatisticsTime, HasHistogram.StrategyNested classes/interfaces inherited from interface HasMean
HasMean.Fitness, HasMean.TraitsNested classes/interfaces inherited from interface HasPop2D
HasPop2D.Fitness, HasPop2D.TraitsNested classes/interfaces inherited from interface HasPop3D
HasPop3D.Fitness, HasPop3D.TraitsNested classes/interfaces inherited from interface IBS.HasIBS
IBS.HasIBS.CGroups, IBS.HasIBS.CPairs, IBS.HasIBS.DGroups, IBS.HasIBS.DPairs, IBS.HasIBS.MCGroups, IBS.HasIBS.MCPairs -
Field Summary
FieldsModifier and TypeFieldDescription(package private) doubleThe last value of theb1benefit parameter.(package private) doubleThe increment of theb1benefit parameter.(package private) booleanThe flag to indicate whether to use logarithmic increments for theb1benefit parameter.(package private) doubleThe first value of theb1benefit parameter.(package private) doubleThe last value of theb2benefit parameter.(package private) doubleThe increment of theb2benefit parameter.(package private) booleanThe flag to indicate whether to use logarithmic increments for theb2benefit parameter.(package private) doubleThe first value of theb2benefit parameter.(package private) doubleThe last value of thec1cost parameter.(package private) doubleThe increment of thec1cost parameter.(package private) booleanThe flag to indicate whether to use logarithmic increments for thec1cost parameter.(package private) doubleThe first value of thec1cost parameter.(package private) doubleThe last value of thec2cost parameter.(package private) doubleThe increment of thec2cost parameter.(package private) booleanThe flag to indicate whether to use logarithmic increments for thec2cost parameter.(package private) doubleThe first value of thec2cost parameter.final CLOptionCommand line option to set the benefit parameterb1, or its range or its range to scan.final CLOptionCommand line option to set the benefit parameterb2, or its range or its range to scan.final CLOptionCommand line option to set the number of bins for the distribution (histogram).final CLOptionCommand line option to set the cost parameterc1, or its range or its range to scan.final CLOptionCommand line option to set the cost parameterc2, or its range or its range to scan.final CLOptionThe command line option to print the trait distribution.final CLOptionCommand line option to show the simulation progress.final CLOptionThe command line option to set the interval for snapshots.(package private) IBSCPopulationThe population with continuous traits.(package private) intThe number of bins for the histogram.(package private) PrintStreamThe output stream.(package private) booleanThe flag to indicate whether to print the distribution.(package private) booleanThe flag to indicate whether to show progress.(package private) intThe interval for snapshots.final intThe index of the mean trait.final intThe index of the standard deviation.Fields inherited from class Continuous
cloBenefits, cloCosts, cloTraitRange, cxMaxMonoScore, cxMaxScore, cxMinMonoScore, cxMinScore, extremalScoresSet, mutation, traitMax, traitMin, traits2payoffFields inherited from class Module
cloDeathRate, cloGeometry, cloNGroup, cloNPopulation, cloPhase2DAxes, cloTraitColors, cloTraitDisable, cloTraitNames, competition, deathRate, defaultColor, engine, interaction, logger, map2fitness, markers, model, nActive, name, nGroup, nPopulation, nTraits, playerUpdate, structure, traitColor, trajectoryColor, VACANT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectCLO(CLOParser parser) All providers of command line options must implement this method to collect their options.static voidMain method to run the simulation.protected FileopenSnapshot(String ext) Open file for exporting the snapshot.voidprintState(double[] stat, double[] low) Print the distributions of the strategies.voidrun()voidSave snapshot of current configuration.Methods inherited from class CSD
getAuthors, getKey, getTitle, load, pairScoresMethods inherited from class Continuous
add, check, getMaxMonoPayoff, getMaxPayoff, getMinMonoPayoff, getMinPayoff, getMutation, getTraitMax, getTraitMin, setExtremalScores, setTraitRange, unloadMethods inherited from class Module
createGeometry, createIBSPop, createModel, getActiveTraits, getCompetitionGeometry, getDeathRate, getGeometry, getIBSPopulation, getID, getInteractionGeometry, getMap2Fitness, getMarkers, getMeanColors, getModelTypes, getNActive, getName, getNGroup, getNPopulation, getNRoles, getNSpecies, getNTraits, getOpponent, getPlayerUpdate, getSpecies, getSpecies, getTraitColor, getTraitColors, getTraitName, getTraitNames, getTrajectoryColor, getVacant, init, processColorMap, reset, setActiveTraits, setDeathRate, setGeometries, setIBSPopulation, setModel, setName, setNGroup, setNPopulation, setNTraits, setOpponent, setTraitColors, setTraitNames, setTrajectoryColorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CLOProvider
adjustCLOMethods inherited from interface Features
isMultispecies, isStaticMethods inherited from interface Features.Pairs
isPairwiseMethods inherited from interface Features.Payoffs
getMap2Fitness, getMaxMonoPayoff, getMaxPayoff, getMinMonoPayoff, getMinPayoff, isNeutralMethods inherited from interface HasDistribution
getNTraits, getTraitNameMethods inherited from interface HasHistogram
getCustomLevels, getNTraits, getTraitColorsMethods inherited from interface IBS.HasIBS
createIBSMethods inherited from interface MilestoneListener
modelDidInit, modelDidReset, modelLoaded, modelRelaxed, modelRunning, modelSettings, modelStopped, modelUnloaded, moduleLoaded, moduleRestored, moduleUnloaded
-
Field Details
-
b1Start
double b1StartThe first value of theb1benefit parameter. -
b1End
double b1EndThe last value of theb1benefit parameter. -
b1Incr
double b1IncrThe increment of theb1benefit parameter. -
b1Log
boolean b1LogThe flag to indicate whether to use logarithmic increments for theb1benefit parameter. -
b2Start
double b2StartThe first value of theb2benefit parameter. -
b2End
double b2EndThe last value of theb2benefit parameter. -
b2Incr
double b2IncrThe increment of theb2benefit parameter. -
b2Log
boolean b2LogThe flag to indicate whether to use logarithmic increments for theb2benefit parameter. -
c1Start
double c1StartThe first value of thec1cost parameter. -
c1End
double c1EndThe last value of thec1cost parameter. -
c1Incr
double c1IncrThe increment of thec1cost parameter. -
c1Log
boolean c1LogThe flag to indicate whether to use logarithmic increments for thec1cost parameter. -
c2Start
double c2StartThe first value of thec2cost parameter. -
c2End
double c2EndThe last value of thec2cost parameter. -
c2Incr
double c2IncrThe increment of thec2cost parameter. -
c2Log
boolean c2LogThe flag to indicate whether to use logarithmic increments for thec2cost parameter. -
nBins
int nBinsThe number of bins for the histogram. -
printDistr
boolean printDistrThe flag to indicate whether to print the distribution. -
snapinterval
int snapintervalThe interval for snapshots. Disabled ifsnapinterval ≤ 0. -
progress
boolean progressThe flag to indicate whether to show progress. -
cpop
IBSCPopulation cpopThe population with continuous traits. -
out
PrintStream outThe output stream. Defaults toSystem.out. -
TRAIT_MEAN
public final int TRAIT_MEANThe index of the mean trait.- See Also:
-
TRAIT_SDEV
public final int TRAIT_SDEVThe index of the standard deviation.- See Also:
-
cloC1
Command line option to set the cost parameterc1, or its range or its range to scan. -
cloC2
Command line option to set the cost parameterc2, or its range or its range to scan. -
cloB1
Command line option to set the benefit parameterb1, or its range or its range to scan. -
cloB2
Command line option to set the benefit parameterb2, or its range or its range to scan. -
cloBins
Command line option to set the number of bins for the distribution (histogram). -
cloDistribution
The command line option to print the trait distribution. -
cloSnapInterval
The command line option to set the interval for snapshots. -
cloProgress
Command line option to show the simulation progress.
-
-
Constructor Details
-
scanCSD
Create a new scanCSD simulation.- Parameters:
engine- the pacemaker for running the model
-
-
Method Details
-
run
public void run()Description copied from class:ModuleDefault run-loop for modules. Opportunity to override in subclasses for running customized simulations. Currently only called from
EvoLudoJRE.simulation()if custom simulation class is specified injarfile. -
printState
public void printState(double[] stat, double[] low) Print the distributions of the strategies. In order to identify bi-stability two complementary runs with low and high initial investments are required. In all other cases, thelowisnull.- Parameters:
stat- the trait distributionlow- the trait distribution for low investments
-
collectCLO
Description copied from interface:CLOProviderAll providers of command line options must implement this method to collect their options.Each command line option is (uniquely) identified by it's name (see
CLOption.getName()), which corresponds to the long version of the option. If an attempt is made to add an option with a name that already exists, theparserissues a warning and ignores the option. Thus, in general, implementing subclasses should first register their options and callsuper.collectCLO(CLOParser)at the end such that subclasses are able to override command line options specified in a parental class.Override this method in subclasses to add further command line options. Subclasses must make sure that they include a call to super.
- Specified by:
collectCLOin interfaceCLOProvider- Overrides:
collectCLOin classContinuous- Parameters:
parser- the reference to parser that manages command line options- See Also:
-
saveSnapshot
public void saveSnapshot()Save snapshot of current configuration. The snapshot is saved in the PNG format for lattices and in the SVG format for generic graphs.- See Also:
-
openSnapshot
Open file for exporting the snapshot.- Parameters:
ext- the file extension- Returns:
- the file for the snapshot
-
main
Main method to run the simulation.- Parameters:
args- the array of command line arguments
-