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

Test objective #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Test objective #7

wants to merge 2 commits into from

Conversation

gnowzil
Copy link
Contributor

@gnowzil gnowzil commented Feb 3, 2021

Should fix #5. I think these updates will allow the use of JuMP.@objective to represent linear, quadratic objective functions. Needs more testing.

@lassepe
Copy link

lassepe commented Feb 3, 2021

Works on a minimal example:

import JuMP
import SNOPT7

opt_model = JuMP.Model(SNOPT7.Optimizer)
x = JuMP.@variable(opt_model, [1:10])
y = JuMP.@variable(opt_model)

JuMP.@objective(opt_model, Min, (x .- 1)' * x)
JuMP.@NLconstraint(opt_model, x[1] == y)
JuMP.optimize!(opt_model)

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.

Support JuMP.@objective
2 participants