# Stand

The Stand command is used to expose the Stand object to the user. By doing so, certain stand properties and methods exposed by the model developer can be set or called during the simulation by the user through this command interface. These exposed properties and members are known as commandable members.

Actions

def MyExampleAction

Stand {cycle delay}

{Stand property alteration statements…}

See Actions for information about cycle delay arguments.

The commands below provide examples on how to change some stand properties or call methods exposed through the Stand object. In the first example, stand Age is assigned to zero. This may be used to change the age of the stand immediately after a harvest occurs.

Note that, in the next example, we see a reference to the main Model is exposed as a commandable property in Stand; therefore we can also set or call all commandable properties of the Model object. In this case, Model exposes the commandable property Ingrowth, which controls whether ingrowth is predicted in a simulation cycle. This property is either true or false, and in this case we set it to false following harvest and then switch it back to true after two more cycles.

In the last example, we add the action name into the stand history collection by calling the Add method of the Stand History property.

Actions

def MyExampleAction

Stand 0

Age = 0

Model.Ingrowth = False

History.Add “MyExampleAction”

Stand 2

Model.Ingrowth = True

New commandable members, beyond those defined by OSM, can be introduced by the Variant model developer. For example, a Variant model developer may wish to expose a property that controls model predictions under different management regimes. The state of this new property can then be altered following a treatment action so all predictions in current and future cycles use a different model calibration (e.g., following clearcut and plant, switch diameter growth models to use plantation parameters).

Commandable members exposed through Stand include those exposed by the OSM framework (common across all OSM stand models) and custom commandable members exposed by the Variant model. For a list of all commandable members available, execute your stand model without a command file. A command help file will be auto-generated in the same folder as the executable that will describe all available commands exposed by the OSM framework as well as any custom commands declared the Variant model.

### History

The Stand.History list is useful for tracking whether a treatment has occurred in a previous cycle. History can be used to restrict operability in Action.Operable statements. By default, History = ‘None’. Stand history can be reported in outputs.

Example A: Action can only be activated if no action history has been recorded.

Actions

def MyExampleAction

Operable 0

GMV >= 130

History None

Example B: One- or two-entry commercial thin with final clearcut. The action definitions below permit one or two CT actions to occur before final harvest at age 45.

Actions

def CT1

Operable

GMV >= 120 with DBH >= 9.1

Trees >= 2000

History None

Stand 0

History.Add CT1

Cut 0

…Priority and Retention Instructions…

Lock 10 CT1 CT2 CC

def CT2

Operable

GMV >= 120 with DBH >= 9.1

History CT1

Cut 0

…Priority and Retention Instructions…

Lock 10 CC CT2

def CC

Operable

GMV >= 100 with DBH >= 9.1

Age >= 45

Cut 0

Lock 100