# Minimal Simulation Kernel

pypdevs.minimal.directConnect(component_set)

  Perform a trimmed down version of the direct connection algorithm.

  It does not support transfer functions, but all the rest is the same.

  Parameters

    component_set – the iterable to direct connect

  Returns

    the direct connected component_set

class pypdevs.minimal.Simulator(model)

  Minimal simulation kernel, offering only setTerminationTime and simulate.

  Use this Simulator instead of the normal one to use the minimal kernel. While it has a lot less features, its performance is much higher. The polymorphic scheduler is also used by default.

  __init__(model)

    Constructor

    Parameters

      model – the model to simulate

  setTerminationCondition(function)

    Set the termination condition of the simulation.

    Parameters

      function – termination condition to execute, taking the current simulated time and the model, returning a boolean (True to terminate)

  setTerminationTime(time)

    Set the termination time of the simulation.

    Parameters

      time – simulation time at which simulation should terminate

  simulate()

    Perform the simulation