Skip to content

Commit

Permalink
print node in branching tree after conquer (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
guimarqu authored May 29, 2020
1 parent 281ecc3 commit 20a44cd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Algorithm/treesearch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function get_storages_usage!(
)
get_storages_usage!(algo.conqueralg, reform, storages_usage)
get_storages_usage!(algo.dividealg, reform, storages_usage)
return
end

function get_storages_to_restore!(
Expand Down Expand Up @@ -189,7 +190,7 @@ function run_conquer_algorithm!(
set_tree_order!(node, tsdata.tree_order)
tsdata.tree_order += 1
end

print_node_info_before_conquer(tsdata, node)

node.conquerwasrun && return
Expand All @@ -205,8 +206,6 @@ function run_conquer_algorithm!(
if algo.storelpsolution && isrootnode(node) && nb_lp_primal_sols(nodestate) > 0
set_lp_primal_sol!(treestate, get_best_lp_primal_sol(nodestate))
end

print_node_in_branching_tree_file(algo, tsdata, node)
return
end

Expand Down Expand Up @@ -266,7 +265,6 @@ function updatedualbound!(data::TreeSearchRuntimeData)
end
end
set_ip_dual_bound!(treestate, worst_bound)

return
end

Expand All @@ -290,7 +288,8 @@ function determine_statuses(data::TreeSearchRuntimeData)
elseif !gap_is_zero
setterminationstatus!(treestate, OTHER_LIMIT)
end
end
return
end

function TreeSearchRuntimeData(algo::TreeSearchAlgorithm, rfdata::ReformData, input::OptimizationInput)
exploitsprimalsols = exploits_primal_solutions(algo.conqueralg) || exploits_primal_solutions(algo.dividealg)
Expand All @@ -310,7 +309,6 @@ function TreeSearchRuntimeData(algo::TreeSearchAlgorithm, rfdata::ReformData, in
return tsdata
end


function run!(algo::TreeSearchAlgorithm, rfdata::ReformData, input::OptimizationInput)::OptimizationOutput
tsdata = TreeSearchRuntimeData(algo, rfdata, input)

Expand All @@ -320,7 +318,8 @@ function run!(algo::TreeSearchAlgorithm, rfdata::ReformData, input::Optimization

if get_tree_order(tsdata) <= algo.maxnumnodes
restore_states!(node.stateids, tsdata.node_storages_to_restore)
run_conquer_algorithm!(algo, tsdata, rfdata, node)
run_conquer_algorithm!(algo, tsdata, rfdata, node)
print_node_in_branching_tree_file(algo, tsdata, node)
run_divide_algorithm!(algo, tsdata, rfdata, node)
updatedualbound!(tsdata)
else
Expand Down

0 comments on commit 20a44cd

Please sign in to comment.