org.openmi.standard
Interface IDiscreteTimes


public interface IDiscreteTimes

Within and outside modelling exercises, many situations occur where "raw" data is desired at the (discrete) time stamp as it is available in the source component. A typical example is the comparison of computation results with monitoring data, or a computational core that wants to adhere to the time stepping of its data source. To keep the values fixed to the discrete times as they are available in the source component, the IDiscreteTimes interface has been defined. This interface can provide a list of time stamps for which values of a quantity on an element set are available.

Note that the IDiscreteTimes interface is an optional interface to provide more detailed information on the temporal discretization of available data. It is not required to implement the IDiscreteTimes interface in order to claim OpenMI compliance for a Component. However, if the IDiscreteTimes interface is implemented it must be implemented according to the definitions given below.


Method Summary
 ITime getDiscreteTime(IQuantity quantity, IElementSet elementSet, int discreteTimeIndex)
          Get n-th discrete time stamp or time span for a specific combination of ElementSet and Quantity.
 int getDiscreteTimesCount(IQuantity quantity, IElementSet elementSet)
          Returns the number of discrete time steps for a specific combination of ElementSet and Quantity
 boolean hasDiscreteTimes(IQuantity quantity, IElementSet elementSet)
          Returns true if the component can provide discrete times for the specific exchange item defined by the arguments quantity and elementSet
 

Method Detail

hasDiscreteTimes

boolean hasDiscreteTimes(IQuantity quantity,
                         IElementSet elementSet)
Returns true if the component can provide discrete times for the specific exchange item defined by the arguments quantity and elementSet


getDiscreteTimesCount

int getDiscreteTimesCount(IQuantity quantity,
                          IElementSet elementSet)
Returns the number of discrete time steps for a specific combination of ElementSet and Quantity


getDiscreteTime

ITime getDiscreteTime(IQuantity quantity,
                      IElementSet elementSet,
                      int discreteTimeIndex)
Get n-th discrete time stamp or time span for a specific combination of ElementSet and Quantity. This method must accept values of discreteTimeIndex in the interval [0, GetDiscreteTimesCount - 1]. If the discreteTimeIndex is outside this interval an exception must be thrown.

Parameters:
quantity - The quantity.
elementSet - The element.
discreteTimeIndex - index of timeStep.
Returns:
Discrete time stamp or time span.