Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etiennne tremblay patch 1 #249

Conversation

EtiennneTremblay
Copy link

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

@tmigot
Copy link
Member

tmigot commented Apr 3, 2023

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

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

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

@@ -0,0 +1,13 @@
# Modèle JuMP
f_211 = Model(Ipopt.Optimizer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f_211 = Model(Ipopt.Optimizer)
f_211 = Model()

Comment on lines +6 to +9
JuMP.optimize!(f_211)
JuMP.solution_summary(f_211)
@show JuMP.value(x1)
@show JuMP.value(x2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JuMP.optimize!(f_211)
JuMP.solution_summary(f_211)
@show JuMP.value(x1)
@show JuMP.value(x2)

@tmigot tmigot mentioned this pull request Sep 7, 2024
@tmigot
Copy link
Member

tmigot commented Sep 7, 2024

superseded by #346

@tmigot tmigot closed this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants