fmdtools 2.0.6__tar.gz → 2.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fmdtools-2.0.6 → fmdtools-2.0.7}/LICENSE +1 -1
- {fmdtools-2.0.6/fmdtools.egg-info → fmdtools-2.0.7}/PKG-INFO +5 -5
- {fmdtools-2.0.6 → fmdtools-2.0.7}/README.md +2 -2
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/asg_demo/demo_model.py +0 -3
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/drone_mdl_dynamic.py +8 -1
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/drone_mdl_hierarchical.py +2 -2
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/drone_mdl_urban.py +6 -6
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/ex_pump.py +3 -3
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/parallelism_methods.py +1 -1
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/test_pump_stochastic.py +16 -16
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/common.py +1 -1
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/model.py +14 -14
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/__init__.py +1 -1
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/common.py +206 -87
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/history.py +39 -14
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/result.py +108 -153
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/tabulate.py +128 -83
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/action.py +11 -6
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/base.py +28 -12
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/component.py +3 -5
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/function.py +20 -8
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/base.py +120 -9
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/block/base.py +31 -15
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/block/function.py +7 -9
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/mode.py +3 -0
- fmdtools-2.0.7/fmdtools/define/container/rand.py +602 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/object/coords.py +188 -30
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/sim/sample.py +99 -92
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/sim/scenario.py +0 -4
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/sim/search.py +8 -18
- {fmdtools-2.0.6 → fmdtools-2.0.7/fmdtools.egg-info}/PKG-INFO +5 -5
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools.egg-info/SOURCES.txt +1 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/pyproject.toml +1 -1
- fmdtools-2.0.7/tests/test_hierarchical.py +78 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/tests/test_packages.py +20 -14
- fmdtools-2.0.6/fmdtools/define/container/rand.py +0 -407
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/asg_demo/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/eps/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/eps/eps.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/eps/test_eps.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multiflow_demo/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multiflow_demo/multiflow_demo.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multiflow_demo/test_multiflow.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/drone_mdl_rural.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/drone_mdl_static.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/opt_drone_rural.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/multirotor/test_multirotor.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/jointfaults_ex.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/pump_indiv.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/pump_stochastic.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/test_pump.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/pump/test_pump_example.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/opt_rover.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/optimization/ea_analysis.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/optimization/search_rover.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/optimization/untitled2.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/rover_degradation.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/rover_mode_space.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/rover_model.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/rover_model_human.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/rover/test_rover.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/tank/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/tank/tank_model.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/tank/tank_optimization_model.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/tank/test_tank.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/ATC.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/asset.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/test_asset.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/examples/taxiway/test_model.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/graph/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/graph/base.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/graph/label.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/graph/model.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/graph/style.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/analyze/phases.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/architecture/geom.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/block/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/block/action.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/block/component.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/base.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/parameter.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/state.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/container/time.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/environment.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/flow/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/flow/base.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/flow/commsflow.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/flow/multiflow.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/object/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/object/base.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/object/geom.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/define/object/timer.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/sim/__init__.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools/sim/propagate.py +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools.egg-info/dependency_links.txt +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools.egg-info/requires.txt +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/fmdtools.egg-info/top_level.txt +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/setup.cfg +0 -0
- {fmdtools-2.0.6 → fmdtools-2.0.7}/tests/test_graph.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: fmdtools
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: System resilience modelling, simulation, and assessment in Python
|
|
5
5
|
Author: fmdtools Developers
|
|
6
6
|
Maintainer-email: Daniel Hulse <daniel.e.hulse@nasa.gov>
|
|
7
|
-
License: fmdtools version 2.0.
|
|
7
|
+
License: fmdtools version 2.0.7
|
|
8
8
|
---------------------------
|
|
9
9
|
Apache License
|
|
10
10
|
Version 2.0, January 2004
|
|
@@ -357,7 +357,7 @@ This may then be installed using:
|
|
|
357
357
|
Note that this version reflects the latest version on the ``main`` git branch along with any local changes. To use a particular version of ``fmdtools`` you can checkout the tag corresponding to the version you want, e.g.:
|
|
358
358
|
|
|
359
359
|
```
|
|
360
|
-
git checkout v2.0.
|
|
360
|
+
git checkout v2.0.7
|
|
361
361
|
```
|
|
362
362
|
|
|
363
363
|
|
|
@@ -495,7 +495,7 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
495
495
|
author = {{NASA}},
|
|
496
496
|
title = {fmdtools},
|
|
497
497
|
url = {https://github.com/nasa/fmdtools},
|
|
498
|
-
version = {2.0.
|
|
498
|
+
version = {2.0.7},
|
|
499
499
|
date = {2024-11-13},
|
|
500
500
|
}
|
|
501
501
|
```
|
|
@@ -97,7 +97,7 @@ This may then be installed using:
|
|
|
97
97
|
Note that this version reflects the latest version on the ``main`` git branch along with any local changes. To use a particular version of ``fmdtools`` you can checkout the tag corresponding to the version you want, e.g.:
|
|
98
98
|
|
|
99
99
|
```
|
|
100
|
-
git checkout v2.0.
|
|
100
|
+
git checkout v2.0.7
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
|
|
@@ -235,7 +235,7 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
235
235
|
author = {{NASA}},
|
|
236
236
|
title = {fmdtools},
|
|
237
237
|
url = {https://github.com/nasa/fmdtools},
|
|
238
|
-
version = {2.0.
|
|
238
|
+
version = {2.0.7},
|
|
239
239
|
date = {2024-11-13},
|
|
240
240
|
}
|
|
241
241
|
```
|
|
@@ -194,9 +194,6 @@ if __name__ == '__main__':
|
|
|
194
194
|
result_fault, mdlhist_fault = prop.one_fault(mdl, 'detect_hazard',
|
|
195
195
|
'act_unable', time=4,
|
|
196
196
|
desired_result='graph')
|
|
197
|
-
result_fault, mdlhist_fault = prop.one_fault(mdl, 'detect_hazard',
|
|
198
|
-
'perceive_failed', time=4,
|
|
199
|
-
desired_result='graph')
|
|
200
197
|
|
|
201
198
|
result_fault.graph.draw()
|
|
202
199
|
ex_fxn = DetectHazard('detect_hazard')
|
|
@@ -522,17 +522,24 @@ def script_env_viewed(**kwargs):
|
|
|
522
522
|
"""Show the viewed properties of the environment in various configurations."""
|
|
523
523
|
mdl = Drone(**kwargs)
|
|
524
524
|
ec, mdlhist = fs.propagate.nominal(mdl)
|
|
525
|
+
l_k = dict(new_labs={'viewed': 'viewed_true', 'target': 'target_true'})
|
|
525
526
|
mdl.flows['environment'].c.assign_from(mdlhist.flows.environment.c, 10)
|
|
526
527
|
mdl.flows['environment'].c.show({'viewed': {}})
|
|
527
528
|
|
|
528
529
|
mdl.flows['environment'].c.show({'viewed': {}, 'target': {}})
|
|
529
530
|
mdl.flows['environment'].c.show({'target': {},
|
|
530
531
|
'viewed': {'alpha': 0.5}},
|
|
532
|
+
legend_kwargs=l_k,
|
|
531
533
|
collections={'start': {}, 'safe': {}})
|
|
532
534
|
|
|
533
535
|
mdl.flows['environment'].c.show_from(10, mdlhist.flows.environment.c,
|
|
534
|
-
{'viewed': {}}, title='hi'
|
|
536
|
+
{'viewed': {}}, title='hi',
|
|
537
|
+
legend_kwargs=l_k)
|
|
535
538
|
properties={'target': {'alpha': 0.6}, 'viewed': {'alpha': 0.5}}
|
|
539
|
+
mdl.flows['environment'].c.show_over_time([0, 10, 15],
|
|
540
|
+
history=mdlhist.flows.environment.c,
|
|
541
|
+
properties=properties, title='hi')
|
|
542
|
+
|
|
536
543
|
ani = mdl.flows['environment'].c.animate(mdlhist.flows.environment.c,
|
|
537
544
|
properties=properties,
|
|
538
545
|
collections={'start': {}, 'safe': {}})
|
|
@@ -169,8 +169,8 @@ class AffectDOF(AffectDOFDynamic):
|
|
|
169
169
|
"""Corrects for individual line faultmodes by turning off the opposite rotor
|
|
170
170
|
and upping the throttle (amp_factor)"""
|
|
171
171
|
for fault in self.m.faults:
|
|
172
|
-
if fault in self.ca.
|
|
173
|
-
comp = self.ca.
|
|
172
|
+
if fault in self.ca.m.sub_modes:
|
|
173
|
+
comp = self.ca.m.sub_modes[fault]
|
|
174
174
|
opp = self.ca.p.opposite[comp]
|
|
175
175
|
if self.ca.s.forward[comp] != 0.0:
|
|
176
176
|
self.ca.s.forward[comp] = 0.0
|
|
@@ -535,13 +535,13 @@ if __name__ == "__main__":
|
|
|
535
535
|
plot_env_with_traj_z(hists, mdl)
|
|
536
536
|
plot_env_with_traj(hists, mdl)
|
|
537
537
|
statsfmea = an.tabulate.FMEA(endresults, app, group_by=('function', 'fault'),
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
'
|
|
541
|
-
|
|
542
|
-
statsfmea.sort_by_metric("
|
|
538
|
+
average_metric=['rate', 'unsafe_flight_time', 'cost',
|
|
539
|
+
'repcost', 'landcost', 'body_strikes',
|
|
540
|
+
'head_strikes', 'property_restrictions'],
|
|
541
|
+
rates='rate')
|
|
542
|
+
statsfmea.sort_by_metric("average_cost")
|
|
543
543
|
statsfmea.as_table()
|
|
544
|
-
statsfmea.as_plots("
|
|
544
|
+
statsfmea.as_plots("average_repcost", "average_unsafe_flight_time", "average_cost", "average_rate",
|
|
545
545
|
color_factor="function", suppress_ticklabels=True,
|
|
546
546
|
legend_loc=2)
|
|
547
547
|
|
|
@@ -644,7 +644,7 @@ def script_sample_faults(track='all', **kwargs):
|
|
|
644
644
|
|
|
645
645
|
|
|
646
646
|
|
|
647
|
-
c = an.tabulate.Comparison(endclasses, faultapp, default_stat=np.
|
|
647
|
+
c = an.tabulate.Comparison(endclasses, faultapp, default_stat=np.average,
|
|
648
648
|
metrics=['cost', 'rate', 'expected_cost'],
|
|
649
649
|
ci_metrics=['cost'])
|
|
650
650
|
c.as_table()
|
|
@@ -654,8 +654,8 @@ def script_sample_faults(track='all', **kwargs):
|
|
|
654
654
|
|
|
655
655
|
fmea = an.tabulate.FMEA(endclasses, faultapp)
|
|
656
656
|
fmea.as_table()
|
|
657
|
-
fmea.sort_by_metric("
|
|
658
|
-
fmea.as_plot("
|
|
657
|
+
fmea.sort_by_metric("expected_cost")
|
|
658
|
+
fmea.as_plot("expected_cost", color_factor="function")
|
|
659
659
|
|
|
660
660
|
# test cases for multiplot legend/axis sharing
|
|
661
661
|
mdlhists.plot_line("flows.ee_1.s.current", "flows.sig_1.s.power",
|
|
@@ -146,7 +146,7 @@ def parallel_mc3():
|
|
|
146
146
|
pool = mp.Pool(4)
|
|
147
147
|
mdl = Pump()
|
|
148
148
|
inputlist = [(fxn, fm) for fxn in mdl.fxns
|
|
149
|
-
for fm in mdl.fxns[fxn].faultmodes.keys()]
|
|
149
|
+
for fm in mdl.fxns[fxn].m.faultmodes.keys()]
|
|
150
150
|
resultslist = pool.map(one_fault_helper, inputlist)
|
|
151
151
|
close_pool(pool)
|
|
152
152
|
return resultslist
|
|
@@ -44,20 +44,20 @@ class StochasticPumpTests(unittest.TestCase, CommonTests):
|
|
|
44
44
|
def test_stochastic_pdf(self):
|
|
45
45
|
"""Tests that (1) track_pdf option runs and (2) gives repeated
|
|
46
46
|
probability density results under the same seed(s)"""
|
|
47
|
-
testvals = [
|
|
48
|
-
|
|
49
|
-
0.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
testvals = [35.23570453993965,
|
|
48
|
+
49.32124529702974,
|
|
49
|
+
0.31327201999190035,
|
|
50
|
+
21.386958080811567,
|
|
51
|
+
1.1103965455215503,
|
|
52
|
+
9.066120598345039,
|
|
53
|
+
131.79987407014573,
|
|
54
|
+
5.81402243889764,
|
|
55
|
+
19.01081621541118]
|
|
56
|
+
mdl = Pump(r={'run_stochastic': 'track_pdf'})
|
|
56
57
|
for i in range(1, 10):
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
pd =
|
|
60
|
-
# print(pd)
|
|
58
|
+
mdl.update_seed(i)
|
|
59
|
+
mdl.propagate(i, run_stochastic='track_pdf')
|
|
60
|
+
pd = mdl.return_probdens()
|
|
61
61
|
self.assertAlmostEqual(pd, testvals[i-1])
|
|
62
62
|
|
|
63
63
|
def test_run_safety(self):
|
|
@@ -282,7 +282,7 @@ class StochasticPumpTests(unittest.TestCase, CommonTests):
|
|
|
282
282
|
|
|
283
283
|
if __name__ == '__main__':
|
|
284
284
|
# suite = unittest.TestSuite()
|
|
285
|
-
# suite.addTest(StochasticPumpTests("
|
|
285
|
+
# suite.addTest(StochasticPumpTests("test_stochastic_pdf"))
|
|
286
286
|
|
|
287
287
|
# suite.addTest(StochasticPumpTests("test_save_load_nominalapproach"))
|
|
288
288
|
# suite.addTest(StochasticPumpTests("test_save_load_nominalapproach_indiv"))
|
|
@@ -292,6 +292,6 @@ if __name__ == '__main__':
|
|
|
292
292
|
# runner = unittest.TextTestRunner()
|
|
293
293
|
# runner.run(suite_for_plots(StochasticPumpTests))
|
|
294
294
|
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
runner = unittest.TextTestRunner()
|
|
296
|
+
runner.run(suite_for_plots(StochasticPumpTests, True))
|
|
297
297
|
unittest.main()
|
|
@@ -823,7 +823,7 @@ def plot_tstep(mdl, mdlhist, t, fxnattr="", locattr="", markersize=10,
|
|
|
823
823
|
if fxnattr:
|
|
824
824
|
try:
|
|
825
825
|
atthist = mdlhist.fxns.get(f + "." + fxnattr)
|
|
826
|
-
except AttributeError:
|
|
826
|
+
except Exception or AttributeError:
|
|
827
827
|
atthist = None
|
|
828
828
|
if (not atthist is None) and len(atthist) > 0:
|
|
829
829
|
if fxnattr == "s.visioncov" and atthist[t]:
|
|
@@ -83,19 +83,19 @@ class taxiway_model(FunctionArchitecture):
|
|
|
83
83
|
|
|
84
84
|
def create_fault_scen_metrics(mdlhist):
|
|
85
85
|
nomhist = History({'incorrect_fields':
|
|
86
|
-
mdlhist.nominal.get_metric("i.incorrect",
|
|
86
|
+
mdlhist.nominal.get_metric("i.incorrect", method=np.sum, axis=0),
|
|
87
87
|
'assets_without_sight':
|
|
88
|
-
mdlhist.nominal.get_metric("i.nosight",
|
|
88
|
+
mdlhist.nominal.get_metric("i.nosight", method=np.sum, axis=0),
|
|
89
89
|
"unsafe_distances":
|
|
90
|
-
mdlhist.nominal.get_metric("i.unsafe",
|
|
90
|
+
mdlhist.nominal.get_metric("i.unsafe", method=np.sum, axis=0),
|
|
91
91
|
"overbooked_locations":
|
|
92
|
-
mdlhist.nominal.get_metric("i.overbooked",
|
|
92
|
+
mdlhist.nominal.get_metric("i.overbooked", method=np.sum, axis=0),
|
|
93
93
|
"incorrect_perception":
|
|
94
|
-
mdlhist.nominal.get_metric("i.incorrect_perception",
|
|
94
|
+
mdlhist.nominal.get_metric("i.incorrect_perception", method=np.sum, axis=0),
|
|
95
95
|
"duplicate_land_commands":
|
|
96
|
-
mdlhist.nominal.get_metric("i.duplicate_land",
|
|
96
|
+
mdlhist.nominal.get_metric("i.duplicate_land", method=np.sum, axis=0),
|
|
97
97
|
"cycled_assets":
|
|
98
|
-
mdlhist.nominal.get_metric('cycled',
|
|
98
|
+
mdlhist.nominal.get_metric('cycled', methodc=np.sum, axis=0),
|
|
99
99
|
"degraded_fields":
|
|
100
100
|
0*mdlhist.nominal.time,
|
|
101
101
|
"faulty_functions":
|
|
@@ -103,19 +103,19 @@ def create_fault_scen_metrics(mdlhist):
|
|
|
103
103
|
"time": mdlhist.nominal.time})
|
|
104
104
|
|
|
105
105
|
faulthist = History({"incorrect_fields":
|
|
106
|
-
mdlhist.faulty.get_metric("i.incorrect",
|
|
106
|
+
mdlhist.faulty.get_metric("i.incorrect", method=np.sum, axis=0),
|
|
107
107
|
'assets_without_sight':
|
|
108
|
-
mdlhist.faulty.get_metric("i.nosight",
|
|
108
|
+
mdlhist.faulty.get_metric("i.nosight", method=np.sum, axis=0),
|
|
109
109
|
"unsafe_distances":
|
|
110
|
-
mdlhist.faulty.get_metric("i.unsafe",
|
|
110
|
+
mdlhist.faulty.get_metric("i.unsafe", method=np.sum, axis=0),
|
|
111
111
|
"overbooked_locations":
|
|
112
|
-
mdlhist.faulty.get_metric("i.overbooked",
|
|
112
|
+
mdlhist.faulty.get_metric("i.overbooked", method=np.sum, axis=0),
|
|
113
113
|
"incorrect_perception":
|
|
114
|
-
mdlhist.faulty.get_metric("i.incorrect_perception",
|
|
114
|
+
mdlhist.faulty.get_metric("i.incorrect_perception", method=np.sum, axis=0),
|
|
115
115
|
"duplicate_land_commands":
|
|
116
|
-
mdlhist.faulty.get_metric("i.duplicate_land",
|
|
116
|
+
mdlhist.faulty.get_metric("i.duplicate_land", method=np.sum, axis=0),
|
|
117
117
|
"cycled_assets":
|
|
118
|
-
mdlhist.faulty.get_metric('cycled',
|
|
118
|
+
mdlhist.faulty.get_metric('cycled', method=np.sum, axis=0),
|
|
119
119
|
"degraded_fields":
|
|
120
120
|
100*mdlhist.get_degraded_hist(*mdlhist.nominal.flows.keys())['total']/len(mdlhist.nominal.flows.keys()),
|
|
121
121
|
"faulty_functions":
|