This generates a simple block to end a SLiM simulation.

slim_block_finish(generation)

Arguments

generation

Generation to end the simulation at.

Value

A slimr_block object

Examples

slim_script(
  slim_block_init_minimal(),
  slim_block_finish(100)
)
#> <slimr_script[2]>
#> block_init:initialize() {
#>     initializeMutationRate(1e-07);
#>     initializeMutationType("m1", 0.5, "f", 0);
#>     initializeGenomicElementType("g1", m1, 1);
#>     initializeGenomicElement(g1, 0, 1e+05 - 1);
#>     initializeRecombinationRate(1e-08);
#> }
#> 
#> block_2:100 early() {
#>     sim.simulationFinished();
#> }