A boolean profile; a function from time to truth values.

Hierarchy

  • Windows

Methods

  • Counts the cumulative amount of time spent in an active Window, as a multiple of some unit of time.

    The output profile always starts at 0 at the simulation start time. Initial conditions from before the simulation start time are not considered, even in the case of temporal-subset plan branches with later start times.

    Parameters

    • unit: Duration

      unit of time to count. Does not need to be a round unit (i.e. can be 1.5 minutes, if you want).

    Returns Real

  • Performs the boolean And operation on this and any number of additional Windows.

    Parameters

    Returns Windows

  • Replaces all gaps in this profile with default segments taken from the argument

    Parameters

    • defaultProfile: boolean | Windows

      boolean or windows to take default values from.

    Returns Windows

  • Replaces each true segment with its end point.

    Since gaps represent "unknown", true segments that come before a gap don't have a known end point. So instead their last known point is unset and the rest is set to false.

    True segments that explicitly come directly before false and include their end point have all except their end point set to false. If they don't include the end point, then the whole interval is set to false and the end point is set true.

    Returns Windows

  • Only check this expression when the condition argument is true; otherwise the result is vacuously true.

    Parameters

    Returns Windows

  • Selects the ith true window and falsifies the other true segments.

    Parameters

    • i: number

      the index of the true segment in the sequence of windows. index(0) will point to the first element, index(-1) to the last element.

    Returns Windows

  • Returns a new windows object, with all true segments shorter than or equal to the given duration set to false.

    Parameters

    • duration: Duration

      the duration

    Returns Windows

  • Performs the boolean Not operation on this windows object.

    Returns Windows

  • Performs the boolean Or operation on this and any number of additional Windows.

    Parameters

    Returns Windows

  • Shifts the start and end of all true segments by a duration.

    The second argument is optional: if omitted, shiftBy(dur) shifts all segments uniformly by dur, which is equivalent to shiftBy(dur, dur).

    Shifts the start and end of all false segment by the reversed directions (i.e. the start of each false segment is shifted by fromEnd).

    Parameters

    • fromStart: Duration

      duration to add from the start of each true segment

    • Optional fromEnd: Duration

      duration to add from the end of each true segment. Default is equal to fromStart if omitted.

    Returns Windows

  • Returns a new windows object, with all true segments longer than or equal to the given duration set to false.

    Parameters

    • duration: Duration

      the duration

    Returns Windows

  • Convert this into a set of Spans.

    Throws

    InvalidGapsException if this contains any gaps.

    Returns Spans

  • Splits each true segment into equal sized sub-intervals. Returns a Spans object.

    For .split(N), N sub-windows will be created by removing N-1 points in the middle.

    Throws

    UnsplittableSpanException during backend evaluation if the duration of a window is fewer microseconds than N.

    Throws

    UnsplittableSpanException if any window is unbounded (i.e. contains MIN_VALUE or MAX_VALUE)

    Throws

    InvalidGapsException if this contains any gaps.

    Parameters

    • numberOfSubSpans: number

      how many sub-windows to split each window into

    • internalStartInclusivity: Inclusivity = Inclusivity.Inclusive

      Inclusivity for any newly generated span start points (default Inclusive).

    • internalEndInclusivity: Inclusivity = Inclusivity.Exclusive

      Inclusivity for any newly generated span end points (default Exclusive).

    Returns Spans

  • Replaces each true segment with its start point.

    Since gaps represent "unknown", true segments that come after a gap don't have a known start point. So instead their first known point is unset and the rest is set to false.

    True segments that explicitly come directly after false and include their start point have all except their start point set to false. If they don't include the start point, then the whole interval is set to false and the start point is set true.

    Returns Windows

  • Produces a constraint violation whenever this is false.

    Essentially, express the condition you want to be satisfied, then use this method to produce a violation whenever it is NOT satisfied.

    Returns Constraint

  • Performs the boolean And operation on any number of Windows.

    Parameters

    • Rest ...windows: Windows[]

      any number of windows expressions

    Returns Windows

  • Produces windows for each activity present in the plan and belonging to one of the activity types passed

    Parameters

    • Rest ...activityTypes: activity[]

      the activity types

    Returns Windows

  • Performs the boolean Or operation on any number of Windows.

    Parameters

    • Rest ...windows: Windows[]

      any number of windows expressions

    Returns Windows

  • Produces a single window.

    Parameters

    • value: boolean

      value of the window segment.

    • Optional interval: Interval

      interval of the window segment.

    Returns Windows

Generated using TypeDoc