OptimizationProblems.jl icon indicating copy to clipboard operation
OptimizationProblems.jl copied to clipboard

Etiennne tremblay patch 1

Open EtiennneTremblay opened this issue 2 years ago • 1 comments

Adding the Jump Model and ADNLP Model for function 211 for MTH8408 at Polytechnique Montréal.

EtiennneTremblay avatar Apr 02 '23 21:04 EtiennneTremblay

Merci @EtiennneTremblay pour la pull request (#114)!

Est-ce que tu peux separer le code en 2 fichiers:

  • un dans le dossier PureJuMP qui s'appelerait hs211.jl ;
  • un dans le dossier ADNLPProblems qui s'appelerait aussi hs211.jl . A chaque fois le code doit etre dans une fonction. Tu peux prendre exemple sur https://github.com/JuliaSmoothOptimizers/OptimizationProblems.jl/blob/main/src/ADNLPProblems/AMPGO02.jl pour le ADNLPProblems et https://github.com/JuliaSmoothOptimizers/OptimizationProblems.jl/blob/main/src/PureJuMP/AMPGO02.jl pour le PureJuMP.

Dans le fichier hs211.jl du dossier PureJuMP, tu peux ajouter la documentation suivante au debut du fichier:

# Hock and Schittkowski problem number 211.
#
#   Source:
#   Problem 211 in
#   K. Schittkowski,
#   More Test Examples for Nonlinear Programming Codes,
#   Lectures Notes in Economics and Mathematical Systems 282,
#   Springer Verlag, Heidelberg, 1987.
#

Enfin, il y a un troisieme fichier hs211.jl a mettre dans le dossier Meta contenant:

hs211_meta = Dict(
  :nvar => 2,
  :variable_nvar => false,
  :ncon => 0,
  :variable_ncon => false,
  :minimize => true,
  :name => "hs211",
  :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 => 750.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

tmigot avatar Apr 03 '23 12:04 tmigot

superseded by #346

tmigot avatar Sep 07 '24 15:09 tmigot