ExampleOM <- OM("Example OM",
nYear = 30,
pYear = 20,
nSim = 5
)5 Build an OM Object
5.1 Create a new OM Object
The OM() function is used to create a new Operating Model object (see ?OM). The contents of the OM can be specified with arguments to the OM function:
or by using functions matching the names of the slots in the object.
For example, to change the number of independent stochastic simulations in the OM:
nSim(ExampleOM)[1] 5
nSim(ExampleOM) <- 100
nSim(ExampleOM)[1] 100
Similarly, the number of historical years and projection years could be changed in the same manner:
nYear(ExampleOM) <- 20
pYear(ExampleOM) <- 10The contents of the OM object, and the various methods to access and modify these contents are discussed in more detail in Chapter 21.
5.2 Populating the OM Object
An OM object needs at least one Stock and one Fleet object before it can be used to Simulate a historical fishery and Project it forward for the closed-loop simulation testing (Figure 3.1).
The process to build these objects is described in the next few chapters. In Chapter 9, these objects are added to the new ExampleOM object created here.
