From d06563cc2b0cec31d06d3c982661df4937e9d0e7 Mon Sep 17 00:00:00 2001 From: jalving Date: Tue, 30 Jan 2024 15:42:42 -0800 Subject: [PATCH] fix nl objective --- src/optigraph.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/optigraph.jl b/src/optigraph.jl index 9ea84ce..ada72b6 100644 --- a/src/optigraph.jl +++ b/src/optigraph.jl @@ -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),