Skip to content

Commit cf68b39

Browse files
committed
standardize on "viability/survival" as the tick cycle stage name
1 parent 97d8ddb commit cf68b39

7 files changed

Lines changed: 15 additions & 17 deletions

File tree

QtSLiM/help/SLiMHelpClasses.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,11 +810,11 @@
810810
<p class="p3">individuals =&gt; (object&lt;Individual&gt;)</p>
811811
<p class="p6"><span class="s5">All of the individuals contained by the subpopulation.<span class="Apple-converted-space">  </span>Each individual is diploid and thus contains two </span><span class="s8">Genome</span><span class="s5"> objects.</span><span class="s3"><span class="Apple-converted-space">  </span>See the </span><span class="s4">sampleIndividuals()</span><span class="s3"> and </span><span class="s4">subsetIndividuals()</span><span class="s3"> for fast ways to get a subset of the individuals in a subpopulation.</span></p>
812812
<p class="p5">lifetimeReproductiveOutput =&gt; (integer)</p>
813-
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutput</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This allows access to the lifetime reproductive output of individuals in the subpopulation at the end of their lives.<span class="Apple-converted-space">  </span>If pedigree tracking is not on, this property is unavailable.</p>
813+
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutput</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This allows access to the lifetime reproductive output of individuals in the subpopulation at the end of their lives.<span class="Apple-converted-space">  </span>If pedigree tracking is not on, this property is unavailable.</p>
814814
<p class="p5">lifetimeReproductiveOutputF =&gt; (integer)</p>
815-
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutputF</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all female individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.</p>
815+
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutputF</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all female individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.</p>
816816
<p class="p5">lifetimeReproductiveOutputM =&gt; (integer)</p>
817-
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutputM</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all male individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.</p>
817+
<p class="p6">If pedigree tracking is turned on with <span class="s1">initializeSLiMOptions(keepPedigrees=T)</span>, <span class="s1">lifetimeReproductiveOutputM</span> contains the value of the <span class="s1">Individual</span> property <span class="s1">reproductiveOutput</span> for all male individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction).<span class="Apple-converted-space">  </span>This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.</p>
818818
<p class="p5">name &lt;–&gt; (string$)</p>
819819
<p class="p6">A human-readable <span class="s1">string</span> name for the subpopulation.<span class="Apple-converted-space">  </span>By default, this is the subpopulation’s symbol as a <span class="s1">string</span>; for subpopulation <span class="s1">p3</span>, for example, <span class="s1">name</span> defaults to <span class="s1">"p3"</span>.<span class="Apple-converted-space">  </span>However, it may be set to whatever you wish except that subpopulation names must be unique across time (two different subpopulations may not both have the name <span class="s1">"foo"</span>, even if they never exist at the same time).<span class="Apple-converted-space">  </span>A subpopulation’s <span class="s1">name</span> may appear as a label in SLiMgui, and it can be useful in generating output, debugging, and other purposes.<span class="Apple-converted-space">  </span>When tree-sequence recording is enabled, <span class="s1">name</span> is persisted in the subpopulation’s metadata in tree-sequence output, and can then be used in Python to identify the subpopulation; if you plan to take advantage of that feature, <span class="s1">name</span> should follow the syntax of Python identifiers: starting with a letter or underscore <span class="s1">[a-zA-Z_]</span>, followed by letters, digits, or underscores <span class="s1">[a-zA-Z0-9_]</span>, without spaces, hyphens, or other characters.</p>
820820
<p class="p3">selfingRate =&gt; (float$)</p>

