diff --git a/src/ADNLPProblems/hs201.jl b/src/ADNLPProblems/hs201.jl index 2cfd6637..7eef731e 100644 --- a/src/ADNLPProblems/hs201.jl +++ b/src/ADNLPProblems/hs201.jl @@ -1,7 +1,7 @@ export hs201 -function hs201(; n::Int=default_nvar, type::Val{T}=Val(Float64), kwargs...) where {T} +function hs201(; n::Int=default_nvar, type::Type{T} = Float64, kwargs...) where {T} f(x) = 4 * (x[1] - 5)^2 + (x[2] - 6)^2 x0 = T[8, 9] return ADNLPModels.ADNLPModel(f, x0, name="hs201"; kwargs...) -end \ No newline at end of file +end diff --git a/src/Meta/hs201.jl b/src/Meta/hs201.jl new file mode 100644 index 00000000..0ed7b4bb --- /dev/null +++ b/src/Meta/hs201.jl @@ -0,0 +1,25 @@ +hs201_meta = Dict( + :nvar => 2, + :variable_nvar => false, + :ncon => 0, + :variable_ncon => false, + :minimize => true, + :name => "hs201", + :has_equalities_only => false, + :has_inequalities_only => false, + :has_bounds => false, + :has_fixed_variables => false, + :objtype => :other, + :contype => :unconstrained, + :best_known_lower_bound => -Inf, + :best_known_upper_bound => 45.0, + :is_feasible => true, + :defined_everywhere => missing, + :origin => :unknown, +) +get_hs201_nvar(; n::Integer = default_nvar, kwargs...) = 2 +get_hs201_ncon(; n::Integer = default_nvar, kwargs...) = 0 +get_hs201_nlin(; n::Integer = default_nvar, kwargs...) = 0 +get_hs201_nnln(; n::Integer = default_nvar, kwargs...) = 0 +get_hs201_nequ(; n::Integer = default_nvar, kwargs...) = 0 +get_hs201_nineq(; n::Integer = default_nvar, kwargs...) = 0 diff --git a/src/PureJuMP/hs201.jl b/src/PureJuMP/hs201.jl index 395c314e..864322fd 100644 --- a/src/PureJuMP/hs201.jl +++ b/src/PureJuMP/hs201.jl @@ -16,7 +16,7 @@ function hs201(args...; n::Int = default_nvar, kwargs...) @variable(model, x1) set_start_value(x1, 8) @variable(model, x2) - set_start_value(x2, 8) + set_start_value(x2, 9) #Définition de la fonction objectif @NLobjective(model, Min, 4*(x1-5)^2+(x2-6)^2)