Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LimitContext

A wrapper around a Limit object with additional functions to determines status and limit usage.

Hierarchy

  • LimitContext

Index

Constructors

Private constructor

  • Parameters

    • nominalValue: number | undefined
    • limit: Limit
    • lowerValueIsNatural: boolean
    • upperValueIsNatural: boolean
    • limitReference: LimitUsageReference

    Returns LimitContext

Properties

lowerValueIsNatural

lowerValueIsNatural: boolean

Determines whether the lower boundary of a limit is natural.

nominalValue

nominalValue: number | undefined

The nominal value, usually determined by attribute K2110.

upperValueIsNatural

upperValueIsNatural: boolean

Determines whether the upper boundary of a limit is natural.

Accessors

lowerValue

  • get lowerValue(): number
  • Gets the lower limit.

    Returns number

upperValue

  • get upperValue(): number
  • Gets the upper limit.

    Returns number

Methods

contains

  • contains(value: MeasurementValue | number | undefined, precision?: number): boolean
  • Returns true if the interval contains the specified value.

    Parameters

    • value: MeasurementValue | number | undefined

      The value to be checked.

    • Default value precision: number = 0.000001

      The epsilon for floating point comparison, e.g. 0.00001.

    Returns boolean

getlimitUsage

  • getlimitUsage(value: MeasurementValue | number, precision?: number): number | undefined
  • Calculates the normalized limit usage for a given limit.

    Parameters

    • value: MeasurementValue | number

      The value to be checked.

    • Default value precision: number = 0.000001

      The epsilon for floating point comparison, e.g. 0.00001.

    Returns number | undefined

toDisplayString

  • toDisplayString(): string
  • Returns a string in the format [lower; upper].

    Returns string

Generated using TypeDoc