-
Notifications
You must be signed in to change notification settings - Fork 298
/
isExperiment.mos
57 lines (48 loc) · 1.06 KB
/
isExperiment.mos
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
// name: isExperiment
// keywords:
// status: correct
// cflags: -d=-newInst
//
loadString("
package P
model NotExperiment
end NotExperiment;
model Experiment1
annotation(experiment(StopTime = 1.0));
end Experiment1;
model Experiment2
annotation(experiment(StartTime = 1.0, StopTime = 4.0));
end Experiment2;
block Experiment3
annotation(experiment(StopTime = 3.0));
end Experiment3;
model MissingStopTime
annotation(experiment(StartTime = 1.0));
end MissingStopTime;
partial model PartialModel
annotation(experiment(StopTime = 2.0));
end PartialModel;
package NotModelOrBlock
annotation(experiment(StopTime = 1.0));
end NotModelOrBlock;
end P;
");
isExperiment(P);
isExperiment(P.NotExperiment);
isExperiment(P.Experiment1);
isExperiment(P.Experiment2);
isExperiment(P.Experiment3);
isExperiment(P.MissingStopTime);
isExperiment(P.PartialModel);
isExperiment(P.NotModelOrBlock);
// Result:
// true
// false
// false
// true
// true
// true
// false
// false
// false
// endResult