test_simple_bound Subroutine

private subroutine test_simple_bound(x, ix, xl, xu, eps9, i)

test on activity of a given simple bound.

Note

This routine was formerly called plnews.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x(*)

x(nf) vector of variables.

integer, intent(inout) :: ix(*)

ix(nf) vector containing types of bounds.

real(kind=wp), intent(in) :: xl(*)

xl(nf) vector containing lower bounds for variables.

real(kind=wp), intent(in) :: xu(*)

xu(nf) vector containing upper bounds for variables.

real(kind=wp), intent(in) :: eps9

tolerance for active constraints.

integer, intent(in) :: i

index of tested simple bound.


Called by

proc~~test_simple_bound~~CalledByGraph proc~test_simple_bound test_simple_bound proc~psqp psqp_class%psqp proc~psqp->proc~test_simple_bound proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

   subroutine test_simple_bound(x, ix, xl, xu, eps9, i)

      real(wp),intent(in) :: x(*)    !! x(nf)  vector of variables.
      integer,intent(inout) :: ix(*) !! ix(nf)  vector containing types of bounds.
      real(wp),intent(in) :: xl(*)   !! xl(nf)  vector containing lower bounds for variables.
      real(wp),intent(in) :: xu(*)   !! xu(nf)  vector containing upper bounds for variables.
      real(wp),intent(in) :: eps9    !! tolerance for active constraints.
      integer,intent(in) :: i        !! index of tested simple bound.

      real(wp) :: temp

      temp = 1.0_wp
      if (ix(i) <= 0) then
      elseif (ix(i) == 1) then
         if (x(i) <= xl(i) + eps9*max(abs(xl(i)), temp)) then
            ix(i) = 11
         end if
      elseif (ix(i) == 2) then
         if (x(i) >= xu(i) - eps9*max(abs(xu(i)), temp)) then
            ix(i) = 12
         end if
      elseif (ix(i) == 3 .or. ix(i) == 4) then
         if (x(i) <= xl(i) + eps9*max(abs(xl(i)), temp)) then
            ix(i) = 13
         end if
         if (x(i) >= xu(i) - eps9*max(abs(xu(i)), temp)) then
            ix(i) = 14
         end if
      end if

   end subroutine test_simple_bound