pyipopt icon indicating copy to clipboard operation
pyipopt copied to clipboard

Documentation on apply_new

Open nanthony21 opened this issue 8 years ago • 3 comments

I've done some searching but haven't found an explanation of what the apply_new function does. I started with

def apply_new(x):
    return True

as the examples show. However I have found that returning false improves performance a bit but I'm not sure why.

nanthony21 avatar Apr 11 '18 01:04 nanthony21

I believe it's a callback function to indicate whether the Hessian of the Lagrangian is user-provided. See the start page https://github.com/xuy/pyipopt for a short mention of it. I have found little mention of it elsewhere, nor how to change away from the default return value "True".

economoser avatar Apr 13 '18 19:04 economoser

The readme that you reference says that if the functions "eval_h" and "apply_new" are provided then hessian approximation isn't used, but it doesn't have any mention of the effect of "apply_new" return value .

In my experience setting apply_new to false still didn't use Hessian approximation and it actually caused my problem to converge faster. I wonder if perhaps apply_new is used to indicate whether or not to re-evaluate the Hessian. In my case the Hessian is constant so it would make sense that there is no need to reevaluate it.

nanthony21 avatar Apr 14 '18 12:04 nanthony21

See pull request #40

nanthony21 avatar Apr 20 '18 01:04 nanthony21