Back to Courses

Model Testing and Verification

Up to 3 hours
Static and dynamic testing Debugging techniques Error identification patterns

Course Overview

This session focuses on model verification — the process of ensuring that a simulation model is correctly programmed and behaves as intended. Participants will learn and apply both static and dynamic testing approaches using practical examples in AnyLogic.


Objectives

  • Understand the key concepts of model verification
  • Learn and apply static and dynamic testing approaches
  • Use practical debugging techniques for simulation models in AnyLogic
  • Identify common sources of errors in simulation models

Prerequisites

  • Basic understanding of simulation modeling concepts
  • AnyLogic: Discrete Events basics (Source, Queue, Delay, Sink), Functions, Events, System Dynamics (Stocks, Flows, Dimensions and Sub-Dimensions)
  • Java syntax: variables, collections, basic data types, objects, conditions, error handling, loops, lists and maps
  • Statistical distributions

Topics Covered

1. Introduction

  • What is model verification and why it matters
  • The distinction between verification and validation

2. Static Testing Techniques

  • Analyzing code without executing it
  • Structured walkthroughs and program correctness testing
  • Examination of structural properties
  • AnyLogic examples: module structure review and System Dynamics unit checks
  • Activity: Analyze a pre-built AnyLogic model using static testing techniques

3. Dynamic Testing Techniques

  • Executing the model under different conditions
  • Traces and debugging
  • Input-output relationship analysis
  • Internal consistency checks
  • Creating isolated test models for specific functions
  • AnyLogic examples: varied input configurations, animation-based visualization, output data monitoring
  • Activity: Execute and modify an AnyLogic model to investigate potential errors

4. Debugging Techniques

  • Writing code in modules or functions for easier debugging
  • Applying good programming practices and code reviews
  • Tracking key variables, event times, and counters
  • Comparing model results to known system behavior
  • Using model animations for visual verification

5. Common Sources of Errors

  • Data errors and conceptual model flaws
  • Programming mistakes and implementation issues
  • Random number generator problems

6. AnyLogic Debug Tool

  • Using AnyLogic’s built-in debugging capabilities

Acquired Knowledge

By the end of this session, participants will be able to:

  • Differentiate between static and dynamic testing methods
  • Implement effective debugging techniques in AnyLogic
  • Verify the correctness of simulation models by identifying and fixing errors systematically

Interested in this course?

Get in Touch