Class ParameterDriver

Direct Known Subclasses:
AmbiguityDriver, DateDriver, ParameterDriversList.DelegatingDriver

public class ParameterDriver extends BaseParameterDriver<ParameterDriver,ParameterObserver>
Class allowing to drive the value of a parameter.

This class is typically used as a bridge between an estimation algorithm (typically orbit determination or optimizer) and an internal parameter in a physical model that needs to be tuned. The physical model will expose to the algorithm a set of instances of this class so the algorithm can call the setValue(double) method to update the parameter value.

Any object can be notified when any of value, name, selection status… are changed. This is done by registering a parameter observer to the parameter driver.

This design has two major goals. First, it allows an external algorithm to drive internal parameters blindly, as it only needs to get a list of instances of this class, without knowing what they really drive. Second, it allows the physical model to not expose directly setters methods for its parameters. In order to be able to modify the parameter value, the algorithm must retrieve a parameter driver.

As of versions 12.X and 13.X, it was possible to set up time-dependent values within a single ParameterDriver. This feature has been replaced by ParameterDriversSequence as of 14.0, which is simpler and also allows finer selection, making it possible to select only a subset of the parameters along a timeline. Starting with version 14.0, ParameterDriver instances only hold one value, which can have a restricted validity range.

Since:
8.0
Author:
Luc Maisonobe, Melina Vanel
See Also:
  • Constructor Details

    • ParameterDriver

      public ParameterDriver(String name, double referenceValue, double scale, double minValue, double maxValue, TimeInterval validity)
      Simple constructor.

      At construction, the parameter is configured as not selected, the reference date is set to null, the value is set to the referenceValue.

      Parameters:
      name - name of the parameter
      referenceValue - reference value of the parameter
      scale - scaling factor to convert the parameters value to non-dimensional (typically set to the expected standard deviation of the parameter), it must be non-zero
      minValue - minimum value allowed
      maxValue - maximum value allowed
      validity - validity interval
  • Method Details

    • getReferenceDate

      public AbsoluteDate getReferenceDate()
      Get current reference date.
      Returns:
      current reference date (null if it was never set)
      Since:
      9.0
    • setReferenceDate

      public void setReferenceDate(AbsoluteDate newReferenceDate)
      Set reference date.
      Parameters:
      newReferenceDate - new reference date
      Since:
      9.0
    • getReferenceValue

      public double getReferenceValue()
      Get reference parameter value.
      Returns:
      reference parameter value
    • setReferenceValue

      public void setReferenceValue(double referenceValue)
      Set reference parameter value.
      Parameters:
      referenceValue - the reference value to set.
      Since:
      9.3
    • getValue

      public double getValue()
      Get current parameter value.
      Returns:
      current parameter value
    • getValue

      public Gradient getValue(int freeParameters, Map<String,Integer> indices)
      Get the value as a gradient.
      Parameters:
      freeParameters - total number of free parameters in the gradient
      indices - indices of the differentiation parameters in derivatives computations
      Returns:
      value with derivatives
      Since:
      10.2
    • setValue

      public void setValue(double newValue)
      Set parameter value.

      If newValue is below BaseParameterDriver.getMinValue(), it will be silently set to BaseParameterDriver.getMinValue(). If newValue is above BaseParameterDriver.getMaxValue(), it will be silently set to BaseParameterDriver.getMaxValue().

      Parameters:
      newValue - new value to set
    • getNormalizedValue

      public double getNormalizedValue()
      Get normalized value.

      The normalized value is a non-dimensional value suitable for use as part of a vector in an optimization process. It is computed as (current - reference)/scale.

      Returns:
      normalized value
    • setNormalizedValue

      public void setNormalizedValue(double normalized)
      Set normalized value.

      The normalized value is a non-dimensional value suitable for use as part of a vector in an optimization process. It is computed as (current - reference)/scale.

      Parameters:
      normalized - value
    • setMinValue

      public void setMinValue(double minValue)
      Set minimum parameter value.
      Overrides:
      setMinValue in class BaseParameterDriver<ParameterDriver,ParameterObserver>
      Parameters:
      minValue - the minimum value to set.
      Since:
      9.3
    • setMaxValue

      public void setMaxValue(double maxValue)
      Set maximum parameter value.
      Overrides:
      setMaxValue in class BaseParameterDriver<ParameterDriver,ParameterObserver>
      Parameters:
      maxValue - the maximum value to set.
      Since:
      9.3
    • toString

      public String toString()
      Get a text representation of the parameter.
      Overrides:
      toString in class Object
      Returns:
      text representation of the parameter, in the form name = value.