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

Multiplication Commutativity Issue within sum{ } #99

Closed
jlepird opened this issue Feb 7, 2014 · 2 comments
Closed

Multiplication Commutativity Issue within sum{ } #99

jlepird opened this issue Feb 7, 2014 · 2 comments

Comments

@jlepird
Copy link
Contributor

jlepird commented Feb 7, 2014

After playing around with the vectorization stuff, I noticed that the following script

using JuMP
m = Model()
@defVar(m,x[1:10])
c = [1,2,3,4,5,6,7,8,9,10]
@addConstraint(m,sum{x[i]*c[i],i=1:10} < 1)

returns the error "No method *(Variable,) found in macros.jl". However, the following script works fine:

using JuMP
m = Model()
@defVar(m,x[1:10])
c = [1,2,3,4,5,6,7,8,9,10]
@addConstraint(m,sum{c[i]*x[i],i=1:10} < 1)
@mlubin
Copy link
Member

mlubin commented Feb 7, 2014

Yep, thanks for reporting. This is a known issue.

@mlubin
Copy link
Member

mlubin commented Oct 17, 2014

Finally resolved. Main docs still need to be updated, but we should wait until 0.4 is released for that.

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

No branches or pull requests

3 participants