pandemia.world.world_factory
World factories build a World object.
Worlds consist of locations, agents and activities.
They provide a set of data for the simulation to run upon.
Submodules
Package Contents
Classes
A world consiting of regions. |
|
Generic world factory that outputs a World object. |
- class pandemia.world.world_factory.World(scale_factor)
A world consiting of regions.
For example, a country consisting of administrative divisions, or the whole world consisting of countries.
Parameters:
- scale_factorfloat
Attached to each world is a scale factor, indicating that scaling may have taken place in the creation of the world. For example, a world with 1 million agents representing a real world with 100 million agents would have the scale factor 0.01. This is stored as an attribute since the scale factor is needed to scale quantities during input and output.
Attributes:
- regionslist[Region]
The list of regions in this world.
- number_of_regionsint
How many regions are in this world.
- scale_factorfloat
Attached to each world is a scale factor, indicating that scaling may have taken place in the creation of the world. For example, a world with 1 million agents representing a real world with 100 million agents would have the scale factor 0.01. This is stored as an attribute since the scale factor is needed to scale quantities during input and output.
- travel_matrixnp.ndarray
An array of integers of dimension number_of_regions x number_of_regions.
- class pandemia.world.world_factory.WorldFactory
Generic world factory that outputs a World object.
- get_world() pandemia.world.World
Gets a world.