smif.data_layer.abstract_config_store module

A config store holds the configuration data for running system-of-systems models with smif: - model runs - system-of-systems models - model definitions - strategies - scenarios and scenario variants - narratives

Summary

Data:

ConfigStore A ConfigStore must implement each of the abstract methods defined in this interface

Reference

class smif.data_layer.abstract_config_store.ConfigStore[source]

Bases: object

A ConfigStore must implement each of the abstract methods defined in this interface

read_model_runs()[source]

Read all system-of-system model runs

Returns:
Return type:list[ModelRun]
read_model_run(model_run_name)[source]

Read a system-of-system model run

Parameters:model_run_name (str) –
Returns:
Return type:ModelRun
write_model_run(model_run)[source]

Write system-of-system model run

Parameters:model_run (ModelRun) –
update_model_run(model_run_name, model_run)[source]

Update system-of-system model run

Parameters:
delete_model_run(model_run_name)[source]

Delete a system-of-system model run

Parameters:model_run_name (str) –
read_sos_models()[source]

Read all system-of-system models

Returns:
Return type:list[SosModel]
read_sos_model(sos_model_name)[source]

Read a specific system-of-system model

Parameters:sos_model_name (str) –
Returns:
Return type:SosModel
write_sos_model(sos_model)[source]

Write system-of-system model

Parameters:sos_model (SosModel) –
update_sos_model(sos_model_name, sos_model)[source]

Update system-of-system model

Parameters:
delete_sos_model(sos_model_name)[source]

Delete a system-of-system model

Parameters:sos_model_name (str) –
read_models()[source]

Read all models

Returns:
Return type:list[Model]
read_model(model_name)[source]

Read a model

Parameters:model_name (str) –
Returns:
Return type:Model
write_model(model)[source]

Write a model

Parameters:model (Model) –
update_model(model_name, model)[source]

Update a model

Parameters:
  • model_name (str) –
  • model (Model) –
delete_model(model_name)[source]

Delete a model

Parameters:model_name (str) –
read_scenarios()[source]

Read scenarios

Returns:
Return type:list[ScenarioModel]
read_scenario(scenario_name)[source]

Read a scenario

Parameters:scenario_name (str) –
Returns:
Return type:ScenarioModel
write_scenario(scenario)[source]

Write scenario

Parameters:scenario (ScenarioModel) –
update_scenario(scenario_name, scenario)[source]

Update scenario

Parameters:
  • scenario_name (str) –
  • scenario (ScenarioModel) –
delete_scenario(scenario_name)[source]

Delete scenario from project configuration

Parameters:scenario_name (str) –
read_scenario_variants(scenario_name)[source]

Read variants of a given scenario

Parameters:scenario_name (str) –
Returns:
Return type:list[dict]
read_scenario_variant(scenario_name, variant_name)[source]

Read a scenario variant

Parameters:
  • scenario_name (str) –
  • variant_name (str) –
Returns:

Return type:

dict

write_scenario_variant(scenario_name, variant)[source]

Write scenario to project configuration

Parameters:
  • scenario_name (str) –
  • variant (dict) –
update_scenario_variant(scenario_name, variant_name, variant)[source]

Update scenario to project configuration

Parameters:
  • scenario_name (str) –
  • variant_name (str) –
  • variant (dict) –
delete_scenario_variant(scenario_name, variant_name)[source]

Delete scenario from project configuration

Parameters:
  • scenario_name (str) –
  • variant_name (str) –
read_narrative(sos_model_name, narrative_name)[source]

Read narrative from sos_model

Parameters:
  • sos_model_name (str) –
  • narrative_name (str) –
read_strategies(modelrun_name)[source]

Read strategies for a given model run

Parameters:model_run_name (str) –
Returns:
Return type:list[dict]
write_strategies(modelrun_name, strategies)[source]

Write strategies for a given model_run

Parameters: