diff --git a/src/ADNLPProblems/dembo_gp2.jl b/src/ADNLPProblems/dembo_gp2.jl new file mode 100644 index 00000000..763c7cae --- /dev/null +++ b/src/ADNLPProblems/dembo_gp2.jl @@ -0,0 +1,60 @@ +export dembo_gp2 + +function dembo_gp2(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + c = T[ + 5.35785470, + 0.83568910, + 37.239239, + -40792.1410, + 0.00002584, + -0.00006663, + -0.00000734, + 0.000853007, + 0.00009395, + -0.00033085, + 1330.32937, + -0.42002610, + -0.30585975, + 0.00024186, + 0.00010159, + 0.00007379, + 2275.132693, + -0.26680980, + -0.40583930, + 0.00029955, + 0.00007992, + 0.00012157, + ] + + function f(x) + return c[1] * x[2] + c[2] * x[1] * x[5] + c[3] * x[1] + c[4] + end + + function c!(cx, x) + cx[1] = c[5] * x[3] * x[5] + c[6] * x[2] * x[5] + c[7] * x[1] * x[4] + cx[2] = c[8] * x[2] * x[5] + c[9] * x[1] * x[4] + c[10] * x[3] * x[5] + cx[3] = c[11] / (x[2] * x[5]) + c[12] * x[1] / x[5] + c[13] / x[5] + cx[4] = c[14] * x[2] * x[5] + c[15] * x[1] * x[2] + c[16] * x[2] + cx[5] = c[17] / (x[3] * x[5]) + c[18] * x[1] / x[5] + c[19] * x[4] / x[5] + cx[6] = c[20] * x[3] * x[5] + c[21] * x[1] * x[3] + c[22] * x[3] * x[4] + return cx + end + + x0 = T[78.62, 33.44, 31.07, 44.18, 35.22] + lvar = T[78.0, 33.0, 27.0, 27.0, 27.0] + uvar = T[102.0, 45.0, 45.0, 45.0, 45.0] + lcon = fill(T(-Inf), 6) + ucon = fill(T(0), 6) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp2"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp3.jl b/src/ADNLPProblems/dembo_gp3.jl new file mode 100644 index 00000000..50fae2f4 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp3.jl @@ -0,0 +1,90 @@ +export dembo_gp3 + +function dembo_gp3(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + c = T[ + 1.715, + 0.035, + 4.0565, + 10.0, + 3000.0, + -0.063, + 0.59553571e-2, + 0.88392857, + -0.11756250, + 1.10880000, + 0.13035330, + -0.00660330, + 0.66173269e-3, + 0.17239878e-1, + -0.56595559e-2, + -0.19120592e-1, + 0.56850750e2, + 1.08702000, + 0.32175000, + -0.03762000, + 0.00619800, + 0.24623121e4, + -0.25125634e2, + 0.16118996e3, + 5000.0, + -0.48951000e6, + 0.44333333e2, + 0.33000000, + 0.02255600, + -0.00759500, + 0.00061000, + -0.0005, + 0.81967200, + 0.81967200, + 24500.0, + -250.0, + 0.10204082e-1, + 0.12244898e-4, + 0.00006250, + 0.00006250, + -0.00007625, + 1.22, + 1.0, + -1.0, + ] + + function f(x) + return c[1] * x[1] + c[2] * x[1] * x[6] + c[3] * x[3] + c[4] * x[2] + c[5] + c[6] * x[3] * x[5] + end + + function c!(cx, x) + cx[1] = c[7] * x[2] + c[8] * x[3] / x[1] + c[9] * x[6] + cx[2] = c[10] * x[1] / x[3] + c[11] * x[1] * x[6] / x[3] + c[12] * x[1] * x[2] / x[3] + cx[3] = c[13] * x[2] + c[14] * x[5] + c[15] * x[4] + c[16] * x[6] + cx[4] = c[17] / x[5] + c[18] * x[6] / x[5] + c[19] * x[4] / x[5] + c[20] * x[2] / x[5] + cx[5] = c[21] * x[7] + c[22] * x[2] / (x[3] * x[4]) + c[23] * x[2] / x[3] + cx[6] = c[24] / x[7] + c[25] * x[2] / (x[3] * x[7]) + c[26] * x[2] / (x[3] * x[4] * x[7]) + cx[7] = c[27] / x[7] + c[28] * x[7] / x[5] + cx[8] = c[29] * x[5] + c[30] * x[7] + cx[9] = c[31] * x[3] + c[32] * x[1] + cx[10] = c[33] * x[1] / x[3] + c[34] / x[3] + cx[11] = c[35] * x[2] / (x[3] * x[4]) + c[36] * x[2] / x[3] + cx[12] = c[37] * x[4] + c[38] * x[3] * x[4] / x[2] + cx[13] = c[39] * x[1] * x[6] + c[40] * x[1] + c[41] * x[3] + cx[14] = c[42] * x[3] / x[1] + c[43] / x[1] + c[44] * x[6] + return cx + end + + x0 = T[1745.0, 110.0, 3048.0, 89.0, 92.0, 8.0, 145.0] + lvar = T[1.0, 1.0, 1.0, 85.0, 90.0, 3.0, 145.0] + uvar = T[2000.0, 120.0, 5000.0, 93.0, 95.0, 12.0, 162.0] + lcon = fill(T(-Inf), 14) + ucon = fill(T(0), 14) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp3"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp4a.jl b/src/ADNLPProblems/dembo_gp4a.jl new file mode 100644 index 00000000..a90ebfb7 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp4a.jl @@ -0,0 +1,33 @@ +export dembo_gp4a + +function dembo_gp4a(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + function f(x) + return T(0.4) * x[1]^T(0.67) * x[7]^T(0.67) + T(0.4) * x[2]^T(0.67) * x[8]^T(0.67) + T(10) - x[1] - x[2] + end + + function c!(cx, x) + cx[1] = T(0.0588) * x[5] * x[7] + T(0.1) * x[1] + cx[2] = T(0.0588) * x[6] * x[8] + T(0.1) * x[1] + T(0.1) * x[2] + cx[3] = T(4) * x[3] / x[5] + T(2) * x[3]^T(0.71) / x[5] + T(0.0588) * x[3]^T(1.3) * x[7] + cx[4] = T(4) * x[4] / x[6] + T(2) * x[4]^T(0.71) / x[6] + T(0.0588) * x[4]^T(1.3) * x[8] + return cx + end + + x0 = T[6.0, 3.0, 0.4, 0.2, 6.0, 6.0, 1.0, 0.5] + lvar = fill(T(0.1), 8) + uvar = fill(T(10), 8) + lcon = fill(T(-Inf), 4) + ucon = fill(T(0), 4) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp4a"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp4b.jl b/src/ADNLPProblems/dembo_gp4b.jl new file mode 100644 index 00000000..5379a0f0 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp4b.jl @@ -0,0 +1,33 @@ +export dembo_gp4b + +function dembo_gp4b(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + function f(x) + return T(0.4) * x[1]^T(0.67) * x[7]^T(0.67) + T(0.4) * x[2]^T(0.67) * x[8]^T(0.67) + T(10) - x[1] - x[2] + end + + function c!(cx, x) + cx[1] = T(0.0588) * x[5] * x[7] + T(0.1) * x[1] + cx[2] = T(0.0588) * x[6] * x[8] + T(0.1) * x[1] + T(0.1) * x[2] + cx[3] = T(4) * x[3] / x[5] + T(2) * x[3]^T(0.71) / x[5] + T(0.0588) * x[3]^T(1.3) * x[7] + cx[4] = T(4) * x[4] / x[6] + T(2) * x[4]^T(0.71) / x[6] + T(0.0588) * x[4]^T(1.3) * x[8] + return cx + end + + x0 = T[6.0, 3.0, 0.4, 0.2, 6.0, 6.0, 1.0, 0.5] + lvar = fill(T(0.1), 8) + uvar = fill(T(10), 8) + lcon = fill(T(-Inf), 4) + ucon = fill(T(0), 4) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp4b"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp5.jl b/src/ADNLPProblems/dembo_gp5.jl new file mode 100644 index 00000000..de254343 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp5.jl @@ -0,0 +1,57 @@ +export dembo_gp5 + +function dembo_gp5(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + c = T[ + 1.0, + 1.0, + 1.0, + 833.33252, + 100.0, + -83333.333, + 1250.0, + 1.0, + -1250.0, + 1250000.0, + 1.0, + -2500.0, + 0.0025, + 0.0025, + 0.0025, + 0.0025, + -0.0025, + 0.01, + -0.01, + ] + + function f(x) + return c[1] * x[1] + c[2] * x[2] + c[3] * x[3] + end + + function c!(cx, x) + cx[1] = c[4] * x[4] / (x[1] * x[6]) + c[5] / x[6] + c[6] / (x[1] * x[6]) + cx[2] = c[7] * x[5] / (x[2] * x[7]) + c[8] * x[4] / x[7] + c[9] * x[4] / (x[2] * x[7]) + cx[3] = c[10] / (x[3] * x[8]) + c[11] * x[5] / x[8] + c[12] * x[5] / (x[3] * x[8]) + cx[4] = c[13] * x[4] + c[14] * x[6] + cx[5] = c[15] * x[5] + c[16] * x[7] + c[17] * x[4] + cx[6] = c[18] * x[8] + c[19] * x[5] + return cx + end + + x0 = T[5000.0, 5000.0, 5000.0, 200.0, 350.0, 150.0, 225.0, 425.0] + lvar = T[100.0, 1000.0, 1000.0, 10.0, 10.0, 10.0, 10.0, 10.0] + uvar = T[10000.0, 10000.0, 10000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0] + lcon = fill(T(-Inf), 6) + ucon = fill(T(0), 6) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp5"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp6.jl b/src/ADNLPProblems/dembo_gp6.jl new file mode 100644 index 00000000..b57e9344 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp6.jl @@ -0,0 +1,84 @@ +export dembo_gp6 + +function dembo_gp6(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + c = T[ + 1.0, + 1.0, + 1.0, + 1.262626, + -1.231059, + 1.262626, + -1.231059, + 1.262626, + -1.231059, + 0.034750, + 0.975000, + -0.009750, + 0.034750, + 0.975000, + -0.009750, + 1.0, + 1.0, + -1.0, + 0.002, + 0.002, + 1.0, + 1.0, + -0.002, + -0.002, + 1.0, + 1.0, + 500.0, + -1.0, + -500.0, + 0.9, + 0.002, + -0.002, + 1.0, + 1.0, + 0.002, + -0.002, + 0.034750, + 0.975000, + -0.009750, + ] + + function f(x) + return c[1] * x[11] + c[2] * x[12] + c[3] * x[13] + end + + function c!(cx, x) + cx[1] = c[4] * x[8] / x[11] + c[5] * x[1] * x[8] / x[11] + cx[2] = c[6] * x[9] / x[12] + c[7] * x[2] * x[9] / x[12] + cx[3] = c[8] * x[10] / x[13] + c[9] * x[3] * x[10] / x[13] + cx[4] = c[10] * x[2] / x[5] + c[11] * x[2] + c[12] * x[1] / x[5] + cx[5] = c[13] * x[3] / x[6] + c[14] * x[3] + c[15] * x[2] / x[6] + cx[6] = c[16] * x[1] * x[8] / (x[5] * x[7]) + c[17] * x[4] / x[5] + c[18] * x[4] * x[8] / (x[5] * x[7]) + cx[7] = c[19] * x[2] * x[9] + c[20] * x[5] * x[8] + c[21] * x[6] + c[22] * x[5] + c[23] * x[1] * x[8] + c[24] * x[6] * x[9] + cx[8] = c[25] * x[3] * x[10] / (x[2] * x[9]) + c[26] * x[6] / x[2] + c[27] / x[9] + c[28] * x[10] / x[9] + c[29] * x[6] / (x[2] * x[9]) + cx[9] = c[30] / x[2] + c[31] * x[10] + c[32] * x[3] * x[10] / x[2] + cx[10] = c[33] * x[2] / x[3] + cx[11] = c[34] * x[1] / x[2] + cx[12] = c[35] * x[7] + c[36] * x[8] + cx[13] = c[37] * x[1] / x[4] + c[38] * x[1] + c[39] * x[3] / x[4] + return cx + end + + x0 = T[0.50, 0.80, 0.90, 0.10, 0.14, 0.50, 489.0, 80.0, 650.0, 450.0, 150.0, 150.0, 150.0] + lvar = T[0.1, 0.1, 0.9, 0.0001, 0.1, 0.1, 0.1, 0.1, 500.0, 0.1, 1.0, 0.0001, 0.0001] + uvar = T[1.0, 1.0, 1.0, 0.1, 0.9, 0.9, 1000.0, 1000.0, 1000.0, 500.0, 150.0, 150.0, 150.0] + lcon = fill(T(-Inf), 13) + ucon = fill(T(0), 13) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp6"; + kwargs..., + ) +end diff --git a/src/ADNLPProblems/dembo_gp7.jl b/src/ADNLPProblems/dembo_gp7.jl new file mode 100644 index 00000000..fb6d34e9 --- /dev/null +++ b/src/ADNLPProblems/dembo_gp7.jl @@ -0,0 +1,113 @@ +export dembo_gp7 + +function dembo_gp7(; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T} + c = T[ + 1.262626, + 1.262626, + -1.262626, + 1.262626, + 1.262626, + -1.231060, + -1.231060, + -1.231060, + -1.231060, + -1.231060, + 0.034750, + 0.975, + -0.00975, + 0.034750, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 1.0, + 1.0, + -1.0, + 1.0, + 0.002, + 0.002, + -0.002, + -0.002, + 1.0, + 0.002, + 0.002, + 1.0, + -0.002, + -0.002, + 1.0, + 1.0, + 500.0, + -500.0, + -1.0, + 1.0, + 1.0, + 500.0, + -1.0, + -500.0, + 0.9, + 0.002, + -0.002, + 0.002, + -0.002, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + ] + + function f(x) + return c[1] * x[12] + c[2] * x[13] + c[3] * x[14] + c[4] * x[15] + c[5] * x[16] + + c[6] * x[1] * x[12] + c[7] * x[2] * x[13] + c[8] * x[3] * x[14] + c[9] * x[4] * x[15] + c[10] * x[5] * x[16] + end + + function c!(cx, x) + cx[1] = c[11] * x[1] / x[6] + c[12] * x[1] + c[13] * x[2] / x[6] + cx[2] = c[14] * x[2] / x[7] + c[15] * x[2] + c[16] * x[2]^2 / x[7] + cx[3] = c[17] * x[3] / x[8] + c[18] * x[3] + c[19] * x[2] / x[8] + cx[4] = c[20] * x[4] / x[9] + c[21] * x[4] + c[22] * x[2] / x[9] + cx[5] = c[23] * x[5] / x[10] + c[24] * x[5] + c[25] * x[2]^5 / x[10] + cx[6] = c[26] * x[6] / x[7] + c[27] * x[1] * x[12] / (x[7] * x[11]) + c[28] * x[6] * x[12] / (x[7] * x[11]) + cx[7] = c[29] * x[7] / x[8] + c[30] * x[7] * x[12] / x[8] + c[31] * x[2] * x[13] / x[8] + c[32] * x[13] + c[33] * x[1] * x[12] / x[8] + cx[8] = c[34] * x[8] + c[35] * x[8] * x[13] + c[36] * x[3] * x[14] + c[37] * x[9] + c[38] * x[2] * x[13] + c[39] * x[9] * x[14] + cx[9] = c[40] * x[9] / x[3] + c[41] * x[4] * x[15] / (x[3] * x[14]) + c[42] * x[10] / (x[3] * x[14]) + c[43] * x[9] / (x[3] * x[14]) + c[44] * x[8] * x[15] / (x[3] * x[14]) + cx[10] = c[45] * x[5] * x[16] / (x[4] * x[15]) + c[46] * x[10] / x[4] + c[47] / x[10] + c[48] * x[16] / x[15] + c[49] * x[10] / (x[4] * x[15]) + cx[11] = c[50] / x[4] + c[51] * x[16] + c[52] * x[5] * x[16] / x[4] + cx[12] = c[53] * x[11] + c[54] * x[12] + cx[13] = c[55] * x[12] / x[11] + cx[14] = c[56] * x[4] / x[5] + cx[15] = c[57] * x[3] / x[4] + cx[16] = c[58] * x[2] / x[3] + cx[17] = c[59] * x[1] / x[2] + cx[18] = c[60] * x[9] / x[10] + cx[19] = c[61] * x[8] / x[9] + return cx + end + + x0 = T[0.8, 0.83, 0.85, 0.87, 0.90, 0.10, 0.12, 0.19, 0.25, 0.29, 512.0, 13.1, 71.8, 640.0, 650.0, 5.7] + lvar = T[0.1, 0.1, 0.1, 0.1, 0.9, 0.0001, 0.1, 0.1, 0.1, 0.1, 1.0, 1e-6, 1.0, 500.0, 500.0, 1e-6] + uvar = T[0.9, 0.9, 0.9, 0.9, 1.0, 0.1, 0.9, 0.9, 0.9, 0.9, 1000.0, 500.0, 500.0, 1000.0, 1000.0, 500.0] + lcon = fill(T(-Inf), 19) + ucon = fill(T(0), 19) + + return ADNLPModels.ADNLPModel!( + f, + x0, + lvar, + uvar, + c!, + lcon, + ucon, + name = "dembo_gp7"; + kwargs..., + ) +end diff --git a/src/Meta/dembo_gp2.jl b/src/Meta/dembo_gp2.jl new file mode 100644 index 00000000..44223200 --- /dev/null +++ b/src/Meta/dembo_gp2.jl @@ -0,0 +1,25 @@ +dembo_gp2_meta = Dict( + :nvar => 5, + :variable_nvar => false, + :ncon => 6, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp2", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :other, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp2_nvar(; n::Integer = default_nvar, kwargs...) = 5 +get_dembo_gp2_ncon(; n::Integer = default_nvar, kwargs...) = 6 +get_dembo_gp2_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp2_nnln(; n::Integer = default_nvar, kwargs...) = 6 +get_dembo_gp2_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp2_nineq(; n::Integer = default_nvar, kwargs...) = 6 diff --git a/src/Meta/dembo_gp3.jl b/src/Meta/dembo_gp3.jl new file mode 100644 index 00000000..68aa1510 --- /dev/null +++ b/src/Meta/dembo_gp3.jl @@ -0,0 +1,25 @@ +dembo_gp3_meta = Dict( + :nvar => 7, + :variable_nvar => false, + :ncon => 14, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp3", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :other, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp3_nvar(; n::Integer = default_nvar, kwargs...) = 7 +get_dembo_gp3_ncon(; n::Integer = default_nvar, kwargs...) = 14 +get_dembo_gp3_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp3_nnln(; n::Integer = default_nvar, kwargs...) = 14 +get_dembo_gp3_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp3_nineq(; n::Integer = default_nvar, kwargs...) = 14 diff --git a/src/Meta/dembo_gp4a.jl b/src/Meta/dembo_gp4a.jl new file mode 100644 index 00000000..8be05abd --- /dev/null +++ b/src/Meta/dembo_gp4a.jl @@ -0,0 +1,25 @@ +dembo_gp4a_meta = Dict( + :nvar => 8, + :variable_nvar => false, + :ncon => 4, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp4a", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :other, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp4a_nvar(; n::Integer = default_nvar, kwargs...) = 8 +get_dembo_gp4a_ncon(; n::Integer = default_nvar, kwargs...) = 4 +get_dembo_gp4a_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp4a_nnln(; n::Integer = default_nvar, kwargs...) = 4 +get_dembo_gp4a_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp4a_nineq(; n::Integer = default_nvar, kwargs...) = 4 diff --git a/src/Meta/dembo_gp4b.jl b/src/Meta/dembo_gp4b.jl new file mode 100644 index 00000000..ac44f35b --- /dev/null +++ b/src/Meta/dembo_gp4b.jl @@ -0,0 +1,25 @@ +dembo_gp4b_meta = Dict( + :nvar => 8, + :variable_nvar => false, + :ncon => 4, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp4b", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :other, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp4b_nvar(; n::Integer = default_nvar, kwargs...) = 8 +get_dembo_gp4b_ncon(; n::Integer = default_nvar, kwargs...) = 4 +get_dembo_gp4b_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp4b_nnln(; n::Integer = default_nvar, kwargs...) = 4 +get_dembo_gp4b_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp4b_nineq(; n::Integer = default_nvar, kwargs...) = 4 diff --git a/src/Meta/dembo_gp5.jl b/src/Meta/dembo_gp5.jl new file mode 100644 index 00000000..6f768e0d --- /dev/null +++ b/src/Meta/dembo_gp5.jl @@ -0,0 +1,25 @@ +dembo_gp5_meta = Dict( + :nvar => 8, + :variable_nvar => false, + :ncon => 6, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp5", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :linear, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp5_nvar(; n::Integer = default_nvar, kwargs...) = 8 +get_dembo_gp5_ncon(; n::Integer = default_nvar, kwargs...) = 6 +get_dembo_gp5_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp5_nnln(; n::Integer = default_nvar, kwargs...) = 6 +get_dembo_gp5_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp5_nineq(; n::Integer = default_nvar, kwargs...) = 6 diff --git a/src/Meta/dembo_gp6.jl b/src/Meta/dembo_gp6.jl new file mode 100644 index 00000000..61b01da7 --- /dev/null +++ b/src/Meta/dembo_gp6.jl @@ -0,0 +1,25 @@ +dembo_gp6_meta = Dict( + :nvar => 13, + :variable_nvar => false, + :ncon => 13, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp6", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :linear, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp6_nvar(; n::Integer = default_nvar, kwargs...) = 13 +get_dembo_gp6_ncon(; n::Integer = default_nvar, kwargs...) = 13 +get_dembo_gp6_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp6_nnln(; n::Integer = default_nvar, kwargs...) = 13 +get_dembo_gp6_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp6_nineq(; n::Integer = default_nvar, kwargs...) = 13 diff --git a/src/Meta/dembo_gp7.jl b/src/Meta/dembo_gp7.jl new file mode 100644 index 00000000..8c3dd8e8 --- /dev/null +++ b/src/Meta/dembo_gp7.jl @@ -0,0 +1,25 @@ +dembo_gp7_meta = Dict( + :nvar => 16, + :variable_nvar => false, + :ncon => 19, + :variable_ncon => false, + :minimize => true, + :name => "dembo_gp7", + :has_equalities_only => false, + :has_inequalities_only => true, + :has_bounds => true, + :has_fixed_variables => false, + :objtype => :other, + :contype => :general, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => Inf, + :is_feasible => true, + :defined_everywhere => false, + :origin => :academic, +) +get_dembo_gp7_nvar(; n::Integer = default_nvar, kwargs...) = 16 +get_dembo_gp7_ncon(; n::Integer = default_nvar, kwargs...) = 19 +get_dembo_gp7_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp7_nnln(; n::Integer = default_nvar, kwargs...) = 19 +get_dembo_gp7_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_dembo_gp7_nineq(; n::Integer = default_nvar, kwargs...) = 19 diff --git a/src/PureJuMP/dembo_gp2.jl b/src/PureJuMP/dembo_gp2.jl new file mode 100644 index 00000000..db21a4b0 --- /dev/null +++ b/src/PureJuMP/dembo_gp2.jl @@ -0,0 +1,51 @@ +export dembo_gp2 + +function dembo_gp2(; n::Int = default_nvar, kwargs...) + c = [ + 5.35785470, + 0.83568910, + 37.239239, + -40792.1410, + 0.00002584, + -0.00006663, + -0.00000734, + 0.000853007, + 0.00009395, + -0.00033085, + 1330.32937, + -0.42002610, + -0.30585975, + 0.00024186, + 0.00010159, + 0.00007379, + 2275.132693, + -0.26680980, + -0.40583930, + 0.00029955, + 0.00007992, + 0.00012157, + ] + + model = Model() + @variable(model, x[1:5]) + + lbs = [78.0, 33.0, 27.0, 27.0, 27.0] + ubs = [102.0, 45.0, 45.0, 45.0, 45.0] + x0 = [78.62, 33.44, 31.07, 44.18, 35.22] + for i in 1:5 + set_lower_bound(x[i], lbs[i]) + set_upper_bound(x[i], ubs[i]) + set_start_value(x[i], x0[i]) + end + + @objective(model, Min, c[1] * x[2] + c[2] * x[1] * x[5] + c[3] * x[1] + c[4]) + + @constraint(model, c[5] * x[3] * x[5] + c[6] * x[2] * x[5] + c[7] * x[1] * x[4] <= 0) + @constraint(model, c[8] * x[2] * x[5] + c[9] * x[1] * x[4] + c[10] * x[3] * x[5] <= 0) + @constraint(model, c[11] / (x[2] * x[5]) + c[12] * x[1] / x[5] + c[13] / x[5] <= 0) + @constraint(model, c[14] * x[2] * x[5] + c[15] * x[1] * x[2] + c[16] * x[2] <= 0) + @constraint(model, c[17] / (x[3] * x[5]) + c[18] * x[1] / x[5] + c[19] * x[4] / x[5] <= 0) + @constraint(model, c[20] * x[3] * x[5] + c[21] * x[1] * x[3] + c[22] * x[3] * x[4] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp3.jl b/src/PureJuMP/dembo_gp3.jl new file mode 100644 index 00000000..b4bf8e63 --- /dev/null +++ b/src/PureJuMP/dembo_gp3.jl @@ -0,0 +1,81 @@ +export dembo_gp3 + +function dembo_gp3(; n::Int = default_nvar, kwargs...) + c = [ + 1.715, + 0.035, + 4.0565, + 10.0, + 3000.0, + -0.063, + 0.59553571e-2, + 0.88392857, + -0.11756250, + 1.10880000, + 0.13035330, + -0.00660330, + 0.66173269e-3, + 0.17239878e-1, + -0.56595559e-2, + -0.19120592e-1, + 0.56850750e2, + 1.08702000, + 0.32175000, + -0.03762000, + 0.00619800, + 0.24623121e4, + -0.25125634e2, + 0.16118996e3, + 5000.0, + -0.48951000e6, + 0.44333333e2, + 0.33000000, + 0.02255600, + -0.00759500, + 0.00061000, + -0.0005, + 0.81967200, + 0.81967200, + 24500.0, + -250.0, + 0.10204082e-1, + 0.12244898e-4, + 0.00006250, + 0.00006250, + -0.00007625, + 1.22, + 1.0, + -1.0, + ] + + model = Model() + @variable(model, x[1:7]) + + lbs = [1.0, 1.0, 1.0, 85.0, 90.0, 3.0, 145.0] + ubs = [2000.0, 120.0, 5000.0, 93.0, 95.0, 12.0, 162.0] + x0 = [1745.0, 110.0, 3048.0, 89.0, 92.0, 8.0, 145.0] + for i in 1:7 + set_lower_bound(x[i], lbs[i]) + set_upper_bound(x[i], ubs[i]) + set_start_value(x[i], x0[i]) + end + + @objective(model, Min, c[1] * x[1] + c[2] * x[1] * x[6] + c[3] * x[3] + c[4] * x[2] + c[5] + c[6] * x[3] * x[5]) + + @constraint(model, c[7] * x[2] + c[8] * x[3] / x[1] + c[9] * x[6] <= 0) + @constraint(model, c[10] * x[1] / x[3] + c[11] * x[1] * x[6] / x[3] + c[12] * x[1] * x[2] / x[3] <= 0) + @constraint(model, c[13] * x[2] + c[14] * x[5] + c[15] * x[4] + c[16] * x[6] <= 0) + @constraint(model, c[17] / x[5] + c[18] * x[6] / x[5] + c[19] * x[4] / x[5] + c[20] * x[2] / x[5] <= 0) + @constraint(model, c[21] * x[7] + c[22] * x[2] / (x[3] * x[4]) + c[23] * x[2] / x[3] <= 0) + @constraint(model, c[24] / x[7] + c[25] * x[2] / (x[3] * x[7]) + c[26] * x[2] / (x[3] * x[4] * x[7]) <= 0) + @constraint(model, c[27] / x[7] + c[28] * x[7] / x[5] <= 0) + @constraint(model, c[29] * x[5] + c[30] * x[7] <= 0) + @constraint(model, c[31] * x[3] + c[32] * x[1] <= 0) + @constraint(model, c[33] * x[1] / x[3] + c[34] / x[3] <= 0) + @constraint(model, c[35] * x[2] / (x[3] * x[4]) + c[36] * x[2] / x[3] <= 0) + @constraint(model, c[37] * x[4] + c[38] * x[3] * x[4] / x[2] <= 0) + @constraint(model, c[39] * x[1] * x[6] + c[40] * x[1] + c[41] * x[3] <= 0) + @constraint(model, c[42] * x[3] / x[1] + c[43] / x[1] + c[44] * x[6] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp4a.jl b/src/PureJuMP/dembo_gp4a.jl new file mode 100644 index 00000000..ab35e175 --- /dev/null +++ b/src/PureJuMP/dembo_gp4a.jl @@ -0,0 +1,16 @@ +export dembo_gp4a + +function dembo_gp4a(; n::Int = default_nvar, kwargs...) + model = Model() + @variable(model, 0.1 <= x[1:8] <= 10.0) + set_start_value.(x, [6.0, 3.0, 0.4, 0.2, 6.0, 6.0, 1.0, 0.5]) + + @objective(model, Min, 0.4 * x[1]^0.67 * x[7]^0.67 + 0.4 * x[2]^0.67 * x[8]^0.67 + 10.0 - x[1] - x[2]) + + @constraint(model, 0.0588 * x[5] * x[7] + 0.1 * x[1] <= 0) + @constraint(model, 0.0588 * x[6] * x[8] + 0.1 * x[1] + 0.1 * x[2] <= 0) + @constraint(model, 4.0 * x[3] / x[5] + 2.0 * x[3]^0.71 / x[5] + 0.0588 * x[3]^1.3 * x[7] <= 0) + @constraint(model, 4.0 * x[4] / x[6] + 2.0 * x[4]^0.71 / x[6] + 0.0588 * x[4]^1.3 * x[8] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp4b.jl b/src/PureJuMP/dembo_gp4b.jl new file mode 100644 index 00000000..e79d142a --- /dev/null +++ b/src/PureJuMP/dembo_gp4b.jl @@ -0,0 +1,16 @@ +export dembo_gp4b + +function dembo_gp4b(; n::Int = default_nvar, kwargs...) + model = Model() + @variable(model, 0.1 <= x[1:8] <= 10.0) + set_start_value.(x, [6.0, 3.0, 0.4, 0.2, 6.0, 6.0, 1.0, 0.5]) + + @objective(model, Min, 0.4 * x[1]^0.67 * x[7]^0.67 + 0.4 * x[2]^0.67 * x[8]^0.67 + 10.0 - x[1] - x[2]) + + @constraint(model, 0.0588 * x[5] * x[7] + 0.1 * x[1] <= 0) + @constraint(model, 0.0588 * x[6] * x[8] + 0.1 * x[1] + 0.1 * x[2] <= 0) + @constraint(model, 4.0 * x[3] / x[5] + 2.0 * x[3]^0.71 / x[5] + 0.0588 * x[3]^1.3 * x[7] <= 0) + @constraint(model, 4.0 * x[4] / x[6] + 2.0 * x[4]^0.71 / x[6] + 0.0588 * x[4]^1.3 * x[8] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp5.jl b/src/PureJuMP/dembo_gp5.jl new file mode 100644 index 00000000..148329a1 --- /dev/null +++ b/src/PureJuMP/dembo_gp5.jl @@ -0,0 +1,48 @@ +export dembo_gp5 + +function dembo_gp5(; n::Int = default_nvar, kwargs...) + c = [ + 1.0, + 1.0, + 1.0, + 833.33252, + 100.0, + -83333.333, + 1250.0, + 1.0, + -1250.0, + 1250000.0, + 1.0, + -2500.0, + 0.0025, + 0.0025, + 0.0025, + 0.0025, + -0.0025, + 0.01, + -0.01, + ] + + model = Model() + @variable(model, x[1:8]) + + lbs = [100.0, 1000.0, 1000.0, 10.0, 10.0, 10.0, 10.0, 10.0] + ubs = [10000.0, 10000.0, 10000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0] + x0 = [5000.0, 5000.0, 5000.0, 200.0, 350.0, 150.0, 225.0, 425.0] + for i in 1:8 + set_lower_bound(x[i], lbs[i]) + set_upper_bound(x[i], ubs[i]) + set_start_value(x[i], x0[i]) + end + + @objective(model, Min, c[1] * x[1] + c[2] * x[2] + c[3] * x[3]) + + @constraint(model, c[4] * x[4] / (x[1] * x[6]) + c[5] / x[6] + c[6] / (x[1] * x[6]) <= 0) + @constraint(model, c[7] * x[5] / (x[2] * x[7]) + c[8] * x[4] / x[7] + c[9] * x[4] / (x[2] * x[7]) <= 0) + @constraint(model, c[10] / (x[3] * x[8]) + c[11] * x[5] / x[8] + c[12] * x[5] / (x[3] * x[8]) <= 0) + @constraint(model, c[13] * x[4] + c[14] * x[6] <= 0) + @constraint(model, c[15] * x[5] + c[16] * x[7] + c[17] * x[4] <= 0) + @constraint(model, c[18] * x[8] + c[19] * x[5] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp6.jl b/src/PureJuMP/dembo_gp6.jl new file mode 100644 index 00000000..fa2e4166 --- /dev/null +++ b/src/PureJuMP/dembo_gp6.jl @@ -0,0 +1,75 @@ +export dembo_gp6 + +function dembo_gp6(; n::Int = default_nvar, kwargs...) + c = [ + 1.0, + 1.0, + 1.0, + 1.262626, + -1.231059, + 1.262626, + -1.231059, + 1.262626, + -1.231059, + 0.034750, + 0.975000, + -0.009750, + 0.034750, + 0.975000, + -0.009750, + 1.0, + 1.0, + -1.0, + 0.002, + 0.002, + 1.0, + 1.0, + -0.002, + -0.002, + 1.0, + 1.0, + 500.0, + -1.0, + -500.0, + 0.9, + 0.002, + -0.002, + 1.0, + 1.0, + 0.002, + -0.002, + 0.034750, + 0.975000, + -0.009750, + ] + + model = Model() + @variable(model, x[1:13]) + + lbs = [0.1, 0.1, 0.9, 0.0001, 0.1, 0.1, 0.1, 0.1, 500.0, 0.1, 1.0, 0.0001, 0.0001] + ubs = [1.0, 1.0, 1.0, 0.1, 0.9, 0.9, 1000.0, 1000.0, 1000.0, 500.0, 150.0, 150.0, 150.0] + x0 = [0.50, 0.80, 0.90, 0.10, 0.14, 0.50, 489.0, 80.0, 650.0, 450.0, 150.0, 150.0, 150.0] + for i in 1:13 + set_lower_bound(x[i], lbs[i]) + set_upper_bound(x[i], ubs[i]) + set_start_value(x[i], x0[i]) + end + + @objective(model, Min, c[1] * x[11] + c[2] * x[12] + c[3] * x[13]) + + @constraint(model, c[4] * x[8] / x[11] + c[5] * x[1] * x[8] / x[11] <= 0) + @constraint(model, c[6] * x[9] / x[12] + c[7] * x[2] * x[9] / x[12] <= 0) + @constraint(model, c[8] * x[10] / x[13] + c[9] * x[3] * x[10] / x[13] <= 0) + @constraint(model, c[10] * x[2] / x[5] + c[11] * x[2] + c[12] * x[1] / x[5] <= 0) + @constraint(model, c[13] * x[3] / x[6] + c[14] * x[3] + c[15] * x[2] / x[6] <= 0) + @constraint(model, c[16] * x[1] * x[8] / (x[5] * x[7]) + c[17] * x[4] / x[5] + c[18] * x[4] * x[8] / (x[5] * x[7]) <= 0) + @constraint(model, c[19] * x[2] * x[9] + c[20] * x[5] * x[8] + c[21] * x[6] + c[22] * x[5] + c[23] * x[1] * x[8] + c[24] * x[6] * x[9] <= 0) + @constraint(model, c[25] * x[3] * x[10] / (x[2] * x[9]) + c[26] * x[6] / x[2] + c[27] / x[9] + c[28] * x[10] / x[9] + c[29] * x[6] / (x[2] * x[9]) <= 0) + @constraint(model, c[30] / x[2] + c[31] * x[10] + c[32] * x[3] * x[10] / x[2] <= 0) + @constraint(model, c[33] * x[2] / x[3] <= 0) + @constraint(model, c[34] * x[1] / x[2] <= 0) + @constraint(model, c[35] * x[7] + c[36] * x[8] <= 0) + @constraint(model, c[37] * x[1] / x[4] + c[38] * x[1] + c[39] * x[3] / x[4] <= 0) + + return model +end diff --git a/src/PureJuMP/dembo_gp7.jl b/src/PureJuMP/dembo_gp7.jl new file mode 100644 index 00000000..dc97fbec --- /dev/null +++ b/src/PureJuMP/dembo_gp7.jl @@ -0,0 +1,106 @@ +export dembo_gp7 + +function dembo_gp7(; n::Int = default_nvar, kwargs...) + c = [ + 1.262626, + 1.262626, + -1.262626, + 1.262626, + 1.262626, + -1.231060, + -1.231060, + -1.231060, + -1.231060, + -1.231060, + 0.034750, + 0.975, + -0.00975, + 0.034750, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 0.03475, + 0.975, + -0.00975, + 1.0, + 1.0, + -1.0, + 1.0, + 0.002, + 0.002, + -0.002, + -0.002, + 1.0, + 0.002, + 0.002, + 1.0, + -0.002, + -0.002, + 1.0, + 1.0, + 500.0, + -500.0, + -1.0, + 1.0, + 1.0, + 500.0, + -1.0, + -500.0, + 0.9, + 0.002, + -0.002, + 0.002, + -0.002, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + ] + + model = Model() + @variable(model, x[1:16]) + + lbs = [0.1, 0.1, 0.1, 0.1, 0.9, 0.0001, 0.1, 0.1, 0.1, 0.1, 1.0, 1e-6, 1.0, 500.0, 500.0, 1e-6] + ubs = [0.9, 0.9, 0.9, 0.9, 1.0, 0.1, 0.9, 0.9, 0.9, 0.9, 1000.0, 500.0, 500.0, 1000.0, 1000.0, 500.0] + x0 = [0.8, 0.83, 0.85, 0.87, 0.90, 0.10, 0.12, 0.19, 0.25, 0.29, 512.0, 13.1, 71.8, 640.0, 650.0, 5.7] + for i in 1:16 + set_lower_bound(x[i], lbs[i]) + set_upper_bound(x[i], ubs[i]) + set_start_value(x[i], x0[i]) + end + + @objective(model, Min, + c[1] * x[12] + c[2] * x[13] + c[3] * x[14] + c[4] * x[15] + c[5] * x[16] + + c[6] * x[1] * x[12] + c[7] * x[2] * x[13] + c[8] * x[3] * x[14] + c[9] * x[4] * x[15] + c[10] * x[5] * x[16] + ) + + @constraint(model, c[11] * x[1] / x[6] + c[12] * x[1] + c[13] * x[2] / x[6] <= 0) + @constraint(model, c[14] * x[2] / x[7] + c[15] * x[2] + c[16] * x[2]^2 / x[7] <= 0) + @constraint(model, c[17] * x[3] / x[8] + c[18] * x[3] + c[19] * x[2] / x[8] <= 0) + @constraint(model, c[20] * x[4] / x[9] + c[21] * x[4] + c[22] * x[2] / x[9] <= 0) + @constraint(model, c[23] * x[5] / x[10] + c[24] * x[5] + c[25] * x[2]^5 / x[10] <= 0) + @constraint(model, c[26] * x[6] / x[7] + c[27] * x[1] * x[12] / (x[7] * x[11]) + c[28] * x[6] * x[12] / (x[7] * x[11]) <= 0) + @constraint(model, c[29] * x[7] / x[8] + c[30] * x[7] * x[12] / x[8] + c[31] * x[2] * x[13] / x[8] + c[32] * x[13] + c[33] * x[1] * x[12] / x[8] <= 0) + @constraint(model, c[34] * x[8] + c[35] * x[8] * x[13] + c[36] * x[3] * x[14] + c[37] * x[9] + c[38] * x[2] * x[13] + c[39] * x[9] * x[14] <= 0) + @constraint(model, c[40] * x[9] / x[3] + c[41] * x[4] * x[15] / (x[3] * x[14]) + c[42] * x[10] / (x[3] * x[14]) + c[43] * x[9] / (x[3] * x[14]) + c[44] * x[8] * x[15] / (x[3] * x[14]) <= 0) + @constraint(model, c[45] * x[5] * x[16] / (x[4] * x[15]) + c[46] * x[10] / x[4] + c[47] / x[10] + c[48] * x[16] / x[15] + c[49] * x[10] / (x[4] * x[15]) <= 0) + @constraint(model, c[50] / x[4] + c[51] * x[16] + c[52] * x[5] * x[16] / x[4] <= 0) + @constraint(model, c[53] * x[11] + c[54] * x[12] <= 0) + @constraint(model, c[55] * x[12] / x[11] <= 0) + @constraint(model, c[56] * x[4] / x[5] <= 0) + @constraint(model, c[57] * x[3] / x[4] <= 0) + @constraint(model, c[58] * x[2] / x[3] <= 0) + @constraint(model, c[59] * x[1] / x[2] <= 0) + @constraint(model, c[60] * x[9] / x[10] <= 0) + @constraint(model, c[61] * x[8] / x[9] <= 0) + + return model +end