22
1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference: Law/Kelton, Simulation Modeling and Analysis, Ch 5. Sargent, Verification and Validation of Simulation Models, Tutorial, 2010 Winter Simulation conference. Instructor: Peter Kemper R 104A, phone 221-3462, email:[email protected]

CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Embed Size (px)

Citation preview

Page 1: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

1

CS626 Data Analysis and Simulation

Today:Verification and Validation of Simulation Models

Reference: Law/Kelton, Simulation Modeling and Analysis, Ch 5.Sargent, Verification and Validation of Simulation Models, Tutorial, 2010 Winter Simulation conference.

Instructor: Peter Kemper R 104A, phone 221-3462, email:[email protected]

Page 2: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Verification and Validation

Validation: “substantiation that a computerized model within its domain of applicability possesses a satisfactory range of accuracy consistent with the intended application of the model”

Verification: “ensuring that the computer program of the computerized model and its implementation are correct”

Sargent’s WSC Tutorial 2010, cites Schlesinger 79

“Verify (debug) the computer program.” Law’s WSC 09 Tutorial

Accreditation: DoD: “official certification that a model, simulation, or federation of models and simulations and its associated data are acceptable for use for a specific application.”

Credibility: “developing in users the confidence they require in order to use a model and in the information derived from that model.”

2

Page 3: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Confidence

Validity with respect to objective Often too costly & time consuming to determine that a model is absolutely valid over complete domain of intended applicability.

3

Sargent

lidation, is generally considered to be a process and is usually part of the (total) model development process. It is often too costly and time consuming to determine that a model is absolutely valid over the com-plete domain of its intended applicability. Instead, tests and evaluations are conducted until sufficient con-fidence is obtained that a model can be considered valid for its intended application (Sargent 1982, 1984a). If a test determines that a model does not have sufficient accuracy for any one of the sets of expe-rimental conditions, then the model is invalid. However, determining that a model has sufficient accuracy for numerous experimental conditions does not guarantee that a model is valid everywhere in its applica-ble domain. Figure 1 shows the relationships between model confidence and (a) cost (a similar relation-ship holds for the amount of time) of performing model validation and (b) the value of the model to a us-er. The cost of model validation is usually quite significant, especially when extremely high model confidence is required.

Figure 1: Model Confidence

The remainder of this paper is organized as follows: Section 2 presents the basic approaches used in deciding model validity; Section 3 describes two different paradigms used in verification and validation; Section 4 defines validation techniques; Sections 5, 6, 7, and 8 discuss data validity, conceptual model va-lidity, computerized model verification, and operational validity, respectively; Section 9 describes a way of documenting results; Section 10 gives a recommended validation procedure; Section 11 contains a brief description of accreditation; and Section 12 presents the summary. (Note that this tutorial paper is similar to Sargent (2009).)

2 BASIC APPROACHES

There are four basic decision-making approaches for deciding whether a simulation model is valid. Each of the approaches requires the model development team to conduct verification and validation as part of the model development process, which is discussed in Section 3. One approach, and a frequently used one, is for the model development team itself to make the decision as to whether a simulation model is va-lid. A subjective decision is made based on the results of the various tests and evaluations conducted as part of the model development process. However, it is usually better to use one of the next two approach-es, depending on which situation applies. If the size of the simulation team developing the model is small, a better approach than the one above is to have the user(s) of the model heavily involved with the model development team in deciding the va-lidity of the simulation model. In this approach the focus of determining the validity of the simulation model moves from the model developers to the model users. Also, this approach aids in model credibility. Another approach, usually called “independent verification and validation” (IV&V), uses a third (in-dependent) party to decide whether the simulation model is valid. The third party is independent of both the simulation development team(s) and the model sponsor/user(s). The IV&V approach should be used when developing large-scale simulation models, whose developments usually involve several teams. (This approach is also useful in model credibility, especially when the problem the simulation model is associated with has a high cost.) The third party needs to have a thorough understanding of the intended

167

Page 4: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Remarks from Law/Kelton

Model valid => simulation results support decision making similar to experiments with real system

