We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d74feb commit c72b380Copy full SHA for c72b380
src/NLPModelsIpopt.jl
@@ -212,8 +212,20 @@ end
212
function ipopt(nls::AbstractNLSModel; kwargs...)
213
ff_nls = FeasibilityFormNLS(nls)
214
stats = ipopt(ff_nls; kwargs...)
215
- # Only keep the original variables in the solution
+
216
stats.solution = stats.solution[1:nls.meta.nvar]
217
218
+ if hasproperty(stats, :multipliers_L)
219
+ stats.multipliers_L = stats.multipliers_L[1:nls.meta.nvar]
220
+ end
221
+ if hasproperty(stats, :multipliers_U)
222
+ stats.multipliers_U = stats.multipliers_U[1:nls.meta.nvar]
223
224
225
+ if hasproperty(stats, :multipliers)
226
+ stats.multipliers = stats.multipliers[end-nls.meta.ncon+1:end]
227
228
229
return stats
230
end
231
0 commit comments