Hello there!

I’m fairly new to Julia. I just made a problem to test and learn how to write the obj. function and restrictions. But i’m having some issues, if anyone can help me out, will be trully apreciated.

Here’s my code:

```
workspace()
using JuMP, AmplNLWriter, CoinOptServices
## Solve test problem
#
# min 100 * (x5 - (0.5 + x4) ^ 2) ^ 2 + (1 - x4) ^ 2
# s.t. x4*x3 + x5*x1 <= 20
# 5x1 - 2x5 + 3x3 <= 17
# x4, x5 binary
# 0 <= x1 <= 3
# 0 <= x2 <= 5
# 0 <= x3 <= 10
##
m = Model(solver=AmplNLSolver(CoinOptServices.couenne))
X_U = [3;5;10] # Superior Limits
@variable(m, 0 <= X[i=1:3] <= X_U[i])
@variable(m, x[i=4:5], Bin)
@NLobjective(m, Min, 100*(x[5] - (0.5 + x[4])^2)^2 + (1 - x[4])^2)
@NLconstraint(m, x[4]*X[3]+x[5]*X[1] <= 20)
@constraint(m, 5*X[1]-2*x[5]+3*X[3] <= 17)
print(m)
status = solve(m)
println("Objective value: ", getobjectivevalue(m))
println("x = ", getvalue(x))
println("X = ", getvalue(X))
```

I’m using counne here, because later i’ll have to solve a Non-Convex MINLP.

Then, when i run the code, i get this:

```
Objective value: 0.24937733210128057
x = x: 1 dimensions:
[4] = 0.501244569130593
[5] = 1.0
X = [1.0, 2.5, 2.0]
```

So, x4 should be a binary variable here, but from the solution it gives me 0.5012… Does anyone knows why this happens?