Complexity of validation process depends on complexity of system and whether a version of the system exists.

Simulation model is always an approximation, there is no absolute validity.

Model should be developed for a particular purpose.

4

Page 5: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Remarks from Law/Kelton

Performance measures for validation must include those used for decision making.

Validation should take place during model development.

Credibility: Needs user understanding & agreement with model’s assumptions Needs demonstration that model has been validated & verified. Needs user’s ownership of & involvement with the project Profits from reputation of the model developers

5

Page 6: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

How to find an appropriate level of detail?

A model is an abstraction / a simplification of a real system. Selection of details depends on objective / purpose of a model! Model is not supposed to represent complete knowledge of a topic. Include only details that are necessary to match relevant behavior ...

or to support credibility.

Examples for possible simplifications: Entities in system need not match 1-1 with entities in a model. Unique entities in system may need not be unique in a model.

Level of detail Level of detail should be consistent with the type of data available. Time and budget constraints influence a possible level of detail. Subject matter experts (SME) and sensitivity analysis can give

guidance and what impacts measures of interest! If the number of factor is large, use a “coarse” model to identify most

relevant ones.

6

Page 7: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Output Analysis vs Validation (Law/Kelton)

Difference between validation and output analysis:Measure of interest

System: mean µS

Model: mean µM

Estimate from simulating the model: µE

Error in µE is difference | µE - µS | = | µE - µM + µM - µS | ≤ | µE - µM | + | µM - µS | (triangle inequality)1st part: Focus in output analysis2nd part: Focus in validation

7

Page 8: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Who shall decide if model is valid?

Four basic approaches (Sargent) The model development team

subjective decision based on tests and evaluations during development Users of the model with members of development team

Focus moves to users, also aids in model credibility in particular if development team is small

3rd party independent of both, developers and users in particular for large scale models that involve several teams 3rd party needs thorough understanding of purpose 2 variants

concurrently: can be perform complete VV effort after development: may focus on VV work done by development team

Scoring model rarely used in practice subjective assignment of scores/weights to categories model is valid if overall & category scores greater than threshold

8

Page 9: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Variant 1: Simplified Version of Modeling Approach Conceptual model validation

determine that theories & assumptions are correct model representation “reasonable” for intended purpose

Computerized model verification assure correct implementation

Operational validation model’s output behavior has

sufficient accuracy

Data validity ensure that the data necessary

for model building, evaluation, testing, and experimenting are adequate & correct.

Iterative process also reflects underlying learning process

9

Sargent

Figure 2: Simplified Version of the Modeling Process el’s intended purpose over the domain of the model’s intended applicability. Data validity is defined as ensuring that the data necessary for model building, model evaluation and testing, and conducting the model experiments to solve the problem are adequate and correct. An iterative process is used to develop a valid simulation model (Sargent 1984a). A conceptual model is developed followed by conceptual model validation. This process is repeated until the conceptual mod-el is satisfactory. Next the computerized model is developed from the conceptual model followed by computerized model verification. This process is repeated until the computerized model is satisfactory. Next operational validity is conducted on the computerized model. Model changes required by conducting operational validity can be in either the conceptual model or in the computerized model. Verification and validation must be performed again when any model change is made. Usually several models are devel-oped prior to obtaining a valid simulation model. A detailed way of relating verification and validation to developing simulation models and system theories is shown in Figure 3. This paradigm shows the processes of developing system theories and si-mulation models and relates verification and validation to both of these processes. This paradigm (Sargent 2001b) shows a Real World and a Simulation World. We first discuss the Real World. There exist some system or problem entity in the real world of which an understanding of is desired. System theories describe the characteristics and the causal relationships of the system (or problem entity) and possibly its behavior (including data). System data and results are obtained by conducting ex-periments (experimenting) on the system. System theories are developed by abstracting what has been observed from the system and by hypothesizing from the system data and results. If a simulation model exists of this system, then hypothesizing of system theories can also be done from simulation data and re-sults. System theories are validated by performing theory validation. Theory validation involves the com-parison of system theories against system data and results over the domain the theory is applicable for to determine if there is agreement. This process requires numerous experiments to be conducted on the real system. We now discuss the Simulation World, which shows a slightly more complicated model development process than the previous paradigm (Figure 2). A simulation model should only be developed for a set of well-defined objectives. The conceptual model is the mathematical/logical/verbal representation (mimic) of the system developed for the objectives of a particular study. The simulation model specification is a written detailed description of the software design and specification for programming and implementing the conceptual model on a particular computer system. The simulation model is the conceptual model

