# NOT RUN {
# Load the 1970-1999 version of the North Sea model supplied with the package; outputs go
# to a temporary results folder; default model.ident setting.
# Default screen information settings - on-screen parameter file information suppressed but
# path information enabled:
model <- e2e_read("North_Sea", "1970-1999")
# User-specified model.ident; on-screen parameter file and path information enabaled:
model <- e2e_read("North_Sea", "1970-1999",model.ident="baseline",quiet=FALSE)
# All on-screen information suppressed even though quiet=FALSE:
model <- e2e_read("North_Sea", "1970-1999",model.ident="baseline",quiet=FALSE,silent=TRUE)
# View details of the structure and contents of the model list-object:
str(model,max.level=1)
str(model,max.level=2)
# Dummy example to illustrate loading a user defined model from a user workspace
# ... substitute your own path details for e.g. "Folder/Models":
# model<-e2e_read("Modelname", "Variantname",
# models.path="Folder/Models",
# model.ident="demo")
# Dummy example to illustrate loading a user defined model from a user workspace and
# sending the model outputs to a specified folder ... substitute your own path details
# for the dummy paths shown here
# for "Folder/Models" and "Folder/results":
# model<-e2e_read("Modelname", "Variantname",
# models.path="Folder/Models",
# results.path="Folder/results",
# model.ident="demo")
# Create a new scenario version of the North Sea/1970-1999 model by increasing the
# activity rate of gear 1 (pelagic trawls and seines) by a factor of 2:
model <- e2e_read("North_Sea", "1970-1999")
scenario_model <- model
scenario_model$data$fleet.model$gear_mult[1] <- 2
# Set a new identifier for any csv outputs:
scenario_model$setup$model.ident <- "gear1x2"
# Run the baseline model for 2 years:
results<-e2e_run(model,nyears=2)
# Visualise the time series of output from the baseline model run:
e2e_plot_ts(model,results,selection="ECO")
# }
# NOT RUN {
# Run the scenario model for 20 years:
scenario_results<-e2e_run(scenario_model,nyears=20)
# Visualise the time series of output from the scenario model run
# in a new graphics window:
dev.new()
e2e_plot_ts(scenario_model,scenario_results,selection="ECO")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab