computation of the new penalty parameters.
Note
This routine was formerly called ppset2.
| Type | Intent | Optional | 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. |
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