Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BNST2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function BNST2(n::Int = 200)
model = Model()
@variable(model, x[1:n], start = 0.1)
@expression(model, F[i = 1:n], x[i])
@NLconstraint(model, c[j = 1:(n - 1)], x[1] * (x[j + 1] - 1) - 10x[j + 1] == 0)
@constraint(model, c[j = 1:(n - 1)], x[1] * (x[j + 1] - 1) - 10x[j + 1] == 0)

return MathOptNLSModel(model, F, name = "BNST2")
end
2 changes: 1 addition & 1 deletion src/BNST3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function BNST3(n::Int = 200)
model = Model()
@variable(model, x[1:n], start = 0.1)
@expression(model, F[i = 1:n], x[i])
@NLconstraint(model, c[j = 1:N], x[j] * (x[N + j] - 1) - 10x[N + j] == 0)
@constraint(model, c[j = 1:N], x[j] * (x[N + j] - 1) - 10x[N + j] == 0)

return MathOptNLSModel(model, F, name = "BNST3")
end
2 changes: 1 addition & 1 deletion src/LVcon501.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function LVcon501(n::Int = 20)
@variable(model, x[i = 1:n], start = (i % 2 == 1 ? -1.2 : 1.0))
@NLexpression(model, F1[i = 1:(n - 1)], 10 * (x[i]^2 - x[i + 1]))
@expression(model, F2[i = 1:(n - 1)], x[i] - 1.0)
@NLconstraint(
@constraint(
model,
c[k = 1:(n - 2)],
3 * x[k + 1]^3 + 2 * x[k + 2] - 5 +
Expand Down
2 changes: 1 addition & 1 deletion src/LVcon502.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function LVcon502(n::Int = 20)
@expression(model, F4[i = 1:N], x[2i + 1] - 1)
@expression(model, F5[i = 1:N], s * (x[2i] + x[2i + 2] - 2))
@expression(model, F6[i = 1:N], (x[2i] - x[2i + 2]) / s)
@NLconstraint(
@constraint(
model,
c[k = 1:(n - 7)],
(2 + 5 * x[k + 5]^2) * x[k + 5] + 1.0 + sum(x[i] * (1 + x[i]) for i = max(k - 5, 1):(k + 1)) ==
Expand Down
4 changes: 2 additions & 2 deletions src/LVcon503.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function LVcon503(n::Int = 20)
@expression(model, F2[i = 1:N], sqrt(5) * (x[2i + 1] - x[2i + 2]))
@NLexpression(model, F3[i = 1:N], (x[2i] - 2 * x[2i + 1])^2)
@NLexpression(model, F4[i = 1:N], sqrt(10) * (x[2i - 1] - x[2i + 2])^2)
@NLconstraint(model, 3 * x[1]^3 + 2 * x[2] + sin(x[1] - x[2]) * sin(x[1] + x[2]) == 5)
@NLconstraint(model, 4 * x[n] - x[n - 1] * exp(x[n - 1] - x[n]) == 3)
@constraint(model, 3 * x[1]^3 + 2 * x[2] + sin(x[1] - x[2]) * sin(x[1] + x[2]) == 5)
@constraint(model, 4 * x[n] - x[n - 1] * exp(x[n - 1] - x[n]) == 3)

return MathOptNLSModel(model, [F1; F2; F3; F4], name = "Lukšan-Vlček 5.3")
end
2 changes: 1 addition & 1 deletion src/LVcon504.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function LVcon504(n::Int = 20)
@NLexpression(model, F3[i = 1:N], tan(x[2i + 1] - x[2i + 2])^2)
@NLexpression(model, F4[i = 1:N], x[2i - 1]^4)
@expression(model, F5[i = 1:N], x[2i + 2] - 1)
@NLconstraint(
@constraint(
model,
c[k = 1:(n - 2)],
8 * x[k + 1] * (x[k + 1]^2 - x[k]) - 2 * (1 - x[k + 1]) + 4 * (x[k + 1] - x[k + 2]^2) == 0.0
Expand Down
4 changes: 2 additions & 2 deletions src/LVcon511.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ function LVcon511(n::Int = 20)
for k = 1:(2N)
ℓ = 3 * div(k - 1, 2)
if k % 2 == 1
@NLconstraint(model, x[ℓ + 1]^2 * x[ℓ + 4] + sin(x[ℓ + 4] - x[ℓ + 5]) == 1)
@constraint(model, x[ℓ + 1]^2 * x[ℓ + 4] + sin(x[ℓ + 4] - x[ℓ + 5]) == 1)
else
@NLconstraint(model, x[ℓ + 2] + x[ℓ + 3]^4 * x[ℓ + 4]^2 == 2)
@constraint(model, x[ℓ + 2] + x[ℓ + 3]^4 * x[ℓ + 4]^2 == 2)
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/LVcon512.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function LVcon512(n::Int = 21)
for k = 1:(3N)
ℓ = 4 * div(k - 1, 3)
if k % 3 == 1
@NLconstraint(model, x[ℓ + 1] + x[ℓ + 2]^2 + x[ℓ + 3]^2 == 3)
@constraint(model, x[ℓ + 1] + x[ℓ + 2]^2 + x[ℓ + 3]^2 == 3)
elseif k % 3 == 2
@NLconstraint(model, x[ℓ + 2] + x[ℓ + 3]^2 + x[ℓ + 4] == 1)
@constraint(model, x[ℓ + 2] + x[ℓ + 3]^2 + x[ℓ + 4] == 1)
else
@NLconstraint(model, x[ℓ + 1] * x[ℓ + 5] == 1)
@constraint(model, x[ℓ + 1] * x[ℓ + 5] == 1)
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/LVcon513.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ function LVcon513(n::Int = 20)
for k = 1:(2N)
ℓ = 3 * div(k - 1, 2)
if k % 2 == 1
@NLconstraint(model, x[ℓ + 1] + x[ℓ + 2]^2 + x[ℓ + 3] + x[ℓ + 4] + x[ℓ + 5] == 5)
@constraint(model, x[ℓ + 1] + x[ℓ + 2]^2 + x[ℓ + 3] + x[ℓ + 4] + x[ℓ + 5] == 5)
else
@NLconstraint(model, x[ℓ + 3]^2 - 2 * (x[ℓ + 4] + x[ℓ + 5]) == 3)
@constraint(model, x[ℓ + 3]^2 - 2 * (x[ℓ + 4] + x[ℓ + 5]) == 3)
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/LVcon514.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function LVcon514(n::Int = 20)
for k = 1:(2N)
ℓ = 3 * div(k - 1, 2)
if k % 2 == 1
@NLconstraint(model, x[ℓ + 1]^2 + x[ℓ + 2] + x[ℓ + 3] + 4 * x[ℓ + 4] == 7)
@constraint(model, x[ℓ + 1]^2 + x[ℓ + 2] + x[ℓ + 3] + 4 * x[ℓ + 4] == 7)
else
@NLconstraint(model, x[ℓ + 3]^2 - 5 * x[ℓ + 5] == 6)
@constraint(model, x[ℓ + 3]^2 - 5 * x[ℓ + 5] == 6)
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/LVcon515.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function LVcon515(n::Int = 21)
for k = 1:(3N)
ℓ = 4 * div(k - 1, 3)
if k % 3 == 1
@NLconstraint(model, x[ℓ + 1]^2 + 2 * x[ℓ + 2] + 3 * x[ℓ + 3] == 6)
@constraint(model, x[ℓ + 1]^2 + 2 * x[ℓ + 2] + 3 * x[ℓ + 3] == 6)
elseif k % 3 == 2
@NLconstraint(model, x[ℓ + 2]^2 + 2 * x[ℓ + 3] + 3 * x[ℓ + 4] == 6)
@constraint(model, x[ℓ + 2]^2 + 2 * x[ℓ + 3] + 3 * x[ℓ + 4] == 6)
else
@NLconstraint(model, x[ℓ + 3]^2 + 2 * x[ℓ + 4] + 3 * x[ℓ + 5] == 6)
@constraint(model, x[ℓ + 3]^2 + 2 * x[ℓ + 4] + 3 * x[ℓ + 5] == 6)
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/LVcon516.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function LVcon516(n::Int = 21)
for k = 1:(3N)
ℓ = 4 * div(k - 1, 3)
if k % 3 == 1
@NLconstraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 4)
@constraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 4)
elseif k % 3 == 2
@NLconstraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
else
@NLconstraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/LVcon517.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function LVcon517(n::Int = 21)
for k = 1:(3N)
ℓ = 4 * div(k - 1, 3)
if k % 3 == 1
@NLconstraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 0)
@constraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 0)
elseif k % 3 == 2
@NLconstraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
else
@NLconstraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/LVcon518.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function LVcon518(n::Int = 21)
for k = 1:(3N)
ℓ = 4 * div(k - 1, 3)
if k % 3 == 1
@NLconstraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 0)
@constraint(model, x[ℓ + 1]^2 + 3 * x[ℓ + 2] == 0)
elseif k % 3 == 2
@NLconstraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 3]^2 + x[ℓ + 4] - 2 * x[ℓ + 5] == 0)
else
@NLconstraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
@constraint(model, x[ℓ + 2]^2 - x[ℓ + 5] == 0)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/hs06.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs06(args...)
@variable(model, x[1:2])
set_start_value.(x, [-1.2; 1.0])
@expression(model, F, 1.0 - x[1])
@NLconstraint(model, 10 * (x[2] - x[1]^2) == 0)
@constraint(model, 10 * (x[2] - x[1]^2) == 0)

return MathOptNLSModel(model, [F], name = "hs06")
end
2 changes: 1 addition & 1 deletion src/hs13.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs13(args...)
@variable(model, x[1:2] ≥ 0.0, start = -2.0)
@expression(model, F1, x[1] - 2)
@expression(model, F2, x[2])
@NLconstraint(model, (1 - x[1])^3 - x[2] ≥ 0.0)
@constraint(model, (1 - x[1])^3 - x[2] ≥ 0.0)

return MathOptNLSModel(model, [F1; F2], name = "hs13")
end
2 changes: 1 addition & 1 deletion src/hs14.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs14(args...)
@variable(model, x[1:2], start = 2.0)
@expression(model, F1, x[1] - 2)
@expression(model, F2, x[2] - 1)
@NLconstraint(model, -0.25 * x[1]^2 - x[2]^2 + 1.0 ≥ 0.0)
@constraint(model, -0.25 * x[1]^2 - x[2]^2 + 1.0 ≥ 0.0)
@constraint(model, x[1] - 2 * x[2] == -1.0)

return MathOptNLSModel(model, [F1; F2], name = "hs14")
Expand Down
4 changes: 2 additions & 2 deletions src/hs16.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function hs16(args...)
set_start_value.(x, [-2.0; 1.0])
@NLexpression(model, F1, 10 * (x[2] - x[1]^2))
@expression(model, F2, 1 - x[1])
@NLconstraint(model, x[1] + x[2]^2 ≥ 0.0)
@NLconstraint(model, x[1]^2 + x[2] ≥ 0.0)
@constraint(model, x[1] + x[2]^2 ≥ 0.0)
@constraint(model, x[1]^2 + x[2] ≥ 0.0)

