WikiPrint - from Polar Technologies

MSE Batch plugin user notes

10 Sept, 2010

13 July, 2011

Overview

The MSE Batch plugin runs the MSE (Management Strategy Evaluator) in batch mode from a command file. The command file runs the MSE changing input harvest rule parameters for each iteration and outputting data to file.

MSE parameters available through the command file.

  1. Number of MSE simulations
  2. End Year
  3. Assessment and Implementation error
  4. Primary Production forcing functions
  5. Primary Production forcing function variation
  6. Fleet Control types
  7. Harvest rules

How to run

Installing MSE Batch Plugin

  1. Download and latest version of EwE from the ?Ecopath.org website.
  2. Download and unzip the contents of MSEBatch Plugin Ver 6.2.0.713.zip into the same directory as EwE6.exe, the default setup location is "C:\Program Files\Ecopath with Ecosim 6\".
  3. Open the EwE interface and go to "Tools>Options>General" under "General option" check the "Download updates for plug-ins" and re-start EwE. This will update the MSEBatch plugin to the latest version.
  4. Open a model in EwE6 the MSE Batch plugin interface will be accessible from the Navigator tree under "Tools>Management procedures (MSE)>Output>MSE Batch"

MSE Batch interface
MSE Batch plugin interface.

Running the MSE Batch

The MSE Batch plugin interface provides a way to select command files and begin a batch run.

Select the command file using the 'Select command file..." button. Once a file has been selected it will be parsed to see if it can be run with the currently loaded EwE model and Ecosim scenario. If any errors are found in the file then an ERROR: message will shown in the output window. All errors must be fixed before the command file can run. In the case of a WARNING: message you can still run the command file however, you should address any issues that have warnings.

Once the Run has been started, by clicking the "Run" button, the output window will contain progress messages with the number of run completed out of the total. A run can be stopped by clicking the "Stop run" button. The batch process will wait for the current MSE run to completion before exiting. The output files specified in the command file will contain output for the completed runs.

MSE Batch iterations

The MSE Batch loops over Forcing Functions, Fleet Controls and Harvest Rules running the MSE for each set of parameters from the command file. Parameters not set by the command file will be left at the values loaded by the current Ecosim model.

Sample looping structure:

  For each Forcing Function 
    For each Fleet Control
      For each Harvest Rule 

        MSE run...
        WriteOuputFile...

      next Harvest Rule
    next Fleet Control
  next Forcing Function

Command file format

The command file is a CSV (coma separated values) file that contains tags. A tag is a predefined string of text that appears at the start of the line and is used to identify the line as valid input for the MSE module. After the data part of the tag there must be a least one empty entry to mark the end of the valid data. All data that appears after the empty entry will be ignored. For example

Control_File_Version,1.0,,,ignored comments,,,

Lines in the command file that do not contain a recognized tag will be ignored. This allows a command file to contain comments, notes or other non parameter information as long the line does not start with a valid tag. The order of the tags in the file is not important and the command file can contain as many lines as the user wants.

Tags

Control_File_Version

 Control_File_Version,1.0,,

Model_Name

Model_Name,Some model.ewemdb,,,

Ecosim_Scenario

Ecosim_Scenario,Scenario1,,

Run_Type

Run_Type,1,,

Number_Sims

Number_Sims,50,,

Error_CV

Error_CV,0.3,,

Output_Directory

Output_Directory,C:\EwE data,,

End_Year

End_Year,-1,,

PP_STDEV

PP_STDEV,0.5,,

PP

PP,1,Increasing,10,,
PP,2,Decreasing,10,,

Control_Type_INDEX & Control_Type

Control_Type_INDEX,1,2,3,,
Control_Type,2,0,0,,
Control_Type,0,2,0,,
Control_Type,0,0,2,,

Constant_F_INDEX & Constant_F

Constant_F_INDEX,10,,
Constant_F,0.1,,
Constant_F,0.2,,
Constant_F,0.3,,
Constant_F,0.4,,
Constant_F,0.5,,

Constant_Y_INDEX & Constant_Y

Constant_Y_INDEX,10,15,,
Constant_Y,0.1,10.2,,
Constant_Y,0.2,11.2,,
Constant_Y,0.3,12.2,,
Constant_Y,0.4,13.2,,
Constant_Y,0.5,14.2,,

TFM_INDEX &TFM

TFM_INDEX,10,,
TFM,0.4,1.6,0,0.1,,,
TFM,0.4,1.6,0,0.2,,,
TFM,0.4,1.6,0,0.3,,,

Output types

Biomass_OUTPUT,1,,,
Consumption/Biomass_OUTPUT,0,,,
FeedingTime_OUTPUT,0,,,
FishingMortRate_OUTPUT,1,,,
PredationRates_OUTPUT,0,,,
CatchByGroup_OUTPUT,1,,,