PredictiveEcology / SpaDES.core

Core functionality for Spatial Discrete Event Simulation (SpaDES)
https://spades-core.predictiveecology.org/
GNU General Public License v3.0
9 stars 15 forks source link

[Improving Defaults] `times` argument default should extract information on `timeframe` from modules, not start at `0` #274

Open tati-micheletti opened 7 months ago

tati-micheletti commented 7 months ago

Currently, the default behavior of SpaDES is to set the default start$time to 0 and end$time to 1. I would suggest we recover the times proposed in the modules' metadata, such as:

Module A: timeframe = as.POSIXlt(c(2010, 2020))
Module B: timeframe = as.POSIXlt(c(2015, 2050))

out$times
$start
[1] 2010
$end
[2] 2050

This way times is not starting at a non-sensical default and the user doesn't have to worry about scheduling it wrong.