World2¶
State¶
-
class
whynot.simulators.world2.
State
[source]¶ World2 state. Defaults correspond to the initial state in the standard run of World2.
-
capital_investment
= 400000000.0¶ Total capital investment stock
-
capital_investment_in_agriculture
= 0.2¶ Fraction of capital investment in agriculture
-
initial_natural_resources
= 900000000000.0¶ Initial natural resources
-
natural_resources
= 900000000000.0¶ Stock of natural resources
-
pollution
= 200000000.0¶ Pollution stock
-
population
= 1650000000.0¶ Total population stock
-
Config¶
-
class
whynot.simulators.world2.
Config
[source]¶ Dynamics and simulation parameters for World2.
Default values correspond to the standard run of World2.
Examples
>>> # Set the initial birth rate to 0.05 >>> world2.config(birth_rate=0.05)
-
atol
= 1e-06¶ solver absolute tolerance
-
birth_rate
= 0.04¶
-
capital_investment_agriculture
= 0.3¶
-
capital_investment_discard
= 0.025¶
-
capital_investment_generation
= 0.05¶
-
capital_investment_in_agriculture_frac_adj_time
= 15.0¶
-
death_rate
= 0.028¶
-
delta_t
= 0.2¶ Time (in years) elapsed on each update of the discrete dynamics.
-
effective_capital_investment_ratio
= 1.0¶
-
end_time
= 2100¶ Time to end the simulation (in years).
-
food_coefficient
= 1.0¶
-
food_normal
= 1.0¶
-
intervention_time
= 1970¶
-
land_area
= 135000000.0¶
-
natural_resources_usage
= 1.0¶
-
pollution
= 1.0¶
-
pollution_standard
= 3600000000.0¶
-
population_density
= 26.5¶
-
quality_of_life_standard
= 1.0¶
-
rtol
= 1e-06¶ solver relative tolerance
-
start_time
= 1900¶ Time to initialize the simulation (in years).
-
Interventions¶
-
class
whynot.simulators.world2.
Intervention
[source]¶ Class to specify interventions in World2 dynamics.
An intervention is a subset of the configuration variables, and only variables passed into the constructor are modified.
Examples
>>> # Set the death rate to 0.06 in 1980. All other parameters unchanged. >>> world2.Intervention(time=1980, death_rate=0.06)
Experiments¶
Experiments for world2 simulator.
-
whynot.simulators.world2.experiments.
RCT
= world2_rct¶ RCT experiment for world2.
-
whynot.simulators.world2.experiments.
BiasedTreatment
= world2_biased_treatment¶ Observational experiment with confounding for world2.
-
whynot.simulators.world2.experiments.
Mediation
= world2_mediation¶ Observational experiment with mediation for world2.