我正在尝试在Julia
using中复制代码Jupyter Notebook
。
并得到错误
MethodError:Module 类型的对象不可调用
我在这里想念什么?
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))