aeromaps.core.process¶
High-level AeroMAPS process orchestration.
This module defines the main process class that orchestrates parameter initialization, model instantiation, GEMSEO configuration, generic energy carrier handling, and data export for the AeroMAPS framework.
AeroMAPSProcess ¶
AeroMAPSProcess(configuration_file=None, custom_models=None, optimisation=False, disable_execution_statistics=False)
Bases: object
High-level AeroMAPS process driver.
This class configures parameters, instantiates discipline models, builds GMESEO objects, handles generic energy carrier pathways, and manages input and output data structures for AeroMAPS studies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration_file
|
Path to a configuration JSON file overriding default settings. |
None
|
|
custom_models
|
Dictionary of model instances to be used in the process. |
None
|
|
optimisation
|
Whether to configure GEMSEO for optimisation instead of a pure MDA chain. |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
configuration_file |
Path of the active configuration JSON file. |
|
models |
Dictionary of discipline and auxiliary models used in the process. |
|
parameters |
Central parameter container used by all models and disciplines. |
|
disciplines |
List of wrapped discipline objects used by GEMSEO or the MDA chain. |
|
data |
Dictionary storing structured inputs and outputs, including scalar, string, vector, climate, and LCA results. |
|
json |
Dictionary reserved for JSON-compatible representations of results. |
|
mda_chain |
GEMSEO MDAChain instance used when running pure MDA analyses. |
|
scenario |
GEMSEO scenario instance for conventional MDO. |
|
scenario_adapted |
GEMSEO scenario of scenario instance for the bilevel optimization problem. |
|
gemseo_settings |
Dictionary containing all GEMSEO-related configuration options. |
|
fleet |
Fleet instance when the bottom-up fleet model is activated, else None. |
|
fleet_model |
FleetModel instance wrapping the fleet when the bottom-up model is used. |
|
energy_resources_data |
Parsed configuration data for generic energy resources. |
|
energy_processes_data |
Parsed configuration data for generic energy processes. |
|
energy_carriers_data |
Parsed configuration data for aviation energy carrier pathways. |
|
pathways_manager |
EnergyCarrierManager instance describing available energy pathways. |
|
climate_historical_data |
Historical climate dataset used by climate-related models. |
Initialize an AeroMAPSProcess instance.
This method loads configuration settings, initializes parameters, deep-copies the provided models dictionary when needed, and performs the common setup. It then configures either an MDA chain or an optimization scenario depending on the specified mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration_file
|
Path to a configuration YAML file overriding default settings. |
None
|
|
custom_models
|
Dictionary of additional model instances to be merged with
the standard models loaded from the configuration file's
|
None
|
|
optimisation
|
Whether to configure GEMSEO for optimization instead of a pure MDA chain. |
False
|
|
disable_execution_statistics
|
Whether to disable GEMSEO's execution statistics shared memory. If False, statistics are enabled. Set to True to disable (useful when running many disciplines to avoid semaphore exhaustion). |
False
|
Source code in aeromaps/core/process.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
common_setup ¶
common_setup()
Perform common setup steps independent of analysis type.
This method initializes the disciplines list, the main data container, and JSON storage, and computes index structures and climate data. It also stores the flag indicating whether to add example aircraft and subcategories to the fleet.
Warning
This method should be called only if end year was modified, otherwise it is called in init.
Source code in aeromaps/core/process.py
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | |
setup_mda ¶
setup_mda()
Configure the process for a standalone MDA chain.
This method initializes generic energy inputs and disciplines, then builds a GEMSEO MDAChain with default convergence settings for multidisciplinary analysis execution of AeroMAPS.
Warning
This method should be called only if end year was modified, otherwise it is called in init.
Source code in aeromaps/core/process.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | |
setup_optimisation ¶
setup_optimisation()
Configure the process for GEMSEO-based optimization.
This method initializes the internal GEMSEO settings dictionary so that optimization scenarios can be defined and executed later.
Source code in aeromaps/core/process.py
502 503 504 505 506 507 508 | |
create_gemseo_scenario ¶
create_gemseo_scenario()
Build a single-level GEMSEO MDO scenario.
This method initializes generic energy inputs and disciplines,
and then creates a GEMSEO scenario using the current
gemseo_settings for objective, design space, scenario type,
and formulation.
Source code in aeromaps/core/process.py
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | |
create_gemseo_bilevel ¶
create_gemseo_bilevel()
Build a GEMSEO bilevel optimization formulation.
This method wraps an inner GEMSEO scenario in an
MDOScenarioAdapter and creates an outer scenario that
optimizes over the adapter. If the inner scenario is not yet
defined, it is created using the current gemseo_settings.
Source code in aeromaps/core/process.py
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | |
compute ¶
compute()
Run the configured analysis or optimization.
This method prepares input data, then executes either a bilevel optimization, a single-level GEMSEO scenario, or an MDA chain depending on the current configuration. After execution, it updates the internal data structures with model outputs.
Source code in aeromaps/core/process.py
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
get_dataframes ¶
get_dataframes()
Return all main DataFrames as a dictionary, generated on demand.
This method generates and returns a dictionary of key DataFrames representing inputs, outputs, and climate-related quantities in a tabular form suitable for inspection or export.
Returns:
| Type | Description |
|---|---|
dataframes
|
Dictionary mapping DataFrame names to pandas DataFrame instances for data information, inputs, and outputs. |
Source code in aeromaps/core/process.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | |
get_json ¶
get_json()
Return the model outputs as a JSON-serializable dictionary.
Returns:
| Type | Description |
|---|---|
json_data
|
Dictionary containing JSON-compatible inputs and outputs. |
Source code in aeromaps/core/process.py
632 633 634 635 636 637 638 639 640 641 | |
write_json ¶
write_json(file_name=None)
Write model inputs and outputs to a JSON file.
This method builds the JSON-compatible data and writes it to disk, using either the provided file name or the path defined in the configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
Path to the output JSON file. If None, the path from the configuration is used. |
None
|
Source code in aeromaps/core/process.py
643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | |
write_excel ¶
write_excel(file_name=None)
Write main result tables to an Excel workbook.
This method exports data information, inputs, and outputs into separate sheets of a single Excel file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
Path to the output Excel file. If None, the path from the configuration is used. |
None
|
Source code in aeromaps/core/process.py
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 | |
generate_n2 ¶
generate_n2()
Generate an N2 diagram for the current disciplines.
This method calls GEMSEO to create an N2 plot describing the coupling structure between the configured disciplines.
Source code in aeromaps/core/process.py
709 710 711 712 713 714 715 | |
describe_models ¶
describe_models(include_agnostic=True, scope=None, domain=None, display=True)
Summarise every discipline wired into this process.
Surfaces, for each discipline, its domain (air traffic, fleet, energy,
costs, climate, … — derived from the model class's module path under
aeromaps.models, so new models classify automatically), its
:attr:~aeromaps.models.base.AeroMAPSModel.MARKET_SCOPE
(per-market / cross-market / aggregator / market-agnostic), its
:attr:~aeromaps.models.base.AeroMAPSModel.MODEL_APPROACH (top-down /
bottom-up, where applicable), its coupling
role — loop (inside the MDA feedback cycle, re-run every iteration and
therefore driving convergence cost) vs feed-fwd (run once), derived from
the GEMSEO coupling structure — the market it is bound to, its region namespace
(multi-regional runs) and its I/O counts. This is the topology + cost view that
is otherwise only recoverable by reading the factory wiring and the N2 plot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_agnostic
|
bool
|
Include |
True
|
scope
|
str or None
|
If set (one of :data: |
None
|
domain
|
str or None
|
If set (one of the domains listed in the domain summary, e.g.
|
None
|
display
|
bool
|
If True, print the summary; the string is returned in either case. |
True
|
Returns:
| Type | Description |
|---|---|
str
|
The formatted multi-line summary. |
Source code in aeromaps/core/process.py
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 | |
list_available_plots ¶
list_available_plots()
List the names of supported plots.
Returns:
| Type | Description |
|---|---|
plot_names
|
List of strings identifying available plot functions. |
Source code in aeromaps/core/process.py
944 945 946 947 948 949 950 951 952 | |
list_float_inputs ¶
list_float_inputs()
Return the current scalar input values.
Returns:
| Type | Description |
|---|---|
float_inputs
|
Dictionary of scalar input names and their values. |
Source code in aeromaps/core/process.py
954 955 956 957 958 959 960 961 962 | |
list_str_inputs ¶
list_str_inputs()
Return the current string input values.
Returns:
| Type | Description |
|---|---|
str_inputs
|
Dictionary of string input names and their values. |
Source code in aeromaps/core/process.py
964 965 966 967 968 969 970 971 972 | |
plot ¶
plot(name, save=False, size_inches=None, remove_title=False, fig=None, ax=None, legend=True)
Generate a predefined AeroMAPS plot.
Depending on the plot name, this method uses either generic or fleet-specific plotting functions and optionally saves the figure to a PDF file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
Identifier of the plot to generate, possible to obtain from list_available_plots(). |
required | |
save
|
Whether to save the generated plot as a PDF file. |
False
|
|
size_inches
|
Optional figure size in inches as a tuple or list. |
None
|
|
remove_title
|
Whether to remove the plot title before saving. |
False
|
|
fig
|
Figure
|
Existing figure to draw into. If provided together with |
None
|
ax
|
Axes
|
Existing axes to draw into. Must be provided together with |
None
|
legend
|
bool or str
|
Controls the legend. |
True
|
Returns:
| Type | Description |
|---|---|
fig
|
Object holding the created plot, as returned by the plot function. |
Source code in aeromaps/core/process.py
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | |