determine_new_active_simple_bound Subroutine

private subroutine determine_new_active_simple_bound(nf, ix, xo, xl, xu, s, kbf, inew, knew, eps9, par)

determination of the new active simple bound.

Note

This routine was formerly called plmins.

Arguments

Type IntentOptional Attributes Name
integer :: nf

declared number of variables.

integer :: ix(*)

ix(nf) vector containing types of bounds.

real(kind=wp) :: xo(*)

xo(nf) saved vector of variables.

real(kind=wp) :: xl(*)

xl(nf) vector containing lower bounds for variables.

real(kind=wp) :: xu(*)

xu(nf) vector containing upper bounds for variables.

real(kind=wp) :: s(*)

s(nf) direction vector.

integer :: kbf

specification of simple bounds.

  • kbf=0-no simple bounds.
  • kbf=1-one sided simple bounds.
  • kbf=2=two sided simple bounds.
integer :: inew

index of the new active constraint.

integer :: knew

signum of the new normal.

real(kind=wp) :: eps9

tolerance for active constraints.

real(kind=wp) :: par

auxiliary variable.


Called by

proc~~determine_new_active_simple_bound~~CalledByGraph proc~determine_new_active_simple_bound determine_new_active_simple_bound proc~dual_range_space_quad_prog psqp_class%dual_range_space_quad_prog proc~dual_range_space_quad_prog->proc~determine_new_active_simple_bound proc~psqp psqp_class%psqp proc~psqp->proc~dual_range_space_quad_prog proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

   subroutine determine_new_active_simple_bound(nf, ix, xo, xl, xu, s, kbf, &
                                                inew, knew, eps9, par)

      real(wp) :: eps9   !! tolerance for active constraints.
      real(wp) :: par    !! auxiliary variable.
      integer :: inew    !! index of the new active constraint.
      integer :: kbf     !! specification of simple bounds.
                         !!
                         !! * kbf=0-no simple bounds.
                         !! * kbf=1-one sided simple bounds.
                         !! * kbf=2=two sided simple bounds.
      integer :: knew    !! signum of the new normal.
      integer :: nf      !! declared number of variables.
      real(wp) :: s(*)   !! s(nf)  direction vector.
      real(wp) :: xl(*)  !! xl(nf)  vector containing lower bounds
                         !! for variables.
      real(wp) :: xo(*)  !! xo(nf)  saved vector of variables.
      real(wp) :: xu(*)  !! xu(nf)  vector containing upper bounds
                         !! for variables.
      integer :: ix(*)   !! ix(nf)  vector containing types of bounds.

      real(wp) :: pom, temp
      integer :: i

      if (kbf > 0) then
         do i = 1, nf
            if (ix(i) > 0) then
               temp = 1.0_wp
               if (ix(i) == 1 .or. ix(i) >= 3) then
                  pom = xo(i) + s(i)*temp - xl(i)
                  if (pom < min(par, -eps9*max(abs(xl(i)), temp))) then
                     inew = -i
                     knew = 1
                     par = pom
                  end if
               end if
               if (ix(i) == 2 .or. ix(i) >= 3) then
                  pom = xu(i) - s(i)*temp - xo(i)
                  if (pom < min(par, -eps9*max(abs(xu(i)), temp))) then
                     inew = -i
                     knew = -1
                     par = pom
                  end if
               end if
            end if
         end do
      end if

   end subroutine determine_new_active_simple_bound