pydynamo.world3 package

Submodules

pydynamo.world3.code_pydynamo_w3 module

pydynamo.world3.data_world3 module

Data used to build world3 model.

Pydynamo code, colors, definitions

pydynamo.world3.get_definitions module

DEPRECIATED. Some functions to read definitions from a file in markdown format, usefull for translation.

pydynamo.world3.get_definitions.read_translated_defs(filename)

Reads definitions in markdown format (see begin_sentence) and returns the definitions dictionnary.

Parameters

filenamestr

File in which are stored the definitions in Markdown format.

pydynamo.world3.get_definitions.write_translated_defs(filename, defs)

Write definitions that are in the dictionnary defs in markdown format in the filename.

Parameters

filenamestr

File in which to write the definitions in markdown format.

defsdict

Definitions.

pydynamo.world3.get_sectors module

Infomations about sectors of each variable.

pydynamo.world3.get_sectors.get_sectors(fname)

From the world3 pydynamo code get all sectors for each variable.

Parameters

fnamestr

World3 pydynamo code file.

pydynamo.world3.plot_utils module

pydynamo.world3.plot_utils.plot_03_indices(s, title='Indices level')
pydynamo.world3.plot_utils.plot_03_life(s, title='Life level')
pydynamo.world3.plot_utils.plot_03_state(s, title='State')
pydynamo.world3.plot_utils.plot_world_03(s, title=None, with_legend=False)

Plots world variables with 2003 way.

pydynamo.world3.plot_utils.plot_world_03_compare(s, s2, title=None, with_legend=False, *args, **kwargs)

Compare in the main variables of the worlds, plotted in the “Limits To Growth: the 30th year update” way.

Parameters

s

World3 object (with simulation already run).

s2 :

World3 object to compare (with simulation already run).

args, kwargs :

See pydynmao.core.plot_utils.plot_world arguments.

pydynamo.world3.plot_utils.plot_world_variables(time, var_data, var_names, var_lims, img_background=None, title=None, figsize=None, dist_spines=0.09, grid=False, colors=None)

Plots world state from an instance of World3 or any single sector.

pydynamo.world3.plot_utils.plot_world_with_scales(w, variable_scales=None, title='W3 run')

Plot world3 variables, with potentially new scales.

Parameters

w: world3

Instance to plot

variables: dict(str, [float, float])

Dict of Variable name and range

title: str

Plot title

Returns

pydynamo.world3.scenarios_limits_to_growth module

pydynamo.world3.world3 module

Define the World3 clas

class pydynamo.world3.world3.World3(scenario_number=2, sys=None)

Bases: System

A World3 object is a System object with more convenient functions and some additional plotting functions, adapted for the manipulation of the World3 model 2003’s version equations.

copy()

Returns a copy of the system, with the same equations and constant values.

plot_world(**kwargs)

Plot the main variables of the world, in the “Limits To Growth: the 30th years update” way.

Parameters

kwargs

See pydynmao.world3.plot_utils.plot_world_03 arguments.

plot_world_compare(s2, *args, **kwargs)

Compare in the main variables of the worlds, plotted in the “Limits To Growth: the 30th year update” way.

Parameters

s2 :

World3 object to compare (with simulation already run).

args, kwargs :

See pydynmao.world3.plot_utils.plot_world_03_compare arguments.

run(N=400, dt=0.5)

Run the system with 400 steps of 1/2 year.

show_influence_graph(**kwargs)

See pydynamo.core.plot_system.show_influence_graph.

Module contents

World3 module.