Models Module#
The macrostat.models module
The macrostat.models module consists of the following classes
Godley & Lavoie (2006, Chapter 4) Model PC |
|
Godley & Lavoie (2006, Chapter 3) Model SIM |
|
Godley & Lavoie (2006, Chapter 3) Model SIMEX |
|
Model Manager |
- macrostat.models.get_available_models()[source]#
Get all available models in the models directory.
Parse the models directory and return a list of all available models, which are in subdirectories of the models directory and are named after the model. They are valid when they contain a __init__.py, parameters.py, variables.py, scenarios.py, behavior.py file.
- Returns:
A list of all available models.
- Return type:
- macrostat.models.get_model(modelname: str)[source]#
Get a model from the models directory.
- Parameters:
modelname (str) – The name of the model to get.
- Returns:
Named tuple containing all model component classes
- Return type:
- Raises:
ValueError – If model name is invalid or model is not available
ImportError – If there are problems importing the model components
- macrostat.models.get_model_classes(modelname: str)[source]#
Get a model from the models directory.
- Parameters:
modelname (str) – The name of the model to get.
- Returns:
Named tuple containing all model component classes
- Return type:
- Raises:
ValueError – If model name is invalid or model is not available
ImportError – If there are problems importing the model components