@@ -80,11 +80,11 @@ function IpoptCache(prob, opt;
8080 num_cons = prob. ucons === nothing ? 0 : length (prob. ucons)
8181 if prob. f. adtype isa ADTypes. AutoSymbolics || (prob. f. adtype isa ADTypes. AutoSparse &&
8282 prob. f. adtype. dense_ad isa ADTypes. AutoSymbolics)
83- f = Optimization . instantiate_function (
83+ f = OptimizationBase . instantiate_function (
8484 prob. f, reinit_cache, prob. f. adtype, num_cons;
8585 g = true , h = true , cons_j = true , cons_h = true )
8686 else
87- f = Optimization . instantiate_function (
87+ f = OptimizationBase . instantiate_function (
8888 prob. f, reinit_cache, prob. f. adtype, num_cons;
8989 g = true , h = true , cons_j = true , cons_vjp = true , lag_h = true )
9090 end
150150function eval_objective (cache:: IpoptCache , x)
151151 l = cache. f (x, cache. p)
152152 cache. f_calls += 1
153- return cache. sense === Optimization . MaxSense ? - l : l
153+ return cache. sense === OptimizationBase . MaxSense ? - l : l
154154end
155155
156156function eval_constraint (cache:: IpoptCache , g, x)
@@ -167,7 +167,7 @@ function eval_objective_gradient(cache::IpoptCache, G, x)
167167 cache. f. grad (G, x)
168168 cache. f_grad_calls += 1
169169
170- if cache. sense === Optimization . MaxSense
170+ if cache. sense === OptimizationBase . MaxSense
171171 G .*= - one (eltype (G))
172172 end
173173
@@ -256,7 +256,7 @@ function eval_hessian_lagrangian(cache::IpoptCache{T},
256256 if cache. f. lag_h != = nothing
257257 cache. f. lag_h (h, x, σ, Vector (μ))
258258
259- if cache. sense === Optimization . MaxSense
259+ if cache. sense === OptimizationBase . MaxSense
260260 h .*= - one (eltype (h))
261261 end
262262
@@ -320,7 +320,7 @@ function eval_hessian_lagrangian(cache::IpoptCache{T},
320320 end
321321 end
322322
323- if cache. sense === Optimization . MaxSense
323+ if cache. sense === OptimizationBase . MaxSense
324324 h .*= - one (eltype (h))
325325 end
326326
0 commit comments