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

Norms don't work?! #528

Closed
IainNZ opened this issue Aug 11, 2015 · 3 comments
Closed

Norms don't work?! #528

IainNZ opened this issue Aug 11, 2015 · 3 comments

Comments

@IainNZ
Copy link
Collaborator

IainNZ commented Aug 11, 2015

On master:

using JuMP
m = Model()
@defVar(m, 0 <= x[1:10] <= 1)
@setObjective(m, Max, dot(collect(1:10),x))
@addConstraint(m, norm2{x[i],i=1:10} <= 5)
println(m)
solve(m)
@show getValue(x)
getValue(x) = [0.9999998739678716,0.9999999629917584,0.999999971086957,0.9999999749736622,0.9999999802731457,0.99999998546479,0.9999999900892964,0.9999999938430404,0.9999999963029498,0.9999999970676859]

Or am I going senile?

@IainNZ
Copy link
Collaborator Author

IainNZ commented Aug 11, 2015

Oh lol wait

@IainNZ
Copy link
Collaborator Author

IainNZ commented Aug 11, 2015

sqrt(10) <= 5

@IainNZ IainNZ closed this as completed Aug 11, 2015
@joehuchette
Copy link
Contributor

Math is hard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants