-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathhs119.jl
More file actions
39 lines (35 loc) · 1.73 KB
/
hs119.jl
File metadata and controls
39 lines (35 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export hs119
function hs119(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T}
Q_rows = [1, 2, 2, 3, 1, 4, 5, 5, 6, 1, 2, 3, 4, 7, 1, 6, 8, 3, 9, 2, 3, 5, 8, 10, 4, 7, 11, 5, 9, 12, 7, 11, 13, 3, 10, 12, 13, 14, 4, 6, 8, 15, 1, 5, 9, 16]
Q_cols = [1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16]
clinrows = [1, 2, 3, 4, 7, 1, 3, 4, 6, 8, 1, 2, 4, 6, 8, 1, 2, 4, 5, 7, 8, 1, 2, 3, 5, 6, 8, 1, 3, 4, 5, 6, 1, 2, 4, 5, 6, 7, 8, 1, 3, 5, 6, 8, 1, 7, 2, 3, 4, 5, 6, 7, 8]
clincols = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16]
clinvals = T[0.22, -1.46, 1.29, -1.1, 1.12, 0.2, -0.89, -1.06, -1.72, 0.45, 0.19, -1.3, 0.95, -0.33, 0.26, 0.25, 1.82, -0.54, -1.43, 0.31, -1.1, 0.15, -1.15, -1.16, 1.51, 1.62, 0.58, 0.11, -0.96, -1.78, 0.59, 1.24, 0.12, 0.8, -0.41, -0.33, 0.21, 1.12, -1.03, 0.13, -0.49, -0.43, -0.26, 0.1, 1.0, -0.36, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
function f(x; rows = Q_rows, cols = Q_cols)
return sum((x[rows[k]]^2 + x[rows[k]] + 1) * (x[cols[k]]^2 + x[cols[k]] + 1) for k in 1:46)
end
x0 = 10 * ones(T, 16)
lvar = zeros(T, 16)
uvar = 5 * ones(T, 16)
lcon = T[
40,
17.599999999999998,
-49.600000000000016,
-56,
20.800000000000004,
33.60000000000001,
36.8,
-24,
]
ucon = T[
40,
17.599999999999998,
-49.600000000000016,
-56,
20.800000000000004,
33.60000000000001,
36.8,
-24,
]
return ADNLPModels.ADNLPModel(f, x0, lvar, uvar, clinrows, clincols, clinvals, lcon, ucon, name = "hs119"; kwargs...)
end