compute_new_penalty_parameters Subroutine

private pure subroutine compute_new_penalty_parameters(nf, n, nc, ica, cz, cp)

computation of the new penalty parameters.

Note

This routine was formerly called ppset2.

Arguments

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

declared number of variables.

integer, intent(in) :: n

actual number of variables.

integer, intent(in) :: nc

number of constraints.

integer, intent(in) :: ica(*)

vector containing indices of active constraints.

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

vector of lagrange multipliers.

real(kind=wp), intent(inout) :: cp(*)

vector containing penalty parameters.


Called by

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

Source Code

   pure subroutine compute_new_penalty_parameters(nf, n, nc, ica, cz, cp)

      integer,intent(in) :: nf         !! declared number of variables.
      integer,intent(in) :: n          !! actual number of variables.
      integer,intent(in) :: nc         !! number of constraints.
      integer,intent(in) :: ica(*)     !! vector containing indices of active constraints.
      real(wp),intent(in) :: cz(*)     !! vector of lagrange multipliers.
      real(wp),intent(inout) :: cp(*)  !! vector containing penalty parameters.

      real(wp) :: temp
      integer :: j, l, kc

      do kc = 1, nc
         cp(kc) = 0.5_wp*cp(kc)
      end do
      do j = 1, nf - n
         l = ica(j)
         if (l > 0) then
            temp = abs(cz(j))
            cp(l) = max(temp, cp(l) + 0.5_wp*temp)
         end if
      end do

   end subroutine compute_new_penalty_parameters