mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 08:28:52 -06:00
BB: Remove detailed_output
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
using Printf
|
using Printf
|
||||||
|
|
||||||
function print_progress_header(; detailed_output::Bool)
|
function print_progress_header()
|
||||||
@printf(
|
@printf(
|
||||||
"%8s %9s %9s %13s %13s %9s %6s %13s %6s %-24s %9s %9s %6s %6s",
|
"%8s %9s %9s %13s %13s %9s %6s %13s %6s %-24s %9s %9s %6s %6s",
|
||||||
"time",
|
"time",
|
||||||
@@ -31,7 +31,6 @@ function print_progress(
|
|||||||
node::Node;
|
node::Node;
|
||||||
time_elapsed::Float64,
|
time_elapsed::Float64,
|
||||||
print_interval::Int,
|
print_interval::Int,
|
||||||
detailed_output::Bool,
|
|
||||||
primal_update::Bool,
|
primal_update::Bool,
|
||||||
)::Nothing
|
)::Nothing
|
||||||
if (pool.processed % print_interval == 0) || isempty(pool.pending) || primal_update
|
if (pool.processed % print_interval == 0) || isempty(pool.pending) || primal_update
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ function offer(
|
|||||||
child_nodes::Vector{Node},
|
child_nodes::Vector{Node},
|
||||||
time_elapsed::Float64 = 0.0,
|
time_elapsed::Float64 = 0.0,
|
||||||
print_interval::Int = 100,
|
print_interval::Int = 100,
|
||||||
detailed_output::Bool = false,
|
|
||||||
)::Nothing
|
)::Nothing
|
||||||
lock(pool.lock) do
|
lock(pool.lock) do
|
||||||
primal_update = false
|
primal_update = false
|
||||||
@@ -125,7 +124,6 @@ function offer(
|
|||||||
node,
|
node,
|
||||||
time_elapsed = time_elapsed,
|
time_elapsed = time_elapsed,
|
||||||
print_interval = print_interval,
|
print_interval = print_interval,
|
||||||
detailed_output = detailed_output,
|
|
||||||
primal_update = isfinite(node.obj) && isempty(node.fractional_variables),
|
primal_update = isfinite(node.obj) && isempty(node.fractional_variables),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ function solve!(
|
|||||||
gap_limit::Float64 = 1e-4,
|
gap_limit::Float64 = 1e-4,
|
||||||
print_interval::Int = 5,
|
print_interval::Int = 5,
|
||||||
initial_primal_bound::Float64 = Inf,
|
initial_primal_bound::Float64 = Inf,
|
||||||
detailed_output::Bool = false,
|
|
||||||
branch_rule::VariableBranchingRule = ReliabilityBranching(),
|
branch_rule::VariableBranchingRule = ReliabilityBranching(),
|
||||||
enable_plunging = true,
|
enable_plunging = true,
|
||||||
)::NodePool
|
)::NodePool
|
||||||
@@ -30,7 +29,7 @@ function solve!(
|
|||||||
pool.primal_bound = root_node.obj
|
pool.primal_bound = root_node.obj
|
||||||
return pool
|
return pool
|
||||||
else
|
else
|
||||||
print_progress_header(detailed_output=detailed_output)
|
print_progress_header()
|
||||||
end
|
end
|
||||||
|
|
||||||
offer(
|
offer(
|
||||||
@@ -38,7 +37,6 @@ function solve!(
|
|||||||
parent_node=nothing,
|
parent_node=nothing,
|
||||||
child_nodes=[root_node],
|
child_nodes=[root_node],
|
||||||
print_interval=print_interval,
|
print_interval=print_interval,
|
||||||
detailed_output=detailed_output,
|
|
||||||
)
|
)
|
||||||
@threads for t = 1:nthreads()
|
@threads for t = 1:nthreads()
|
||||||
child_one, child_zero, suggestions = nothing, nothing, Node[]
|
child_one, child_zero, suggestions = nothing, nothing, Node[]
|
||||||
@@ -100,7 +98,6 @@ function solve!(
|
|||||||
child_nodes=[child_one, child_zero],
|
child_nodes=[child_one, child_zero],
|
||||||
time_elapsed=time_elapsed,
|
time_elapsed=time_elapsed,
|
||||||
print_interval=print_interval,
|
print_interval=print_interval,
|
||||||
detailed_output=detailed_output,
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -163,7 +160,6 @@ function solve!(
|
|||||||
node_limit::Int=typemax(Int),
|
node_limit::Int=typemax(Int),
|
||||||
gap_limit::Float64=1e-4,
|
gap_limit::Float64=1e-4,
|
||||||
print_interval::Int=5,
|
print_interval::Int=5,
|
||||||
detailed_output::Bool=false,
|
|
||||||
branch_rule::VariableBranchingRule=ReliabilityBranching()
|
branch_rule::VariableBranchingRule=ReliabilityBranching()
|
||||||
)::NodePool
|
)::NodePool
|
||||||
model = read_from_file("$filename.mps.gz")
|
model = read_from_file("$filename.mps.gz")
|
||||||
@@ -181,7 +177,6 @@ function solve!(
|
|||||||
node_limit,
|
node_limit,
|
||||||
gap_limit,
|
gap_limit,
|
||||||
print_interval,
|
print_interval,
|
||||||
detailed_output,
|
|
||||||
branch_rule
|
branch_rule
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user