8000 SB10FD exits whole process on parameter error · Issue #126 · python-control/Slycot · GitHub
[go: up one dir, main page]

Skip to content

SB10FD exits whole process on parameter error #126

@bnavigator

Description

@bnavigator

In reference to #98 (comment):

[ben@voyagerS9:~]% python                                                                                                   [0]
Python 3.8.2 (default, Apr  8 2020, 14:31:25) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from slycot import synthesis
>>> from numpy import array
>>> A = array([[-1, 0, 0], [0, -12, -5], [0, 4, 0]])
>>> B = array([[2, 0], [0, 0.5], [0, 0]])
>>> C = array([[-0.5, 0, -0.5], [0, 0, 0], [-0.5, 0, -0.5]])
>>> D = array([[0, 0],  [0, 1], [0, 0]], dtype=float)
>>> synthesis.sb10fd(3, 2, 3, 1, 1, 100, A, B, C, D, 1e-7, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ben/src/Slycot/_skbuild/linux-x86_64-3.8/cmake-install/slycot/synthesis.py", line 2717, in sb10fd
    raise_if_slycot_error(out[-1], arg_list, sb10fd.__doc__)
  File "/home/ben/src/Slycot/_skbuild/linux-x86_64-3.8/cmake-install/slycot/exceptions.py", line 236, in raise_if_slycot_error
    raise globals()[exception](fmessage, info)
slycot.exceptions.SlycotArithmeticError: 
The Y-Riccati equation was not solved
successfully (the controller is not admissible or
there are numerical difficulties)
>>> synthesis.sb10fd(1,1,1,0,1,1,[1],[1],[1],[1],1e-3,1)
 ** On entry to SB10FD parameter number 20 had an illegal value
[ben@voyagerS9:~]%                                                                                                          [0]

The last drop out of the whole Python process should not happen. A simple Exception should be enough. Probably have to patch the Fortran code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0