d['smart_tracing_policy_isolate'] = 'basic' d['smart_tracing_isolated_contacts'] = 100000 # testing d['smart_tracing_policy_test'] = 'basic' d['smart_tracing_tested_contacts'] = 100000 d['trigger_tracing_after_posi_trace_test'] = False return d sim_info = options_to_str( expected_daily_base_expo_per100k=expected_daily_base_expo_per100k) # baseline experiment.add( simulation_info=sim_info, country=country, area=area, measure_list=m, test_update=test_update, seed_summary_path=seed_summary_path, set_initial_seeds_to=set_initial_seeds_to, set_calibrated_params_to=calibrated_params, full_scale=full_scale, store_mob=store_mob, expected_daily_base_expo_per100k=expected_daily_base_expo_per100k) print(f'{experiment_info} configuration done.') # execute all simulations experiment.run_all()
measure_window_in_hours['start'], measure_window_in_hours['end']), p_stay_home=p_stay_home), BetaMultiplierMeasureByType( t_window=Interval( measure_window_in_hours['start'], measure_window_in_hours['end']), beta_multiplier=calibration_lockdown_beta_multipliers) ] simulation_info = options_to_str(iter=iteration) experiment.add( simulation_info=simulation_info, country=country, area=area, measure_list=m, lockdown_measures_active=False, test_update=None, seed_summary_path=seed_summary_path, set_calibrated_params_to=calibrated_params, set_initial_seeds_to=set_initial_seeds_to, full_scale=full_scale) print(f'{experiment_info} configuration done.') # execute all simulations experiment.run_all()
site_type: 1.0 for site_type in calibration_lockdown_site_closures } p_stay_home_dict = { **p_stay_home_dict_closures, **p_stay_home_dict_mobility_reduced } m = [ SocialDistancingBySiteTypeForAllMeasure( t_window=Interval(measure_window_in_hours['start'], measure_window_in_hours['end']), p_stay_home_dict=p_stay_home_dict), ] sim_info = options_to_str(validation_region=val_area) experiment.add(simulation_info=sim_info, country=val_country, area=val_area, measure_list=m, seed_summary_path=seed_summary_path, set_calibrated_params_to=calibrated_params, set_initial_seeds_to=set_initial_seeds_to, full_scale=full_scale) print(f'{experiment_info} configuration done.') # execute all simulations experiment.run_all()
end_date = calibration_lockdown_dates[country]['end'] # create experiment object experiment_info = f'{name}-{country}-{area}' experiment = Experiment( experiment_info=experiment_info, start_date=start_date, end_date=end_date, random_repeats=random_repeats, cpu_count=cpu_count, full_scale=full_scale, verbose=verbose, ) # baseline experiment.add(simulation_info='baseline', country=country, area=area, measure_list=[], lockdown_measures_active=False, seed_summary_path=seed_summary_path, set_calibrated_params_to=calibrated_params, set_initial_seeds_to=set_initial_seeds_to, full_scale=full_scale, store_mob=store_mob) print(f'{experiment_info} configuration done.') # execute all simulations experiment.run_all()
maxiters=maxBOiters) calibrated_params['beta_site'] = expparams[ 'beta_scaling'] * calibrated_params['beta_site'] simulation_info = options_to_str( exp=exp, beta_scaling=expparams['beta_scaling']) summary_path = experiment_info + '/' + experiment_info + '-' + simulation_info summary_paths.append(summary_path) if not os.path.exists('summaries/' + summary_path + '.pk'): experiment.add( simulation_info=simulation_info, country=country, area=area, test_update=None, measure_list=[], # set automatically during lockdown seed_summary_path=seed_summary_path, set_initial_seeds_to=set_initial_seeds_to, set_calibrated_params_to=calibrated_params, full_scale=expparams['full_scale']) print(f'{experiment_info} configuration done.') else: print( f'Summary file exists already, skipping experiment {experiment_info}-{simulation_info}' ) if not plot_only: experiment.run_all() else: print( 'Simulations were not run. Trying to produce plots from existing summaries.'