@@ -764,13 +764,14 @@ where
764764 // This function will panic is there is no akkt_tolerance
765765 // This should never happen because we set the AKKT tolerance
766766 // in the constructor and can never become `None` again
767- let criterion_3 = cache
768- . panoc_cache
769- . akkt_tolerance
770- . ok_or ( SolverError :: InvalidProblemState (
771- "missing inner AKKT tolerance while checking the exit criterion" ,
772- ) ) ?
773- <= self . epsilon_tolerance + SMALL_EPSILON ;
767+ let criterion_3 =
768+ cache
769+ . panoc_cache
770+ . akkt_tolerance
771+ . ok_or ( SolverError :: InvalidProblemState (
772+ "missing inner AKKT tolerance while checking the exit criterion" ,
773+ ) ) ?
774+ <= self . epsilon_tolerance + SMALL_EPSILON ;
774775 Ok ( criterion_1 && criterion_2 && criterion_3)
775776 }
776777
@@ -811,12 +812,13 @@ where
811812 fn update_inner_akkt_tolerance ( & mut self ) -> FunctionCallResult {
812813 let cache = & mut self . alm_cache ;
813814 // epsilon_{nu+1} := max(epsilon, beta*epsilon_nu)
814- let akkt_tolerance = cache
815- . panoc_cache
816- . akkt_tolerance
817- . ok_or ( SolverError :: InvalidProblemState (
818- "missing inner AKKT tolerance while updating it" ,
819- ) ) ?;
815+ let akkt_tolerance =
816+ cache
817+ . panoc_cache
818+ . akkt_tolerance
819+ . ok_or ( SolverError :: InvalidProblemState (
820+ "missing inner AKKT tolerance while updating it" ,
821+ ) ) ?;
820822 cache. panoc_cache . set_akkt_tolerance ( f64:: max (
821823 akkt_tolerance * self . epsilon_update_factor ,
822824 self . epsilon_tolerance ,
@@ -992,14 +994,11 @@ where
992994 . with_penalty ( c)
993995 . with_cost ( cost) ;
994996 if self . alm_problem . n1 > 0 {
995- let status = status. with_lagrange_multipliers (
996- self . alm_cache
997- . y_plus
998- . as_ref ( )
999- . ok_or ( SolverError :: InvalidProblemState (
1000- "missing Lagrange multipliers at the ALM solution" ,
1001- ) ) ?,
1002- ) ;
997+ let status = status. with_lagrange_multipliers ( self . alm_cache . y_plus . as_ref ( ) . ok_or (
998+ SolverError :: InvalidProblemState (
999+ "missing Lagrange multipliers at the ALM solution" ,
1000+ ) ,
1001+ ) ?) ;
10031002 Ok ( status)
10041003 } else {
10051004 Ok ( status)
0 commit comments