smif.controller.build module

Summary

Functions:

build_model_run Builds the model run
get_initial_conditions_strategies Add pre-specified planning strategy for all initial conditions
get_model_run_definition Builds the model run
get_narratives Load the narrative data from the sos model run configuration
get_pre_specified_planning_strategies Build pre-specified planning strategies for future investments
get_scenario_objects
param scenarios:
 
type scenarios:dict :param handler: :type handler: smif.data_layer.DataInterface
get_sector_model_objects
get_strategies

Reference

smif.controller.build.get_model_run_definition(directory, modelrun)[source]

Builds the model run

Parameters:
  • directory (str) – Path to the project directory
  • modelrun (str) – Name of the model run to run
Returns:

The complete sos_model_run configuration dictionary with contained ScenarioModel, SosModel and SectorModel objects

Return type:

dict

smif.controller.build.get_scenario_objects(scenarios, handler)[source]
Parameters:
  • scenarios (dict) –
  • handler (smif.data_layer.DataInterface) –
Returns:

Return type:

list

smif.controller.build.get_sector_model_objects(sos_model_config, handler, timesteps)[source]
smif.controller.build.get_strategies(sector_model_objects, model_run_config, handler)[source]
smif.controller.build.get_pre_specified_planning_strategies(model_run_config, handler)[source]

Build pre-specified planning strategies for future investments

Parameters:
  • model_run_config (dict) –
  • handler (smif.data_layer.DataInterface) – An instance of the data interface
Returns:

Return type:

list

smif.controller.build.get_initial_conditions_strategies(sector_model_objects)[source]

Add pre-specified planning strategy for all initial conditions

Parameters:sector_model_objects (list) – A list of SectorModel
Returns:
Return type:list
smif.controller.build.get_narratives(handler, narrative_config)[source]

Load the narrative data from the sos model run configuration

Parameters:
  • handler (smif.data_layer.DataInterface) –
  • narrative_config (dict) – A dict with keys as narrative_set names and values as narrative names
Returns:

A list of smif.parameter.Narrative objects populated with data

Return type:

list

smif.controller.build.build_model_run(model_run_config)[source]

Builds the model run

Parameters:model_run_config (dict) – A valid model run configuration dict with objects
Returns:
Return type:smif.modelrun.ModelRun