ScenarioRunnerNoTrade
This function runs the model for all countries in the world, no trade.
Methods:
.run_model_defaults_no_trade
.run_model_defaults_no_trade(
this_simulation, show_map_figures = False, show_country_figures = False,
create_pptx_with_all_countries = False, scenario_option = []
)
Set a few options to set on top of the specific options for the given simulation These could easily change if another scenario was of more interest.
.run_optimizer_for_country
.run_optimizer_for_country(
country_data, scenario_option, create_pptx_with_all_countries,
show_country_figures, save_all_results, figure_save_postfix = '',
title = 'Untitled'
)
.fill_data_for_map
.fill_data_for_map(
world, country_code, needs_ratio
)
.run_model_no_trade
.run_model_no_trade(
title = 'untitled', create_pptx_with_all_countries = True,
show_country_figures = False, show_map_figures = False,
add_map_slide_to_pptx = True, scenario_option = [], countries_list = [],
figure_save_postfix = '', return_results = False, save_all_results = False
)
This function runs the model for all countries in the world, no trade. countries_list is a list of country codes to run the model for, but if there's an "!" in the list, you skip that one. If you leave it blank, it runs all the countries
You can generate a powerpoint as an option here too
.save_pptx
.save_pptx(
title
)
.save_all_results_to_csv
.save_all_results_to_csv(
results, title
)
Save the results to a csv file Read by the web interface
.get_countries_to_run_and_skip
.get_countries_to_run_and_skip(
countries_list
)
if there's any country code with a "!", skip that one For example, if !USA is one of the country codes, that one will be skipped If !USA and !CHN are country codes, then both will skip if there's no ! in any of the codes, then only the ones listed will be run.
.run_many_options
.run_many_options(
scenario_options, title, add_map_slide_to_pptx = True, show_map_figures = False,
countries_list = [], return_results = False
)
.create_several_maps_with_different_assumptions
.create_several_maps_with_different_assumptions(
this_simulation, show_map_figures = False
)
.run_desired_simulation
.run_desired_simulation(
this_simulation, args
)
.apply_custom_parameters
.apply_custom_parameters(
country_data, scenario_option
)
Apply custom parameters to the country data using parameters defined in the scenario yaml file
.verify_country_data
.verify_country_data(
country_data
)
Runs a bunch of checks to make sure the country data is reasonable
Arguments
- country_data : a dictionary with the country data