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

Second order correction #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rodrigosgr
Copy link
Contributor

implementação da correção de 2a ordem

@abelsiqueira
Copy link
Member

Está conflitando, fazer dar uma olhada com o GitKraken pra corrigir.

ZWZ = Z' * W * Z
LSMR = lsmr(A, -cx, radius = relax_param * tr.radius, atol = atol, rtol = rtol, itmax = max(2 * n, 50))
v = LSMR[1]
ZWZ = Z' * W * Z
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ZWZ = Z' * W * Z
ZWZ = Z' * W * Z

src/SQP.jl Outdated
Comment on lines 79 to 83
CG = cg(ZWZ, -ZWv, radius = sqrt(tr.radius^2 - norm(v)^2), atol = atol, rtol= 0.0, itmax = max(2 * n, 50))
u = CG[1]
Zu = Z * u
d = v + Zu
norm_v = norm(v)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CG = cg(ZWZ, -ZWv, radius = sqrt(tr.radius^2 - norm(v)^2), atol = atol, rtol= 0.0, itmax = max(2 * n, 50))
u = CG[1]
Zu = Z * u
d = v + Zu
norm_v = norm(v)
CG = cg(ZWZ, -ZWv, radius = sqrt(tr.radius^2 - norm(v)^2), atol = atol, rtol= 0.0, itmax = max(2 * n, 50))
u = CG[1]
Zu = Z * u
d = v + Zu
norm_v = norm(v)

ϕx = fx + μ * norm_cx
ϕn = next_f + μ * next_norm_c
Δm = μ * vpred - dpred
μ_norm_cx = μ * norm_cx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
μ_norm_cx = μ * norm_cx
μ_norm_cx = μ * norm_cx

y = LSMR_dual[1]
W = Symmetric(hess(nlp, x, y), :L)
Z = nullspace(Matrix(A))
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diversos lugares acima. Por favor use um editor que permite a substituição de TAB por espaços ou faça manualmente.


update!(tr, norm(d))

update!(tr, norm(d, 2))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
update!(tr, norm(d, 2))
update!(tr, norm(d))

Por padrão é a 2.

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

Successfully merging this pull request may close these issues.

2 participants