Problem Entity (System)

Conceptual Model

Data Validity

Computerized Model Verification

Computer Programming and Implementation

Conceptual Model Validation

Analysis and Modeling

Experimentation

Operational Validation

Computerized Model

169

Page 10: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Variant 2: Real World and Simulation World

Stresses objectives More detailed but conceptually similar Iterative process

10

Sargent

Figure 3: Real World and Simulation World Relationships with Verification and Validation

running on a computer system such that experiments can be conducted on the simulation model. The si-mulation model data and results are the data and results from experiments conducted (experimenting) on the simulation model. The conceptual model is developed by modeling the system for the objectives of the simulation study using the understanding of the system contained in the system theories. The simula-tion model is obtained by implementing the model on the specified computer system, which includes pro-gramming the conceptual model whose specifications are contained in the simulation model specification. Inferences about the system are made from data obtained by conducting computer experiments (experi-menting) on the simulation model. Conceptual model validation is defined as determining that the theories and assumptions underlying the conceptual model are consistent with those in the system theories and that the model representation of the system is “reasonable” for the intended purpose of the simulation model. Specification verification is defined as assuring that the software design and the specification for programming and implementing the conceptual model on the specified computer system is satisfactory. Implementation verification is defined as assuring that the simulation model has been implemented according to the simulation model specifica-tion. Operational validation is defined as determining that the model’s output behavior has sufficient ac-curacy for the model’s intended purpose over the domain of the model’s intended applicability.

ADDITIONAL EXPERIMENTS

(TESTS) NEEDED

SYSTEM (PROBLEM

ENTITY)

SYSTEM DATA/RESULTS

REAL WORLD

EXPERIMENTING

ABSTRACTING HYPOTHESIZING

SYSTEM EXPERIMENT OBJECTIVES

Theory Validation

SIMULATION EXPERIMENT OBJECTIVES

SIMULATION MODEL

DATA/RESULTS

SIMULATION

MODEL

SPECIFICATION

SIMULATION MODEL

SIMULATION WORLD

SPECIFYING EXPERIMENTING

IMPLEMENTING

HYPOTHESIZING MODELING

SYSTEM THEORIES

CONCEPTUAL MODEL

Operational (Results) Validation Conceptual

Model Validation

Specification Verification

Implementation Verification

170

Page 11: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Aside:

From Stephen Hawking“Any physical theory is always provisional, in the sense that it is only a hypothesis: you can never prove it.

No matter how many times the results of experiments agree with some theory, you can never be sure that the next time the result will not contradict the theory. On the other hand you can disprove a theory by finding a single observation that disagrees with the predictions of the theory. As philosopher of science Karl Popper has emphasized, a good theory is characterized by the fact that it makes a number of predictions that could in principle be disproved or falsified by observation. Each time new experiments are observed to agree with the predictions the theory survives, and our confidence in it is increased; but if ever a new observation is found to disagree, we have to abandon or modify the theory.”

from S. Hawking, A brief history of time, the universe in a nutshell.

11

Page 12: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Validation Techniques

Does it match with own/SME’s expectations? Animation Operational Graphics observe performance measures during

simulation run Face validity Turing test

Does it match with existing knowledge? Comparison to other models Historical data validation Predictive Validation to compare model predictions with field tests/

system data Degenerate Tests

12

Page 13: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Validation Techniques

13

Sanity checks Degenerate Tests Event validity (relative to real events) Extreme condition tests Traces to follow individual entities

Historical methods Rationalism (assumptions true/false) Empiricism Positive economics (predicts future correctly)

