ecology
cybersyn.ecology
Dataclasses to save the ecology and the planned ecology.
TODO:
Add PlannedEcology class or merge it with planned economy.
Ecology
Bases: BaseModel
Dataclass with validations that stores the whole economy's information.
num_pollutants: int
property
Number of products in the economy.
PlannedEcology(pollutants=list())
dataclass
Dataclass that stores the whole planned economy.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
activity
|
list[NDArray]
|
list with the planned activity for all sectors in each period. |
required |
production
|
list[NDArray]
|
list with the planned production for all product in each period. |
required |
surplus
|
list[NDArray]
|
The surplus production at the end of each period. |
required |
total_import
|
list[NDArray]
|
list of total imports in each period. |
required |
export_deficit
|
list[float]
|
list export deficit at the end of each period. |
required |
worked_hours
|
list[float]
|
list of total worked hours in each period. |
required |
TargetEcology
Bases: BaseModel
Dataclass with validations that stores the whole economy's information.
num_pollutants: int
property
Number of products in the economy.
periods: int
property
Number of products in the economy.
equal_sizes(matrices, info)
Assert that all the inputed matrices have the same size.
Source code in cybersyn/ecology.py
60 61 62 63 64 65 66 67 |
|