Page 752 - ExtendSim User Guide
P. 752

726
Debugging Tools
Model tracing
Model tracing
Model tracing is useful for finding anomalies that occur as the simulation runs. The model tracing commands act like the reporting commands, but the output is much more extensive. A trace text file shows the details of block values at every step or event in the simulation.
Because of the large amount of information generated by the model tracing commands, most people don’t use model tracing often. However, tracing is a highly effective method for follow- ing a single block or a few blocks to watch for values that do not match expectations.
The trace is saved as a text file and opens automatically at the end of the run. If the Runs field in the Simulation Setup dialog is greater than 1, each consecutive trace is added to the end of the file so that you can compare traces from earlier runs.
Generating traces
The tracing commands are located in the Run > Debugging menu. To generate a trace:
Select the blocks you want included in the trace:
To specify individual blocks for tracing, select them and choose the Add Selected To Trace command.
To get a trace on every block, choose Add All To Trace.
Tracing commands
Choose the Run > Debugging > Generate Trace command to create a trace the next time you run the model.
Run the simulation to see the trace results. ExtendSim prompts you for a name and location for the trace file. Trace reports are opened, closed, and edited just like any other text file in ExtendSim.
To trace fewer blocks in the next simulation run, select the blocks you want out of the trace report and select Remove Selected from Trace. To start over on the selection of blocks, choose Remove All from Trace.
You can see which blocks are included in the trace by choosing Show Tracing Blocks; each traced block in the model displays the word Trace on its icon.
Tracing example
For the Math block from the Reservoir 1 model, the top of the tracing report is:
    ExtendSim Trace - 9/16/2012 3:48:57 PM
    Run #0
    ### calculation at Math number 2. CurrentTime:0.
    ValuesIn = 2.6
    ResultOut = 3.1550072961999
    ----------------------  Step #1  -----------------------
    ### calculation at Math number 2.  CurrentTime:1.
    ValuesIn = 4.4
    ResultOut = 5.3917648062033
How To


































































































   750   751   752   753   754