Variability Internal validity to determine amount of internal variability with

several replication runs Parameter Variability - Sensitivity Analysis

Page 14: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Data validity

Data needed for building a conceptual model validating a model performing experiments with a validated model

Valid data necessary for overall approach GIGO: Garbage in - Garbage out

Sargent: “Unfortunately, there is not much that can be done to ensure that the data are correct.” in a scientific sense, i.e., there is no particular procedure to follow

other than to carefully collect and maintain data test collected data using techniques such as internal consistency checks screening for outliers and determining if outliers are correct or not

14

Page 15: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Conceptual model validation

Conceptual model validation: determining that the theories and assumptions underlying the conceptual model are

correct the model’s representation of the problem and the models structure,

login and mathematical and causal relationships are “reasonable for the intended purpose of the model.

How to do this? Testing using mathematical analysis and statistical methods, e.g.

Assumptions: linearity, independence of data, Poisson arrivals Methods: fitting to data, MLE parameter estimation, graphical analysis

Evaluating individual components and the way those are composed into an overall model by e.g. face validity: experts examine flowchart, graphical model, set of equations traces: tracking entities in each submodel and overall model.

15

Page 16: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Computerized model verification

Special case of verification in software engineering If a simulation framework is used evaluate if framework works correctly test random number generation model-specific

existing functionality/libraries are used correctly conceptual model is completely and correctly encoded in modeling notation

of the employed framework

Means structured walk through traces testing, i.e., simulation is executed and dynamic behavior is checked

against a given set of criteria, internal consistency checks (assertions) input-output relationships recalculate estimates for mean and variance of input probability distributions

16

Page 17: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

More concrete:

Mobius: Compositional model description Evaluate individual atomic models in isolation analog: unit testing assign minimal values to state variables and see if dynamic behavior

is as expected by fine grained measurements and trace data evaluate qualitative behavior before taking quantitative behavior

(specific distributions, performance measurements) evaluate simple special cases that allow for redundant types of

analysis (numerical solution of Markov chains vs simulation) compose large models from well-understood atomic models of

limited complexity (analog: class and method design)

Traviando: Perform a trace analysis on isolated submodels / overall model

use report generation functionality check ranges of values for state variables occurrence of activities and their state transformations

17

Page 18: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Operational validity

“Determine whether the simulation model’s output behavior has the accuracy required for the model’s intended purpose over the domain of the model’s intended applicability.” May reveal deficits in conceptual model as well as in its implementation. 18

Sargent

and reprogramming critical components to determine if the same results are obtained. If there are a large number of variables, one might aggregate the numerical values of some of the variables to reduce the number of tests needed or use certain types of design of experiments (Kleijnen 1987). It is necessary to be aware while checking the correctness of the computer program and its implemen-tation that errors found may be caused by the data, the conceptual model, the computer program, or the computer implementation. (See Whitner and Balci (1989) for a detailed discussion on model verification.)

8 OPERATIONAL VALIDITY

Operational validation is determining whether the simulation model’s output behavior has the accuracy required for the model’s intended purpose over the domain of the model’s intended applicability. This is where much of the validation testing and evaluation take place. Since the simulation model is used in op-erational validation, any deficiencies found may be caused by what was developed in any of the steps that are involved in developing the simulation model including developing the system’s theories or having invalid data. All of the validation techniques discussed in Section 4 are applicable to operational validity. Which techniques and whether to use them objectively or subjectively must be decided by the model develop-ment team and the other interested parties. The major attribute affecting operational validity is whether the problem entity (or system) is observable, where observable means it is possible to collect data on the operational behavior of the problem entity. Table 1 gives a classification of the validation techniques used in operational validity based on the decision approach and system observable. “Comparison” means com-paring the simulation model output behavior to either the system output behavior or another model output behavior using graphical displays or statistical tests and procedures. “Explore model behavior” means to examine the output behavior of the simulation model using appropriate validation techniques, including parameter variability-sensitivity analysis. Various sets of experimental conditions from the domain of the model’s intended applicability should be used for both comparison and exploring model behavior.

