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

Use default_cache #117

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ MathOptInterface = "0.9.6"
julia = "1"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "Pkg"]
6 changes: 3 additions & 3 deletions bench/runbench.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function generate_moi_problem(model, At, b, c;
else
for row in 1:rows
MOI.add_constraint(model, MOI.VectorAffineFunction(
[MOI.VectorAffineTerm(1,
[MOI.VectorAffineTerm(1,
MOI.ScalarAffineTerm(A_vals[i], x[A_cols[i]])
) for i in nzrange(At, row)], [-b[row]]),
MOI.Nonpositives(1))
Expand Down Expand Up @@ -112,7 +112,7 @@ function time_build_and_solve(to_build, to_solve, At, b, c, scalar = true)
end
@time @timeit "opt" MOI.optimize!(to_solve)
MOI.get(to_solve, MOI.ObjectiveValue())
val = MOI.get(to_solve, MOI.SolveTime())
val = MOI.get(to_solve, MOI.SolveTimeSec())
println(val)
end

Expand Down Expand Up @@ -145,4 +145,4 @@ function solve_clp(seed, data; time_limit_sec=Inf)

end

solve_clp(10, RandomLP(10000, 20000, 0.01); time_limit_sec=5)
solve_clp(10, RandomLP(10000, 20000, 0.01); time_limit_sec=5)
5 changes: 5 additions & 0 deletions src/Clp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ for sym in names(@__MODULE__, all = true)
end
end

if VERSION > v"1.4.2"
include("precompile.jl")
_precompile_()
end

end
Loading