fmdtools 2.3.0__tar.gz → 2.3.2__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.0 → fmdtools-2.3.2}/LICENSE +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2}/PKG-INFO +44 -20
- {fmdtools-2.3.0 → fmdtools-2.3.2}/README.md +31 -17
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/__init__.py +2 -1
- fmdtools-2.3.0/examples/taxiway/asset.py → fmdtools-2.3.2/examples/airport_taxiway/model_asset.py +2 -1
- fmdtools-2.3.0/examples/taxiway/ATC.py → fmdtools-2.3.2/examples/airport_taxiway/model_atc.py +2 -1
- fmdtools-2.3.0/examples/taxiway/common.py → fmdtools-2.3.2/examples/airport_taxiway/model_common.py +33 -26
- fmdtools-2.3.0/examples/taxiway/model.py → fmdtools-2.3.2/examples/airport_taxiway/model_main.py +36 -23
- {fmdtools-2.3.0/examples/taxiway → fmdtools-2.3.2/examples/airport_taxiway}/test_asset.py +38 -48
- {fmdtools-2.3.0/examples/taxiway → fmdtools-2.3.2/examples/airport_taxiway}/test_model.py +3 -3
- fmdtools-2.3.2/examples/airspacelib/__init__.py +22 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/__init__.py +4 -4
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/aircraft.py +2 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/aircraftarchitecture.py +7 -7
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/__init__.py +6 -6
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/aviate.py +2 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/controlflight.py +2 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/flows.py +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/holdpayload.py +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/perceiveenvironment.py +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/arch/storeee.py +1 -1
- {fmdtools-2.3.0/examples/airspacelib/contingencymanagement → fmdtools-2.3.2/examples/airspacelib/contingency_management}/__init__.py +4 -4
- fmdtools-2.3.0/examples/airspacelib/contingencymanagement/aircraft.py → fmdtools-2.3.2/examples/airspacelib/contingency_management/model_aircraft.py +19 -9
- fmdtools-2.3.0/examples/airspacelib/contingencymanagement/environment.py → fmdtools-2.3.2/examples/airspacelib/contingency_management/model_environment.py +2 -2
- fmdtools-2.3.0/examples/airspacelib/contingencymanagement/flightplanner.py → fmdtools-2.3.2/examples/airspacelib/contingency_management/model_flightplanner.py +2 -2
- {fmdtools-2.3.0/examples/airspacelib/wildfireresponse → fmdtools-2.3.2/examples/airspacelib/wildfire_response}/__init__.py +4 -4
- fmdtools-2.3.0/examples/airspacelib/wildfireresponse/aircraft.py → fmdtools-2.3.2/examples/airspacelib/wildfire_response/model_aircraft.py +3 -3
- fmdtools-2.3.0/examples/airspacelib/wildfireresponse/wildfiresim.py → fmdtools-2.3.2/examples/airspacelib/wildfire_response/model_main.py +3 -3
- fmdtools-2.3.2/examples/cooling_tank/__init__.py +22 -0
- fmdtools-2.3.0/examples/tank/tank_model.py → fmdtools-2.3.2/examples/cooling_tank/model_main.py +1 -1
- fmdtools-2.3.0/examples/tank/tank_optimization_model.py → fmdtools-2.3.2/examples/cooling_tank/model_optimization.py +2 -2
- {fmdtools-2.3.0/examples/tank → fmdtools-2.3.2/examples/cooling_tank}/test_tank.py +2 -2
- fmdtools-2.3.0/examples/eps/test_eps.py → fmdtools-2.3.2/examples/electric_power_system/test_model.py +2 -2
- fmdtools-2.3.0/examples/multirotor/drone_mdl_dynamic.py → fmdtools-2.3.2/examples/multirotor_drone/model_dynamic.py +6 -6
- fmdtools-2.3.0/examples/multirotor/drone_mdl_hierarchical.py → fmdtools-2.3.2/examples/multirotor_drone/model_hierarchical.py +8 -11
- fmdtools-2.3.0/examples/multirotor/drone_mdl_rural.py → fmdtools-2.3.2/examples/multirotor_drone/model_rural.py +9 -9
- fmdtools-2.3.0/examples/multirotor/drone_mdl_static.py → fmdtools-2.3.2/examples/multirotor_drone/model_static.py +25 -0
- fmdtools-2.3.0/examples/multirotor/drone_mdl_urban.py → fmdtools-2.3.2/examples/multirotor_drone/model_urban.py +20 -15
- fmdtools-2.3.0/examples/multirotor/opt_drone_rural.py → fmdtools-2.3.2/examples/multirotor_drone/script_opt_model_rural.py +4 -4
- {fmdtools-2.3.0/examples/multirotor → fmdtools-2.3.2/examples/multirotor_drone}/test_multirotor.py +1 -1
- fmdtools-2.3.0/examples/rover/rover_degradation.py → fmdtools-2.3.2/examples/navigating_rover/model_degradation.py +1 -1
- fmdtools-2.3.0/examples/rover/rover_model_human.py → fmdtools-2.3.2/examples/navigating_rover/model_human.py +8 -8
- fmdtools-2.3.0/examples/rover/rover_model.py → fmdtools-2.3.2/examples/navigating_rover/model_main.py +29 -5
- fmdtools-2.3.0/examples/rover/optimization/ea_analysis.py → fmdtools-2.3.2/examples/navigating_rover/script_ea_analysis.py +3 -3
- fmdtools-2.3.0/examples/rover/rover_mode_space.py → fmdtools-2.3.2/examples/navigating_rover/script_mode_space.py +1 -1
- fmdtools-2.3.0/examples/rover/optimization/search_rover.py → fmdtools-2.3.2/examples/navigating_rover/script_search_rover.py +8 -8
- {fmdtools-2.3.0/examples/rover → fmdtools-2.3.2/examples/navigating_rover}/test_rover.py +2 -2
- {fmdtools-2.3.0/examples/airspacelib → fmdtools-2.3.2/examples/state_communication}/__init__.py +4 -5
- {fmdtools-2.3.0/examples/multiflow_demo → fmdtools-2.3.2/examples/state_communication}/test_multiflow.py +1 -1
- fmdtools-2.3.2/examples/water_pump/__init__.py +12 -0
- fmdtools-2.3.0/examples/pump/pump_indiv.py → fmdtools-2.3.2/examples/water_pump/model_indiv.py +1 -1
- fmdtools-2.3.0/examples/pump/pump_stochastic.py → fmdtools-2.3.2/examples/water_pump/model_stochastic.py +7 -7
- fmdtools-2.3.0/examples/pump/jointfaults_ex.py → fmdtools-2.3.2/examples/water_pump/script_jointfaults.py +1 -1
- fmdtools-2.3.0/examples/pump/parallelism_methods.py → fmdtools-2.3.2/examples/water_pump/script_parallelism.py +1 -1
- {fmdtools-2.3.0/examples/pump → fmdtools-2.3.2/examples/water_pump}/test_pump.py +3 -3
- {fmdtools-2.3.0/examples/pump → fmdtools-2.3.2/examples/water_pump}/test_pump_example.py +1 -1
- {fmdtools-2.3.0/examples/pump → fmdtools-2.3.2/examples/water_pump}/test_pump_stochastic.py +3 -3
- {fmdtools-2.3.0 → fmdtools-2.3.2}/fmdtools.egg-info/PKG-INFO +44 -20
- fmdtools-2.3.2/fmdtools.egg-info/SOURCES.txt +125 -0
- fmdtools-2.3.2/fmdtools.egg-info/requires.txt +24 -0
- fmdtools-2.3.2/fmdtools.egg-info/top_level.txt +3 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/pyproject.toml +26 -4
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/__init__.py +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/common.py +9 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/graph/base.py +2 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/graph/model.py +1 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/history.py +10 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/block/base.py +2 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/mode.py +10 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/flow/commsflow.py +3 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/flow/multiflow.py +4 -3
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/sim/sample.py +8 -8
- {fmdtools-2.3.0 → fmdtools-2.3.2}/tests/__init__.py +3 -1
- {fmdtools-2.3.0 → fmdtools-2.3.2}/tests/test_graph.py +7 -2
- {fmdtools-2.3.0 → fmdtools-2.3.2}/tests/test_packages.py +1 -1
- fmdtools-2.3.0/examples/multiflow_demo/__init__.py +0 -6
- fmdtools-2.3.0/examples/pump/__init__.py +0 -6
- fmdtools-2.3.0/examples/tank/__init__.py +0 -16
- fmdtools-2.3.0/fmdtools.egg-info/SOURCES.txt +0 -125
- fmdtools-2.3.0/fmdtools.egg-info/requires.txt +0 -12
- fmdtools-2.3.0/fmdtools.egg-info/top_level.txt +0 -3
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/parameter.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/examples/airspacelib/base/state.py +0 -0
- /fmdtools-2.3.0/examples/airspacelib/wildfireresponse/environment.py → /fmdtools-2.3.2/examples/airspacelib/wildfire_response/model_environment.py +0 -0
- {fmdtools-2.3.0/examples/eps → fmdtools-2.3.2/examples/electric_power_system}/__init__.py +0 -0
- /fmdtools-2.3.0/examples/eps/eps.py → /fmdtools-2.3.2/examples/electric_power_system/model_main.py +0 -0
- {fmdtools-2.3.0/examples/asg_demo → fmdtools-2.3.2/examples/human_hazard_mitigation}/__init__.py +0 -0
- /fmdtools-2.3.0/examples/asg_demo/demo_model.py → /fmdtools-2.3.2/examples/human_hazard_mitigation/model_main.py +0 -0
- {fmdtools-2.3.0/examples/multirotor → fmdtools-2.3.2/examples/multirotor_drone}/__init__.py +0 -0
- {fmdtools-2.3.0/examples/rover → fmdtools-2.3.2/examples/navigating_rover}/__init__.py +0 -0
- /fmdtools-2.3.0/examples/multiflow_demo/multiflow_demo.py → /fmdtools-2.3.2/examples/state_communication/model_main.py +0 -0
- /fmdtools-2.3.0/examples/pump/ex_pump.py → /fmdtools-2.3.2/examples/water_pump/model_main.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/fmdtools.egg-info/dependency_links.txt +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/setup.cfg +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/graph/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/graph/label.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/graph/style.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/phases.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/result.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/analyze/tabulate.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/action.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/base.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/component.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/function.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/architecture/geom.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/base.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/block/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/block/action.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/block/component.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/block/function.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/base.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/parameter.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/rand.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/state.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/container/time.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/environment.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/flow/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/flow/base.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/object/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/object/base.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/object/coords.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/object/geom.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/define/object/timer.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/sim/__init__.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/sim/propagate.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/sim/scenario.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2/src}/fmdtools/sim/search.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/tests/common.py +0 -0
- {fmdtools-2.3.0 → fmdtools-2.3.2}/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.2
|
|
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.2
|
|
8
8
|
---------------------------
|
|
9
9
|
Apache License
|
|
10
10
|
Version 2.0, January 2004
|
|
@@ -253,10 +253,20 @@ Requires-Dist: matplotlib>=3.7.0
|
|
|
253
253
|
Requires-Dist: pandas[all]
|
|
254
254
|
Requires-Dist: ordered-set
|
|
255
255
|
Requires-Dist: dill
|
|
256
|
-
Requires-Dist: recordclass==0.
|
|
256
|
+
Requires-Dist: recordclass==0.24
|
|
257
257
|
Requires-Dist: pytest
|
|
258
258
|
Requires-Dist: graphviz
|
|
259
259
|
Requires-Dist: shapely>=2.0
|
|
260
|
+
Provides-Extra: examples
|
|
261
|
+
Requires-Dist: deap; extra == "examples"
|
|
262
|
+
Requires-Dist: pymoo; extra == "examples"
|
|
263
|
+
Requires-Dist: scikit-learn; extra == "examples"
|
|
264
|
+
Requires-Dist: multiprocess; extra == "examples"
|
|
265
|
+
Requires-Dist: pathos; extra == "examples"
|
|
266
|
+
Requires-Dist: adjustText; extra == "examples"
|
|
267
|
+
Requires-Dist: jinja2; extra == "examples"
|
|
268
|
+
Provides-Extra: all
|
|
269
|
+
Requires-Dist: fmdtools[examples]; extra == "all"
|
|
260
270
|
Dynamic: license-file
|
|
261
271
|
|
|
262
272
|
[](https://github.com/nasa/fmdtools)
|
|
@@ -270,8 +280,8 @@ Dynamic: license-file
|
|
|
270
280
|
[](https://github.com/nasa/fmdtools/releases)
|
|
271
281
|
[](https://github.com/nasa/fmdtools/tags)
|
|
272
282
|
[](https://www.codefactor.io/repository/github/nasa/fmdtools)
|
|
273
|
-
[](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/full-py313/junit/report.html)
|
|
274
|
-
[](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)
|
|
275
285
|
[](https://github.com/nasa/fmdtools/blob/main/LICENSE)
|
|
276
286
|
[](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixD)
|
|
277
287
|
|
|
@@ -279,6 +289,16 @@ Dynamic: license-file
|
|
|
279
289
|
|
|
280
290
|
[Click here to view the the full documentation website.](https://nasa.github.io/fmdtools)
|
|
281
291
|
|
|
292
|
+
### Demo Portfolio
|
|
293
|
+
|
|
294
|
+
See: [Examples](https://nasa.github.io/fmdtools/examples/Examples.html)
|
|
295
|
+
|
|
296
|
+
<img src="/docs/_images/tutorial_fmdtools_basics.webp" width="15%"></img>
|
|
297
|
+
<img src="/docs/_images/demo_proxthreat.webp" width="15%"></img>
|
|
298
|
+
<img src="/docs/_images/demo_wildfire.webp" width="15%"></img>
|
|
299
|
+
<img src="/docs/_images/paper_jcise_dsa.webp" width="15%"></img>
|
|
300
|
+
<img src="/docs/_images/demo_urban_flight.webp" width="15%"></img>
|
|
301
|
+
<img src="/docs/_images/demo_degradation.webp" width="15%"></img>
|
|
282
302
|
|
|
283
303
|
## About
|
|
284
304
|
|
|
@@ -310,11 +330,11 @@ The fmdtools library is developed in Python 3.13 but is tested to maintain compa
|
|
|
310
330
|
|
|
311
331
|
| Python Version | Doctests |
|
|
312
332
|
| -------- | ------- |
|
|
313
|
-
| 3.11 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py311/junit/report.html) |
|
|
314
|
-
| 3.12 | [](https://htmlpreview.github.io/?https://github.com/nasa/fmdtools/blob/main/reports/doctests-py312/junit/report.html) |
|
|
315
|
-
| 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) |
|
|
316
336
|
|
|
317
|
-
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.
|
|
318
338
|
|
|
319
339
|
### Set up python tooling environment
|
|
320
340
|
|
|
@@ -355,25 +375,30 @@ For development as well as interactive use of tutorials and models, we reccomend
|
|
|
355
375
|
For this installation, fmdtools can be downloaded from the [fmdtools github repository](https://github.com/nasa/fmdtools/) using:
|
|
356
376
|
|
|
357
377
|
```
|
|
378
|
+
cd /path/to/fmdtools
|
|
358
379
|
git clone https://github.com/nasa/fmdtools.git
|
|
359
380
|
```
|
|
360
381
|
|
|
361
382
|
This may then be installed using:
|
|
362
383
|
|
|
363
384
|
```
|
|
364
|
-
pip install -e
|
|
385
|
+
pip install -e .[all] --group dev
|
|
365
386
|
```
|
|
366
387
|
|
|
367
|
-
|
|
388
|
+
Which will install both fmdtools as well as examples (`[all]` option) as well as testing and development dependencies (`--group dev` option)
|
|
389
|
+
|
|
390
|
+
More guidance on development installations is provided in [How to Contribute](https://nasa.github.io/fmdtools/docs-source/Contributions.html#how-to-contribute)
|
|
391
|
+
|
|
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.:
|
|
368
393
|
|
|
369
394
|
```
|
|
370
|
-
git checkout v2.3.
|
|
395
|
+
git checkout v2.3.2
|
|
371
396
|
```
|
|
372
397
|
|
|
373
398
|
|
|
374
399
|
#### Dependencies
|
|
375
400
|
|
|
376
|
-
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.
|
|
377
402
|
|
|
378
403
|
```
|
|
379
404
|
scipy
|
|
@@ -409,7 +434,7 @@ Some additional indirect dependencies (listed below) may be needed for developme
|
|
|
409
434
|
deap
|
|
410
435
|
# used for optimization of rover faults
|
|
411
436
|
# license: (LGPL-3.0) https://github.com/DEAP/deap/blob/master/LICENSE.txt
|
|
412
|
-
# 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
|
|
413
438
|
pymoo
|
|
414
439
|
# used for optimization of tank and rover examples
|
|
415
440
|
# license: (Apache 2.0) https://github.com/anyoptimization/pymoo/blob/main/LICENSE
|
|
@@ -447,14 +472,13 @@ One `fmdtools` is installed, you should be able to run:
|
|
|
447
472
|
import fmdtools
|
|
448
473
|
```
|
|
449
474
|
|
|
450
|
-
To check the version of fmdtools, you can
|
|
475
|
+
To check the version of fmdtools, you can check:
|
|
451
476
|
```
|
|
452
|
-
|
|
453
|
-
importlib.metadata.version("fmdtools")
|
|
477
|
+
fmdtools.__version__
|
|
454
478
|
```
|
|
455
479
|
which should return the current version of fmdtools.
|
|
456
480
|
|
|
457
|
-
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)).
|
|
458
482
|
|
|
459
483
|
### Explore Tutorials and Resources
|
|
460
484
|
|
|
@@ -505,8 +529,8 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
505
529
|
author = {{NASA}},
|
|
506
530
|
title = {fmdtools},
|
|
507
531
|
url = {https://github.com/nasa/fmdtools},
|
|
508
|
-
version = {2.3.
|
|
509
|
-
date = {2025-
|
|
532
|
+
version = {2.3.2},
|
|
533
|
+
date = {2025-3-6},
|
|
510
534
|
}
|
|
511
535
|
```
|
|
512
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="/docs/_images/tutorial_fmdtools_basics.webp" width="15%"></img>
|
|
26
|
+
<img src="/docs/_images/demo_proxthreat.webp" width="15%"></img>
|
|
27
|
+
<img src="/docs/_images/demo_wildfire.webp" width="15%"></img>
|
|
28
|
+
<img src="/docs/_images/paper_jcise_dsa.webp" width="15%"></img>
|
|
29
|
+
<img src="/docs/_images/demo_urban_flight.webp" width="15%"></img>
|
|
30
|
+
<img src="/docs/_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
|
|
|
@@ -94,25 +104,30 @@ For development as well as interactive use of tutorials and models, we reccomend
|
|
|
94
104
|
For this installation, fmdtools can be downloaded from the [fmdtools github repository](https://github.com/nasa/fmdtools/) using:
|
|
95
105
|
|
|
96
106
|
```
|
|
107
|
+
cd /path/to/fmdtools
|
|
97
108
|
git clone https://github.com/nasa/fmdtools.git
|
|
98
109
|
```
|
|
99
110
|
|
|
100
111
|
This may then be installed using:
|
|
101
112
|
|
|
102
113
|
```
|
|
103
|
-
pip install -e
|
|
114
|
+
pip install -e .[all] --group dev
|
|
104
115
|
```
|
|
105
116
|
|
|
106
|
-
|
|
117
|
+
Which will install both fmdtools as well as examples (`[all]` option) as well as testing and development dependencies (`--group dev` option)
|
|
118
|
+
|
|
119
|
+
More guidance on development installations is provided in [How to Contribute](https://nasa.github.io/fmdtools/docs-source/Contributions.html#how-to-contribute)
|
|
120
|
+
|
|
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.:
|
|
107
122
|
|
|
108
123
|
```
|
|
109
|
-
git checkout v2.3.
|
|
124
|
+
git checkout v2.3.2
|
|
110
125
|
```
|
|
111
126
|
|
|
112
127
|
|
|
113
128
|
#### Dependencies
|
|
114
129
|
|
|
115
|
-
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.
|
|
116
131
|
|
|
117
132
|
```
|
|
118
133
|
scipy
|
|
@@ -148,7 +163,7 @@ Some additional indirect dependencies (listed below) may be needed for developme
|
|
|
148
163
|
deap
|
|
149
164
|
# used for optimization of rover faults
|
|
150
165
|
# license: (LGPL-3.0) https://github.com/DEAP/deap/blob/master/LICENSE.txt
|
|
151
|
-
# 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
|
|
152
167
|
pymoo
|
|
153
168
|
# used for optimization of tank and rover examples
|
|
154
169
|
# license: (Apache 2.0) https://github.com/anyoptimization/pymoo/blob/main/LICENSE
|
|
@@ -186,14 +201,13 @@ One `fmdtools` is installed, you should be able to run:
|
|
|
186
201
|
import fmdtools
|
|
187
202
|
```
|
|
188
203
|
|
|
189
|
-
To check the version of fmdtools, you can
|
|
204
|
+
To check the version of fmdtools, you can check:
|
|
190
205
|
```
|
|
191
|
-
|
|
192
|
-
importlib.metadata.version("fmdtools")
|
|
206
|
+
fmdtools.__version__
|
|
193
207
|
```
|
|
194
208
|
which should return the current version of fmdtools.
|
|
195
209
|
|
|
196
|
-
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)).
|
|
197
211
|
|
|
198
212
|
### Explore Tutorials and Resources
|
|
199
213
|
|
|
@@ -244,8 +258,8 @@ To cite a particular version of the fmdtools, you may use:
|
|
|
244
258
|
author = {{NASA}},
|
|
245
259
|
title = {fmdtools},
|
|
246
260
|
url = {https://github.com/nasa/fmdtools},
|
|
247
|
-
version = {2.3.
|
|
248
|
-
date = {2025-
|
|
261
|
+
version = {2.3.2},
|
|
262
|
+
date = {2025-3-6},
|
|
249
263
|
}
|
|
250
264
|
```
|
|
251
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.0/examples/taxiway/asset.py → fmdtools-2.3.2/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.0/examples/taxiway/ATC.py → fmdtools-2.3.2/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.0/examples/taxiway/common.py → fmdtools-2.3.2/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.0/examples/taxiway/model.py → fmdtools-2.3.2/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",
|