Skip to content

Commit

Permalink
Fix updating NLPBlock after solve
Browse files Browse the repository at this point in the history
Closes #204
  • Loading branch information
odow authored Aug 25, 2022
1 parent 4a439e6 commit 1ec7f83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/MOI_wrapper/nlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

MOI.supports(::Optimizer, ::MOI.NLPBlock) = true

function MOI.set(model::Optimizer, ::MOI.NLPBlock, nlp_data::MOI.NLPBlockData)
function MOI.set(model::Optimizer, attr::MOI.NLPBlock, nlp_data::MOI.NLPBlockData)
if model.number_solved >= 1
throw(MOI.SetAttributeNotAllowed(attr))
end
model.nlp_data = nlp_data
return
end
Expand Down

0 comments on commit 1ec7f83

Please sign in to comment.