Understanding the Process


When a simulation user clicks on the Run External Process button within a Project Model, SansGUI performs a few procedures before the simulator is executed. Here we describe each of the procedures in greater detail:

Checking Data

The checking data procedure is similar to that of in-process simulation. Basically, SansGUI checks the integrity and completeness of the model configured by the user. The data in the Project Model being checked are: symbolic parameter bindings, objects, parts, and links. If there is any discrepancy found in the model, SansGUI will not start the simulation and will prompt the user to correct them before simulation will occur.

Generating Model File

After the Project Model is checked successfully, SansGUI will generate a textual Model File according to the format specified in the Model File Type field of the external process simulation control object. The format of the file is documented in the SansGUI Model File Format chapter of the SansGUI Reference Manual. SansGUI writes necessary input data and the model configuration in the file so that the external process simulator can read it as an input file. Because it is a plain text file, the Model File can be read by programs written in most programming languages.

Creating Separate Process

An external process simulator, hinted by its name, is executed in a separated process outside of SansGUI. As opposed to an in-process simulator, which is executed in a thread in the same process space as SansGUI, the external process simulator gets the model data in the Model File and process it independently. The only thing SansGUI knows about is whether or not the external simulation process is still running, or has been terminated.

Executing Invocation Script

Once the external process is successfully created, SansGUI will invoke a command script to execute the simulator. By default, the command script is located in the bin subdirectory of the SansGUI installation directory. The simulation user can specify any invocation script file in the Invocation Script field of the external process simulation control object. The usage of the invocation script is documented in the External Process Simulation Control section in the SansGUI Reference Manual. In the next section, Understanding the Invocation Script, we will discuss the standard elements in the invocation script.

 



C:\FH_Suite\htmlgifs\home.gif Developing External Process Simulators Understanding the Invocation Script

SansGUI Modeling and Simulation Environment Version 1.2

Copyright 2000-2003 ProtoDesign, Inc. All rights reserved.

http://protodesign-inc.com