2017-06-12 74 views
3

我正在嘗試使用Jupyter Notebook來重複Julia中的代碼。
並得到錯誤MethodError:Module類型的對象無法調用

MethodError: objects of type Module are not callable

我失去的是什麼?

using JuMP, Clp 
m=Model(solver=Clp()) 
@variable(m, 0 >= x >= 9) 
@variable(m, 0 >= y >= 10) 

@objective(m,Min,3x-y) 

@constraint(m,const1, 6x+5y <=30) 
@constraint(m,const2, 7x+12y <= 84) 
@constraint(m,const3, 19x+14y <=266) 

solve(m) 
println("Optimal Solutions:") 
println("x = ", getvalue(x)) 
println("y = ", getvalue(y)) 

回答

相關問題