- GasByName.add_model(propname, model, regen_mode='', **kwargs)#
Adds a new model to the models dictionary.
propname (str) – The name of the property to be calculated by the model.
model (function) – A reference (handle) to the function to be used.
regen_mode (str) –
Controls how/when the model is run (See Notes for more details). Options are:
The model is run directly upon being assigned, and also run every time
The model is run directly upon being assigned, but is not called again, thus making its data act like a constant. If, however, the data is deleted from the object it will be regenerated again.
Is not run upon being assigned, but is run the first time that
Is only run if the model name is explicitly passed to the
regenerate_modelsmethod. This allows full control of when the model is run.