We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ecc135 commit 649b21eCopy full SHA for 649b21e
1 file changed
control/passivity.py
@@ -4,8 +4,11 @@
4
'''
5
6
import numpy as np
7
-import cvxopt as cvx
8
+try:
9
+ import cvxopt as cvx
10
+except ImportError as e:
11
+ cvx = None
12
13
def is_passive(sys):
14
@@ -17,7 +20,9 @@ def is_passive(sys):
17
20
The source for the algorithm is:
18
21
McCourt, Michael J., and Panos J. Antsaklis. "Demonstrating passivity and dissipativity using computational methods." ISIS 8 (2013).
19
22
-
23
+ if cvx is None:
24
+ raise ModuleNotFoundError
25
+
26
A = sys.A
27
B = sys.B
28
C = sys.C
0 commit comments