Skip to content

AeroMAPS

Initialization module for the AeroMAPS package, which provides the function to create an AeroMAPSProcess.

create_process

create_process(configuration_file=None, custom_models=None, optimisation=False)

Create an AeroMAPS process.

Parameters:

Name Type Description Default
configuration_file str

Path to the configuration file (default is None).

None
models dict

Dictionary of additional models to be used. These are merged with the standard models loaded from the configuration file's models.standards list (default is None).

required
optimisation bool

Whether to enable optimisation (default is False).

False

Returns:

Type Description
AeroMAPSProcess

An instance of the AeroMAPSProcess class.

Source code in aeromaps/__init__.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
def create_process(
    configuration_file=None,
    custom_models=None,
    optimisation=False,
) -> AeroMAPSProcess:
    """
    Create an AeroMAPS process.

    Parameters
    ----------
    configuration_file : str, optional
        Path to the configuration file (default is None).
    models : dict, optional
        Dictionary of additional models to be used. These are merged with
        the standard models loaded from the configuration file's
        `models.standards` list (default is None).
    optimisation : bool, optional
        Whether to enable optimisation (default is False).

    Returns
    -------
    AeroMAPSProcess
        An instance of the AeroMAPSProcess class.
    """

    return AeroMAPSProcess(
        configuration_file=configuration_file,
        custom_models=custom_models,
        optimisation=optimisation,
    )

assemble_processes

assemble_processes(processes)

Create a MultiProcess manager for scenario comparison.

Parameters:

Name Type Description Default
processes dict or list

Dictionary mapping scenario names to AeroMAPSProcess objects, or a list of AeroMAPSProcess objects.

required

Returns:

Type Description
AeroMAPSProcessesAssembly

An instance of the MultiProcess class for managing multiple scenarios.

Examples:

>>> process1 = create_process(configuration_file="config1.yaml")
>>> process2 = create_process(configuration_file="config2.yaml")
>>> process1.compute()
>>> process2.compute()
>>> multi = assemble_processes({"scenario_1": process1, "scenario_2": process2})
>>> multi.list_available_plots()
>>> multi.plot("co2_emissions_comparison")
Source code in aeromaps/__init__.py
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
def assemble_processes(processes) -> AeroMAPSProcessesAssembly:
    """
    Create a MultiProcess manager for scenario comparison.

    Parameters
    ----------
    processes : dict or list
        Dictionary mapping scenario names to AeroMAPSProcess objects,
        or a list of AeroMAPSProcess objects.

    Returns
    -------
    AeroMAPSProcessesAssembly
        An instance of the MultiProcess class for managing multiple scenarios.

    Examples
    --------
    >>> process1 = create_process(configuration_file="config1.yaml")
    >>> process2 = create_process(configuration_file="config2.yaml")
    >>> process1.compute()
    >>> process2.compute()
    >>> multi = assemble_processes({"scenario_1": process1, "scenario_2": process2})
    >>> multi.list_available_plots()
    >>> multi.plot("co2_emissions_comparison")
    """
    return AeroMAPSProcessesAssembly(processes)