Copyright | Predictable Network Solutions Ltd. 2003-2024 |
---|---|
License | BSD-3-Clause |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
DeltaQ.Methods
Contents
Description
This module collects common methods
for constructing DeltaQ
and analyzing them.
Synopsis
- meetsRequirement :: DeltaQ o => o -> (Duration o, Probability o) -> SlackOrHazard o
- data SlackOrHazard o
- = Slack (Duration o) (Probability o)
- | Hazard (Eventually (Duration o)) (Probability o)
- isSlack :: SlackOrHazard o -> Bool
- isHazard :: SlackOrHazard o -> Bool
Slack / Hazard
meetsRequirement :: DeltaQ o => o -> (Duration o, Probability o) -> SlackOrHazard o Source #
Compute "slack or hazard" with respect to a given reference point.
data SlackOrHazard o Source #
The "slack or hazard" represents the distance between
a reference point in (time, probability) space
and a given DeltaQ
.
Slack
represents the case where theDeltaQ
meets the performance requirements set by the reference point.Hazard
represents the case where theDeltaQ
fails to meet the performance requirements set by the reference point.
Both cases include information of how far the reference point is away.
Constructors
Slack (Duration o) (Probability o) | We have some slack.
Specifically, we have |
Hazard (Eventually (Duration o)) (Probability o) | We fail to meet the reference point.
Specifically,
we overshoot by |
Instances
(Show (Duration o), Show (Probability o)) => Show (SlackOrHazard o) Source # | |
Defined in DeltaQ.Methods Methods showsPrec :: Int -> SlackOrHazard o -> ShowS # show :: SlackOrHazard o -> String # showList :: [SlackOrHazard o] -> ShowS # | |
(Eq (Duration o), Eq (Probability o)) => Eq (SlackOrHazard o) Source # | |
Defined in DeltaQ.Methods Methods (==) :: SlackOrHazard o -> SlackOrHazard o -> Bool # (/=) :: SlackOrHazard o -> SlackOrHazard o -> Bool # |
isSlack :: SlackOrHazard o -> Bool Source #
Test whether the given SlackOrHazard
is Slack
.
isHazard :: SlackOrHazard o -> Bool Source #
Test whether the given SlackOrHazard
is Hazard
.