-
Notifications
You must be signed in to change notification settings - Fork 8
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
Inconsistency between RH and dsdp updates #53
Comments
I think you are right. I vaguely remember that there was actually a great reason for have Maybe we need to put that as a comment in the dot_driver.c and print a warning saying that this has changed now, because the MHE people are assuming that ALPHA = 1.0. |
Yeah printing a warning is probably the right call. Do you know off the top of your head if the MHE people are using the opposite perturbation ( |
Also what do you think about storing the positive sensitivity matrix? |
They are doing [hessXX L, gradx_c [0^T, gradp_c^T]^T If you have a nonlinear form of p in c of f though, you need to do this also with hess_L:= So to summarise, you could use suffix magic to partition and re-assemble. You could even partition K into small [K_i, ....] and do some decomposition stuff.... |
What do you mean? |
Yeah that's what I was thinking about for the variables - you'll just need to know which variables are sens vars, instead of which constraints. Right now I think the matrix that is stored in |
I see. I agree, we should save that matrix instead. |
k_aug/src/k_aug/dot_driver/dot_driver.c
Line 376 in 6f45111
In
dot_driver
, RH mode (npdp_strategy
) performs the sensitivity update withALPHA = -1.0
, whereas dsdp mode performs the update withALPHA = 1.0
. How the code is currently written, I believeALPHA = -1.0
is correct for both cases. This way the correct update will occur within both cases. As currently written, the above is only correct for RH mode.
DeltaP
must have the opposite sign as above for dsdp mode. The reason we need this minus sign (ALPHA = -1.0
) is that ink_aug
, we calculate and store the negative sensitivity matrix. I propose we fix this by calculating the positive sensitivity matrix and switchingALPHA
to positive one for both modes. This wayperturbed - original
can be used for both updates, which I think is logical.Let me know if I have this wrong. What I'm saying here is based on my experience getting tests to pass in Pyomo/pyomo#1613.
The text was updated successfully, but these errors were encountered: