Running In-Process Simulation


This section describes user controls for executing tightly coupled, in-process simulators. There is also a Running External Process Simulation section in this manual for executing external process simulators. Whether your simulator is in-process or external depends on the decision made by its developer. You can examine the simulation control (SimControl) objects to see if either is available, or both. SansGUI currently uses Cycle simulation control objects for in-process simulation and XProc simulation control objects for external process simulation. If you have a Default object created for the SimControl.Cycle derived class, verified through the Tree View under the Object tab in the left pane, the in-process simulator is available to you. Similarly, if you have a Default object created for the SimControl.XProc class, you need to go to the next section to run it externally.

If you want simulation results to be logged, you need to go through the procedures stated in the Setting Up Result Log section before running the simulation.

Running Simulation

To start the in-process simulator, click on the Run In-Process button (a right pointed triangle like the play button in a CD player) in the Run toolbar. After clicking on the button, the trace of the simulation run will be shown in the Operation View in the bottom pane. If you have selected attributes for value logging, the results will be displayed in the Result View. If there are any messages issued by the simulator, they will be logged in the Message View. All the views are in the bottom pane with separate tabs. You can switch to a different tab while the simulation is running.

Stopping Simulation

To stop the simulation, click on the Stop button in the Run toolbar. The simulation will be terminated as soon as possible. SansGUI will call the end simulation run routines to allow the simulator to clean up the simulation and release resources. In very rare occasions, you may want to bypass the end run routines and stop the simulation immediately. You can select Tools>Terminate Simulation from the pull-down menu; however, please use this option with great care. You cannot continue to execute a terminated simulation reliably. If you need to suspend the simulation and continue to run it later, use the Pause/Resume mechanism described next.

Pausing/Resuming Simulation

You can pause a simulation, while it is running, by clicking on the Pause/Resume button in the Run toolbar. A # Simulation PAUSED message will be displayed in the Operation View and the Pause/Resume button will be shown depressed. Clicking on the button again will resume the simulation run.

Operations When Paused

One useful feature in the SansGUI environment is that it allows the user to monitor and change the values when the simulation is paused. As in part, link, or object data entry using the associated Properties dialog, the editing facility is available for value examination and modification when paused. The only difference is that you are editing the part, link, or object directly, rather than a copy of it. Therefore, there is only an OK button but no Cancel button in the Properties dialog. You can use the Grid View in the right pane to modify the data directly.

When you click on the Pause button, SansGUI suspend the execution thread immediately. At this time, the simulator routine may still be executed within a particular part or object. When this situation occurs, SansGUI locks the adjacent parts, links, and reference objects related to the part or object being executed while allowing the user to change the values of unrelated parts, links, and objects. The locked fields have the same background color as the tooltips registered under Windows and the editable ones will have a white background.

The single step and fast forward operations, to be described next, are available only when the simulation is paused.

Single Step

While the simulation is paused, clicking on the Single Step button in the Run toolbar will advance the simulation in one step, which means:

Fast Forward

While the simulation is paused, clicking on the Fast Forward button in the Run toolbar will advance the simulation in the following manner:

Running Simulation Again

During the simulation, the values of attributes with In/Out, Output, Port scopes and all array attributes (they are with In/Out scope) may be modified. If you run the simulation again immediately, the initial values may be different. Especially, when parts and links have values changed from their derived objects, all the new values are stored as overriding values. Therefore, to reset the values for the next run, you need to be aware of the following:

The Reset Data button in the Run toolbar can be used to remove the overriding values, similar to selecting Edit>Clear Override Values, and reset all the In/Out and Output numerical data to their default values in the simulation control object.

 



C:\FH_Suite\htmlgifs\home.gif Checking Data Running External Process Simulation

SansGUI Modeling and Simulation Environment Version 1.2

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

http://protodesign-inc.com