rapport du TP6 - #4
Open
bouayoubegrine wants to merge 5 commits into
Open
bouayoubegrine wants to merge 5 commits into
bouayoubegrine wants to merge 5 commits into
Conversation
|
Status: |
dpo
reviewed
Aug 19, 2025
| t = 1.0 | ||
| xt = projection!(xk + t .* p, C) | ||
| errorsquare = dot(xt - xk, xt - xk) | ||
| while obj(nlp, xt) > obj(nlp, xk) - 1.0e-4 * errorsquare / t # alpha = 1.0e-4 |
Contributor
There was a problem hiding this comment.
Le errorsquare dans le membre de droite doit être
| p = -grad(nlp,xk) | ||
| println("Iter\t\t\t||xk - xk(1)||\t\t\t\t objectif") | ||
| println(@sprintf("%d\t\t\t%s\t\t\t\t%.3e", | ||
| k, " - ", obj(nlp, xk))) |
Contributor
There was a problem hiding this comment.
Finalement, les colonnes ne sont pas vraiment bien alignées... 😢
| C = SimpleBounds(model3.meta.lvar, model3.meta.uvar) | ||
| x3 = projected_grad(model3, C) | ||
| stats3 = ipopt(model3, print_level=0) | ||
| println("Erreur relatif d'écart entre gradient projeté est Ipopt: ", norm(x3 - stats3.solution)/norm(stats3.solution)) |
| x .= C.c .+ (C.r/nd) .* d | ||
| end | ||
| return x | ||
| end |
|
|
||
| ## Explication | ||
|
|
||
| - Cette méthode peut être utilisée pour le calcul du pas dans les méthodes de région de confiance, puisqu’on impose la condition d’Armijo, laquelle assure la décroissance de la fonction objectif — point essentiel. |
|
|
||
| - Cette méthode peut être utilisée pour le calcul du pas dans les méthodes de région de confiance, puisqu’on impose la condition d’Armijo, laquelle assure la décroissance de la fonction objectif — point essentiel. | ||
|
|
||
| - L’avantage de cette méthode est qu’elle permet de trouver un point stationnaire sous certains hypothèses du sous-problème de région de confiance à une tolérance près . À l’inverse, dans la méthode du gradient conjugué, dès qu’un itéré sort de la boule, on projette l’avant-dernier itéré sur la boule, ce qui n’est ni la solution du sous-problème de région de confiance ni même un point stationnaire. |
Contributor
There was a problem hiding this comment.
On ne le projette pas ; il est dans la boule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.