Class FieldParameterDrivenDateIntervalDetector<T extends CalculusFieldElement<T>>

  • Type Parameters:
    T - type of the field elements
    All Implemented Interfaces:
    FieldEventDetector<T>

    public class FieldParameterDrivenDateIntervalDetector<T extends CalculusFieldElement<T>>
    extends FieldAbstractDetector<FieldParameterDrivenDateIntervalDetector<T>,​T>
    Detector for date intervals that may be offset thanks to parameter drivers.

    Two dual views can be used for date intervals: either start date/stop date or median date/duration. start/stop drivers and median/duration drivers work in pair. Both drivers in one pair can be selected and their changes will be propagated to the other pair, but attempting to select drivers in both pairs at the same time will trigger an exception. Changing the value of a driver that is not selected should be avoided as it leads to inconsistencies between the pairs.

    Since:
    11.1
    Author:
    Luc Maisonobe
    See Also:
    Propagator.addEventDetector(EventDetector)
    • Constructor Detail

      • FieldParameterDrivenDateIntervalDetector

        public FieldParameterDrivenDateIntervalDetector​(Field<T> field,
                                                        String prefix,
                                                        AbsoluteDate refMedian,
                                                        double refDuration)
        Build a new instance.
        Parameters:
        field - field to which the elements belong
        prefix - prefix to use for parameter drivers names
        refMedian - reference interval median date
        refDuration - reference duration
      • FieldParameterDrivenDateIntervalDetector

        public FieldParameterDrivenDateIntervalDetector​(Field<T> field,
                                                        String prefix,
                                                        AbsoluteDate refStart,
                                                        AbsoluteDate refStop)
        Build a new instance.
        Parameters:
        field - field to which the elements belong
        prefix - prefix to use for parameter drivers names
        refStart - reference interval start date
        refStop - reference interval stop date
      • FieldParameterDrivenDateIntervalDetector

        protected FieldParameterDrivenDateIntervalDetector​(FieldAdaptableInterval<T> maxCheck,
                                                           T threshold,
                                                           int maxIter,
                                                           FieldEventHandler<T> handler,
                                                           DateDriver start,
                                                           DateDriver stop,
                                                           DateDriver median,
                                                           ParameterDriver duration)
        Protected constructor with full parameters.

        This constructor is not public as users are expected to use the builder API with the various withXxx() methods to set up the instance in a readable manner without using a huge amount of parameters.

        Parameters:
        maxCheck - maximum checking interval
        threshold - convergence threshold (s)
        maxIter - maximum number of iterations in the event time search
        handler - event handler to call at event occurrences
        start - reference interval start driver
        stop - reference interval stop driver
        median - median date driver
        duration - duration driver