Hi all,
I am trying include a power expression in my objective function. and I get an error “can’t evaluate pow’(0,0.45)”, even though I forced my variables to start from 1e-20. Has anyone an idea why?
using JuMP
using AmplNLWriter
using Ipopt
m = Model(with_optimizer(AmplNLWriter.Optimizer, /path_to_couenne.exe"))
@variable(m, x[1:NP, 1:NP] >= 1e-20 )
@variable(m, c[1:NP, 1:NC] >= 1e-20)
@variable(m, t[1:NP, 1:NP, 1:NT], Bin)
@variable(m, 0<= TP[1:NP, 1:NP] <= 100)
@constraint(m, 0 .<= Cmax - c)
@constraint(m, 0 .<= QP - x’*QP)
@constraint(m, 1 .>= sum(x, dims=2))
@constraint(m, 1 .== sum(t, dims=3))
.
.
.
@NLexpression(m, Di[i=1:NP, j=1:NP], 0.363 (x[i,j]QP[i]/3600/hoursperday)^0.45rho^0.131000)
@NLobjective(m, Min, sum((0.0008Di[i,j]^2 + 0.002Di[i,j])*Dis[i,j] for i = 1:NP, j = 1:NP))
JuMP.optimize!(m)