# JuMP + Baron

**URL:** https://discourse.julialang.org/t/jump-baron/100401
**Category:** Optimization (Mathematical)
**Created:** [June 15, 2023, 2:26pm UTC](https://discourse.julialang.org/t/jump-baron/100401 "2023-06-15T14:26:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![selvi-aras](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/selvi-aras/32/50637_2.png) [@selvi-aras](https://discourse.julialang.org/u/selvi-aras)
#### Post date: [June 15, 2023, 2:26pm UTC](https://discourse.julialang.org/t/jump-baron/100401/1 "2023-06-15T14:26:45Z")

</div>

Dear JuMP community,

When I use Baron to solve a small-scale problem, I get an error of following form:

```julia
===========================================================================
 This BARON run may utilize the following subsolver(s)
 For LP/MIP/QP: CLP/CBC                                         
 For NLP: IPOPT, FILTERSQP
===========================================================================
 Preprocessing found feasible solution with value 0.00000
 Doing local search
 Preprocessing found feasible solution with value 49.0510
 Solving bounding LP
 Starting multi-start local search
 Done with local search
===========================================================================
  Iteration Open nodes Time (s) Lower bound Upper bound
          1 1 0.06 49.0510 infinity
===========================================================================
 User did not provide appropriate variable bounds. 
 Some model expressions are unbounded.             
 We may not be able to guarantee globality.        
 Number of missing variable or expression bounds = 4
 Number of variable or expression bounds autoset = 4
===========================================================================
* 1+ 1 0.07 49.0511 0.868971E+09
          1 0 0.07 49.0511 49.0511

 Calculating duals

                         ***Normal completion***            

 Wall clock time: 0.07
 Total CPU time used: 0.07

 Total no. of BaR iterations: 1
 Best solution found at node: 1
 Max. no. of nodes in memory: 1
 
 All done
===========================================================================
ERROR: UndefVarError: LOCALLY_SOLVED not defined
Stacktrace:
 [1] get
   @ ~/.julia/packages/BARON/xgWzt/src/moi/results.jl:17 [inlined]
 [2] get(b::MathOptInterface.Bridges.LazyBridgeOptimizer{BARON.Optimizer}, attr::MathOptInterface.TerminationStatus)
   @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/8f6oN/src/Bridges/bridge_optimizer.jl:887
 [3] get(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{BARON.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, attr::MathOptInterface.TerminationStatus)
   @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/8f6oN/src/Utilities/cachingoptimizer.jl:886
 [4] _moi_get_result(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{BARON.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, args::MathOptInterface.ObjectiveValue)
   @ JuMP ~/.julia/packages/JuMP/AKvOr/src/optimizer_interface.jl:637
 [5] get(model::Model, attr::MathOptInterface.ObjectiveValue)
   @ JuMP ~/.julia/packages/JuMP/AKvOr/src/optimizer_interface.jl:660
 [6] objective_value(model::Model; result::Int64)
   @ JuMP ~/.julia/packages/JuMP/AKvOr/src/objective.jl:54
 [7] objective_value
   @ ~/.julia/packages/JuMP/AKvOr/src/objective.jl:50 [inlined]
 [8] maximizer!(f::Quadratic{Matrix{Float64}, Vector{Float64}}, C::Ellipsoid{Matrix{Float64}, Vector{Float64}, Float64}; glob::Bool)
   @ Main ~/Workspace/SumOfConvexMax/julia/quadraticsimplex/functions.jl:219
 [9] top-level scope
   @ REPL[68]:1

```

Does anyone know why I am getting this, by any chance? I checked the constraints, and the problem is feasible.

The command `optimize!(model)` works well, and I get this error when I check `termination_status(model)`.

---

<div class="post-metadata">

### Author: ![blob](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@blob](https://discourse.julialang.org/u/blob)
#### Post date: [June 15, 2023, 2:58pm UTC](https://discourse.julialang.org/t/jump-baron/100401/2 "2023-06-15T14:58:21Z")

</div>

I may be entirely wrong (and don’t have BARON to check) but it seems that there is `MOI.` missing from the code:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/9/99980dcca766fd4abd77afc320c346cd68319100.png)

The yellow part should probably be `MOI.LOCALLY_SOLVED`. Open an issue with BARON.jl: [GitHub - jump-dev/BARON.jl: Julia wrapper for the BARON mixed-integer nonlinear programming solver](https://github.com/jump-dev/BARON.jl) ?

---

<div class="post-metadata">

### Author: ![selvi-aras](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/selvi-aras/32/50637_2.png) [@selvi-aras](https://discourse.julialang.org/u/selvi-aras)
#### Post date: [June 15, 2023, 3:01pm UTC](https://discourse.julialang.org/t/jump-baron/100401/3 "2023-06-15T15:01:55Z")

</div>

Wow! What a nice catch!! I don’t see this chunk of code in my local BARON.jl, though, any guess how I can find it?

Edit: found it: [BARON.jl/src/moi/results.jl at master · jump-dev/BARON.jl · GitHub](https://github.com/jump-dev/BARON.jl/blob/master/src/moi/results.jl)