SLiMgui/SLiMHelpClasses.rtf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5838,8 +5838,7 @@ Beginning with SLiM 3.3, the
58385838
\f4\i0 include the nucleotides associated with any nucleotide-based mutations; the
58395839
\f3\fs18 ancestralNucleotides
58405840
\f4\fs20 flag governs only the ancestral sequence.\
5841-
\pard\pardeftab543\li547\ri720\sb60\sa60\partightenfactor0
5842-
\cf2 \kerning1\expnd0\expndtw0 Beginning with SLiM 3.5, the
5841+
\kerning1\expnd0\expndtw0 Beginning with SLiM 3.5, the
58435842
\f3\fs18 pedigreeIDs
58445843
\f4\fs20 parameter may be used to request that pedigree IDs be written out (and read in by
58455844
\f3\fs18 readFromPopulationFile()
@@ -5969,8 +5968,7 @@ As of SLiM 3.0, this method will read and restore the ages of individuals if tha
59695968
As of SLiM 3.3, this method will restore the nucleotides of nucleotide-based mutations, and will restore the ancestral nucleotide sequence, if that information is present in the output file. Loading an output file that contains nucleotide information in a non-nucleotide-based model, and
59705969
\f1\i vice versa
59715970
\f4\i0 , will produce an error.\
5972-
\pard\pardeftab543\li547\ri720\sb60\sa60\partightenfactor0
5973-
\cf2 \kerning1\expnd0\expndtw0 As of SLiM 3.5, this method will read and restore the pedigree IDs of individuals and genomes if that information is present in the output file (as requested with
5971+
\kerning1\expnd0\expndtw0 As of SLiM 3.5, this method will read and restore the pedigree IDs of individuals and genomes if that information is present in the output file (as requested with
59745972
\f3\fs18 outputFull(pedigreeIDs=T)
59755973
\f4\fs20 )
59765974
\f1\i and
@@ -6835,7 +6833,7 @@ fitnessScaling <\'96> (float$)\
68356833
\f3\fs18 Individual
68366834
\f4\fs20 property
68376835
\f3\fs18 reproductiveOutput
6838-
\f4\fs20 for all individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction). This allows access to the lifetime reproductive output of individuals in the subpopulation at the end of their lives. If pedigree tracking is not on, this property is unavailable.\
6836+
\f4\fs20 for all individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction). This allows access to the lifetime reproductive output of individuals in the subpopulation at the end of their lives. If pedigree tracking is not on, this property is unavailable.\
68396837
\pard\pardeftab720\li720\fi-446\ri720\sb180\sa60\partightenfactor0
68406838
68416839
\f3\fs18 \cf2 lifetimeReproductiveOutputF => (integer)\
@@ -6849,7 +6847,7 @@ fitnessScaling <\'96> (float$)\
68496847
\f3\fs18 Individual
68506848
\f4\fs20 property
68516849
\f3\fs18 reproductiveOutput
6852-
\f4\fs20 for all female individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction). This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.\
6850+
\f4\fs20 for all female individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction). This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.\
68536851
\pard\pardeftab720\li720\fi-446\ri720\sb180\sa60\partightenfactor0
68546852
68556853
\f3\fs18 \cf2 lifetimeReproductiveOutputM => (integer)\
@@ -6863,7 +6861,7 @@ fitnessScaling <\'96> (float$)\
68636861
\f3\fs18 Individual
68646862
\f4\fs20 property
68656863
\f3\fs18 reproductiveOutput
6866-
\f4\fs20 for all male individuals in the subpopulation that died in the last selection/mortality tick cycle stage (or, for WF models, immediately after reproduction). This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.\
6864+
\f4\fs20 for all male individuals in the subpopulation that died in the last viability/survival tick cycle stage (or, for WF models, immediately after reproduction). This property is undefined if separate sexes have not been enabled, or if pedigree tracking is not on.\
68676865
\pard\pardeftab720\li720\fi-446\ri720\sb180\sa60\partightenfactor0
68686866
68696867
\f3\fs18 \cf2 name <\'96> (string$)\

