Skip to content

Commit

Permalink
Update to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Aug 9, 2023
1 parent c8c6440 commit e992a51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ function _F_nonlinear_operator(model::Optimizer)
N = div(MOI.dimension(s), 2)
for i in 1:N
xi = f.rows[i+N]
@assert xi isa MOI.VariableIndex
f_map[xi.value] = f.rows[i]
# Hacky way to ensure that xi is a standalone variable
@assert xi isa MOI.ScalarNonlinearFunction
@assert xi.head == :+ && length(xi.args) == 1
@assert xi.args[1] isa MOI.VariableIndex
f_map[xi.args[1].value] = f.rows[i]
end
end
nlp = MOI.Nonlinear.Model()
Expand Down

0 comments on commit e992a51

Please sign in to comment.