Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent results when defining the hessianstructure() method in the Problem interface #269

Open
lfaucheux opened this issue Sep 26, 2024 · 0 comments

Comments

@lfaucheux
Copy link

lfaucheux commented Sep 26, 2024

A simple question. Given the difficulty of reproducing what I'm dealing with (I've tried in vain to come up with a concise example), I'm more in search of a hunch than a definitive answer.

Do you know why enrich scipy_interface.py at line 228 with

    [...]
    def hessianstructure(self):
        return np.nonzero(np.tril(np.ones((15, 15))))  # actually as done in ipopt_wrapper.pyx
    [...]  #                               ^^  my decision's dimensionality, hardwritten to save time. 

make my scipy.optimize.OptimizeResult-based result change from

...
 message: ...
 success: ...
  status: ...
     fun: 2.3124170059382245e-29
     nit: ...
    info: ...
...

to

...
 message: ...
 success: ...
  status: ...
     fun: 2.3000910542941462e-29
     nit: ...
    info: ...
...

The change is indeed epsilonian in this case, but it still shouldn't occur. More importantly, defining ~.hessianstructure prevents Ipopt from converging in subsequent resolutions. When digging in ipopt_wrapper.pyx, it appears at line 1094 that explicitly defining ~.hessianstructure as I did avoids fixing the "wrong stride" problem.

Any idea what's going on ?


OS : Windows 10
Ipopt version : 3.13.3
Python version : 3.11.6
cyipopt version : 1.6.0.dev0

@lfaucheux lfaucheux changed the title Expliciting hessianstructure Inconsistent results when *defining* the hessianstructure() method in the Problem interface Sep 26, 2024
@lfaucheux lfaucheux changed the title Inconsistent results when *defining* the hessianstructure() method in the Problem interface Inconsistent results when defining the hessianstructure() method in the Problem interface Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant