Interface SimCondition

Type Parameters:
M - the type of the simulation model
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SimCondition
A condition which is continuously checked over the course of a simulation run. Whenever the condition is satisfied, the check method performs a specific action, such as stopping the simulation run, for example.

A common use of this class is the implementation of a stop condition, which causes the simulation run to stop whenever the check method evaluates to true.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether this condition is satisfied.
  • Method Details

    • check

      boolean check()
      Checks whether this condition is satisfied. This is the case, for instance, if a certain stopping criterion holds.
      Returns:
      true, if the condition is satisfied; false, else.