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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 19 additions & 15 deletions src/ADNLPProblems/hs117.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
export hs117

function hs117(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T}
a = Rational{Int}[-16 2 0 1 0;
0 -2 0 4 2;
-7 // 2 0 2 0 0;
0 -2 0 -4 -1;
0 -9 -2 1 -14 // 5;
2 0 -4 0 0;
-1 -1 -1 -1 -1;
-1 -2 -3 -2 -1;
1 2 3 4 5;
1 1 1 1 1]
a = Rational{Int}[
-16 2 0 1 0;
0 -2 0 4 2;
-7 // 2 0 2 0 0;
0 -2 0 -4 -1;
0 -9 -2 1 -14 // 5;
2 0 -4 0 0;
-1 -1 -1 -1 -1;
-1 -2 -3 -2 -1;
1 2 3 4 5;
1 1 1 1 1
]

b = [-40, -2, -25 // 100, -4, -4, -1, -40, -60, 5, 1]

c = [ 30 -20 -10 32 -10;
-20 39 -6 -31 32;
-10 -6 10 -6 -10;
32 -31 -6 39 -20;
-10 32 -10 -20 30]
c = [
30 -20 -10 32 -10;
-20 39 -6 -31 32;
-10 -6 10 -6 -10;
32 -31 -6 39 -20;
-10 32 -10 -20 30
]

d = [4, 8, 10, 6, 2]

Expand Down
282 changes: 275 additions & 7 deletions src/ADNLPProblems/hs119.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,271 @@
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]
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]
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)
return sum((x[rows[k]]^2 + x[rows[k]] + 1) * (x[cols[k]]^2 + x[cols[k]] + 1) for k = 1:46)
end

x0 = 10 * ones(T, 16)
Expand All @@ -35,5 +291,17 @@ function hs119(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) wher
36.8,
-24,
]
return ADNLPModels.ADNLPModel(f, x0, lvar, uvar, clinrows, clincols, clinvals, lcon, ucon, name = "hs119"; kwargs...)
return ADNLPModels.ADNLPModel(
f,
x0,
lvar,
uvar,
clinrows,
clincols,
clinvals,
lcon,
ucon,
name = "hs119";
kwargs...,
)
end
3 changes: 2 additions & 1 deletion src/ADNLPProblems/lincon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ function lincon(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) whe

clinrows = [5, 6, 5, 6, 8, 9, 10, 3, 2, 11, 11, 4, 4, 4, 7, 7, 1]
clincols = [1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
clinvals = T[1.0, 3.0, 2.0, 4.0, 9.0, 12.0, 15.0, 4.0, -2.0, 5.0, 6.0, 1.0, 2.0, 3.0, 1.0, -1.0, 15.0]
clinvals =
T[1.0, 3.0, 2.0, 4.0, 9.0, 12.0, 15.0, 4.0, -2.0, 5.0, 6.0, 1.0, 2.0, 3.0, 1.0, -1.0, 15.0]

lcon = T[22.0, -1.0, 1.0, 1.0, -5.0, -6.0, -Inf, -Inf, -Inf, -Inf, -11.0]
ucon = T[22.0, -1.0, 1.0, Inf, Inf, Inf, 16.0, 1.0, 2.0, 3.0, 9.0]
Expand Down
19 changes: 19 additions & 0 deletions src/Meta/AMPGO02.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ AMPGO02_meta = Dict(
:is_feasible => true,
:defined_everywhere => missing,
:origin => :unknown,
:url => "http://infinity77.net/global_optimization/test_functions_1d.html#d-test-functions",
:notes => raw"""
A one dimensional optimization problem
""",
:origin_notes => raw"""
Problem 2 in
http://infinity77.net/global_optimization/test_functions_1d.html#d-test-functions
Andrea Gavana
S. Goyette, Sherbrooke 2016/2017
""",
:reference => raw"""
@misc{GavanaGOTestSuite,
author = {Gavana, Andrea},
title = {Global Optimization Benchmarks},
year = {2013},
howpublished = {\url{http://infinity77.net/global_optimization/}},
note = {Collection of benchmark functions and algorithm comparisons for global optimization (including AMPGO)}
}
""",
)
get_AMPGO02_nvar(; n::Integer = default_nvar, kwargs...) = 1
get_AMPGO02_ncon(; n::Integer = default_nvar, kwargs...) = 0
Expand Down
Loading
Loading