mode_to_status_message Function

private pure function mode_to_status_message(imode) result(message)

Convert the slsqp mode flag to a message string.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: imode

Return Value character(len=:), allocatable


Called by

proc~~mode_to_status_message~~CalledByGraph proc~mode_to_status_message slsqp_module::mode_to_status_message proc~slsqp_wrapper slsqp_module::slsqp_solver%slsqp_wrapper proc~slsqp_wrapper->proc~mode_to_status_message

Source Code

    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