iode.Simulation.debug

property Simulation.debug: bool

Option to automatically generates IODE lists containing pre-recursive, interdependent and post-recursive equations: _PRE, _INTER and _POST. It is used with the method Simulation.model_simulate(). Default to False.

Parameters:
value: bool

Examples

>>> from iode import SAMPLE_DATA_DIR, equations, lists, scalars, variables 
>>> from iode import Simulation
>>> equations.load(f"{SAMPLE_DATA_DIR}/fun.eqs")
Loading .../fun.eqs
274 objects loaded 
>>> lists.load(f"{SAMPLE_DATA_DIR}/fun.lst")
Loading .../fun.lst
17 objects loaded 
>>> scalars.load(f"{SAMPLE_DATA_DIR}/fun.scl")
Loading .../fun.scl
161 objects loaded 
>>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var")
Loading .../fun.var
394 objects loaded
>>> simu = Simulation()
>>> # force IODE to create the three list _PRE, _INTER and _POST 
>>> # when the method model_simulate is called 
>>> simu.debug = True
>>> success = simu.model_simulate("2000Y1", "2015Y1")
Linking equations ....
Calculating SCC...
Calculating SCC... -> #PRE 31 - #INTER 204 - #POST 39
Reordering interdependent block...
Reordering interdependent block...
2000Y1: 1 iters - error =   0.6558 - cpu=...ms
2000Y1: 2 iters - error =   0.1684 - cpu=...ms
2000Y1: 3 iters - error =   0.5237 - cpu=...ms
...
2015Y1: 19 iters - error = 0.002907 - cpu=...ms
2015Y1: 20 iters - error = 0.001537 - cpu=...ms
2015Y1: 21 iters - error = 0.0005893 - cpu=...ms
>>> lists["_PRE"]
['BRUGP', 'DTH1C', 'EX', 'ITCEE', ..., 'ZZF_', 'DTH1', 'PME', 'PMS', 'PMT']
>>> len(lists["_PRE"])
31
>>> lists["_INTER"]
['PMAB', 'PXAB', 'ITFGO', 'ITFGI', ..., 'FLG', 'VBNP', 'VBNP_P', 'VBBP_P']
>>> len(lists["_INTER"])
204
>>> lists["_POST"]
['IFU', 'SSHFF', 'PBBP', 'OCUF', ..., 'GAP', 'FLGR', 'FLF', 'DPUU', 'BENEF']
>>> len(lists["_POST"])
39