Table Of Contents

Model object

compiled model

class dolo.compiler.compiler_python.GModel(model, model_type=None, recipes=None, compiler=None, order='rows')[source]

Generic compiled model object

Parameters:
  • model – (SModel) a symbolic model
  • model_type – (str) model type (e.g. "fg" or "fga"
  • recipes – (dict) dictionary of recipes (must contain model_type as a key)
  • compiler – (str) compiler to use. One of numpy, numexpr, theano

The class contains the following fields:

Attr symbols:(dict) symbol groups -> list of symbol names defining each group
Attr functions:(dict) equation names -> compiled functions
Attr calibration:
 (dict) symbol groups -> vector of calibrated values for each group
Attr model:(optional) link to the original symbolic model
get_calibration(name)[source]

Get the calibrated value for one or several variables :param name: string or list of string with the parameter names to query :return: parameter(s) name(s)

set_calibration(*args)[source]

Updates the model calibration while respecting dependences between parameters. :param args: either two parameters key, value or a dictionary mapping several keys to several values each key must be a string among the symbols of the model

x_bounds[source]

Decorator that caches a function’s return value each time it is called. If called later with the same arguments, the cached value is returned, and not re-evaluated.