Class BootstrapSampleDelay

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, SequenceActor, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class BootstrapSampleDelay
    extends SampleDelay
    Record an initial token and then output that initial token during initialize(), then pass through.

    The BootstrapSampleDelay works in the same way as a regular sample delay actor, but with the added feature that it records the initial value passed into it and will send that value out as the initial value on the next run.

    Frequently, sample delays are placed as dependency loop-breakers so that a model can run, but their default value of {0} is undesirable. This is commonly fixed by examining the first value passed into the sample delay and either setting the sample delay's starting value to this value; or recording that value in a parameter within the same container as the sample delay and setting the sample delay's starting value to reference the parameter.

    The Bootstrap sample delay internalizes the above solutions and furthermore needs no additional manual upkeep should starting values change.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Jason Smith, Christopher Brooks
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)