The primary reason of using an invocation script to execute an external process simulator is that the script can be easily customized by the developers and the users. Some of the possible uses of custom invocation scripts are:
Input Filter: adding conversion programs to filter SansGUI's Model File into another file in a format that is understandable by a legacy simulator.
Pre and Post Processors: integrating preprocessors and/or postprocessors so that they can be executed in one operation.
Job Control: submitting the simulation job for a long, off-hour execution.
Remote Execution: executing the simulator in a remote system, regardless of its operating system type.
In this section, we discuss the primary elements in the invocation script. It contains two interfaces: one between SansGUI and the invocation script and the other between the invocation script and the simulator. Understanding the two interfaces, you will be able to customize the invocation script and the simulator so that special features can be introduced. For detail specifications of the standard invocation script, consult the External Process Simulation Control section of the SansGUI Reference Manual.
SansGUI calls the invocation script and passes certain parameters to the script for further processing. The parameters include:
Simulator Program and Option Code: The full path of the simulator and the simulator's option code are sent from SansGUI. The invocation script uses the simulator's path to locate the external process simulator program. It passes the option code to the simulator so that the simulator can decide which portions of the code should be activated or disabled.
Working Directory Information: The logged drive and working directory information are supplied so that the invocation script can set the current working directory to where the Model File resides in order to create all output and log files in the same directory.
Model File: The name of the Model File without the file path information is passed because it should be located in the working directory given above.
Extra Parameters: The extra parameters you, as the simulation developer, decide for the simulator. The simulation user enters the extra parameters as a string delimited by spaces in the external process simulation control object. SansGUI appends this string to the end of the command line without any other processing.
The sequence of the parameters that SansGUI created cannot be modified, i.e., the command line arguments to the invocation script shall not be changed.
The standard, out of the box, interface for the invocation script to call a simulator consists of the following parameters:
Simulator Option Code: The code that the simulator uses to determine the features and capabilities available to the simulation user. It may be devised for performance reasons or software licensing issues.
Model File: The Model File to be used as an input to the simulator. Because the working directory is guaranteed in the script, there is no need to process directory changes in the simulator. In other words, the simulator can simply specify the names of the files to be opened for reading and writing without their directory paths.
Extra Parameters: The extra parameters are specified by you; therefore, you can process them as wish.
To accomplish the custom features described in the beginning of this section, you may need to modify this interface so that the invocation script and the simulator can work in a harmony. You should not, however, alter the invocation script in the bin directory. Instead, store a copy of your custom invocation script file with a name specific to your simulator in the sim subdirectory and ask your simulation users to specify that invocation script in the Default external process simulation control object.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.