Several optimization tutorials fail to run
Object-oriented equation-based modelling and optimisation software
Brought to you by:
ciroki
While trying to setup my own parameter estimation, I had a look at several tutorials in DAE Tools 1.9.0 and found them not to execute (on Windows; they seem to work though on Debian GNU/Linux).
python opt_tutorial5.py
Creating the system...
The system created successfully.
Traceback (most recent call last):
File "opt_tutorial5.py", line 222, in <module>
run()
File "opt_tutorial5.py", line 161, in run
simulation.SolveInitial()
RuntimeError: Miscellanous exception in function: dae::solver::daeIDASolver::SolveInitial, source file: .\ida_solver.cpp, line: 813
Sundials IDAS solver cowardly failed to calculate initial conditions at TIME = 0; IDA_NO_RECOVERY
IDAS solver error in module 'IDAS' in function 'IDACalcIC': The residual routine or the linear setup or solve routine had a recoverable error, but IDACalcIC was unable to recover. [IDA_NO_RECOVERY]
Another example:
$ python tutorial_che_opt_2.py
Creating the system...
The system created successfully.
Starting the run No. 1 ...
Exception occurred: Miscellanous exception in function: dae::solver::daeIDASolver::SolveInitial, source file: .\ida_solver.cpp, line: 813
Sundials IDAS solver cowardly failed to calculate initial conditions at TIME = 0; IDA_LSETUP_FAIL
IDAS solver error in module 'IDAS' in function 'IDACalcIC': The linear solver setup failed unrecoverably. [IDA_LSETUP_FAIL]
Optimization failed: Algorithm received an invalid number (such as NaN or Inf) from the NLP; see also option check derivatives for naninf.
I use Python 3.6 on Windows 10 64bit (Python version on Debian 9 is 3.5).
Any hint?
Anonymous
Hi Manuel,
I noticed that too. I am not sure why it happens, but it is daetools related (not python or os). I'll check what is going on and let you know. What you can do is set printInfo to true in daetools.cfg (or programmatically using daeGetConfig function) for both daetols.core and daetools.IDAS and see if there are some strange numbers, infinity or not a number values.
Dragan
Done. I set
in
run(**kwargs)function.This is the output I get. On Windows:
On Debian GNU/Linux:
But I do not see any
Yes, thanks. Hoewver, I do not see the values of variables, residuals and sensitivity residuals printed. Could you set these options not in the run function but before a call to it, i.e.
because some options are collected from the options file at the very beginning.
Dragan