我正在尝试在我的MAC上安装Julia。我在安装过程中遇到了以下错误:
任何想法都可以解决问题。
编辑: “test.jl是这样的:
using JuMP
using Gurobi
m = Model(solver=GurobiSolver())
m = Model()
@variable(m, x ) # No bounds
@variable(m, x >= lb ) # Lower bound only (note: 'lb <= x' is not valid)
@variable(m, x <= ub ) # Upper bound only
@variable(m, lb <= x <= ub ) # Lower and upper bounds
@variable(m, x == fixedval ) # Fixed to a value (lb == ub)
@variable(m, x[1:M,1:N] >= 0 )
aff = AffExpr([x, z], [3.0, 4.0], 2.0) # 3x + 4z + 2
quad = QuadExpr([x,y],[x,z],[3.0,4.0],aff) # 3x^2 + 4yz + 3x + 4z + 2
@constraints(m, begin
x >= 1
y - w <= 2
sum_to_one[i=1:3], z[i] + y == 1
end)
@expression(m, shared, sum(i*x[i] for i=1:5))
@constraint(m, shared + y >= 5)
@constraint(m, shared + z <= 10)
expr = @expression(m, [i=1:3], i*sum(x[j] for j=1:3))
答案 0 :(得分:2)
一些建议: - 使用代码中的完整路径来确定文件的位置 - Julia区分大小写,所以Test.jl和test.jl是不同的 - 检查文件的权限 - 朱莉娅大量使用“test.jl”类型名称,潜在的混淆?