mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 08:28:52 -06:00
FisSal2011: Change some default args; remove basis_seen
This commit is contained in:
@@ -272,7 +272,7 @@ function collect_gmi_FisSal2011(
|
|||||||
optimizer,
|
optimizer,
|
||||||
silent_solver=true,
|
silent_solver=true,
|
||||||
time_limit = 900,
|
time_limit = 900,
|
||||||
variant = :faster,
|
variant = :fast,
|
||||||
)
|
)
|
||||||
variant in [:subg, :hybr, :fast, :faster] || error("unknown variant: $variant")
|
variant in [:subg, :hybr, :fast, :faster] || error("unknown variant: $variant")
|
||||||
if variant == :subg
|
if variant == :subg
|
||||||
@@ -311,7 +311,6 @@ function collect_gmi_FisSal2011(
|
|||||||
end
|
end
|
||||||
|
|
||||||
@timeit "Initialize" begin
|
@timeit "Initialize" begin
|
||||||
basis_seen = Set{UInt64}()
|
|
||||||
count_backtrack = 0
|
count_backtrack = 0
|
||||||
count_deterioration = 0
|
count_deterioration = 0
|
||||||
gapcl_best = 0
|
gapcl_best = 0
|
||||||
@@ -466,8 +465,6 @@ function collect_gmi_FisSal2011(
|
|||||||
if mod(round - 1, interval_read_tableau) == 0
|
if mod(round - 1, interval_read_tableau) == 0
|
||||||
@timeit "Select tableau rows" begin
|
@timeit "Select tableau rows" begin
|
||||||
basis = get_basis(model_s)
|
basis = get_basis(model_s)
|
||||||
basis_hash = hash(basis)
|
|
||||||
push!(basis_seen, basis_hash)
|
|
||||||
selected_rows =
|
selected_rows =
|
||||||
select_gmi_rows(data_s, basis, sol_frac, max_rows = max_cuts_per_round)
|
select_gmi_rows(data_s, basis, sol_frac, max_rows = max_cuts_per_round)
|
||||||
end
|
end
|
||||||
@@ -641,14 +638,13 @@ function collect_gmi_FisSal2011(
|
|||||||
|
|
||||||
if round == 1
|
if round == 1
|
||||||
@printf(
|
@printf(
|
||||||
" %8s %10s %9s %9s %9s %9s %9s %4s %8s %8s %8s\n",
|
" %8s %10s %9s %9s %9s %9s %4s %8s %8s %8s\n",
|
||||||
"round",
|
"round",
|
||||||
"obj",
|
"obj",
|
||||||
"cl_curr",
|
"cl_curr",
|
||||||
"cl_best",
|
"cl_best",
|
||||||
"pool_cuts",
|
"pool_cuts",
|
||||||
"pool_mb",
|
"pool_mb",
|
||||||
"bases",
|
|
||||||
"bktk",
|
"bktk",
|
||||||
"Δ",
|
"Δ",
|
||||||
"μ",
|
"μ",
|
||||||
@@ -663,7 +659,7 @@ function collect_gmi_FisSal2011(
|
|||||||
if log_should_print
|
if log_should_print
|
||||||
last_print_time = time()
|
last_print_time = time()
|
||||||
@printf(
|
@printf(
|
||||||
"%c %8d %10.3e %9.2e %9.2e %9d %9.2f %9d %4d %8.2e %8.2e %8.2e\n",
|
"%c %8d %10.3e %9.2e %9.2e %9d %9.2f %4d %8.2e %8.2e %8.2e\n",
|
||||||
log_prefix,
|
log_prefix,
|
||||||
round,
|
round,
|
||||||
obj_curr,
|
obj_curr,
|
||||||
@@ -671,7 +667,6 @@ function collect_gmi_FisSal2011(
|
|||||||
gapcl_best,
|
gapcl_best,
|
||||||
length(pool.ub),
|
length(pool.ub),
|
||||||
pool_size_mb,
|
pool_size_mb,
|
||||||
length(basis_seen),
|
|
||||||
count_backtrack,
|
count_backtrack,
|
||||||
Δ,
|
Δ,
|
||||||
μ,
|
μ,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function assert_does_not_cut_off(cuts::ConstraintSet, x::Vector{Float64}; tol =
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function assert_int(x::Float64, tol=1e-6)
|
function assert_int(x::Float64, tol=1e-5)
|
||||||
fx = frac(x)
|
fx = frac(x)
|
||||||
if min(fx, 1 - fx) >= tol
|
if min(fx, 1 - fx) >= tol
|
||||||
throw(ErrorException("Number must be integer: $x"))
|
throw(ErrorException("Number must be integer: $x"))
|
||||||
|
|||||||
Reference in New Issue
Block a user