|
1 | 1 | export lincon |
2 | 2 |
|
3 | 3 | function lincon(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} |
4 | | - A = [1 2; 3 4] |
5 | | - b = [5; 6] |
6 | | - B = LinearAlgebra.diagm([3 * i for i = 3:5]) |
7 | | - c = [1; 2; 3] |
8 | | - C = [0 -2; 4 0] |
9 | | - d = [1; -1] |
10 | | - |
11 | 4 | x0 = zeros(T, 15) |
12 | 5 | f(x) = sum(i + x[i]^4 for i = 1:15) |
13 | | - clinvals = vcat(T[15], C[1, :], C[2, :], c, A[1, :], A[2, :], d, T[3 * i for i = 3:5], b) |
14 | | - clincols = |
15 | | - vcat([15], [6; 7], [6; 7], [10; 11; 12], [1; 2], [1; 2], [13; 14], [3], [4], [5], [8; 9]) |
16 | | - clinrows = vcat([1], [2; 2], [3; 3], [4; 4; 4], [5; 5], [6; 6], [7; 7], [8], [9], [10], [11; 11]) |
17 | 6 |
|
18 | | - lcon = T[22; -d; 1; -b; -Inf; -Inf * ones(3); -11] |
19 | | - ucon = T[22; -d; Inf; Inf * ones(2); 16; c; 9] |
| 7 | + clinrows = [5, 6, 5, 6, 8, 9, 10, 3, 2, 11, 11, 4, 4, 4, 7, 7, 1] |
| 8 | + clincols = [1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] |
| 9 | + 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] |
| 10 | + |
| 11 | + lcon = T[22.0, -1.0, 1.0, 1.0, -5.0, -6.0, -Inf, -Inf, -Inf, -Inf, -11.0] |
| 12 | + ucon = T[22.0, -1.0, 1.0, Inf, Inf, Inf, 16.0, 1.0, 2.0, 3.0, 9.0] |
20 | 13 |
|
21 | 14 | return ADNLPModels.ADNLPModel( |
22 | 15 | f, |
|
0 commit comments