diff --git a/src/analysis/analyse_nature.R b/src/analysis/analyse_nature.R index c176b9fe62834a04197384fcf44d12a79c859f08..e63027a945f2aa58528218188b3ae8f06b7e44f5 100755 --- a/src/analysis/analyse_nature.R +++ b/src/analysis/analyse_nature.R @@ -23,7 +23,7 @@ map_output_file = "landscape_map" populationTrends = function() { print("Plotting population trends over time.") popdata = read.csv2(paste(datadir, popfile, sep="/")) %>% - mutate(Date = as.POSIXct(strptime(Date,format="%Y-%m-%d"))) + mutate(Date = as.POSIXct(strptime(Date, format="%Y-%m-%d"))) ggplot(data=popdata, aes(x=Date, y=Abundance, color=Species)) + geom_point() + ##geom_smooth() + diff --git a/src/core/input.jl b/src/core/input.jl index b3730485b21c122ad720d6b9017b11678aa48152..3b4f25b001340c86faee9fd5e8e77f412a1628c8 100644 --- a/src/core/input.jl +++ b/src/core/input.jl @@ -32,6 +32,10 @@ macro param(domainparam) end """ + getsettings(configfile::String, seed::Union{Int64,Nothing}=nothing) + # VScode suggested to "Update method signature in docstring" + # I leave it up to you to decide if you want to do it for all the functions. + getsettings(configfile, seed=nothing) Combines all configuration options to produce a single settings dict. @@ -95,7 +99,7 @@ function preprocessparameters(settings::Dict{String,Any}, defaultoutdir::String) end """ - flattenTOML(dict) + flattenTOML(tomldict) An internal utility function to convert the two-dimensional dict returned by `TOML.parsefile()` into a one-dimensional dict, so that instead of diff --git a/src/core/output.jl b/src/core/output.jl index b805608a53c4b122167428669072c871943f34dc..f5a7a412ce851a3954fd7be229cf21b23883d560 100644 --- a/src/core/output.jl +++ b/src/core/output.jl @@ -98,7 +98,7 @@ function saveinputfiles(model::AgentBasedModel) end """ - prepareTOML(dict) + prepareTOML(settings) An internal utility function to re-convert the one-dimensional dict created by [`flattenTOML`](@ref) into the two-dimensional dict needed by `TOML.print`, diff --git a/src/nature/populations.jl b/src/nature/populations.jl index 12188a2700dc32c1289e17e7d436c01ecc3aab9d..a585d9d4222173b377ce6c9da9dfc96eb74a7434 100644 --- a/src/nature/populations.jl +++ b/src/nature/populations.jl @@ -5,7 +5,7 @@ ### """ - initpopulation(habitatdescriptor; popsize=-1, pairs=false, asexual=false) + initpopulation(habitatdescriptor; popsize=-1, phase= nothing, pairs=false, asexual=false) Creates a function that initialises individuals at random locations across the landscape. This can be used to create the `initialise!` variable in a species definition block. @@ -27,7 +27,7 @@ This can be used to create the `initialise!` variable in a species definition bl location, otherwise, only one individual will be created at a time. - If `asexual` is true, all created individuals are assigned the sex `hermaphrodite`, - otherwise, they are randomly assigned male of female. (If `pairs` is true, `asexual` + otherwise, they are randomly assigned male or female. (If `pairs` is true, `asexual` is ignored.) """ function initpopulation(habitatdescriptor::Function; phase::Union{String,Nothing}=nothing,