noads.core.scenarios.multiscenario#

Multi-scenario vectorization of time-dependant scenarios.

class noads.core.scenarios.multiscenario.MultiScenario(name, temporal_scenario, mean_outputs, scenario_names, fixed_inputs, differentiation_method=DifferentiationMethod.REVERSE)[source]#

Bases: Model

Batch a temporal scenario across several background scenarios.

The wrapped TemporalScenario is vectorized with jax.vmap over an ensemble of background scenarios (e.g. SSP2-1.9, SSP2-2.6, SSP2-3.4), so the whole ensemble is evaluated and differentiated in a single compiled call. Inputs listed in fixed_inputs are shared by all scenarios (exposed as fixed.<name>), while the remaining inputs are scenario-specific (exposed as <scenario>.<name>); the same convention applies to the outputs. Outputs listed in mean_outputs are also averaged across the ensemble and exposed as mean.<name>, which provides the objective of scenario-robust policy optimization (see the robustness formulation of the extended paper).

Parameters:
discipline: JAXDiscipline#
fixed_inputs: list[str]#

List of inputs kept fixed between scenarios.

mean_outputs: list[str]#

List of outputs to apply mean across scenarios.

scenario_inputs: list[str]#

List of scenario-specific inputs.

scenario_names: list[str]#

Names of the scenarios to batch over.

scenario_outputs: list[str]#

List of scenario outputs.

temporal_scenario: TemporalScenario#

TemporalScenario to vectorize.

Classes

MultiScenario(name, temporal_scenario, ...)

Batch a temporal scenario across several background scenarios.