""" return 0 @cache('step') def saveper(): """ SAVEPER Minute [0,?] The frequency with which output is stored. """ return time_step() @cache('run') def time_step(): """ TIME STEP Minute [0,?] The time step for the simulation. """ return 0.125 integ_teacup_temperature = functions.Integ(lambda: -heat_loss_to_room(), lambda: 180)
@cache('step') def saveper(): """ SAVEPER Day [0,?] The frequency with which output is stored. """ return time_step() @cache('run') def time_step(): """ TIME STEP Day [0,?] The time step for the simulation. """ return 1 integ_adopters_a = functions.Integ(lambda: adoption_rate_ar(), lambda: 0) integ_potential_adopters_p = functions.Integ(lambda: -adoption_rate_ar(), lambda: 500)
return time_step() @cache('run') def time_step(): """ TIME STEP --------- (time_step) Month [0,?] The time step for the simulation. """ return 0.0625 integ_total_cumulative_sales = functions.Integ(lambda: accumulating_sales(), lambda: 0) integ_tenure = functions.Integ(lambda: accumulating_tenure(), lambda: 0) integ_total_cumulative_income = functions.Integ(lambda: accumulating_income(), lambda: 0) integ_months_of_buffer = functions.Integ(lambda: income() - expenses(), lambda: initial_buffer()) integ_tier_2_clients = functions.Integ( lambda: tier_2_sales() - tier_2_client_turnover(), lambda: 0) integ_tier_2_leads = functions.Integ( lambda: tier_2_lead_aquisition() + tier_2_sales() - tier_2_leads_going_stale(), lambda: 0)
def saveper(): """ SAVEPER Month [0,?] The frequency with which output is stored. """ return time_step() @cache('run') def time_step(): """ TIME STEP Month [0,?] The time step for the simulation. """ return 0.0625 integ_total_cumulative_income = functions.Integ(lambda: accumulating_income(), lambda: 0) integ_total_cumulative_sales = functions.Integ(lambda: accumulating_sales(), lambda: 0) integ_tenure = functions.Integ(lambda: accumulating_tenure(), lambda: 0) integ_motivation = functions.Integ(lambda: motivation_adjustment(), lambda: 1)
'deradicalization': 'deradicalization', 'Time': 'time', 'percent of muslims in population': 'percent_of_muslims_in_population', 'unexposed citizens on internet': 'unexposed_citizens_on_internet', 'exposure rate': 'exposure_rate', 'radicalized citizens': 'radicalized_citizens', 'INITIAL TIME': 'initial_time', 'exposure': 'exposure', 'percent with access to internet': 'percent_with_access_to_internet', 'deradicalization rate': 'deradicalization_rate', 'SAVEPER': 'saveper', 'TIME STEP': 'time_step' } integ_unexposed_citizens_on_internet = functions.Integ( lambda: -exposure(), lambda: total_population() * percent_with_access_to_internet()) @cache('step') def exposure(): """ exposure -------- (exposure) person/Week """ return exposure_rate() * unexposed_citizens_on_internet()
@cache('run') def contact_infectivity(): """ Contact Infectivity ------------------- (contact_infectivity) Persons/Persons/Day A joint parameter listing both how many people you contact, and how likely you are to give them the disease. """ return 0.3 integ_recovered = functions.Integ(lambda: recovering(), lambda: 0) @cache('step') def recovering(): """ Recovering ---------- (recovering) Persons/Day """ return infectious() / duration() @cache('step')
return lookup_function_call() def lookup_function_table(x): """ lookup function table --------------------- (lookup_function_table) """ return functions.lookup(x, [0, 5, 10, 15, 20, 25, 30, 35, 40, 45], [0, 0, 1, 1, 0, 0, -1, -1, 0, 0]) integ_accumulation = functions.Integ(lambda: rate(), lambda: 0) @cache('step') def lookup_function_call(): """ lookup function call -------------------- (lookup_function_call) """ return lookup_function_table(time()) @cache('run')
@cache('step') def saveper(): """ SAVEPER Month [0,?] The frequency with which output is stored. """ return time_step() @cache('run') def time_step(): """ TIME STEP Month [0,?] The time step for the simulation. """ return 0.03125 integ_desired_state_of_the_system = functions.Integ( lambda: net_change_in_goal(), lambda: initial_goal()) integ_state_of_the_system = functions.Integ( lambda: net_change_in_state(), lambda: initial_state_of_the_system())
return time_step() @cache('run') def time_step(): """ TIME STEP --------- (time_step) Day [0,?] The time step for the simulation. """ return 0.125 integ_deceased_population = functions.Integ( lambda: dying(), lambda: initial_deceased_population()) integ_exposed_population = functions.Integ( lambda: infecting() - incubation(), lambda: initial_exposed_population()) integ_infectious_population = functions.Integ( lambda: incubation() - dying() - surviving(), lambda: initial_infectious_population()) integ_recovered_population = functions.Integ( lambda: surviving(), lambda: initial_recovered_population()) integ_susceptible_population = functions.Integ( lambda: -infecting(), lambda: initial_susceptible_population())