Skip to content
Snippets Groups Projects
Commit 854affd6 authored by sophie-mauran's avatar sophie-mauran
Browse files

suppression du paramètre epsilon inutile, différenciation de tol en tol_rel et...

suppression du paramètre epsilon inutile, différenciation de tol en tol_rel et tol_abs, ajout d'un commentaire pour les tolérances des algos appelés dans Lagrangien Augmenté
parent da9659e7
No related branches found
No related tags found
1 merge request!5Refonte ok
......@@ -53,24 +53,30 @@ grad_contrainte(x) = [2*x[1] ;2*x[2]]
hess_contrainte(x) = [2 0;0 2]
output = Lagrangien_Augmente(algo,f,contrainte,gradf,hessf,grad_contrainte,hess_contrainte,x0,options)
```
# Tolérances des algorithmes appelés
Pour les tolérances définies dans les algorithmes appelés (Newton et régions de confiance), prendre les tolérances
par défaut définies dans ces algorithmes.
"""
function Lagrangien_Augmente(algo,fonc::Function,contrainte::Function,gradfonc::Function,
hessfonc::Function,grad_contrainte::Function,hess_contrainte::Function,x0,options)
if options == []
epsilon = 1e-8
tol = 1e-5
tol_rel = 1e-5
tol_abs = 1e-7
itermax = 1000
lambda0 = 2
mu0 = 100
tho = 2
else
epsilon = options[1]
tol = options[2]
itermax = options[3]
lambda0 = options[4]
mu0 = options[5]
tho = options[6]
tol_rel = options[2]
tol_abs = options[3]
itermax = options[4]
lambda0 = options[5]
mu0 = options[6]
tho = options[7]
end
n = length(x0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment