Skip to content

Commit

Permalink
230615.210009.CST add comments about the validity of the last trust-r…
Browse files Browse the repository at this point in the history
…egion step tried before returning
  • Loading branch information
zaikunzhang committed Jun 15, 2023
1 parent 2a644b0 commit 9b5af8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fortran/cobyla/cobylb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module cobylb_mod
!
! Started: July 2021
!
! Last Modified: Thursday, June 15, 2023 PM08:24:11
! Last Modified: Thursday, June 15, 2023 PM08:59:06
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down Expand Up @@ -589,6 +589,8 @@ subroutine cobylb(calcfc, iprint, maxfilt, maxfun, ctol, cweight, eta1, eta2, ft

! Return from the calculation, after trying the last trust-region step if it has not been tried yet.
if (info == SMALL_TR_RADIUS .and. shortd .and. nf < maxfun) then
! Zaikun 20230615: UPDATEXFC or UPDATEPOLE is not called since the last trust-region step. Hence
! SIM(:, N + 1) remains unchanged. Otherwise, SIM(:, N + 1) + D would not make sense.
x = sim(:, n + 1) + d
call evaluate(calcfc, x, f, constr, cstrv)
nf = nf + 1_IK
Expand Down

0 comments on commit 9b5af8c

Please sign in to comment.