diff --git a/fortran/lincoa/geometry.f90 b/fortran/lincoa/geometry.f90 index 5e5197a840..eb390f564e 100644 --- a/fortran/lincoa/geometry.f90 +++ b/fortran/lincoa/geometry.f90 @@ -8,7 +8,7 @@ module geometry_lincoa_mod ! ! Started: February 2022 ! -! Last Modified: Tuesday, March 12, 2024 PM09:57:55 +! Last Modified: Wednesday, April 03, 2024 AM12:54:36 !--------------------------------------------------------------------------------------------------! implicit none @@ -98,10 +98,10 @@ function setdrop_tr(idz, kopt, ximproved, bmat, d, delta, rho, xpt, zmat) result ! However, Powell's LINCOA code is different. In his code, the KNEW after a trust-region step is ! picked in lines 72--96 of the update.f for LINCOA, where DISTSQ is calculated as the square of the ! distance to XPT(KOPT, :) (Powell recorded the interpolation points in rows). However, note that -! the trust-region trial point has not been included into XPT yet --- it can not be included -! without knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code -! picks KNEW based on the distance to the un-updated "optimal point", which is unreasonable. -! This has been corrected in our implementation of LINCOA, yet it does not boost the performance. +! the trust-region trial point has not been included into XPT yet --- it cannot be included without +! knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code picks KNEW +! based on the distance to the un-updated "optimal point", which is unreasonable. This has been +! corrected in our implementation of LINCOA, yet it does not boost the performance. if (ximproved) then distsq = sum((xpt - spread(xpt(:, kopt) + d, dim=2, ncopies=npt))**2, dim=1) !!MATLAB: distsq = sum((xpt - (xpt(:, kopt) + d)).^2) % d should be a column!! Implicit expansion diff --git a/fortran/newuoa/geometry.f90 b/fortran/newuoa/geometry.f90 index 25ecdf05db..4091515c57 100644 --- a/fortran/newuoa/geometry.f90 +++ b/fortran/newuoa/geometry.f90 @@ -8,7 +8,7 @@ module geometry_newuoa_mod ! ! Started: July 2020 ! -! Last Modified: Saturday, March 16, 2024 AM04:47:40 +! Last Modified: Wednesday, April 03, 2024 AM12:55:24 !--------------------------------------------------------------------------------------------------! implicit none @@ -100,10 +100,10 @@ function setdrop_tr(idz, kopt, ximproved, bmat, d, delta, rho, xpt, zmat) result ! However, Powell's LINCOA code is different. In his code, the KNEW after a trust-region step is ! picked in lines 72--96 of the update.f for LINCOA, where DISTSQ is calculated as the square of the ! distance to XPT(KOPT, :) (Powell recorded the interpolation points in rows). However, note that -! the trust-region trial point has not been included into XPT yet --- it can not be included -! without knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code -! picks KNEW based on the distance to the un-updated "optimal point", which is unreasonable. -! This has been corrected in our implementation of LINCOA, yet it does not boost the performance. +! the trust-region trial point has not been included into XPT yet --- it cannot be included without +! knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code picks KNEW +! based on the distance to the un-updated "optimal point", which is unreasonable. This has been +! corrected in our implementation of LINCOA, yet it does not boost the performance. if (ximproved) then distsq = sum((xpt - spread(xpt(:, kopt) + d, dim=2, ncopies=npt))**2, dim=1) !!MATLAB: distsq = sum((xpt - (xpt(:, kopt) + d)).^2) % d should be a column! Implicit expansion diff --git a/fortran/uobyqa/geometry.f90 b/fortran/uobyqa/geometry.f90 index b35479a3e6..f9c2edd731 100644 --- a/fortran/uobyqa/geometry.f90 +++ b/fortran/uobyqa/geometry.f90 @@ -8,7 +8,7 @@ module geometry_uobyqa_mod ! ! Started: February 2022 ! -! Last Modified: Tuesday, March 12, 2024 PM09:57:17 +! Last Modified: Wednesday, April 03, 2024 AM12:54:55 !--------------------------------------------------------------------------------------------------! implicit none @@ -92,10 +92,10 @@ function setdrop_tr(kopt, ximproved, d, pl, rho, xpt) result(knew) ! However, Powell's LINCOA code is different. In his code, the KNEW after a trust-region step is ! picked in lines 72--96 of the update.f for LINCOA, where DISTSQ is calculated as the square of the ! distance to XPT(KOPT, :) (Powell recorded the interpolation points in rows). However, note that -! the trust-region trial point has not been included into XPT yet --- it can not be included -! without knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code -! picks KNEW based on the distance to the un-updated "optimal point", which is unreasonable. -! This has been corrected in our implementation of LINCOA, yet it does not boost the performance. +! the trust-region trial point has not been included into XPT yet --- it cannot be included without +! knowing KNEW (see lines 332-344 and 404--431 of lincob.f). Hence Powell's LINCOA code picks KNEW +! based on the distance to the un-updated "optimal point", which is unreasonable. This has been +! corrected in our implementation of LINCOA, yet it does not boost the performance. if (ximproved) then distsq = sum((xpt - spread(xpt(:, kopt) + d, dim=2, ncopies=npt))**2, dim=1) !!MATLAB: distsq = sum((xpt - (xpt(:, kopt) + d)).^2) % d should be a column! Implicit expansion