core/interaction_type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,7 @@ EidosValue_SP InteractionType::ExecuteMethod_evaluate(EidosGlobalStringID p_meth
40314031
if ((community_.CycleStage() == SLiMCycleStage::kWFStage2GenerateOffspring) ||
40324032
(community_.CycleStage() == SLiMCycleStage::kNonWFStage1GenerateOffspring) ||
40334033
(community_.CycleStage() == SLiMCycleStage::kNonWFStage4SurvivalSelection))
4034-
EIDOS_TERMINATION << "ERROR (InteractionType::ExecuteMethod_evaluate): evaluate() may not be called during the offspring generation or selection/mortality cycle stages." << EidosTerminate();
4034+
EIDOS_TERMINATION << "ERROR (InteractionType::ExecuteMethod_evaluate): evaluate() may not be called during the offspring generation or viability/survival cycle stages." << EidosTerminate();
40354035

40364036
// Get the requested subpops
40374037
int requested_subpop_count = subpops_value->Count();

core/population.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void Population::RemoveSubpopulation(Subpopulation &p_subpop)
405405
// move individuals as requested by survival() callbacks
406406
void Population::ResolveSurvivalPhaseMovement(void)
407407
{
408-
// So, we have a survival() callback that has requested that some individuals move during the selection/viability phase.
408+
// So, we have a survival() callback that has requested that some individuals move during the viability/survival phase.
409409
// We want to handle this as efficiently as we can; we could have many individuals moving between subpops in arbitrary
410410
// ways. We will remove all moving individuals from their current subpops in a single pass, and then add them to their
411411
// new subpops in a single pass. If just one individual is moving, this will be inefficient since the algorithm is O(N)
@@ -422,7 +422,7 @@ void Population::ResolveSurvivalPhaseMovement(void)
422422
for (Individual *individual : (subpop_pair.second)->nonWF_survival_moved_individuals_)
423423
individual->scratch_ = 1;
424424

425-
// loop through subpops and remove all individuals that are leaving, compacting downwards; similar to Subpopulation::ViabilitySelection()
425+
// loop through subpops and remove all individuals that are leaving, compacting downwards; similar to Subpopulation::ViabilitySurvival()
426426
for (std::pair<const slim_objectid_t,Subpopulation*> &subpop_pair : subpops_)
427427
{
428428
Subpopulation *subpop = subpop_pair.second;

core/species.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,7 @@ void Species::nonWF_ViabilitySurvival(void)
23682368
std::vector<SLiMEidosBlock*> no_survival_callbacks;
23692369

23702370
for (std::pair<const slim_objectid_t,Subpopulation*> &subpop_pair : population_.subpops_)
2371-
subpop_pair.second->ViabilitySelection(no_survival_callbacks);
2371+
subpop_pair.second->ViabilitySurvival(no_survival_callbacks);
23722372
}
23732373
else
23742374
{
@@ -2389,7 +2389,7 @@ void Species::nonWF_ViabilitySurvival(void)
23892389
}
23902390

23912391
// Handle survival, using the callbacks
2392-
subpop->ViabilitySelection(subpop_survival_callbacks);
2392+
subpop->ViabilitySurvival(subpop_survival_callbacks);
23932393
}
23942394

23952395
// Callbacks could have requested that individuals move rather than dying; check for that

core/subpopulation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3604,7 +3604,7 @@ bool Subpopulation::ApplySurvivalCallbacks(std::vector<SLiMEidosBlock*> &p_survi
36043604
return p_surviving;
36053605
}
36063606

3607-
void Subpopulation::ViabilitySelection(std::vector<SLiMEidosBlock*> &p_survival_callbacks)
3607+
void Subpopulation::ViabilitySurvival(std::vector<SLiMEidosBlock*> &p_survival_callbacks)
36083608
{
36093609
// Loop through our individuals and do draws based on fitness to determine who dies; dead individuals get compacted out
36103610
Genome **genome_data = parent_genomes_.data();

core/subpopulation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class Subpopulation : public EidosDictionaryUnretained
388388
void ReproduceSubpopulation(void);
389389
void MergeReproductionOffspring(void);
390390
bool ApplySurvivalCallbacks(std::vector<SLiMEidosBlock*> &p_survival_callbacks, Individual *p_individual, double p_fitness, double p_draw, bool p_surviving);
391-
void ViabilitySelection(std::vector<SLiMEidosBlock*> &p_survival_callbacks);
391+
void ViabilitySurvival(std::vector<SLiMEidosBlock*> &p_survival_callbacks);
392392
void IncrementIndividualAges(void);
393393
IndividualSex _GenomeConfigurationForSex(EidosValue *p_sex_value, GenomeType &p_genome1_type, GenomeType &p_genome2_type, bool &p_genome1_null, bool &p_genome2_null);
394394
inline __attribute__((always_inline)) EidosValue_SP _ResultAfterModifyChildCallbacks(bool p_proposed_child_accepted, Individual *p_individual, Genome *p_genome1, Genome *p_genome2)

0 commit comments

Comments
 (0)