RateLatencyServiceCurve
A rate-latency service curve
public class RateLatencyServiceCurve : ConvexCurve, Unipi.Nancy.MinPlusAlgebra.IToCodeString, Unipi.Nancy.Utility.IStableHashCode
Inheritance Object → Curve → SuperAdditiveCurve → ConvexCurve → RateLatencyServiceCurve
Implements IToCodeString, IStableHashCode
Properties
Rate
Minimum rate of service.
public Rational Rate { get; }
Property Value
Latency
Maximum latency of service.
public Rational Latency { get; }
Property Value
IsSuperAdditive
True if the curve is super-additive.
For a SuperAdditiveCurve this will always return true, without performing any checks.
public bool IsSuperAdditive { get; }
Property Value
PseudoPeriodStart
Point in time after which the curve has a pseudo-periodic behavior.
Referred to as or Rank in [BT08] Section 4.1
public Rational PseudoPeriodStart { get; set; }
Property Value
PseudoPeriodLength
Time length of each pseudo-period.
Referred to as in [BT08] Section 4.1
public Rational PseudoPeriodLength { get; set; }
Property Value
PseudoPeriodHeight
Static value gain applied after each pseudo-period. If it's 0, the curve is truly periodic.
Referred to as in [BT08] Section 4.1
public Rational PseudoPeriodHeight { get; set; }
Property Value
PseudoPeriodSlope
Average slope of curve in pseudo-periodic behavior. If it's 0, the curve is truly periodic.
public Rational PseudoPeriodSlope { get; }
Property Value
FirstPseudoPeriodEnd
End time of the first pseudo period.
public Rational FirstPseudoPeriodEnd { get; }
Property Value
SecondPseudoPeriodEnd
End time of the second pseudo period.
public Rational SecondPseudoPeriodEnd { get; }
Property Value
BaseSequence
Sequence describing behavior of the curve in . Combined with the UPP property, this is also allows to derive for any .
Referred to as in [BT08] Section 4.1
public Sequence BaseSequence { get; set; }
Property Value
IsFinite
True if the curve has finite value for any .
public bool IsFinite { get; }
Property Value
FirstFiniteTime
The first instant around which the curve is not infinite. Does not specify whether it's inclusive or not, i.e. if is finite.
public Rational FirstFiniteTime { get; }
Property Value
FirstFiniteTimeExceptOrigin
The first instant around which the curve is not infinite, excluding the origin point. Does not specify whether it's inclusive or not, i.e. if is finite.
public Rational FirstFiniteTimeExceptOrigin { get; }
Property Value
FirstNonZeroTime
The first instant around which the curve is not 0. Does not specify whether it's inclusive or not, i.e. if .
public Rational FirstNonZeroTime { get; }
Property Value
PseudoPeriodStartInfimum
Returns the minimum such that for all . It is the infimum of all valid PseudoPeriodStart, i.e. .
public Rational PseudoPeriodStartInfimum { get; }
Property Value
IsZero
True if the curve is 0 for all .
public bool IsZero { get; }
Property Value
IsPlusInfinite
True if the curve has value for any .
public bool IsPlusInfinite { get; }
Property Value
IsMinusInfinite
True if the curve has value for any .
public bool IsMinusInfinite { get; }
Property Value
IsContinuous
True if there is no infinite value or discontinuity within the curve.
public bool IsContinuous { get; }
Property Value
IsContinuousExceptOrigin
True if there is no discontinuity within the curve, except at most in origin.
public bool IsContinuousExceptOrigin { get; }
Property Value
IsLeftContinuous
True if there is no left-discontinuity within the curve.
public bool IsLeftContinuous { get; }
Property Value
IsRightContinuous
True if there is no right-discontinuity within the curve.
public bool IsRightContinuous { get; }
Property Value
IsNonNegative
True if the curve is non-negative, i.e. for any .
public bool IsNonNegative { get; }
Property Value
FirstNonNegativeTime
The first instant around which the curve is non-negative. Does not specify whether it's inclusive or not, i.e. if .
public Rational FirstNonNegativeTime { get; }
Property Value
IsNonDecreasing
True if for any , .
public bool IsNonDecreasing { get; }
Property Value
IsUltimatelyFinite
True if for all PseudoPeriodStart the curve is finite.
This property does not check if PseudoPeriodStart is either infinite, finite or both.
public bool IsUltimatelyFinite { get; }
Property Value
IsUltimatelyInfinite
True if, for and some , for all .
public bool IsUltimatelyInfinite { get; }
Property Value
IsUltimatelyPlain
True if for all PseudoPeriodStart the curve is either always finite or always infinite.
Defined in [BT08], Definition 1.
public bool IsUltimatelyPlain { get; }
Property Value
IsPlain
True if is plain, i.e., it is either a) always finite, b) always plus or minus infinite (without changing sign), or c) finite up to a , then always plus or minus infinite (without changing sign)
Formally defined in [BT08], Definition 1.
public bool IsPlain { get; }
Property Value
IsUltimatelyAffine
True if for all PseudoPeriodStart the curve is affine.
public bool IsUltimatelyAffine { get; }
Property Value
IsUltimatelyConstant
True if for PseudoPeriodStart the curve is constant.
public bool IsUltimatelyConstant { get; }
Property Value
IsSubAdditive
True if the curve is sub-additive, i.e. .
Based on [Zippo23] Lemma 9.3: is sub-additive , where is defined in WithZeroOrigin(). Can be computationally expensive the first time it is invoked, the result is cached afterwards.
public bool IsSubAdditive { get; }
Property Value
IsRegularSubAdditive
True if the curve is sub-additive with .
public bool IsRegularSubAdditive { get; }
Property Value
IsRegularSuperAdditive
True if the curve is super-additive with .
public bool IsRegularSuperAdditive { get; }
Property Value
IsConcave
Tests if the curve is concave, i.e. for any two points the straight line joining them is below .
The property is checked via the following property: is concave a) is continuous, or it is continuous for and , and b) is composed of segments with decreasing slopes.
public bool IsConcave { get; }
Property Value
IsRegularConcave
Tests if the curve is concave with .
public bool IsRegularConcave { get; }
Property Value
IsConvex
Tests if the curve is convex, i.e. for any two points the straight line joining them is above .
The property is checked via the following property: is convex a) is continuous, or it is continuous for and , and b) is composed of segments with increasing slopes.
public bool IsConvex { get; }
Property Value
IsRegularConvex
Tests if the curve is convex with .
public bool IsRegularConvex { get; }
Property Value
HasTransient
True if pseudo-periodic behavior starts at .
public bool HasTransient { get; }
Property Value
TransientSequence
Sequence describing the curve in , before pseudo-periodic behavior.
public Sequence TransientSequence { get; }
Property Value
TransientElements
Elements describing the curve from , before pseudo-periodic behavior.
Referred to as in [BT08] Section 4.1
public IEnumerable<Element> TransientElements { get; }
Property Value
PseudoPeriodicSequence
Sequence describing the pseudo-periodic behavior of the curve in .
public Sequence PseudoPeriodicSequence { get; }
Property Value
PseudoPeriodicElements
Elements describing the pseudo-periodic behavior of the curve in .
Referred to as in [BT08] Section 4.1
public IEnumerable<Element> PseudoPeriodicElements { get; }
Property Value
Constructors
RateLatencyServiceCurve(Rational, Rational)
Constructor.
public RateLatencyServiceCurve(Rational rate, Rational latency)
Parameters
rate
Rational
latency
Rational
Methods
Scale(Rational)
public Curve Scale(Rational scaling)
Parameters
scaling
Rational
Returns
DelayBy(Rational)
public Curve DelayBy(Rational delay)
Parameters
delay
Rational
Returns
Addition(Curve)
public Curve Addition(Curve curve)
Parameters
curve
Curve
Returns
VerticalShift(Rational, Boolean)
public Curve VerticalShift(Rational shift, bool exceptOrigin)
Parameters
shift
Rational
exceptOrigin
Boolean
Returns
Convolution(Curve, ComputationSettings)
public Curve Convolution(Curve curve, ComputationSettings settings)
Parameters
curve
Curve
settings
ComputationSettings
Returns
Convolution(RateLatencyServiceCurve, ComputationSettings)
Computes the convolution of the two curves.
Optimized as another RateLatencyServiceCurve with the sum of the delays and the minimum of the rates.
public RateLatencyServiceCurve Convolution(RateLatencyServiceCurve dr, ComputationSettings settings)
Parameters
settings
ComputationSettings
Returns
Convolution(IReadOnlyCollection<RateLatencyServiceCurve>, ComputationSettings)
Computes the convolution of the set of curves.
Optimized as a RateLatencyServiceCurve with the sum of the delays and the minimum of the rates.
public static RateLatencyServiceCurve Convolution(IReadOnlyCollection<RateLatencyServiceCurve> curves, ComputationSettings settings)
Parameters
curves
IReadOnlyCollection<RateLatencyServiceCurve>
settings
ComputationSettings