return MathOptNLSModel(model, [F1; F2], name = "hs16")
end
4 changes: 2 additions & 2 deletions src/hs17.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function hs17(args...)
set_start_value.(x, [-2.0; 1.0])
@NLexpression(model, F1, 10 * (x[2] - x[1]^2))
@expression(model, F2, 1 - x[1])
@NLconstraint(model, x[2]^2 - x[1] ≥ 0.0)
@NLconstraint(model, x[1]^2 - x[2] ≥ 0.0)
@constraint(model, x[2]^2 - x[1] ≥ 0.0)
@constraint(model, x[1]^2 - x[2] ≥ 0.0)

return MathOptNLSModel(model, [F1; F2], name = "hs17")
end
4 changes: 2 additions & 2 deletions src/hs18.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function hs18(args...)
@variable(model, lvar[i] ≤ x[i = 1:2] ≤ uvar[i], start = 2.0)
@expression(model, F1, 0.1 * x[1])
@expression(model, F2, x[2])
@NLconstraint(model, x[1] * x[2] ≥ 25)
@NLconstraint(model, x[1]^2 + x[2]^2 ≥ 25)
@constraint(model, x[1] * x[2] ≥ 25)
@constraint(model, x[1]^2 + x[2]^2 ≥ 25)

return MathOptNLSModel(model, [F1; F2], name = "hs18")
end
6 changes: 3 additions & 3 deletions src/hs20.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function hs20(args...)
set_start_value.(x, [-2.0; 1.0])
@NLexpression(model, F1, 10 * (x[2] - x[1]^2))
@expression(model, F2, 1 - x[1])
@NLconstraint(model, x[1] + x[2]^2 ≥ 0.0)
@NLconstraint(model, x[1]^2 + x[2] ≥ 0.0)
@NLconstraint(model, x[1]^2 + x[2]^2 ≥ 1)
@constraint(model, x[1] + x[2]^2 ≥ 0.0)
@constraint(model, x[1]^2 + x[2] ≥ 0.0)
@constraint(model, x[1]^2 + x[2]^2 ≥ 1)

