Package org.evoludo.simulator.modules
Class ATBT.ODE
Object
Model
ODE
RungeKutta
ODE
- All Implemented Interfaces:
Discrete,CLOProvider
- Enclosing class:
ATBT
Provide ODE implementation for asymmetric
2×2 games with
environmental feedback.-
Nested Class Summary
Nested classes/interfaces inherited from class ODE
ODE.InitTypeNested classes/interfaces inherited from class Model
Model.HasDE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ModuleConvenience variable: module associated with this model (useful for single species).Fields inherited from class ODE
cloAdjustedDynamics, cloDEAccuracy, cloDEdt, cloInit, cloTimeReversed, initType, isDensity, monoStopFields inherited from class Model
cloSamples, cloTimeRelax, cloTimeStep, cloTimeStop, connect, converged, engine, fixData, isMultispecies, logger, mode, nSamples, nSpecies, nStatisticsFailed, nStatisticsSamples, rng, species, statisticsSampleNew, time, timeRelax, timeStep, timeStop -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedODE()Constructs a new ODE solver taylored for the integration of asymmetric2×2games with environmental feedback. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetDerivatives(double t, double[] state, double[] fitness, double[] change) Calculate the rates of change for all species instateattimegiven the fitnessfitnessand returned inchange.booleanChecks if time reversal is permitted.Methods inherited from class ODE
checkConvergence, collectCLO, encodeState, getAccuracy, getDt, getFitnessData, getFitnessHistogramData, getInitialTraits, getInitialTraits, getMaxFitness, getMaxScore, getMeanFitness, getMeanFitness, getMeanTraits, getMeanTraits, getMinFitness, getMinScore, getMonoScore, getNMean, getNMean, getStatus, getTraitData, init, isDensity, isMonomorphic, isTimeReversed, load, next, normalizeState, parse, restoreState, setAccuracy, setAdjustedDynamics, setDt, setInitialTraits, setInitialTraits, setTimeReversed, update, updateBest, updateBestResponse, updateEcology, updateImitate, updateImitateBetter, updateProportional, updateThermalMethods inherited from class Model
debugStep, getCounter, getFitnessNameAt, getFixationData, getLogger, getMeanFitnessAt, getMeanName, getMeanNames, getMeanTraitAt, getMode, getNextHalt, getNSamples, getNSpecies, getNStatisticsFailed, getNStatisticsSamples, getScoreNameAt, getSpecies, getTime, getTimeRelax, getTimeStep, getTimeStop, getTraitNameAt, getType, hasConverged, initStatisticsFailed, initStatisticsSample, isConnected, isContinuous, isRelaxing, permitsDebugStep, permitsMode, permitsSampleStatistics, permitsUpdateStatistics, readStatisticsSample, relax, requestMode, resetStatisticsSample, setMode, setNSamples, setTimeRelax, setTimeStep, setTimeStop, useSchedulingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CLOProvider
adjustCLO
-
Field Details
-
module
Convenience variable: module associated with this model (useful for single species).
-
-
Constructor Details
-
ODE
protected ODE()Constructs a new ODE solver taylored for the integration of asymmetric2×2games with environmental feedback.
-
-
Method Details
-
permitsTimeReversal
public boolean permitsTimeReversal()Checks if time reversal is permitted. By default returnsfalse. Only few models are capable of time reversal.ODE and SDE models return
trueby default.Ecological feedback is unable to deal with time reversal.
- Overrides:
permitsTimeReversalin classODE- Returns:
trueif time reversal permissible.- See Also:
-
getDerivatives
protected void getDerivatives(double t, double[] state, double[] fitness, double[] change) Description copied from class:ODECalculate the rates of change for all species instateattimegiven the fitnessfitnessand returned inchange. For replicator models the dynamics depends on the selected type of player updating, seePlayerUpdate.Type, while for modules with variable population sizes (density based or with vaccant 'space' (reproductive opportunities)) the fitness denotes the rate of reproduction moderated by the available 'space'.IMPORTANT: parallel processing for PDE's in JRE requires this method to be thread safe.
Note: adding
synchronizedto this method would seem to make sense but this results in a deadlock for multiple threads in PDE's and JRE. However, apparently not needed as javascript and java yield the exact same results (after 15k generations!)- Overrides:
getDerivativesin classODE- Parameters:
t- the time at which to calculate the derivativestate- the array of frequencies/densities denoting the state populationfitness- the array of fitness values of types in populationchange- the array to return the rate of change of each type in the population- See Also:
-