Class TraceVerifier

java.lang.Object
org.djutils.traceverifier.TraceVerifier
All Implemented Interfaces:
Closeable, AutoCloseable

public class TraceVerifier extends Object implements Closeable
Create or verify identity of a trace of states of a system.
E.g., A simulation that is run with the same initial conditions (including random seed) should behave in a 100% predictable manner. If it does not, there is some source of randomness that probably should be eliminated. This package can help locate where the various runs of the simulation start to deviate from one another.
The simulation must be instrumented with calls to the sample method. The sample method either records these samples in a file, or compares these samples with the values that were stored in the file in a previous run. When a difference occurs, the sample method throws an exception.

Copyright (c) 2020-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
Author:
Alexander Verbraeck, Peter Knoppers
  • Constructor Details

    • TraceVerifier

      public TraceVerifier(String fileName) throws IOException
      Create a new TraceVerifier.
      Parameters:
      fileName - String; name of the file for the trace
      Throws:
      IOException - when reading or writing fails
  • Method Details