return MathOptNLSModel(model, [F1; F2], name = "hs20")
end
2 changes: 1 addition & 1 deletion src/hs22.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function hs22(args...)
@expression(model, F1, x[1] - 2.0)
@expression(model, F2, x[2] - 1.0)
@constraint(model, -x[1] - x[2] + 2 ≥ 0)
@NLconstraint(model, -x[1]^2 + x[2] ≥ 0)
@constraint(model, -x[1]^2 + x[2] ≥ 0)

return MathOptNLSModel(model, [F1; F2], name = "hs22")
end
8 changes: 4 additions & 4 deletions src/hs23.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function hs23(args...)
set_start_value.(x, [3.0; 1.0])
@expression(model, F[i = 1:2], x[i])
@constraint(model, x[1] + x[2] ≥ 0)
@NLconstraint(model, x[1]^2 + x[2]^2 ≥ 1)
@NLconstraint(model, 9 * x[1]^2 + x[2]^2 ≥ 9)
@NLconstraint(model, x[1]^2 - x[2] ≥ 0)
@NLconstraint(model, x[2]^2 - x[1] ≥ 0)
@constraint(model, x[1]^2 + x[2]^2 ≥ 1)
@constraint(model, 9 * x[1]^2 + x[2]^2 ≥ 9)
@constraint(model, x[1]^2 - x[2] ≥ 0)
@constraint(model, x[2]^2 - x[1] ≥ 0)

return MathOptNLSModel(model, F, name = "hs23")
end
2 changes: 1 addition & 1 deletion src/hs26.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function hs26(args...)
set_start_value.(x, [-2.6; 2.0; 2.0])
@expression(model, F1, x[1] - x[2])
@NLexpression(model, F2, (x[2] - x[3])^2)
@NLconstraint(model, (1 + x[2]^2) * x[1] + x[3]^4 == 3)
@constraint(model, (1 + x[2]^2) * x[1] + x[3]^4 == 3)

return MathOptNLSModel(model, [F1; F2], name = "hs26")
end
2 changes: 1 addition & 1 deletion src/hs27.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs27(args...)
@variable(model, x[1:3], start = 2.0)
@expression(model, F1, 0.1 * (x[1] - 1))
@NLexpression(model, F2, x[2] - x[1]^2)
@NLconstraint(model, x[1] + x[3]^2 == -1)
@constraint(model, x[1] + x[3]^2 == -1)

