hi All,
i am facing running the issue in BARON.
m = Model(BARON.Optimizer)
ub = [2, 2, 1]
@variable(m, 0 ≤ x[i = 1:3] ≤ ub[i])
@variable(m, y[1:3], Bin)
@NLconstraints(
m,
begin
0.8log(x[2] + 1) + 0.96log(x[1] - x[2] + 1) - 0.8x[3] ≥ 0
log(x[2] + 1) + 1.20log(x[1] - x[2] + 1) - x[3] - 2y[3] ≥ -2
x[2] ≤ x[1]
x[2] ≤ 2y[1]
x[1] - x[2] ≤ 2y[2]
y[1] + y[2] ≤ 1
end
)
@NLobjective(
m,
Min,
5y[1] + 6y[2] + 8y[3] + 10x[1] - 7x[3] - 18log(x[2] + 1) -
19.2log(x[1] - x[2] + 1) + 10
)
optimize!(m)```
```optimize!(m)
Base.IOError("could not spawn `'C:\\baron' 'C:\\Users\\MANOJK~1.RAM\\AppData\\Local\\Temp\\jl_r0gXN1\\baron_problem.bar'`: no such file or directory (ENOENT)", -4058)
OPTIONS{
TimName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_r0gXN1\tim.lst";
ProName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_r0gXN1\baron_problem.bar";
ResName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_r0gXN1\res.lst";
SumName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_r0gXN1\sum.lst";
}
BINARY_VARIABLES x4, x5, x6;
POSITIVE_VARIABLES x1, x2, x3;
LOWER_BOUNDS{
x1: 0.0;
x2: 0.0;
x3: 0.0;
}
UPPER_BOUNDS{
x1: 2.0;
x2: 2.0;
x3: 1.0;
}
EQUATIONS e1, e2, e3, e4, e5, e6;
e1: ((((0.8*(log((x2+1.0))))+(0.96*(log(((x1-x2)+1.0)))))-(0.8*x3))-0.0) >= 0.0;
e2: (((((log((x2+1.0)))+(1.2*(log(((x1-x2)+1.0)))))-x3)-(2.0*x6))--2.0) >= 0.0;
e3: ((x2-x1)-0.0) <= 0.0;
e4: ((x2-(2.0*x4))-0.0) <= 0.0;
e5: (((x1-x2)-(2.0*x5))-0.0) <= 0.0;
e6: ((x4+x5)-1.0) <= 0.0;
OBJ: minimize ((((((5.0*x4)+(6.0*x5)+(8.0*x6)+(10.0*x1))-(7.0*x3))-(18.0*(log((x2+1.0)))))-(19.2*(log(((x1-x2)+1.0)))))+10.0);
anu suggestion how to resolve it.
Which packages have you loaded?
Have you followed the installation instructions for Baron.jl?
I follwed the setps mentioned in baron.jl. I just trying to run MINLP.jl from baron.jl \test.
Base.IOError("could not spawn `'C:\\baron' 'C:\\Users\\MANOJK~1.RAM\\AppData\\Local\\Temp\\jl_oaSfa9\\baron_problem.bar'`: no such file or directory (ENOENT)", -4058)
OPTIONS{
TimName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_oaSfa9\tim.lst";
ProName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_oaSfa9\baron_problem.bar";
ResName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_oaSfa9\res.lst";
SumName: "C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_oaSfa9\sum.lst";
}
BINARY_VARIABLES x4, x5, x6;
POSITIVE_VARIABLES x1, x2, x3;
LOWER_BOUNDS{
x1: 0.0;
x2: 0.0;
x3: 0.0;
}
UPPER_BOUNDS{
x1: 2.0;
x2: 2.0;
x3: 1.0;
}
EQUATIONS e1, e2, e3, e4, e5, e6;
e1: ((((0.8*(log((x2+1.0))))+(0.96*(log(((x1-x2)+1.0)))))-(0.8*x3))-0.0) >= 0.0;
e2: (((((log((x2+1.0)))+(1.2*(log(((x1-x2)+1.0)))))-x3)-(2.0*x6))--2.0) >= 0.0;
e3: ((x2-x1)-0.0) <= 0.0;
e4: ((x2-(2.0*x4))-0.0) <= 0.0;
e5: (((x1-x2)-(2.0*x5))-0.0) <= 0.0;
e6: ((x4+x5)-1.0) <= 0.0;
OBJ: minimize ((((((5.0*x4)+(6.0*x5)+(8.0*x6)+(10.0*x1))-(7.0*x3))-(18.0*(log((x2+1.0)))))-(19.2*(log(((x1-x2)+1.0)))))+10.0);
ERROR: failed to call BARON exec C:\baron
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] optimize!(model::BARON.Optimizer)
@ BARON ~\.julia\packages\BARON\MCs9G\src\MOI_wrapper.jl:66
[3] optimize!
@ ~\.julia\packages\MathOptInterface\yvYgQ\src\Bridges\bridge_optimizer.jl:376 [inlined]
[4] optimize!
@ ~\.julia\packages\MathOptInterface\yvYgQ\src\MathOptInterface.jl:85 [inlined]
[5] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{BARON.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
@ MathOptInterface.Utilities ~\.julia\packages\MathOptInterface\yvYgQ\src\Utilities\cachingoptimizer.jl:316
[6] optimize!(model::Model; ignore_optimize_hook::Bool, _differentiation_backend::MathOptInterface.Nonlinear.SparseReverseMode, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ JuMP ~\.julia\packages\JuMP\9CBpS\src\optimizer_interface.jl:416
caused by: IOError: could not spawn `'C:\baron' 'C:\Users\MANOJK~1.RAM\AppData\Local\Temp\jl_oaSfa9\baron_problem.bar'`: no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
@ Base .\process.jl:99
[2] #637
@ .\process.jl:112 [inlined]
[3] setup_stdios(f::Base.var"#637#638"{Cmd}, stdios::Vector{Any})
@ Base .\process.jl:196
[4] _spawn
@ .\process.jl:111 [inlined]
[5] run(::Cmd; wait::Bool)
@ Base .\process.jl:439
[6] run
@ .\process.jl:438 [inlined]
[7] optimize!(model::BARON.Optimizer)
@ BARON ~\.julia\packages\BARON\MCs9G\src\MOI_wrapper.jl:62
[8] optimize!
@ ~\.julia\packages\MathOptInterface\yvYgQ\src\Bridges\bridge_optimizer.jl:376 [inlined]
[9] optimize!
@ ~\.julia\packages\MathOptInterface\yvYgQ\src\MathOptInterface.jl:85 [inlined]
[10] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{BARON.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
@ MathOptInterface.Utilities ~\.julia\packages\MathOptInterface\yvYgQ\src\Utilities\cachingoptimizer.jl:316
[11] optimize!(model::Model; ignore_optimize_hook::Bool, _differentiation_backend::MathOptInterface.Nonlinear.SparseReverseMode, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ JuMP ~\.julia\packages\JuMP\9CBpS\src\optimizer_interface.jl:416
odow
4
Does C:\\baron
exist? If you run import Pkg; Pkg.test("BARON")
do the tests pass?
Perhaps you need ENV["BARON_EXEC"] = "C:\\baron.exe"
?