-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathreliability.sysml
More file actions
65 lines (56 loc) · 2.39 KB
/
Copy pathreliability.sysml
File metadata and controls
65 lines (56 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Mission reliability R = e^(-λt) rolled up over critical components, with a
// requirement on the result. Two spellings of e^x; both resolve, one evaluates.
package Reliability {
private import ISQ::*;
private import SI::*;
private import ScalarValues::*;
private import OpenSysMLMathFunctions::exp;
private import RealFunctions::product;
private import ControlFunctions::collect;
abstract part def Component {
attribute failureRate :> ISQ::frequency;
}
part def GuidanceComputer :> Component { attribute :>> failureRate = 8.0E-9 [Hz]; }
part def FuelCell :> Component { attribute :>> failureRate = 4.0E-9 [Hz]; }
part def RadioTransponder :> Component { attribute :>> failureRate = 2.0E-9 [Hz]; }
// λ in Hz times t in s is a pure number, which is what exp takes.
calc def SurvivalProbability {
in failureRate :> ISQ::frequency;
in missionTime :> ISQ::time;
return : Real = exp(-(failureRate * missionTime));
}
part def Spacecraft {
part guidance : GuidanceComputer;
part power : FuelCell;
part comms : RadioTransponder;
part critical : Component[*] = (guidance, power, comms);
attribute missionTime :> ISQ::time;
attribute reliability : Real = product(critical.failureRate->collect {
in rate :> ISQ::frequency;
SurvivalProbability(rate, missionTime)
});
}
part apollo : Spacecraft {
attribute :>> missionTime = 195 [h];
}
requirement def CrewSafetyReliability {
doc /* Every critical component survives the mission with high probability. */
subject craft : Spacecraft;
attribute threshold : Real default = 0.99;
require constraint { craft.reliability >= threshold }
}
// Eighty-four days aloft with the same hardware.
part longStay : Spacecraft {
attribute :>> missionTime = 84 [d];
}
requirement crewSafety : CrewSafetyReliability;
assert satisfy crewSafety by apollo;
assert satisfy crewSafety by longStay;
// The same formula as a power of `eulerNumber`, which ISQ::* resolves to
// the ISO 80000-11 flow characteristic, a quantity with no value, not e.
calc def SurvivalProbabilityFromConstant {
in failureRate :> ISQ::frequency;
in missionTime :> ISQ::time;
return : Real = eulerNumber^(-(failureRate * missionTime));
}
}