return MathOptNLSModel(model, [F1; F2], name = "hs27")
end
2 changes: 1 addition & 1 deletion src/hs30.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs30(args...)
lvar = [1.0; -10.0; -10.0]
@variable(model, lvar[i] ≤ x[i = 1:3] ≤ 10, start = 1.0)
@expression(model, F[i = 1:3], x[i])
@NLconstraint(model, x[1]^2 + x[2]^2 ≥ 1.0)
@constraint(model, x[1]^2 + x[2]^2 ≥ 1.0)

return MathOptNLSModel(model, F, name = "hs30")
end
2 changes: 1 addition & 1 deletion src/hs31.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function hs31(args...)
@expression(model, F1, 3.0 * x[1])
@expression(model, F2, x[2])
@expression(model, F3, 3.0 * x[3])
@NLconstraint(model, x[1] * x[2] ≥ 1)
@constraint(model, x[1] * x[2] ≥ 1)

return MathOptNLSModel(model, [F1; F2; F3], name = "hs31")
end
2 changes: 1 addition & 1 deletion src/hs32.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function hs32(args...)
set_start_value.(x, [0.1; 0.7; 0.2])
@expression(model, F1, x[1] + 3 * x[2] + x[3])
@expression(model, F2, 2 * (x[1] - x[2]))
@NLconstraint(model, 6 * x[2] + 4 * x[3] - x[1]^3 ≥ 3.0)
@constraint(model, 6 * x[2] + 4 * x[3] - x[1]^3 ≥ 3.0)
@constraint(model, 1.0 - x[1] - x[2] - x[3] == 0.0)

return MathOptNLSModel(model, [F1; F2], name = "hs32")
Expand Down
2 changes: 1 addition & 1 deletion src/hs42.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function hs42(args...)
@variable(model, x[1:4], start = 1.0)
@expression(model, F[i = 1:4], x[i] - i)
@constraint(model, x[1] == 2.0)
@NLconstraint(model, x[3]^2 + x[4]^2 == 2.0)
@constraint(model, x[3]^2 + x[4]^2 == 2.0)

return MathOptNLSModel(model, F, name = "hs42")
end
6 changes: 3 additions & 3 deletions src/hs43.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ function hs43(args...)
@expression(model, F2, x[2] - 5 / 2)
@expression(model, F3, sqrt(2) * (x[3] - 21 / 4))
@expression(model, F4, x[4] + 7 / 2)
@NLconstraint(model, 8 - x[1]^2 - x[2]^2 - x[3]^2 - x[4]^2 - x[1] + x[2] - x[3] + x[4] ≥ 0.0)
@NLconstraint(model, 10 - x[1]^2 - 2 * x[2]^2 - x[3]^2 - 2 * x[4]^2 + x[1] + x[4] ≥ 0.0)
@NLconstraint(model, 5 - 2 * x[1]^2 - x[2]^2 - x[3]^2 - 2 * x[1] + x[2] + x[4] ≥ 0.0)
@constraint(model, 8 - x[1]^2 - x[2]^2 - x[3]^2 - x[4]^2 - x[1] + x[2] - x[3] + x[4] ≥ 0.0)
@constraint(model, 10 - x[1]^2 - 2 * x[2]^2 - x[3]^2 - 2 * x[4]^2 + x[1] + x[4] ≥ 0.0)
@constraint(model, 5 - 2 * x[1]^2 - x[2]^2 - x[3]^2 - 2 * x[1] + x[2] + x[4] ≥ 0.0)

return MathOptNLSModel(model, [F1; F2; F3; F4], name = "hs43")
end
4 changes: 2 additions & 2 deletions src/hs46.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function hs46(args...)
@expression(model, F2, x[3] - 1.0)
@NLexpression(model, F3, (x[4] - 1.0)^2)
@NLexpression(model, F4, (x[5] - 1.0)^3)
@NLconstraint(model, x[1]^2 * x[4] + sin(x[4] - x[5]) == 1.0)
@NLconstraint(model, x[2] + x[3]^4 * x[4]^2 == 2.0)
@constraint(model, x[1]^2 * x[4] + sin(x[4] - x[5]) == 1.0)
@constraint(model, x[2] + x[3]^4 * x[4]^2 == 2.0)

