transform_incompatible_qp_subproblem Subroutine

private subroutine transform_incompatible_qp_subproblem(nc, cf, ic, cl, cu, kbc)

transformation of the incompatible quadratic programming subproblem.

Note

This routine was formerly called plredl.

Arguments

Type IntentOptional Attributes Name
integer :: nc

number of current linear constraints.

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

cf(nf) vector containing values of the constraint functions.

integer :: ic(nc)

ic(nc) vector containing types of constraints.

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

cl(nc) vector containing lower bounds for constraint functions.

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

cu(nc) vector containing upper bounds for constraint functions.

integer :: kbc

specification of linear constraints.

  • kbc=0-no linear constraints.
  • kbc=1-one sided linear constraints.
  • kbc=2=two sided linear constraints.

Called by

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

Source Code

   subroutine transform_incompatible_qp_subproblem(nc, cf, ic, cl, cu, kbc)

      integer :: nc     !! number of current linear constraints.
      integer :: ic(nc) !! ic(nc)  vector containing types of constraints.
      integer :: kbc    !! specification of linear constraints.
                        !!
                        !! * kbc=0-no linear constraints.
                        !! * kbc=1-one sided linear constraints.
                        !! * kbc=2=two sided linear constraints.
      real(wp) :: cf(*) !! cf(nf)  vector containing values of the constraint functions.
      real(wp) :: cl(*) !! cl(nc)  vector containing lower bounds for constraint functions.
      real(wp) :: cu(*) !! cu(nc)  vector containing upper bounds for constraint functions.

      real(wp) :: temp
      integer :: k, kc

      if (kbc > 0) then
         do kc = 1, nc
            k = ic(kc)
            if (abs(k) == 1 .or. abs(k) == 3 .or. abs(k) == 4) then
               temp = (cf(kc) - cl(kc))
               if (temp < 0) cf(kc) = cl(kc) + 0.1_wp*temp
            end if
            if (abs(k) == 2 .or. abs(k) == 3 .or. abs(k) == 4) then
               temp = (cf(kc) - cu(kc))
               if (temp > 0) cf(kc) = cu(kc) + 0.1_wp*temp
            end if
            if (abs(k) == 5 .or. abs(k) == 6) then
               temp = (cf(kc) - cl(kc))
               cf(kc) = cl(kc) + 0.1_wp*temp
            end if
         end do
      end if

   end subroutine transform_incompatible_qp_subproblem