Skip to content
Sean Anderson edited this page May 13, 2013 · 35 revisions

Home

Folder structure

The basic folder structure will look like this:

paper1 -> species1 -> om1-em1-note -> om
                                   -> em

where paper1 refers to a paper ID (one of XX, XX, XX) and species1 refers to the species ID (one of XX, XX, XX), and om1-em1-note refers to a scenario. om1 refers to the operating model ID, em1 refers to the estimation model ID, and note refers to anything you want to append to the folder name for reference. om and em will always be named the same and will contain the operating and estimation model files. This folder structure will be created with the create_dirs() function.

It's important we have this absolutely consistent folder naming structure so that future functions that work with the output can easily traverse the folders.

Documenting how simulations were run

There will be a .r file in each paper folder that contains all calls to the wrapper function to run the simulation. It should be theoretically possible (although it would take a long time) to run the whole simulation again by sourcing the .r file. In general, the expectation is to call the wrapper function once per scenario. To facilitate distributed computing among multiple people and computers, there may be multiple function calls in the main .r folder with each running different simulation runs. In the end, this will mimic the concept of having a plain text control file, but avoid us having to invent a new file format, and error check the input. We'll be able to work directly within the R framework.

What the "wrapper" function will do

The wrapper function will take care of:

  1. moving operating and estimating models to the correct folders

  2. running the operating model

  3. manipulating data as needed

  4. renaming files and file extensions as needed

  5. running the estimation model

Generating the operating and estimating models

The wrapper function will take as input an operating folder and estimating folder. It is therefore the responsibility of the user to have these generated beforehand. We went this route to make the wrapper function as generalizable as possible. We will have examples of how the R functions can help generate these folders in a vignette.

Recruitment deviations

The recruitment deviations will be in a 100x100 matrix with the columns representing different simulation runs and the rows representing years 1:100. These will be stored in a .rda file in the R package. They can then be easily loaded with data(recdevs) or we can have them loaded automatically with lazyload in the package description. Sean will take care of this.

The recruitment deviations will be generated as N(0, 1) and will be scaled by each operating model. Kelli will write a function to find the desired standard deviation and scale the data.