|
Printer Friendly |
Running Stanley in Batch Mode
This short installment will conclude the discussion of automated processing with Woodstock/Stanley by describing how to run Stanley in batch mode. As with Woodstock, Stanley can be run as a batch process to streamline analysis and save you time.
Now, for Stanley runs to be automated, the data files (i.e., the GPAT, extents and adjacencies) must have been built already and you must have created and saved any desired scenarios (i.e., the actions to block, blocking objective, spatial restrictions, reports and length of time Stanley should run). To run Stanley from the command line, you issue the command followed by the project and scenario to run, specified using the slash commands /p and /s respectively.
Stanley3.exe /p”Project_name” /s”Scenario_name”
Commands are case insensitive. Enclosing project and scenario names in quotes permits the use of names with spaces. If project and scenario names do not contain spaces, the quotes are not necessary; however, it is good practice to always use them since it is of no consequence to Stanley.
Let's say you want to create spatial plans for two separate land bases, one you own (project named PRIVATE) and one you lease (project named PUBLIC). On your private lands, management is driven primarily by economics, and you are running scenarios that maximize net present value (NPV) and harvest volume (VOL). On your public territory, you have been asked to examine the relationship between harvesting and spatial pattern, so you are running scenarios that limit (MAX) or do not limit (NOMAX) the maximum opening size.
The following series of commands can be used to run each of the scenarios:
Stanley3.exe /P”private” /S”npv”
Stanley3.exe /p”private” /S”vol”
Stanley3.exe /P”public” /S”max”
Stanley3.exe /P”public” /S”nomax”
Simply store the commands in a file with a .BAT extension and the entire set of runs can be completed by issuing a single command. One note of caution, be sure that projects and scenarios are stored in the currently selected Stanley project directory (this is only an issue if you have projects stored in more than one location), otherwise Stanley will not be able to locate the data files.The only other piece of advice I have is to run Stanley using the start /w command, otherwise, all of the sessions may be run simultaneously (NT seems to wait by default, but 95 certainly doesn’t).
This command forces Windows to wait until a process has finished before starting the next. The commands from the examples above, then, become:
Start /w Stanley3.exe /P”private” /S”npv”
Start /w Stanley3.exe /p”private” /S”vol”
Start /w Stanley3.exe /P”public” /S”max”
Start /w Stanley3.exe /P”public” /S”nomax”.
Running Stanley this way prevents shortages in memory because multiple Stanley sessions are running simultaneously, and also eliminates the risk of file input/output errors if the same data files are being accessed by the multiple sessions.
|
|
Stora Enso Predicts a 2.5% Savings
“We asked, ‘If we had made the decision and optimized the problems, how much money would we have saved?’” The answer was approximately 2.5 percent.”
- Continue reading...
- View all case studies...
|
 |
|
|
|