@@ -430,7 +430,6 @@ def solve(self):
430430 opt = max (np .linalg .norm (lag_grad , ord = np .inf ),
431431 np .linalg .norm (compl , ord = np .inf ))
432432 c_viol = np .concatenate ((np .abs (c_k [:nce ]), np .maximum (0. , - c_k [nce :]))) if nc > 0 else np .array ([0.0 ])
433- feas = np .linalg .norm (c_viol , ord = np .inf )
434433 tol_satisfied = False
435434
436435 # Initializing declared outputs
@@ -442,7 +441,7 @@ def solve(self):
442441 obj = f_k / o_scaler ,
443442 constraints = c_k / c_scaler ,
444443 opt = opt ,
445- feas = np .linalg .norm (c_viol / c_scaler , np .inf ),
444+ feas = np .linalg .norm (c_viol / c_scaler , np .inf ) if nc > 0 else 0. ,
446445 time = time .time () - start_time ,
447446 nfev = nfev ,
448447 ngev = ngev ,
@@ -681,7 +680,7 @@ def solve(self):
681680 obj = f_k / o_scaler ,
682681 constraints = c_k / c_scaler ,
683682 opt = opt ,
684- feas = np .linalg .norm (c_viol / c_scaler , np .inf ),
683+ feas = np .linalg .norm (c_viol / c_scaler , np .inf ) if nc > 0 else 0. ,
685684 time = time .time () - start_time ,
686685 nfev = nfev ,
687686 ngev = ngev ,
@@ -703,7 +702,7 @@ def solve(self):
703702 'pi' : pi_k * c_scaler / o_scaler ,
704703 's' : s_k / c_scaler [nce :],
705704 'optimality' : opt ,
706- 'feasibility' : np .linalg .norm (c_viol / c_scaler , np .inf ),
705+ 'feasibility' : np .linalg .norm (c_viol / c_scaler , np .inf ) if nc > 0 else 0. ,
707706 'nfev' : nfev ,
708707 'ngev' : ngev ,
709708 'niter' : itr ,
0 commit comments