helgeanl / GP-MPC

MPC with Gaussian Process
MIT License
193 stars 60 forks source link

[Bug] car_example.py raises LAPACK error #8

Open canbooo opened 4 years ago

canbooo commented 4 years ago

System


Windows 10 Python 3.7.0 SciPy 1.4.1

Problem


When I run python car_example.py, I get the traceback below. I understand that the issue may raise from different SciPy version. Any Idea how to solve it? An addition of the requirements.txt for stating which version of Scipy to use this with would be good, if a solution is not available. According to LAPACK documentation, the third argument is for precision so I first thought it was a SciPy bug but the function works as intended when used separately.

Traceback

** On entry to DGEBAL parameter number  3 had an illegal value
Traceback (most recent call last):
  File "car_example.py", line 223, in <module>
    methods = ['TA', 'ME'], num_cols=1, xnames=xnames)
  File "./..\gp_mpc\gp_class.py", line 775, in predict_compare
    K, S, E = lqr(A, B, Q, R)
  File "./..\gp_mpc\mpc_class.py", line 972, in lqr
    P = np.array(scipy.linalg.solve_discrete_are(A, B, Q, R))
  File "C:\Users\Admin\Anaconda3\envs\pirl\lib\site-packages\scipy\linalg\_solvers.py", line 675, in solve_discrete_are
    _, (sca, _) = matrix_balance(M, separate=1, permute=0)
  File "C:\Users\Admin\Anaconda3\envs\pirl\lib\site-packages\scipy\linalg\basic.py", line 1588, in matrix_balance
    ''.format(-info))
ValueError: xGEBAL exited with the internal error "illegal value in argument number 3.". See LAPACK documentation for the xGEBAL error codes.