This subroutine checks the validity of the input data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | m | |||
real(kind=wp), | intent(in) | :: | Factr | |||
real(kind=wp), | intent(in) | :: | l(n) |
the lower bound on |
||
real(kind=wp), | intent(in) | :: | u(n) |
the upper bound on |
||
integer, | intent(in) | :: | Nbd(n) | |||
character(len=60) | :: | Task | ||||
integer, | intent(inout) | :: | Info | |||
integer, | intent(out) | :: | k |
subroutine errclb(n,m,Factr,l,u,Nbd,Task,Info,k) implicit none character(len=60) :: Task integer,intent(in) :: n integer,intent(in) :: m integer,intent(inout) :: Info integer,intent(out) :: k integer,intent(in) :: Nbd(n) real(wp),intent(in) :: Factr real(wp),intent(in) :: l(n) !! the lower bound on `x`. real(wp),intent(in) :: u(n) !! the upper bound on `x`. integer :: i ! Check the input arguments for errors. if ( n<=0 ) Task = 'ERROR: N <= 0' if ( m<=0 ) Task = 'ERROR: M <= 0' if ( Factr<zero ) Task = 'ERROR: FACTR < 0' ! Check the validity of the arrays nbd(i), u(i), and l(i). k = 0 ! JW : added this so it will always be defined do i = 1 , n if ( Nbd(i)<0 .or. Nbd(i)>3 ) then ! return Task = 'ERROR: INVALID NBD' Info = -6 k = i endif if ( Nbd(i)==2 ) then if ( l(i)>u(i) ) then ! return Task = 'ERROR: NO FEASIBLE SOLUTION' Info = -7 k = i endif endif enddo end subroutine errclb