23
1 of Simulation Computer Program Presented by:- ASHISH KUMAR Bundelkhand University Jhansi Presented to:- Mr. KAMAL GUPTA

Verification of simulation computer program by ashish gangwar (8445059669)

Embed Size (px)

Citation preview

Page 1: Verification of simulation computer program by ashish gangwar (8445059669)

1

of Simulation Computer Program

Presented by:-

ASHISH KUMAR

Bundelkhand University Jhansi

Presented to:-

Mr. KAMAL GUPTA

Page 2: Verification of simulation computer program by ashish gangwar (8445059669)

Verification of Simulation Computer Program

Verification of a model is the process of confirming that it is correctly implemented with respect to the conceptual model. During verification the model is tested to find and fix errors in the implementation of the model.

Model verification is formally defined as “ensuring that the computer program of the computerized model and its implementation are correct”. 2

Page 3: Verification of simulation computer program by ashish gangwar (8445059669)

Verification of Simulation Computer ProgramVerification is like debugging—it is intended

to ensure that the model does what it is intended to do. Models, especially simulation models, are often large computer programs.

Verification: concerned with building the model right. It is utilized in the comparison of the conceptual model to the computer representation that implements that conception.

3

Page 4: Verification of simulation computer program by ashish gangwar (8445059669)

4

Verification of Simulation Computer Program

Page 5: Verification of simulation computer program by ashish gangwar (8445059669)

Verification of Simulation Computer Program

Verification: concerned with building the model right. It is utilized in the comparison of the conceptual model to the computer representation that implements that conception.

5

Page 6: Verification of simulation computer program by ashish gangwar (8445059669)

It asks the questions:-

Is the model implemented correctly in the computer? Are the input parameters and logical structure of the model correctly represented?

6

Page 7: Verification of simulation computer program by ashish gangwar (8445059669)

Many common sense suggestions can be given for use in the verification process.

1. Have the code checked by someone other than the programmer.2. Make a flow diagram which includes each logically possible action a system can take when an event occurs, and follow the model logic for each action for each event type.

7

Page 8: Verification of simulation computer program by ashish gangwar (8445059669)

Many common sense suggestions can be given for use in the verification process.

3.Closely examine the model output for reasonableness under a variety of settings of the input parameters. Have the code print out a wide variety of output statistics.4. Have the computerized model print the input parameters at the end of the simulation, to be sure that these parameter values have not been changed inadvertently.

8

Page 9: Verification of simulation computer program by ashish gangwar (8445059669)

Many common sense suggestions can be given for use in the verification process.

5. Make the computer code as self-documenting as possible. Give a precise definition of every variable used, and a general description of the purpose of each major section of code.

9

Page 10: Verification of simulation computer program by ashish gangwar (8445059669)

Verification of Simulation Computer Program

Verification is like debugging—it is intended to ensure that the model does what it is intended to do. Models, especially simulation models, are often large computer programs.

Therefore all techniques that can help develop, debug or maintain large computer programs are also useful for models.

10

Page 11: Verification of simulation computer program by ashish gangwar (8445059669)

Techniques of Verification of Simulation Computer Program

1) Anti-bugging.2) Structured walk-through/one-step analysis.3) Simplified models .4) Deterministic models (simulation only). 5) Tracing (simulation only).6) Animation (simulation only).7) Seed independence (simulation only).8) Continuity testing .9) Degeneracy testing .10) Consistency testing . 11

Page 12: Verification of simulation computer program by ashish gangwar (8445059669)

Anti-bugging.

Anti-bugging consists of including additional checks and outputs in a model that may be used to capture bugs if they exist.

A common form of anti-bugging is to maintain counters within a simulation model which keep track of the number of entities which are generated and terminated during the evolution of the model.

12

Page 13: Verification of simulation computer program by ashish gangwar (8445059669)

Simplified models

It is sometimes possible to reduce the model to its minimal possible behavior.

13

Page 14: Verification of simulation computer program by ashish gangwar (8445059669)

Deterministic models (simulation only)

For simulation models the presence of random variables can make it hard for the modeller to reason about the behavior of a model and check that it is as expected or required. Replacing random variables which govern delays or scheduling with deterministic values may help the modeller to see whether the model is behaving correctly.

Note that this technique is only appropriate for simulation models , markovian models can only be solved with exponential distributions. 14

Page 15: Verification of simulation computer program by ashish gangwar (8445059669)

Tracing (simulation only)

Trace outputs can be extremely useful in isolating incorrect behavior in a model.

Default tracing can be switched on and o ffusing the method Sim system.

15

Page 16: Verification of simulation computer program by ashish gangwar (8445059669)

Animation (simulation only)

Animation is similar to tracing but provides the information about the internal behavior of the model in a graphical form.

Animation can take the form of automated one-step analysis, if the animation facilities allow the view of the model to advance one event at a time.

16

Page 17: Verification of simulation computer program by ashish gangwar (8445059669)

Seed independence (simulation only)

The seeds used for random number generation in a simulation model should not significantly a ect the fffinal conclusion drawn from a model, although there will be variation in sample points as seeds vary. If a model produces widely varying results for di erent seed values it indicates that there is ffsomething wrong within the model. Seed independence can be verified by running the simulation with di erent seed values, something ffwhich is probably necessary in any case.

17

Page 18: Verification of simulation computer program by ashish gangwar (8445059669)

Continuity testing

At an abstract level all systems and models can be thought of as generating a function from input values to output values, and in most cases we expect that function to be continuous.

Continuity testing consists of running a simulation model, or solving a Markovian model, several times for slightly di erent values of input parameters. ff

Page 19: Verification of simulation computer program by ashish gangwar (8445059669)

Degeneracy testing

Degenerate cases for a model is those values of input parameters which are at the extremes of the model’s intended range of representation.

Degeneracy testing consists of checking that the model works for the extreme values of system and workload parameters.

Degeneracy testing can help the modeller to find bugs that would not otherwise have been discovered. 19

Page 20: Verification of simulation computer program by ashish gangwar (8445059669)

Consistency testing

Consistency tests are used to check that a model produces similar results for input parameter values that have similar e ects.ff

20

Page 21: Verification of simulation computer program by ashish gangwar (8445059669)

Structured walk-through/one-step analysis.

Explaining the model to another person, or group of people, can make the modeller focus on di erent aspects of the model and fftherefore discover problems with its current implementation. Even if the listeners do not understand the details of the model, or the system, the developer may become aware of bugs simply by studying the model carefully and trying to explain how it works. Preparing documentation for a model can have a similar e ect by making the modeller look at the model from a ffdi erent perspective. In the absence of a willing audience the ffmodel developer should try to carry out the same sort of step-by-step analysis of the model to convince himself or herself that it behaves correctly. For a GSPN model this would amount to playing the token game; in a queuing network, stepping through the possible customer transitions. Some modeling packages provide support for doing this. 21

Page 22: Verification of simulation computer program by ashish gangwar (8445059669)

Summary

i. Verification is the most important step in any simulation study.

ii. No model is ever 100% verified.

22

Page 23: Verification of simulation computer program by ashish gangwar (8445059669)

23

Thank You !

@&h!&h