Batch Execution
Examples: Using SAS Simulation Studio Object Spawner for SAS Services
Executing a Model with Data Input
This example illustrates the use of command line arguments and involves reading a data set from a file on a local host that has a Linux operating system. The docDatasetHolder model (available in your /projects/examples folder) is used in this example. (For more information, about the docDatasetHolder example, see the section Machining Center Model). The batch mode command is as follows:
./simstudio_batch -m projects/examples/docDatasetHolder/ MachiningCenter.simmdl -e projects/examples/docDatasetHolder/ experiment0.simexp -locdfp /<path to user home>/SASSimulationStudio/ 15.1 -authpath /<path to authinfo file> -nonparallel -locport 58591
Based on this command, the following actions are executed by Simulation Studio at run time before model execution:
The path to the model file is interpreted to be
(-locdfp + -m); that is,/<path to user home>/SASSimulationStudio/15.1/projects/examples/ docDatasetHolder/MachiningCenter.simmdl
The path to the experiment file is interpreted to be
(-locdfp + -e); that is,/<path to user home>/SASSimulationStudio/15.1/projects/examples/ docDatasetHolder/experiment0.simexp
The data set that is specified as
projects\examples\docDatasetHolder\partroutes.sas7bdatin the Observation Source block "Read Dataset" (present in the modelMachiningCenter.simmdl) is a relative path. This is interpreted to be(-locdfp + relative path in data loading block); that is,/<path to user home>/SASSimulationStudio/15.1/projects/examples/ docDatasetHolder/partroutes.sas7bdat
The SAS Workspace Server connection is established by using the arguments to the
-authpathand-locportoptions.
Executing a Model with Data Input That Uses Alternative Command Line Options
This example illustrates the use of -i option for data loading. It uses the previous example with slight modifications to the batch command, as follows:
./simstudio_batch -m projects/examples/docDatasetHolder/ MachiningCenter.simmdl -e projects/examples/docDatasetHolder/ experiment0.simexp -locdfp /<path to user home>/SASSimulationStudio/ 15.1 -i inputdata -authpath /<path to authinfo file> -nonparallel -locport 58591
The folder inputdata does not exist in the user home directory. This example assumes that it exists in order to demonstrate the use of -i option.
Based on this command, the following actions are executed by Simulation Studio at run time before model execution:
The paths to the model file, experiment file, and the commands for SAS server connection are interpreted exactly as in the previous example.
The path to the input data set in the Observation Source block is interpreted to be
(-locdfp + -i + relative path in data loading block)because-iis a relative path. Hence, the input data path becomes/<path to user home>/SASSimulationStudio/15.1/inputdata/ projects/examples/docDatasetHolder/partroutes.sas7bdat
If
-iis provided as an absolute path, the path to the input data set is interpreted to be(-i + relative path in data loading block).
Executing a Model with Data Input and Saving the Experiment Design Matrix as Output
This example illustrates the use of -d option for saving the experiment design matrix. It uses the previous example with slight modifications to the batch command as follows:
./simstudio_batch -m projects/examples/docDatasetHolder/ MachiningCenter.simmdl -e projects/examples/docDatasetHolder/ experiment0.simexp -locdfp /<path to user home>/SASSimulationStudio/ 15.1 -authpath /<path to authinfo file> -nonparallel -locport 58591 -d projects/examples/docDatasetHolder/expresults.sas7bdat
Based on this command, the following actions are executed by Simulation Studio at run time before model execution:
The paths to the model file, experiment file, input data, and the commands for SAS server connection are interpreted exactly as in Example 1.
The path to the output data set for the experiment design matrix is interpreted to be
(-locdfp + -d)because-dis a relative path. Hence, the path to the design matrix file becomes/<path to user home>/SASSimulationStudio/15.1/projects /examples/docDatasetHolder/expresults.sas7bdat
Depending on the options that are specified, the path for the design matrix output file can be interpreted in different ways:
Specifying
(-locdfp <absolute_path> -d <relative_path>)causes the path to be interpreted to be(-locdfp + -d).Specifying
(-locdfp <absolute_path> -r <relative_path> -d <relative_path>)causes the path to be interpreted to be(-locdfp + -r + -d).Specifying
(-r <absolute_path> -d <relative_path>)causes the path to be interpreted to be(-r + -d).Specifying
(-d <absolute_path>)causes the path to be interpreted to be(-d).