return MathOptNLSModel(model, [F1; F2; F3; F4], name = "hs46")
end
2 changes: 1 addition & 1 deletion src/hs57.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function hs57(args...)
@variable(model, lvar[i] ≤ x[i = 1:2] ≤ uvar[i])
set_start_value.(x, [0.42; 5.0])
@NLexpression(model, F[i = 1:44], b[i] - x[1] - (0.49 - x[1]) * exp(-x[2] * (a[i] - 8)))
@NLconstraint(model, 0.49 * x[2] - x[1] * x[2] ≥ 0.09)
@constraint(model, 0.49 * x[2] - x[1] * x[2] ≥ 0.09)

return MathOptNLSModel(model, F, name = "hs57")
end
2 changes: 1 addition & 1 deletion src/hs60.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function hs60(args...)
@expression(model, F1, x[1] - 1)
@expression(model, F2, x[1] - x[2])
@NLexpression(model, F3, (x[2] - x[3])^2)
@NLconstraint(model, x[1] * (1 + x[2]^2) + x[3]^4 == 4 + 3 * sqrt(2))
@constraint(model, x[1] * (1 + x[2]^2) + x[3]^4 == 4 + 3 * sqrt(2))

return MathOptNLSModel(model, [F1; F2; F3], name = "hs60")
end
4 changes: 2 additions & 2 deletions src/hs61.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function hs61(args...)
@expression(model, F1, 2 * (x[1] - 33 / 8))
@expression(model, F2, sqrt(2) * (x[2] + 4))
@expression(model, F3, sqrt(2) * (x[3] - 6))
@NLconstraint(model, 3 * x[1] - 2 * x[2]^2 == 7)
@NLconstraint(model, 4 * x[1] - 3 * x[3]^2 == 11)
@constraint(model, 3 * x[1] - 2 * x[2]^2 == 7)
@constraint(model, 4 * x[1] - 3 * x[3]^2 == 11)

return MathOptNLSModel(model, [F1; F2; F3], name = "hs61")
end
2 changes: 1 addition & 1 deletion src/hs65.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function hs65(args...)
@expression(model, F1, x[1] - x[2])
@expression(model, F2, (x[1] + x[2] - 10) / 3)
@expression(model, F3, x[3] - 5)
@NLconstraint(model, 48 - x[1]^2 - x[2]^2 - x[3]^2 == 0)
@constraint(model, 48 - x[1]^2 - x[2]^2 - x[3]^2 == 0)

return MathOptNLSModel(model, [F1; F2; F3], name = "hs65")
end
2 changes: 1 addition & 1 deletion src/hs70.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function hs70(args...)
)

@NLexpression(nls, F[i = 1:19], ycal[i] - yobs[i])
@NLconstraint(nls, b ≥ 0)
@constraint(nls, b ≥ 0)

return MathOptNLSModel(nls, F, name = "hs70")
end
4 changes: 2 additions & 2 deletions src/hs77.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function hs77(args...)
@expression(model, F3, x[3] - 1)
@NLexpression(model, F4, (x[4] - 1)^2)
@NLexpression(model, F5, (x[5] - 1)^3)
@NLconstraint(model, x[1]^2 * x[4] + sin(x[4] - x[5]) == 2 * sqrt(2))
@NLconstraint(model, x[2] + x[3]^4 * x[4]^2 == 8 + sqrt(2))
@constraint(model, x[1]^2 * x[4] + sin(x[4] - x[5]) == 2 * sqrt(2))
@constraint(model, x[2] + x[3]^4 * x[4]^2 == 8 + sqrt(2))

return MathOptNLSModel(model, [F1; F2; F3; F4; F5], name = "hs77")
end
Loading
Loading