Skip to content

Commit

Permalink
fix nl objective
Browse files Browse the repository at this point in the history
  • Loading branch information
jalving committed Jan 30, 2024
1 parent 49a4883 commit d06563c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/optigraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ function _moi_set_objective_function(
graph::OptiGraph,
expr::JuMP.GenericNonlinearExpr{NodeVariableRef}
)
graph_moi_func = JuMP.moi_function(expr)
moi_func = JuMP.moi_function(expr)

# add variables to backend if using subgraphs
_add_backend_variables(graph_backend(graph), expr)

# update the moi function variable indices
_create_graph_moi_func(graph_backend(graph), moi_func, expr)
graph_moi_func = _create_graph_moi_func(graph_backend(graph), moi_func, expr)

MOI.set(
graph_backend(graph),
Expand Down

0 comments on commit d06563c

Please sign in to comment.