Table 1: Operational Validity Classification

To obtain a high degree of confidence in a simulation model and its results, comparisons of the mod-el’s and system’s output behaviors for several different sets of experimental conditions are usually re-quired. Thus if a system is not observable, which is often the case, it is usually not possible to obtain a high degree of confidence in the model. In this situation the model output behavior(s) should be explored as thoroughly as possible and comparisons made to other valid models whenever possible.

8.1 Explore Model Behavior

The simulation model output behavior can be explored either qualitatively or quantitatively. In qualitative analysis the directions of the output behaviors are examined and also possibly whether the magnitudes are “reasonable.” In quantitative analysis both the directions and the precise magnitudes of the output beha-viors are examined. Experts on the system usually know the directions and often know the “general val-ues” of the magnitudes of the output behaviors. Many of the validation techniques given in Section 4 can

Observable System

Non-observable System

Subjective Approach

• Comparison Using Graphical Displays

• Explore Model Behavior

• Explore Model Behavior

• Comparison to Other Models

Objective Approach

• Comparison Using Statistical Tests and Procedures

• Comparison to Other Models Using Statistical Tests

174

Page 19: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Operational Validity

Explore Model Behavior Directions of behavior Reasonable / precise magnitudes Parameter variability-sensitivity analysis

Statistical approaches: Metamodeling, design of experiments

Comparisons of Output Behavior (System vs Model) Most effective: trace driven simulation

feed measurement data into simulation to closely follow real behavior Use graphs to make subjective decisions

Histograms, Box plots, Scatter plots Useful in model development process to evaluate level of detail and accuracy,

for face validity checks by subject matter experts, and in Turing tests Use confidence intervals and/or hypothesis tests to make an

“objective” decision Problems: underlying assumptions (independence, normality) and/or

insufficient system data

19

Page 20: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Trace driven simulation

Idea: feed measurement data into simulation model Example from MAP fitting work by Casale, Smirni et al.

20

Page 21: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Documentation of VV effort

Critical to build credibility, justify confidence Detailed documentation on specifics of tests etc Separate tables for data validity, conceptual model validity, computer model verification, operational validity

21

Sargent

Figure 8: Operating Characteristic Curves

Details of the methodology for using hypotheses tests in comparing the model’s and system’s output data for model validations are given in Balci and Sargent (1981). Examples of the application of this me-thodology in the testing of output means for model validation are given in Balci and Sargent (1982a, 1982b, 1983).

9 DOCUMENTATION

Documentation on model verification and validation is usually critical in convincing users of the “cor-rectness” of a model and its results, and should be included in the simulation model documentation. (See Gass (1984) for a general discussion on documentation of computer-based models.) Both detailed and summary documentation are desired. The detailed documentation should include specifics on the tests, evaluations made, data, results, etc. The summary documentation should contain a separate evaluation ta-ble for data validity, conceptual model validity, computer model verification, operational validity, and an overall summary. See Table 2 for an example of an evaluation table of conceptual model validity. (For examples of two other evaluation tables, see Sargent (1994, 1996b).) The columns of Table 2 are self-explanatory except for the last column, which refers to the confidence the evaluators have in the results or conclusions. These are often expressed as low, medium, or high.

Table 2: Evaluation Table for Conceptual Model Validity

178

LowMediumHigh

Page 22: CS626 Data Analysis and Simulation - Computer Sciencekemper/cs626/slides/v13.pdf · 1 CS626 Data Analysis and Simulation Today: Verification and Validation of Simulation Models Reference:

Recommended Procedure

Agreement between user & developer on VV approach (prior to model development) Specification of required amount of accuracy Test assumptions & theories underlying simulation model In each iteration perform face validity on the conceptual model explore simulation model’s behavior using the computerized model make comparisons (if possible) between simulation model and

system behavior for at least a few sets of experimental conditions (at least in the last iteration)

Develop validation documentation for inclusion in the simulation model documentation If model is to be used of a period of time, develop a schedule for periodic review of the model’s validity.

22