Minimal Simulation Kernel¶
- pypdevs.minimal.directConnect(component_set)[source]¶
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)[source]¶
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.
- setTerminationCondition(function)[source]¶
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)