Skip to content

Commit 48299db

Browse files
committed
Fix small dimension specification issue.
1 parent 536bb26 commit 48299db

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/ADNLPProblems/clplatea.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ function clplatea(;
66
wght = -0.1,
77
kwargs...,
88
) where {T}
9-
p = floor(Int, sqrt(n))
10-
p * p != n && @warn("clplatea: number of variables adjusted from $n down to $(p*p)")
9+
p = floor(Int, sqrt(n)) < 3 ? 3 : floor(Int, sqrt(n))
10+
p * p != n && @warn("clplatea: number of variables adjusted from $n to $(p*p)")
1111
n = p * p
1212
hp2 = (1 // 2) * p^2
1313
function f(x; p = p, hp2 = hp2, wght = wght)

src/ADNLPProblems/clplateb.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ function clplateb(;
66
wght = -0.1,
77
kwargs...,
88
) where {T}
9-
p = floor(Int, sqrt(n))
10-
p * p != n && @warn("clplateb: number of variables adjusted from $n down to $(p*p)")
9+
p = floor(Int, sqrt(n)) < 3 ? 3 : floor(Int, sqrt(n))
10+
p * p != n && @warn("clplateb: number of variables adjusted from $n to $(p*p)")
1111
n = p * p
1212
hp2 = 1 // 2 * p^2
1313
function f(x; p = p, hp2 = hp2, wght = wght)

src/ADNLPProblems/clplatec.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function clplatec(;
88
l = 0.01,
99
kwargs...,
1010
) where {T}
11-
p = floor(Int, sqrt(n))
12-
p * p != n && @warn("clplatec: number of variables adjusted from $n down to $(p*p)")
11+
p = floor(Int, sqrt(n)) < 3 ? 3 : floor(Int, sqrt(n))
12+
p * p != n && @warn("clplatec: number of variables adjusted from $n to $(p*p)")
1313
n = p * p
1414

1515
hp2 = 1 // 2 * p^2

0 commit comments

Comments
 (0)