Detecting and Resolving Model Errors

Download Report

Transcript Detecting and Resolving Model Errors

Detecting and Resolving Model Errors
Jeffrey S. Smith
Auburn University
Detecting and Resolving Model Errors
• Error detection and correction (e.g., debugging) is a significant part of
most simulation studies. In can be very time consuming and is usually
quite frustrating.
• In general, there are three classes of errors encountered during the
development and implementation of a simulation model:
– Syntax errors – Incorrect usage of language constructs/modules
– Runtime errors – Program errors that occur during the simulation run
(e.g., exceeding the memory limits)
– Logic errors – Errors in the modeling logic that cause the simulation to
run in an unexpected manner.
7/18/2015
Detecting and Resolving Model Errors
2
Syntax Errors
• Most commercial simulation packages (Simio included) automatically look
for syntax errors during the model development or initialization
(compilation) stage. Some of the common errors that are detected
include:
– Misspellings of keywords and other reserved words
– Duplicate use of object names or other “strings”
– Undefined states, resources, statistics, etc.
• When Simio finds one of these errors, the error is reported to the user and
Simio provides functions to try to “find” the error and lists possible causes.
• These errors are generally easy to find and fix (once you understand the
syntactical rules of Simio).
7/18/2015
Detecting and Resolving Model Errors
3
Runtime Errors
Output node not connected to the network
7/18/2015
Detecting and Resolving Model Errors
4
Runtime Errors
7/18/2015
Detecting and Resolving Model Errors
5
Logic Errors
• While Simio is fairly helpful in finding and fixing syntax and runtime errors,
it generally cannot automatically find logic errors.
• With a logic error, the model compiles and runs without errors, but the
logic error makes the model results not “correct”.
7/18/2015
Detecting and Resolving Model Errors
6
Debugging Tools and Techniques
•
•
•
•
•
•
•
•
Carefully watch the animation
Enhance the animation with debugging information and “messages”
“Step Mode” + “Mouse-overs” for entities
Watch
Breakpoints
Model Trace
Subclassing objects
Notify step
7/18/2015
Detecting and Resolving Model Errors
7
Simio Debugging Tools
7/18/2015
Detecting and Resolving Model Errors
8