MCPcopy Create free account
hub / github.com/devosoft/avida / Process

Method Process

avida-core/source/actions/DriverActions.cc:129–142  ·  view source on GitHub ↗

! Check to see if we should exit Avida based on the average generation. The average generation is calculated differently based on whether demes / germlines are used. This method is called based on the events file. */

Source from the content-addressed store, hash-verified

127 are used. This method is called based on the events file.
128 */
129 void Process(cAvidaContext&) {
130 if(m_world->GetConfig().NUM_DEMES.Get() > 1) {
131 // Using demes; generation might be different.
132 if(m_world->GetConfig().DEMES_USE_GERMLINE.Get()
133 && (m_world->GetStats().GetAveGermlineGeneration() > m_tgt_gen)) {
134 m_world->GetDriver().Finish();
135 }
136 } else {
137 // No demes; generation is calculated in cStats.
138 if(m_world->GetStats().GetGeneration() > m_tgt_gen) {
139 m_world->GetDriver().Finish();
140 }
141 }
142 }
143
144protected:
145 double m_tgt_gen; //!< Target generation above which Avida should exit.

Callers

nothing calls this directly

Calls 6

GetConfigMethod · 0.80
GetMethod · 0.45
GetStatsMethod · 0.45
FinishMethod · 0.45
GetGenerationMethod · 0.45

Tested by

no test coverage detected