fmdtools 2.3.1__tar.gz → 2.3.3__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.3.1 → fmdtools-2.3.3}/LICENSE +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3}/PKG-INFO +26 -15
- {fmdtools-2.3.1 → fmdtools-2.3.3}/README.md +22 -12
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/__init__.py +2 -1
- fmdtools-2.3.1/examples/taxiway/asset.py → fmdtools-2.3.3/examples/airport_taxiway/model_asset.py +2 -1
- fmdtools-2.3.1/examples/taxiway/ATC.py → fmdtools-2.3.3/examples/airport_taxiway/model_atc.py +2 -1
- fmdtools-2.3.1/examples/taxiway/common.py → fmdtools-2.3.3/examples/airport_taxiway/model_common.py +33 -26
- fmdtools-2.3.1/examples/taxiway/model.py → fmdtools-2.3.3/examples/airport_taxiway/model_main.py +36 -23
- {fmdtools-2.3.1/examples/taxiway → fmdtools-2.3.3/examples/airport_taxiway}/test_asset.py +38 -48
- {fmdtools-2.3.1/examples/taxiway → fmdtools-2.3.3/examples/airport_taxiway}/test_model.py +3 -3
- fmdtools-2.3.3/examples/airspacelib/__init__.py +22 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/__init__.py +4 -4
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/aircraft.py +2 -2
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/aircraftarchitecture.py +7 -7
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/__init__.py +6 -6
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/aviate.py +3 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/controlflight.py +2 -2
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/flows.py +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/holdpayload.py +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/perceiveenvironment.py +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/arch/storeee.py +1 -1
- {fmdtools-2.3.1/examples/airspacelib/contingencymanagement → fmdtools-2.3.3/examples/airspacelib/contingency_management}/__init__.py +4 -4
- fmdtools-2.3.1/examples/airspacelib/contingencymanagement/aircraft.py → fmdtools-2.3.3/examples/airspacelib/contingency_management/model_aircraft.py +33 -15
- fmdtools-2.3.1/examples/airspacelib/contingencymanagement/environment.py → fmdtools-2.3.3/examples/airspacelib/contingency_management/model_environment.py +5 -5
- fmdtools-2.3.1/examples/airspacelib/contingencymanagement/flightplanner.py → fmdtools-2.3.3/examples/airspacelib/contingency_management/model_flightplanner.py +18 -5
- {fmdtools-2.3.1/examples/airspacelib/wildfireresponse → fmdtools-2.3.3/examples/airspacelib/wildfire_response}/__init__.py +4 -4
- fmdtools-2.3.1/examples/airspacelib/wildfireresponse/aircraft.py → fmdtools-2.3.3/examples/airspacelib/wildfire_response/model_aircraft.py +3 -3
- fmdtools-2.3.1/examples/airspacelib/wildfireresponse/wildfiresim.py → fmdtools-2.3.3/examples/airspacelib/wildfire_response/model_main.py +3 -3
- fmdtools-2.3.3/examples/cooling_tank/__init__.py +22 -0
- fmdtools-2.3.1/examples/tank/tank_model.py → fmdtools-2.3.3/examples/cooling_tank/model_main.py +1 -1
- fmdtools-2.3.1/examples/tank/tank_optimization_model.py → fmdtools-2.3.3/examples/cooling_tank/model_optimization.py +2 -2
- {fmdtools-2.3.1/examples/tank → fmdtools-2.3.3/examples/cooling_tank}/test_tank.py +2 -2
- fmdtools-2.3.1/examples/eps/test_eps.py → fmdtools-2.3.3/examples/electric_power_system/test_model.py +2 -2
- fmdtools-2.3.1/examples/multirotor/drone_mdl_dynamic.py → fmdtools-2.3.3/examples/multirotor_drone/model_dynamic.py +6 -6
- fmdtools-2.3.1/examples/multirotor/drone_mdl_hierarchical.py → fmdtools-2.3.3/examples/multirotor_drone/model_hierarchical.py +8 -11
- fmdtools-2.3.1/examples/multirotor/drone_mdl_rural.py → fmdtools-2.3.3/examples/multirotor_drone/model_rural.py +9 -9
- fmdtools-2.3.1/examples/multirotor/drone_mdl_static.py → fmdtools-2.3.3/examples/multirotor_drone/model_static.py +25 -0
- fmdtools-2.3.1/examples/multirotor/drone_mdl_urban.py → fmdtools-2.3.3/examples/multirotor_drone/model_urban.py +20 -15
- fmdtools-2.3.1/examples/multirotor/opt_drone_rural.py → fmdtools-2.3.3/examples/multirotor_drone/script_opt_model_rural.py +4 -4
- {fmdtools-2.3.1/examples/multirotor → fmdtools-2.3.3/examples/multirotor_drone}/test_multirotor.py +1 -1
- fmdtools-2.3.1/examples/rover/rover_degradation.py → fmdtools-2.3.3/examples/navigating_rover/model_degradation.py +1 -1
- fmdtools-2.3.1/examples/rover/rover_model_human.py → fmdtools-2.3.3/examples/navigating_rover/model_human.py +8 -8
- fmdtools-2.3.1/examples/rover/rover_model.py → fmdtools-2.3.3/examples/navigating_rover/model_main.py +29 -5
- fmdtools-2.3.3/examples/navigating_rover/model_troupe.py +1339 -0
- fmdtools-2.3.1/examples/rover/optimization/ea_analysis.py → fmdtools-2.3.3/examples/navigating_rover/script_ea_analysis.py +3 -3
- fmdtools-2.3.1/examples/rover/rover_mode_space.py → fmdtools-2.3.3/examples/navigating_rover/script_mode_space.py +1 -1
- fmdtools-2.3.1/examples/rover/optimization/search_rover.py → fmdtools-2.3.3/examples/navigating_rover/script_search_rover.py +8 -8
- {fmdtools-2.3.1/examples/rover → fmdtools-2.3.3/examples/navigating_rover}/test_rover.py +2 -2
- {fmdtools-2.3.1/examples/airspacelib → fmdtools-2.3.3/examples/state_communication}/__init__.py +4 -5
- {fmdtools-2.3.1/examples/multiflow_demo → fmdtools-2.3.3/examples/state_communication}/test_multiflow.py +1 -1
- fmdtools-2.3.3/examples/water_pump/__init__.py +12 -0
- fmdtools-2.3.1/examples/pump/pump_indiv.py → fmdtools-2.3.3/examples/water_pump/model_indiv.py +1 -1
- fmdtools-2.3.1/examples/pump/pump_stochastic.py → fmdtools-2.3.3/examples/water_pump/model_stochastic.py +7 -7
- fmdtools-2.3.1/examples/pump/jointfaults_ex.py → fmdtools-2.3.3/examples/water_pump/script_jointfaults.py +1 -1
- fmdtools-2.3.1/examples/pump/parallelism_methods.py → fmdtools-2.3.3/examples/water_pump/script_parallelism.py +1 -1
- {fmdtools-2.3.1/examples/pump → fmdtools-2.3.3/examples/water_pump}/test_pump.py +3 -3
- {fmdtools-2.3.1/examples/pump → fmdtools-2.3.3/examples/water_pump}/test_pump_example.py +1 -1
- {fmdtools-2.3.1/examples/pump → fmdtools-2.3.3/examples/water_pump}/test_pump_stochastic.py +3 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3}/fmdtools.egg-info/PKG-INFO +26 -15
- fmdtools-2.3.3/fmdtools.egg-info/SOURCES.txt +126 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/fmdtools.egg-info/requires.txt +2 -1
- fmdtools-2.3.3/fmdtools.egg-info/top_level.txt +3 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/pyproject.toml +12 -8
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/__init__.py +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/common.py +9 -2
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/graph/base.py +5 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/graph/model.py +1 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/history.py +15 -5
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/base.py +3 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/block/base.py +2 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/mode.py +10 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/flow/commsflow.py +3 -2
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/flow/multiflow.py +4 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/sim/propagate.py +2 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/sim/sample.py +8 -8
- {fmdtools-2.3.1 → fmdtools-2.3.3}/tests/__init__.py +3 -1
- {fmdtools-2.3.1 → fmdtools-2.3.3}/tests/test_graph.py +7 -2
- {fmdtools-2.3.1 → fmdtools-2.3.3}/tests/test_packages.py +1 -1
- fmdtools-2.3.1/examples/multiflow_demo/__init__.py +0 -6
- fmdtools-2.3.1/examples/pump/__init__.py +0 -6
- fmdtools-2.3.1/examples/tank/__init__.py +0 -16
- fmdtools-2.3.1/fmdtools.egg-info/SOURCES.txt +0 -125
- fmdtools-2.3.1/fmdtools.egg-info/top_level.txt +0 -3
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/parameter.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/examples/airspacelib/base/state.py +0 -0
- /fmdtools-2.3.1/examples/airspacelib/wildfireresponse/environment.py → /fmdtools-2.3.3/examples/airspacelib/wildfire_response/model_environment.py +0 -0
- {fmdtools-2.3.1/examples/eps → fmdtools-2.3.3/examples/electric_power_system}/__init__.py +0 -0
- /fmdtools-2.3.1/examples/eps/eps.py → /fmdtools-2.3.3/examples/electric_power_system/model_main.py +0 -0
- {fmdtools-2.3.1/examples/asg_demo → fmdtools-2.3.3/examples/human_hazard_mitigation}/__init__.py +0 -0
- /fmdtools-2.3.1/examples/asg_demo/demo_model.py → /fmdtools-2.3.3/examples/human_hazard_mitigation/model_main.py +0 -0
- {fmdtools-2.3.1/examples/multirotor → fmdtools-2.3.3/examples/multirotor_drone}/__init__.py +0 -0
- {fmdtools-2.3.1/examples/rover → fmdtools-2.3.3/examples/navigating_rover}/__init__.py +0 -0
- /fmdtools-2.3.1/examples/multiflow_demo/multiflow_demo.py → /fmdtools-2.3.3/examples/state_communication/model_main.py +0 -0
- /fmdtools-2.3.1/examples/pump/ex_pump.py → /fmdtools-2.3.3/examples/water_pump/model_main.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/fmdtools.egg-info/dependency_links.txt +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/setup.cfg +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/graph/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/graph/label.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/graph/style.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/phases.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/result.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/analyze/tabulate.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/action.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/component.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/function.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/architecture/geom.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/base.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/block/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/block/action.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/block/component.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/block/function.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/base.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/parameter.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/rand.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/state.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/container/time.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/environment.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/flow/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/flow/base.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/object/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/object/base.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/object/coords.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/object/geom.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/define/object/timer.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/sim/__init__.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/sim/scenario.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3/src}/fmdtools/sim/search.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/tests/common.py +0 -0
- {fmdtools-2.3.1 → fmdtools-2.3.3}/tests/test_hierarchical.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmdtools
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
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.3.
|
|
7
|
+
License: fmdtools version 2.3.3
|
|
8
8
|
---------------------------
|
|
9
9
|
Apache License
|
|
10
10
|
Version 2.0, January 2004
|
|
@@ -250,7 +250,7 @@ Requires-Dist: tqdm
|
|
|
250
250
|
Requires-Dist: networkx
|
|
251
251
|
Requires-Dist: numpy>=2.0
|
|
252
252
|
Requires-Dist: matplotlib>=3.7.0
|
|
253
|
-
Requires-Dist: pandas[all]
|
|
253
|
+
Requires-Dist: pandas[all]>=2.2.0
|
|
254
254
|
Requires-Dist: ordered-set
|
|
255
255
|
Requires-Dist: dill
|
|
256
256
|
Requires-Dist: recordclass==0.24
|
|
@@ -264,6 +264,7 @@ Requires-Dist: scikit-learn; extra == "examples"
|
|
|
264
264
|
Requires-Dist: multiprocess; extra == "examples"
|
|
265
265
|
Requires-Dist: pathos; extra == "examples"
|
|
266
266
|
Requires-Dist: adjustText; extra == "examples"
|
|
267
|
+
Requires-Dist: jinja2; extra == "examples"
|
|
267
268
|
Provides-Extra: all
|
|
268
269
|
Requires-Dist: fmdtools[examples]; extra == "all"
|
|
269
270
|
Dynamic: license-file
|
|
@@ -279,8 +280,8 @@ Dynamic: license-file
|
|
|
279
280
|
[](https://github.com/nasa/fmdtools/releases)
|
|
280
281
|
[](https://github.com/nasa/fmdtools/tags)
|
|
281
282
|
[](https://www.codefactor.io/repository/github/nasa/fmdtools)
|
|
282
|
-
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/full-py313/junit/report.html)
|
|
283
|
-
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/full-py313/coverage_html/index.html)
|
|
283
|
+
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/full-py313/junit/report.html)
|
|
284
|
+
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/full-py313/coverage_html/index.html)
|
|
284
285
|
[](https://github.com/nasa/fmdtools/blob/main/LICENSE)
|
|
285
286
|
[](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixD)
|
|
286
287
|
|
|
@@ -288,6 +289,16 @@ Dynamic: license-file
|
|
|
288
289
|
|
|
289
290
|
[Click here to view the the full documentation website.](https://nasa.github.io/fmdtools)
|
|
290
291
|
|
|
292
|
+
### Demo Portfolio
|
|
293
|
+
|
|
294
|
+
See: [Examples](https://nasa.github.io/fmdtools/examples/Examples.html)
|
|
295
|
+
|
|
296
|
+
<img src="https://nasa.github.io/fmdtools/_images/tutorial_fmdtools_basics.webp" width="15%"></img>
|
|
297
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_proxthreat.webp" width="15%"></img>
|
|
298
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_wildfire.webp" width="15%"></img>
|
|
299
|
+
<img src="https://nasa.github.io/fmdtools/_images/paper_jcise_dsa.webp" width="15%"></img>
|
|
300
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_urban_flight.webp" width="15%"></img>
|
|
301
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_degradation.webp" width="15%"></img>
|
|
291
302
|
|
|
292
303
|
## About
|
|
293
304
|
|
|
@@ -319,11 +330,11 @@ The fmdtools library is developed in Python 3.13 but is tested to maintain compa
|
|
|
319
330
|
|
|
320
331
|
| Python Version | Doctests |
|
|
321
332
|
| -------- | ------- |
|
|
322
|
-
| 3.11 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py311/junit/report.html) |
|
|
323
|
-
| 3.12 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py312/junit/report.html) |
|
|
324
|
-
| 3.13 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py313/junit/report.html) |
|
|
333
|
+
| 3.11 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py311/junit/report.html) |
|
|
334
|
+
| 3.12 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py312/junit/report.html) |
|
|
335
|
+
| 3.13 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py313/junit/report.html) |
|
|
325
336
|
|
|
326
|
-
Further (functional and integration) tests are performed in the Python 3.13 to ensure that examples run as desired. Thus, it is generally
|
|
337
|
+
Further (functional and integration) tests are performed in the Python 3.13 to ensure that examples run as desired. Thus, it is generally recommended to use Python 3.13 with this version to keep pace with development, especially when running examples.
|
|
327
338
|
|
|
328
339
|
### Set up python tooling environment
|
|
329
340
|
|
|
@@ -381,13 +392,13 @@ More guidance on development installations is provided in [How to Contribute](ht
|
|
|
381
392
|
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`` in the context of a development install you can checkout the tag corresponding to the version you want, e.g.:
|
|
382
393
|
|
|
383
394
|
```
|
|
384
|
-
git checkout v2.3.
|
|
395
|
+
git checkout v2.3.3
|
|
385
396
|
```
|
|
386
397
|
|
|
387
398
|
|
|
388
399
|
#### Dependencies
|
|
389
400
|
|
|
390
|
-
fmdtools requires `Python 3.13` and depends directly on the packages below (see requirements.txt). Note that the use of these
|
|
401
|
+
fmdtools requires `Python 3.13` and depends directly on the packages below (see requirements.txt). Note that the use of these dependencies is governed by their respective licenses, which may be obtained at the provided links.
|
|
391
402
|
|
|
392
403
|
```
|
|
393
404
|
scipy
|
|
@@ -423,7 +434,7 @@ Some additional indirect dependencies (listed below) may be needed for developme
|
|
|
423
434
|
deap
|
|
424
435
|
# used for optimization of rover faults
|
|
425
436
|
# license: (LGPL-3.0) https://github.com/DEAP/deap/blob/master/LICENSE.txt
|
|
426
|
-
# the LGPL license and installation instructions are provided in ~/examples/
|
|
437
|
+
# the LGPL license and installation instructions are provided in ~/examples/navigating_rover/readme.rst
|
|
427
438
|
pymoo
|
|
428
439
|
# used for optimization of tank and rover examples
|
|
429
440
|
# license: (Apache 2.0) https://github.com/anyoptimization/pymoo/blob/main/LICENSE
|
|
@@ -467,7 +478,7 @@ fmdtools.__version__
|
|
|
467
478
|
```
|
|
468
479
|
which should return the current version of fmdtools.
|
|
469
480
|
|
|
470
|
-
If a development install has been performed, you can further check aspects of your installation by running `run_all_tests.py` and opening the corresponding test report in
|
|
481
|
+
If a development install has been performed, you can further check aspects of your installation by running `run_all_tests.py` and opening the corresponding test report in `tests/reports/junit/report.html` to see if all tests pass (or, are consistent with the [current test report](https://github.com/nasa/fmdtools/blob/main/tests/reports/junit/report.html)).
|
|
471
482
|
|
|
472
483
|
### Explore Tutorials and Resources
|
|
473
484
|
|
|
@@ -518,8 +529,8 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
518
529
|
author = {{NASA}},
|
|
519
530
|
title = {fmdtools},
|
|
520
531
|
url = {https://github.com/nasa/fmdtools},
|
|
521
|
-
version = {2.3.
|
|
522
|
-
date = {2025-
|
|
532
|
+
version = {2.3.3},
|
|
533
|
+
date = {2025-4-10},
|
|
523
534
|
}
|
|
524
535
|
```
|
|
525
536
|
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
[](https://github.com/nasa/fmdtools/releases)
|
|
10
10
|
[](https://github.com/nasa/fmdtools/tags)
|
|
11
11
|
[](https://www.codefactor.io/repository/github/nasa/fmdtools)
|
|
12
|
-
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/full-py313/junit/report.html)
|
|
13
|
-
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/full-py313/coverage_html/index.html)
|
|
12
|
+
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/full-py313/junit/report.html)
|
|
13
|
+
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/full-py313/coverage_html/index.html)
|
|
14
14
|
[](https://github.com/nasa/fmdtools/blob/main/LICENSE)
|
|
15
15
|
[](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixD)
|
|
16
16
|
|
|
@@ -18,6 +18,16 @@
|
|
|
18
18
|
|
|
19
19
|
[Click here to view the the full documentation website.](https://nasa.github.io/fmdtools)
|
|
20
20
|
|
|
21
|
+
### Demo Portfolio
|
|
22
|
+
|
|
23
|
+
See: [Examples](https://nasa.github.io/fmdtools/examples/Examples.html)
|
|
24
|
+
|
|
25
|
+
<img src="https://nasa.github.io/fmdtools/_images/tutorial_fmdtools_basics.webp" width="15%"></img>
|
|
26
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_proxthreat.webp" width="15%"></img>
|
|
27
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_wildfire.webp" width="15%"></img>
|
|
28
|
+
<img src="https://nasa.github.io/fmdtools/_images/paper_jcise_dsa.webp" width="15%"></img>
|
|
29
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_urban_flight.webp" width="15%"></img>
|
|
30
|
+
<img src="https://nasa.github.io/fmdtools/_images/demo_degradation.webp" width="15%"></img>
|
|
21
31
|
|
|
22
32
|
## About
|
|
23
33
|
|
|
@@ -49,11 +59,11 @@ The fmdtools library is developed in Python 3.13 but is tested to maintain compa
|
|
|
49
59
|
|
|
50
60
|
| Python Version | Doctests |
|
|
51
61
|
| -------- | ------- |
|
|
52
|
-
| 3.11 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py311/junit/report.html) |
|
|
53
|
-
| 3.12 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py312/junit/report.html) |
|
|
54
|
-
| 3.13 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py313/junit/report.html) |
|
|
62
|
+
| 3.11 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py311/junit/report.html) |
|
|
63
|
+
| 3.12 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py312/junit/report.html) |
|
|
64
|
+
| 3.13 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/tests/reports/doctests-py313/junit/report.html) |
|
|
55
65
|
|
|
56
|
-
Further (functional and integration) tests are performed in the Python 3.13 to ensure that examples run as desired. Thus, it is generally
|
|
66
|
+
Further (functional and integration) tests are performed in the Python 3.13 to ensure that examples run as desired. Thus, it is generally recommended to use Python 3.13 with this version to keep pace with development, especially when running examples.
|
|
57
67
|
|
|
58
68
|
### Set up python tooling environment
|
|
59
69
|
|
|
@@ -111,13 +121,13 @@ More guidance on development installations is provided in [How to Contribute](ht
|
|
|
111
121
|
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`` in the context of a development install you can checkout the tag corresponding to the version you want, e.g.:
|
|
112
122
|
|
|
113
123
|
```
|
|
114
|
-
git checkout v2.3.
|
|
124
|
+
git checkout v2.3.3
|
|
115
125
|
```
|
|
116
126
|
|
|
117
127
|
|
|
118
128
|
#### Dependencies
|
|
119
129
|
|
|
120
|
-
fmdtools requires `Python 3.13` and depends directly on the packages below (see requirements.txt). Note that the use of these
|
|
130
|
+
fmdtools requires `Python 3.13` and depends directly on the packages below (see requirements.txt). Note that the use of these dependencies is governed by their respective licenses, which may be obtained at the provided links.
|
|
121
131
|
|
|
122
132
|
```
|
|
123
133
|
scipy
|
|
@@ -153,7 +163,7 @@ Some additional indirect dependencies (listed below) may be needed for developme
|
|
|
153
163
|
deap
|
|
154
164
|
# used for optimization of rover faults
|
|
155
165
|
# license: (LGPL-3.0) https://github.com/DEAP/deap/blob/master/LICENSE.txt
|
|
156
|
-
# the LGPL license and installation instructions are provided in ~/examples/
|
|
166
|
+
# the LGPL license and installation instructions are provided in ~/examples/navigating_rover/readme.rst
|
|
157
167
|
pymoo
|
|
158
168
|
# used for optimization of tank and rover examples
|
|
159
169
|
# license: (Apache 2.0) https://github.com/anyoptimization/pymoo/blob/main/LICENSE
|
|
@@ -197,7 +207,7 @@ fmdtools.__version__
|
|
|
197
207
|
```
|
|
198
208
|
which should return the current version of fmdtools.
|
|
199
209
|
|
|
200
|
-
If a development install has been performed, you can further check aspects of your installation by running `run_all_tests.py` and opening the corresponding test report in
|
|
210
|
+
If a development install has been performed, you can further check aspects of your installation by running `run_all_tests.py` and opening the corresponding test report in `tests/reports/junit/report.html` to see if all tests pass (or, are consistent with the [current test report](https://github.com/nasa/fmdtools/blob/main/tests/reports/junit/report.html)).
|
|
201
211
|
|
|
202
212
|
### Explore Tutorials and Resources
|
|
203
213
|
|
|
@@ -248,8 +258,8 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
248
258
|
author = {{NASA}},
|
|
249
259
|
title = {fmdtools},
|
|
250
260
|
url = {https://github.com/nasa/fmdtools},
|
|
251
|
-
version = {2.3.
|
|
252
|
-
date = {2025-
|
|
261
|
+
version = {2.3.3},
|
|
262
|
+
date = {2025-4-10},
|
|
253
263
|
}
|
|
254
264
|
```
|
|
255
265
|
|
|
@@ -15,4 +15,5 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
15
15
|
specific language governing permissions and limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
__all__ = ['
|
|
18
|
+
__all__ = ['human_hazard_mitigation', 'electric_power_system', 'state_communication',
|
|
19
|
+
'multirotor_drone', 'water_pump', 'rover', 'tank', 'taxiway' 'airspacelib']
|
fmdtools-2.3.1/examples/taxiway/asset.py → fmdtools-2.3.3/examples/airport_taxiway/model_asset.py
RENAMED
|
@@ -25,7 +25,8 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
25
25
|
specific language governing permissions and limitations under the License.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
from
|
|
28
|
+
from fmdtools_examples.airport_taxiway.model_common import (AssetParams, Location,
|
|
29
|
+
Requests, Environment)
|
|
29
30
|
|
|
30
31
|
from fmdtools.define.container.state import State
|
|
31
32
|
from fmdtools.define.container.mode import Mode
|
fmdtools-2.3.1/examples/taxiway/ATC.py → fmdtools-2.3.3/examples/airport_taxiway/model_atc.py
RENAMED
|
@@ -15,7 +15,8 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
15
15
|
specific language governing permissions and limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from
|
|
18
|
+
from fmdtools_examples.airport_taxiway.model_common import (Location, Requests,
|
|
19
|
+
TaxiwayParams, Environment)
|
|
19
20
|
|
|
20
21
|
from fmdtools.define.block.function import Function
|
|
21
22
|
from fmdtools.define.container.mode import Mode
|
fmdtools-2.3.1/examples/taxiway/common.py → fmdtools-2.3.3/examples/airport_taxiway/model_common.py
RENAMED
|
@@ -27,7 +27,9 @@ from fmdtools.define.flow.multiflow import MultiFlow
|
|
|
27
27
|
from fmdtools.define.flow.commsflow import CommsFlow
|
|
28
28
|
from fmdtools.define.container.parameter import Parameter
|
|
29
29
|
from fmdtools.define.container.state import State
|
|
30
|
-
from fmdtools.
|
|
30
|
+
from fmdtools.define.base import filter_kwargs
|
|
31
|
+
from fmdtools.analyze.common import consolidate_legend, setup_plot, add_title_xylabs
|
|
32
|
+
from fmdtools.analyze.common import prep_animation_title, clear_prev_figure
|
|
31
33
|
|
|
32
34
|
import matplotlib.pyplot as plt
|
|
33
35
|
import numpy as np
|
|
@@ -391,7 +393,8 @@ class Environment(MultiFlow):
|
|
|
391
393
|
self.s.area_allocation[new_area].add(asset)
|
|
392
394
|
|
|
393
395
|
def show_map(self, legend=False, figsize=(6.5, 3.5), show_area_allocation=False,
|
|
394
|
-
areas_to_label=["gate", "landing", "helipad", "takeoff"]
|
|
396
|
+
areas_to_label=["gate", "landing", "helipad", "takeoff"],
|
|
397
|
+
fig=None, ax=None):
|
|
395
398
|
"""
|
|
396
399
|
Show the map as a plot.
|
|
397
400
|
|
|
@@ -407,7 +410,7 @@ class Environment(MultiFlow):
|
|
|
407
410
|
fig: matplotlib figure
|
|
408
411
|
ax: matplotlib axis
|
|
409
412
|
"""
|
|
410
|
-
fig, ax =
|
|
413
|
+
fig, ax = setup_plot(fig=fig, ax=ax, figsize=figsize)
|
|
411
414
|
airspace = plt.Rectangle(
|
|
412
415
|
(self.p.air_loc[0] - 5, self.p.air_loc[1] - 5),
|
|
413
416
|
10,
|
|
@@ -416,7 +419,7 @@ class Environment(MultiFlow):
|
|
|
416
419
|
ec="blue",
|
|
417
420
|
)
|
|
418
421
|
ax.add_patch(airspace)
|
|
419
|
-
|
|
422
|
+
ax.text(
|
|
420
423
|
self.p.air_loc[0],
|
|
421
424
|
self.p.air_loc[1] + 5,
|
|
422
425
|
"In Air",
|
|
@@ -441,7 +444,7 @@ class Environment(MultiFlow):
|
|
|
441
444
|
else:
|
|
442
445
|
area_text = "\n" + str(entry)
|
|
443
446
|
text = segname + area_text
|
|
444
|
-
|
|
447
|
+
ax.text(
|
|
445
448
|
lineobj.centroid.xy[0][0],
|
|
446
449
|
lineobj.centroid.xy[1][0],
|
|
447
450
|
text,
|
|
@@ -457,7 +460,7 @@ class Environment(MultiFlow):
|
|
|
457
460
|
|
|
458
461
|
if legend:
|
|
459
462
|
consolidate_legend(ax)
|
|
460
|
-
|
|
463
|
+
ax.axis('off')
|
|
461
464
|
return fig, ax
|
|
462
465
|
|
|
463
466
|
def show_route(self, routename, color="red", legend=True, **kwargs):
|
|
@@ -743,7 +746,7 @@ def att_to_text(att):
|
|
|
743
746
|
return str(att)
|
|
744
747
|
|
|
745
748
|
|
|
746
|
-
def plot_tstep(
|
|
749
|
+
def plot_tstep(t, history={}, mdl=None, fxnattr="", locattr="", markersize=10,
|
|
747
750
|
show_area_allocation=True, asset_assignment=False, title="",
|
|
748
751
|
assets_to_label="all", **kwargs):
|
|
749
752
|
"""
|
|
@@ -751,12 +754,12 @@ def plot_tstep(mdl, mdlhist, t, fxnattr="", locattr="", markersize=10,
|
|
|
751
754
|
|
|
752
755
|
Parameters
|
|
753
756
|
----------
|
|
754
|
-
mdl : model
|
|
755
|
-
model with ground and Location
|
|
756
|
-
mdlhist : dict
|
|
757
|
-
Model history
|
|
758
757
|
t : int
|
|
759
758
|
time-step to plot
|
|
759
|
+
mdlhist : dict
|
|
760
|
+
Model history
|
|
761
|
+
mdl : model
|
|
762
|
+
model with ground and Location
|
|
760
763
|
fxnattr : str
|
|
761
764
|
function attribute to display on the plot (e.g., visioncov, mode, segment)
|
|
762
765
|
locattr : str
|
|
@@ -778,22 +781,23 @@ def plot_tstep(mdl, mdlhist, t, fxnattr="", locattr="", markersize=10,
|
|
|
778
781
|
ax: matplotlib axis
|
|
779
782
|
|
|
780
783
|
"""
|
|
784
|
+
kwargs = clear_prev_figure(**kwargs)
|
|
785
|
+
# fig, ax = setup_plot(**kwargs)
|
|
781
786
|
if show_area_allocation == "size":
|
|
782
787
|
show_area_allocation = {
|
|
783
788
|
pl: len(plhist[t])
|
|
784
|
-
for pl, plhist in
|
|
789
|
+
for pl, plhist in history.flows.ground.s.area_allocation.items()
|
|
785
790
|
}
|
|
786
791
|
elif show_area_allocation:
|
|
787
792
|
show_area_allocation = {
|
|
788
793
|
pl: plhist[t]
|
|
789
|
-
for pl, plhist in
|
|
794
|
+
for pl, plhist in history.flows.ground.s.area_allocation.items()
|
|
790
795
|
}
|
|
791
796
|
fig, ax = mdl.flows["ground"].show_map(
|
|
792
|
-
**kwargs, show_area_allocation=show_area_allocation
|
|
793
|
-
)
|
|
797
|
+
**kwargs, show_area_allocation=show_area_allocation)
|
|
794
798
|
texts = []
|
|
795
799
|
for f in mdl.flows["location"].locals:
|
|
796
|
-
loc =
|
|
800
|
+
loc = history.flows.location.get(f)
|
|
797
801
|
x, y = loc.s.x[t], loc.s.y[t]
|
|
798
802
|
xd, yd = loc.s.xd[t], loc.s.yd[t]
|
|
799
803
|
mode, stage = loc.s.mode[t], loc.s.stage[t]
|
|
@@ -816,25 +820,25 @@ def plot_tstep(mdl, mdlhist, t, fxnattr="", locattr="", markersize=10,
|
|
|
816
820
|
markeredgecolor = "purple"
|
|
817
821
|
else:
|
|
818
822
|
markeredgecolor = "grey"
|
|
819
|
-
|
|
823
|
+
ax.plot(x, y, marker=marker, markersize=markersize,
|
|
820
824
|
markeredgecolor=markeredgecolor, color=color)
|
|
821
825
|
text = f
|
|
822
826
|
if assets_to_label == "all" or f in assets_to_label:
|
|
823
827
|
if fxnattr:
|
|
824
828
|
try:
|
|
825
|
-
atthist =
|
|
829
|
+
atthist = history.fxns.get(f + "." + fxnattr)
|
|
826
830
|
except Exception or AttributeError:
|
|
827
831
|
atthist = None
|
|
828
832
|
if (not atthist is None) and len(atthist) > 0:
|
|
829
833
|
if fxnattr == "s.visioncov" and atthist[t]:
|
|
830
|
-
|
|
834
|
+
ax.plot(*atthist[t].exterior.xy)
|
|
831
835
|
if fxnattr in ["mode", "segment"]:
|
|
832
|
-
text_add =
|
|
836
|
+
text_add = history.fxns.get(f + "." + fxnattr)[t]
|
|
833
837
|
text = text + ": " + text_add
|
|
834
838
|
if fxnattr == "faults":
|
|
835
839
|
faults = {
|
|
836
840
|
fault
|
|
837
|
-
for fault, hist in
|
|
841
|
+
for fault, hist in history.fxns["functions"][f][
|
|
838
842
|
"faults"
|
|
839
843
|
].items()
|
|
840
844
|
if hist[t]
|
|
@@ -843,17 +847,20 @@ def plot_tstep(mdl, mdlhist, t, fxnattr="", locattr="", markersize=10,
|
|
|
843
847
|
text = text + ": " + str(faults)
|
|
844
848
|
if locattr:
|
|
845
849
|
text_add = att_to_text(
|
|
846
|
-
|
|
850
|
+
history.flows.location.get(f + ".s." + locattr)[t]
|
|
847
851
|
)
|
|
848
852
|
text = text + ": " + text_add
|
|
849
853
|
if asset_assignment:
|
|
850
|
-
assignment = str(
|
|
851
|
-
area = str(
|
|
854
|
+
assignment = str(history.fxns["ground"]["asset_assignment"][f][t])
|
|
855
|
+
area = str(history.fxns["ground"]["asset_area"][f][t])
|
|
852
856
|
text = text + ": (" + area + "->" + assignment + ")"
|
|
853
857
|
textax = plt.text(x, y, text)
|
|
854
858
|
texts.append(textax)
|
|
855
859
|
if texts:
|
|
860
|
+
# note - may print to console--known issue with adjustText 1.3.0
|
|
856
861
|
adjust_text(texts)
|
|
857
|
-
|
|
858
|
-
|
|
862
|
+
_ = kwargs.pop('fig', None)
|
|
863
|
+
add_title_xylabs(ax, title=prep_animation_title(t, title=title),
|
|
864
|
+
**filter_kwargs(add_title_xylabs, **kwargs))
|
|
865
|
+
ax.axis('off')
|
|
859
866
|
return fig, ax
|
fmdtools-2.3.1/examples/taxiway/model.py → fmdtools-2.3.3/examples/airport_taxiway/model_main.py
RENAMED
|
@@ -17,17 +17,16 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
17
17
|
specific language governing permissions and limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
20
|
+
from fmdtools_examples.airport_taxiway.model_atc import ATC
|
|
21
|
+
from fmdtools_examples.airport_taxiway.model_asset import Aircraft, Helicopter
|
|
22
|
+
from fmdtools_examples.airport_taxiway.model_common import (TaxiwayParams,
|
|
23
|
+
Environment,
|
|
24
|
+
Location,
|
|
25
|
+
Requests,
|
|
26
|
+
plot_course,
|
|
27
|
+
plot_one_path,
|
|
28
|
+
plot_tstep,
|
|
29
|
+
)
|
|
31
30
|
|
|
32
31
|
from fmdtools.define.architecture.function import FunctionArchitecture
|
|
33
32
|
from fmdtools.sim import propagate as prop
|
|
@@ -133,19 +132,33 @@ if __name__ == "__main__":
|
|
|
133
132
|
|
|
134
133
|
mdl = taxiway_model()
|
|
135
134
|
|
|
135
|
+
|
|
136
|
+
endresults, mdlhist = prop.one_fault(mdl, "ma3", "lost_sight",
|
|
137
|
+
to_return={93: {"graph.flows.location": {'with_root':False, 'with_methods': False}},
|
|
138
|
+
110:{"graph.flows.location": {'with_root': False, 'with_methods': False}},
|
|
139
|
+
20:["graph"], 120:['graph', "classify"]})
|
|
140
|
+
plot_tstep(50, history=mdlhist.faulty, mdl=mdl, fxnattr="s.visioncov")
|
|
141
|
+
endresults.faulty.t93p0.graph.flows.location
|
|
142
|
+
|
|
136
143
|
mg = mdl.as_modelgraph()
|
|
137
144
|
mg.draw()
|
|
138
145
|
|
|
139
|
-
ground_args = {'
|
|
146
|
+
ground_args = {'with_root':True, "include_containers": ['s'],
|
|
140
147
|
'send_connections':{"asset_area":"asset_area",
|
|
141
148
|
"area_allocation":"area_allocation",
|
|
142
149
|
"asset_assignment":"asset_assignment"}}
|
|
143
|
-
req_args = {'
|
|
150
|
+
req_args = {'with_root':False, "ports_only":True}
|
|
151
|
+
|
|
152
|
+
endresults, mdlhist = prop.sequence(mdl, faultseq={7:{"atc": ["wrong_land_command"]}, 9: {"ua2":["lost_sight"]}},
|
|
153
|
+
to_return={93: {"graph.flows.location": {'with_root':False, 'with_methods': False}},
|
|
154
|
+
110:{"graph.flows.location": {'with_root': False, 'with_methods': False}},
|
|
155
|
+
20:["graph"], 120:['graph', "classify"]})
|
|
156
|
+
|
|
144
157
|
endresults, mdlhist = prop.sequence(mdl, faultseq={7:{"atc": ["wrong_land_command"]}, 9: {"ua2":["lost_sight"]}},
|
|
145
158
|
to_return={10:{"graph.flows.requests":(CommsFlowGraph, req_args)},
|
|
146
159
|
11:{"graph.flows.requests":(CommsFlowGraph, req_args),
|
|
147
160
|
"graph.flows.ground":(MultiFlowGraph, ground_args)},
|
|
148
|
-
19:{"graph.flows.requests":{'
|
|
161
|
+
19:{"graph.flows.requests":{'with_root':False, "ports_only":True}},
|
|
149
162
|
20:["graph"], 120: "classify"})
|
|
150
163
|
ind_hist = create_fault_scen_metrics(mdlhist)
|
|
151
164
|
fig, ax = ind_hist.plot_line("degraded_fields",
|
|
@@ -160,8 +173,8 @@ if __name__ == "__main__":
|
|
|
160
173
|
"ma3",
|
|
161
174
|
"lost_sight",
|
|
162
175
|
to_return={
|
|
163
|
-
93: {"graph.flows.location": {"
|
|
164
|
-
110: {"graph.flows.location": {"
|
|
176
|
+
93: {"graph.flows.location": {"with_root": False}},
|
|
177
|
+
110: {"graph.flows.location": {"with_root": False}},
|
|
165
178
|
20: ["graph"],
|
|
166
179
|
120: ["graph", "classify"],
|
|
167
180
|
},
|
|
@@ -186,11 +199,11 @@ if __name__ == "__main__":
|
|
|
186
199
|
plot_course(mdl, mdlhist, "ua2")
|
|
187
200
|
plot_course(mdl, mdlhist, "ua3")
|
|
188
201
|
|
|
189
|
-
plot_tstep(
|
|
190
|
-
plot_tstep(
|
|
191
|
-
plot_tstep(
|
|
192
|
-
plot_tstep(
|
|
193
|
-
plot_tstep(
|
|
202
|
+
plot_tstep(50, history=mdlhist, mdl=mdl, fxnattr="s.visioncov")
|
|
203
|
+
plot_tstep(75, history=mdlhist, mdl=mdl, fxnattr="s.visioncov")
|
|
204
|
+
plot_tstep(100, history=mdlhist, mdl=mdl, fxnattr="s.visioncov")
|
|
205
|
+
plot_tstep(110, history=mdlhist, mdl=mdl, fxnattr="s.visioncov")
|
|
206
|
+
plot_tstep(115, history=mdlhist, mdl=mdl, fxnattr="s.visioncov")
|
|
194
207
|
|
|
195
208
|
vals = {"flows": {"location": {"ua2": {"s": {"x", "y", "speed", "mode", "stage"}}}}}
|
|
196
209
|
mdlhist.plot_line(vals)
|
|
@@ -210,8 +223,8 @@ if __name__ == "__main__":
|
|
|
210
223
|
120: "classify",
|
|
211
224
|
},
|
|
212
225
|
)
|
|
213
|
-
plot_tstep(mdl, mdlhist.faulty,
|
|
214
|
-
plot_tstep(mdl, mdlhist.faulty,
|
|
226
|
+
plot_tstep(110, mdl=mdl, history=mdlhist.faulty, title="Aircraft crashed")
|
|
227
|
+
plot_tstep(25, mdl=mdl, history=mdlhist.faulty, fxnattr="visioncov", areas_to_label=[])
|
|
215
228
|
|
|
216
229
|
ind_hist = create_fault_scen_metrics(mdlhist)
|
|
217
230
|
fig, ax = ind_hist.plot_line("degraded_fields",
|
|
@@ -17,7 +17,7 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
17
17
|
specific language governing permissions and limitations under the License.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
from
|
|
20
|
+
from fmdtools_examples.airport_taxiway.model_common import (
|
|
21
21
|
TaxiwayParams,
|
|
22
22
|
AssetParams,
|
|
23
23
|
Environment,
|
|
@@ -26,7 +26,7 @@ from common import (
|
|
|
26
26
|
plot_course,
|
|
27
27
|
plot_tstep,
|
|
28
28
|
)
|
|
29
|
-
from
|
|
29
|
+
from fmdtools_examples.airport_taxiway.model_asset import Aircraft, Helicopter
|
|
30
30
|
|
|
31
31
|
from fmdtools.define.block.function import Function
|
|
32
32
|
from fmdtools.define.architecture.function import FunctionArchitecture
|
|
@@ -194,33 +194,27 @@ class AssetTests(unittest.TestCase):
|
|
|
194
194
|
|
|
195
195
|
def test_avoid_plot(self):
|
|
196
196
|
endresults, mdlhist = prop.nominal(self.two_ac_model)
|
|
197
|
-
plot_tstep(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
78,
|
|
219
|
-
fxnattr="s.visioncov",
|
|
220
|
-
locattr="speed",
|
|
221
|
-
assets_to_label=["ma1"],
|
|
222
|
-
title="Visioncov means ma1 stops",
|
|
223
|
-
)
|
|
197
|
+
plot_tstep(76,
|
|
198
|
+
history=mdlhist,
|
|
199
|
+
mdl=self.two_ac_model,
|
|
200
|
+
fxnattr="s.visioncov",
|
|
201
|
+
locattr="speed",
|
|
202
|
+
assets_to_label=["ma1"],
|
|
203
|
+
title="Visioncov means ma1 slows down")
|
|
204
|
+
plot_tstep(77,
|
|
205
|
+
history=mdlhist,
|
|
206
|
+
mdl=self.two_ac_model,
|
|
207
|
+
fxnattr="s.visioncov",
|
|
208
|
+
locattr="speed",
|
|
209
|
+
assets_to_label=["ma1"],
|
|
210
|
+
title="Visioncov means ma1 stops")
|
|
211
|
+
plot_tstep(78,
|
|
212
|
+
history=mdlhist,
|
|
213
|
+
mdl=self.two_ac_model,
|
|
214
|
+
fxnattr="s.visioncov",
|
|
215
|
+
locattr="speed",
|
|
216
|
+
assets_to_label=["ma1"],
|
|
217
|
+
title="Visioncov means ma1 stops")
|
|
224
218
|
|
|
225
219
|
def test_lost_sight(self):
|
|
226
220
|
endresults, mdlhist = prop.one_fault(self.two_ac_model, "ma1", "lost_sight")
|
|
@@ -237,22 +231,18 @@ class AssetTests(unittest.TestCase):
|
|
|
237
231
|
def test_lost_sight_plot(self):
|
|
238
232
|
endresults, mdlhist = prop.one_fault(self.two_ac_model, "ma1", "lost_sight")
|
|
239
233
|
fhist = mdlhist.faulty
|
|
240
|
-
plot_tstep(
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
fxnattr="m.faults",
|
|
253
|
-
assets_to_label=["ma1"],
|
|
254
|
-
title="ma1 crashes into ma2 (should show faults)",
|
|
255
|
-
)
|
|
234
|
+
plot_tstep(76,
|
|
235
|
+
history=fhist,
|
|
236
|
+
mdl=self.two_ac_model,
|
|
237
|
+
fxnattr="s.visioncov",
|
|
238
|
+
assets_to_label=["ma1"],
|
|
239
|
+
title="ma1 approaches ma2 with no vision cone")
|
|
240
|
+
plot_tstep(77,
|
|
241
|
+
history=fhist,
|
|
242
|
+
mdl=self.two_ac_model,
|
|
243
|
+
fxnattr="m.faults",
|
|
244
|
+
assets_to_label=["ma1"],
|
|
245
|
+
title="ma1 crashes into ma2 (should show faults)")
|
|
256
246
|
|
|
257
247
|
def test_heli_cycle(self):
|
|
258
248
|
"""Tests that a single helicopter will land and take off as desired"""
|
|
@@ -273,9 +263,9 @@ class AssetTests(unittest.TestCase):
|
|
|
273
263
|
|
|
274
264
|
def test_heli_cycle_plot(self):
|
|
275
265
|
endresults, mdlhist = prop.nominal(self.heli_model)
|
|
276
|
-
plot_tstep(
|
|
277
|
-
plot_tstep(
|
|
278
|
-
plot_tstep(
|
|
266
|
+
plot_tstep(1, history=mdlhist, mdl=self.heli_model, title="Empty landing spot")
|
|
267
|
+
plot_tstep(7, history=mdlhist, mdl=self.heli_model, title="h1 at landing spot")
|
|
268
|
+
plot_tstep(59, history=mdlhist, mdl=self.heli_model, title="h1 back in air")
|
|
279
269
|
mdlhist.fxns.h1
|
|
280
270
|
# mdlhist['flows']['Perc_location']['h1']
|
|
281
271
|
|