Skip to content

essai#7

Open
Mimimmi15 wants to merge 2 commits intodpo-mth8408:mainfrom
Mimimmi15:LabQuadraticPenalty_Yasmine
Open

essai#7
Mimimmi15 wants to merge 2 commits intodpo-mth8408:mainfrom
Mimimmi15:LabQuadraticPenalty_Yasmine

Conversation

@Mimimmi15
Copy link

No description provided.

Pkg.add("PrettyTables")
Pkg.add("Printf")
using LinearAlgebra, ADNLPModels, PrettyTables, Printf
include("newton_modifiees.jl")
Copy link
Contributor

Choose a reason for hiding this comment

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

Pour une fois que tu ne me remets pas 10,000 fichiers, celui-ci est manquant.

x -> [4x[1] + 6x[2] - 10],
zeros(1), zeros(1),
name="Simple linear-quadratique problem")
jac(nlp, [1.0; 2.0])
Copy link
Contributor

Choose a reason for hiding this comment

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

tu ne peux pas appeler jac sans faire d'abord using NLPModels.

# on definit une nouvelle fonction objectif pénalisée
function objectif_penalise(point)
valeur_f = modele.f(point)
contraintes = zeros(modele.meta.ncon)
Copy link
Contributor

Choose a reason for hiding this comment

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

Tu alloues un nouveau tableau à chaque évaluation ...

où Vf(x) est le gradient de la fonction objectif, J(x) est la jacobien et y est le vecteur des multiplicateurs de Lagrange.
- feasibility : La violation de faisabilité des contraintes d'égalité,
"""
function KKT_eqs_contraintes(model :: AbstractNLPModel, X, y)
Copy link
Contributor

Choose a reason for hiding this comment

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

Tu passes X (majuscule), mais tu utilises x (minuscule) dans la fonction. Je ne pense pas que tu ais testé ton code...

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