-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathdixmaan_ijkl.jl
More file actions
68 lines (59 loc) · 1.8 KB
/
Copy pathdixmaan_ijkl.jl
File metadata and controls
68 lines (59 loc) · 1.8 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# The Dixon-Maany test problem (version I by default)
#
# Source:
# L. C. W. Dixon and Z. Maany,
# A family of test problems with sparse Hessians for unconstrained
# optimization,
# TR 206, Numerical Optimization Centre, Hatfield Polytechnic, 1988.
#
# See also
#
# problems 15, 16, 17, 18 in
# L. Luksan, C. Matonoha and J. Vlcek
# Modified CUTE problems for sparse unconstrained optimization,
# Technical Report 1081,
# Institute of Computer Science,
# Academy of Science of the Czech Republic
#
# http://www.cs.cas.cz/matonoha/download/V1081.pdf
#
# classification OUR2-AN-V-0
#
# D. Orban, Montreal, 08/2015.
export dixmaani, dixmaanj, dixmaank, dixmaanl
"Dixon-Maany function in size `n` (version I by default)"
function dixmaani(
args...;
n::Int = default_nvar,
α::Float64 = 1.0,
β::Float64 = 0.0,
γ::Float64 = 0.125,
δ::Float64 = 0.125,
kwargs...,
)
n_orig = n
m = max(1, div(n, 3))
n = 3 * m
@adjust_nvar_warn("dixmaan", n_orig, n)
nlp = Model()
@variable(nlp, x[i = 1:n], start = 2)
@objective(
nlp,
Min,
1 +
sum((i / n)^2 * α * x[i]^2 for i = 1:n) +
sum(β * x[i]^2 * (x[i + 1] + x[i + 1]^2)^2 for i = 1:(n - 1)) +
sum(γ * x[i]^2 * x[i + m]^4 for i = 1:(2 * m)) +
sum((i / n)^2 * δ * x[i] * x[i + 2 * m] for i = 1:m)
)
return nlp
end
"Dixon-Maany function in size `n` (version J)"
dixmaanj(args...; n::Int = default_nvar, kwargs...) =
dixmaani(n = n, α = 1.0, β = 0.0625, γ = 0.0625, δ = 0.0625)
"Dixon-Maany function in size `n` (version K)"
dixmaank(args...; n::Int = default_nvar, kwargs...) =
dixmaani(n = n, α = 1.0, β = 0.125, γ = 0.125, δ = 0.125)
"Dixon-Maany function in size `n` (version L)"
dixmaanl(args...; n::Int = default_nvar, kwargs...) =
dixmaani(n = n, α = 1.0, β = 0.26, γ = 0.26, δ = 0.26)