modelx module#
The top-level module modelx
includes API functions.
By convention, modelx
is assigned to the name mx
in
the global namespace:
>> import modelx as mx
Attributes defined in the top level module.
- models#
Alias for
get_models()
. Available for Python 3.7 or newer- Type
Getting objects#
Returns a dict that maps model names to models. |
|
|
Get a modelx object from its full name. |
|
Get and/or set the current model. |
|
Get and/or set the current space of the current model. |
Creating objects#
|
Create and return a new model. |
|
Create and return a new space in the current model. |
|
Decorator/function to create/update cells from Python functions. |
Saving Models#
|
Write model to files. |
|
Archive model to a zip file |
|
Export a given model as a self-contained Python package. |
|
Read model from files. |
|
Restore a model and return it. |
|
Load a model saved from a file and return it. |
Recursion limit#
Returns formula recursion limit |
|
|
Set formula recursion limit. |
Recalculation mode#
Return |
|
|
Set the recalculation option. |
IPython configuration#
Set up IPython shell for modelx. |
|
Restore IPython' default error message. |
Tracing the call stack#
|
Activate stack tracing. |
Deactivate stack tracing. |
|
|
Get stack trace. |
Clear stack trace. |
Error reporting#
Returns exception raised during last formula execution |
|
|
Traces back the last formula error. |
|
Retuns the local variables of a formula execution in the last traceback. |
|
Specifies whether to replace error raised during formula execution |
|
Specifies whether to raise FormulaError |