artofscience / SAOR

Sequential Approximate Optimization Repository
GNU General Public License v3.0
5 stars 1 forks source link

Taylor1 approximation #83

Closed aatmdelissen closed 2 years ago

aatmdelissen commented 2 years ago

The taylor1 approximation now calculates delta_y each time the function is evaluated. This can be omitted if we calculate the 'constant' part first: g(x) = g0 + dfdy.dot(y(x) - y0) = (g0 - dfdy.dot(y0)) + dfdy.dot(y(x))

Probably will make the code a bit faster :)

Giannis1993 commented 2 years ago

Indeed, that's also how Svanberg has coded it; we can probably do the same for the Taylor2 expansion too.

Giannis1993 commented 2 years ago

There's a PR for that now