-
Notifications
You must be signed in to change notification settings - Fork 56
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
Comments
hessianstructure
hessianstructure()
method in the Problem interface
hessianstructure()
method in the Problem interfacehessianstructure()
method in the Problem interface
Why prevent us from transposing the indices of the lower triangle (and get the upper triangle's) ? You do this in the case where [...]
row, col = np.nonzero(np.tril(np.ones((self.__n, self.__n))))
np_iRow = np.array(col, dtype=DTYPEi) # <- `np_iRow` defined from `col` 🕊️🕊️🕊️
np_jCol = np.array(row, dtype=DTYPEi) # <- and vice versa 🕊️🕊️🕊️ ... but you forbid us from doing so when [...]
if not(np_iRow >= np_jCol).all():
msg = b"Indices are not lower triangular in hessianstructure"
log(msg, logging.ERROR) # 💥💥💥
return False # 💥💥💥 |
hessianstructure()
method in the Problem interfaceself.__hessianstructure
is None
self.__hessianstructure
is None
self.__hessianstructure
is None
self.__hessianstructure
is None
self.__hessianstructure
is None
self.__hessianstructure
is None
self.__hessianstructure
is None
ok. I can reproduce the def hessianstructure(...):
[...]
return np.nonzero(np.tril(np.ones((n, n))))[::-1]
def hessian(...):
[...]
return H[self.hessianstructure[::-1]] |
self.__hessianstructure
is None
hessianstructure
() method in the Problem interface
hessianstructure
() method in the Problem interfacehessianstructure()
method in the Problem interface
Here and there, it reads that
there seems to be options to supply either the upper or lower triangular part (maybe dependent on which IPOPT interface is used).
Are you sure that the ipopt_interface that cyipopt mobilizes does not require the supplied hessian to be upper triangular ? Because that's what cyipopt does in the
self.__hessianstructure is None
case. And it turns out to work better that way...The text was updated successfully, but these errors were encountered: