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)
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
|
|
models
|
Dictionary of model instances to be used in the process. |
required | |
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
|
Source code in aeromaps/core/process.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
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
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
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
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 | |
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
291 292 293 294 295 296 297 | |
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
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
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
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
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
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
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
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
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
418 419 420 421 422 423 424 425 426 427 | |
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
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 | |
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
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | |
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
484 485 486 487 488 489 490 | |
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
492 493 494 495 496 497 498 499 500 | |
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
502 503 504 505 506 507 508 509 510 | |
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
512 513 514 515 516 517 518 519 520 | |
plot ¶
plot(name, save=False, size_inches=None, remove_title=False)
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
|
Returns:
| Type | Description |
|---|---|
fig
|
Object holding the created plot, as returned by the plot function. |
Source code in aeromaps/core/process.py
522 523 524 525 526 527 528 529 530 531 532 533 534 535 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 | |