""" Provides code to run multiple simulations. Uses sim01, sim, concurrency, concurrency01 """ from sim01 import run_simulations_mp, onesim # Run model with medium sex worker population from params import ehg_staged03_csw as model_params, phi_ehg ### model globals model_params = model_params.copy() model_params.update( model_phi = phi_ehg, outfile_pattern = 'eps??sim??.out', n_sim = 100, #the number of replications for each parameter set pop_size = 2 * 10**4, #equal number of males & females ) if __name__ == '__main__': outfolder = 'temp' try: import os os.mkdir(outfolder) except OSError: pass model_name = 'test' model_params['outfolder'] = outfolder model_params['model_name'] = model_name run_simulations_mp(model_params)
""" Provides constants and parameter set for simulation. It does so by importing relevant parts from the pool of parameters params.py and overriding/updating them as needed by the current simulation. This simulation aims to include two extra types of individuals in the population: miners and PREP-treated persons. """ from params import shared_params, ehg_staged03_csw # miners p_miners = 0.08 # under prep treatment p_PREP = 0.1 beta_PREP = (0.0, 0.0, 0.0, 0.0) # Base case scenario; should be the same as running sim.py and concurrency.py # get the shared params ehg_staged01 = shared_params.copy() # update the sim adding miners inside ehg_staged05_csw = ehg_staged03_csw.copy() ehg_staged05_csw.update(sim_name="ehg-staged", p_miners=p_miners, p_PREP=p_PREP, beta_PREP=beta_PREP)