Hello to every one,

Any one can tell me the code given below is not giving the optimal solution 
.it gives the just range of x1 and x2. I want to calculate optimal value of 
the function. Thank you for your time.

Best Regards,
Tanveer Iqbal

using JuMP
using Ipopt
m = Model(solver = IpoptSolver())

@defVar(m, 0 <= x1 <=3)
@defVar(m, 0 <= x2 <=7)

@addNLConstraint(m, x1+2x2 <=8)
@addNLConstraint(m, 2x1 + x2 <= 10)
@addNLConstraint(m,  x2 <= 3)

@setNLObjective(m, Min, (x1)^2 +2(x2)^2 + 2(x1)+ 3(x2))

solve (m)

print(m)

Reply via email to