Convert the slsqp mode
flag to a message string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | imode |
pure function mode_to_status_message(imode) result(message) implicit none integer,intent(in) :: imode character(len=:),allocatable :: message select case (imode) case(0) !required accuracy for solution obtained message = 'Required accuracy for solution obtained' case(-100) message = 'Invalid size(x) in slsqp_wrapper' case(-101) message = 'Invalid linesearch_mode in slsqp_wrapper' case(-102) message = 'Function is not associated' case(-103) message = 'Gradient function is not associated' case(-104) message = 'Invalid gradient mode' case(-105) message = 'Invalid perturbation step size for finite difference gradients' case(-2) message = 'User-triggered stop of slsqp' case(1,-1) message = 'In progress' case(2) message = 'Number of equality constraints larger than n' case(3) message = 'More than 3*n iterations in lsq subproblem' case(4) message = 'Inequality constraints incompatible' case(5) message = 'Singular matrix e in lsq subproblem' case(6) message = 'Singular matrix c in lsq subproblem' case(7) message = 'Rank-deficient equality constraint subproblem hfti' case(8) message = 'Positive directional derivative for linesearch' case(9) message = 'More than max_iter iterations in slsqp' case default message = 'Unknown slsqp error' end select end function mode_to_status_message