Skip to content
Open
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
346 changes: 221 additions & 125 deletions cpp/src/branch_and_bound/branch_and_bound.cpp

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions cpp/src/branch_and_bound/branch_and_bound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#pragma once

#include <branch_and_bound/bb_event.hpp>
#include <branch_and_bound/branch_and_bound_worker.hpp>
#include <branch_and_bound/deterministic_workers.hpp>
#include <branch_and_bound/diving_heuristics.hpp>
#include <branch_and_bound/mip_node.hpp>
#include <branch_and_bound/node_queue.hpp>
#include <branch_and_bound/pseudo_costs.hpp>
#include <branch_and_bound/worker.hpp>
#include <branch_and_bound/worker_pool.hpp>

#include <cuts/cuts.hpp>

Expand All @@ -30,8 +30,6 @@
#include <utilities/work_limit_context.hpp>
#include <utilities/work_unit_scheduler.hpp>

#include <omp.h>

#include <atomic>
#include <functional>
#include <future>
Expand Down Expand Up @@ -102,7 +100,7 @@ class branch_and_bound_t {
}
}

// Set a solution based on the user problem during the course of the solve
// Set a solution based on the user problem during solve time
void set_new_solution(const std::vector<f_t>& solution);

// This queues the solution to be processed at the correct work unit timestamp
Expand Down Expand Up @@ -133,10 +131,6 @@ class branch_and_bound_t {
std::vector<i_t>& nonbasic_list,
std::vector<f_t>& edge_norms);

i_t find_reduced_cost_fixings(f_t upper_bound,
std::vector<f_t>& lower_bounds,
std::vector<f_t>& upper_bounds);

// The main entry routine. Returns the solver status and populates solution with the incumbent.
mip_status_t solve(mip_solution_t<i_t, f_t>& solution);

Expand Down Expand Up @@ -307,6 +301,8 @@ class branch_and_bound_t {
dual::status_t lp_status,
logger_t& log);

void root_reduced_cost_fixing(f_t upper_bound);

// ============================================================================
// Deterministic BSP (Bulk Synchronous Parallel) methods for deterministic parallel B&B
// ============================================================================
Expand Down
281 changes: 0 additions & 281 deletions cpp/src/branch_and_bound/branch_and_bound_worker.hpp

This file was deleted.

11 changes: 7 additions & 4 deletions cpp/src/branch_and_bound/deterministic_workers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#pragma once

#include <branch_and_bound/bb_event.hpp>
#include <branch_and_bound/branch_and_bound_worker.hpp>
#include <branch_and_bound/diving_heuristics.hpp>
#include <branch_and_bound/node_queue.hpp>
#include <branch_and_bound/worker.hpp>

#include <utilities/work_limit_context.hpp>

Expand Down Expand Up @@ -316,10 +316,13 @@ class deterministic_diving_worker_t
void enqueue_dive_node(mip_node_t<i_t, f_t>* node, const lp_problem_t<i_t, f_t>& original_lp)
{
dive_queue_entry_t<i_t, f_t> entry;
entry.resolved_lower = original_lp.lower;
entry.resolved_upper = original_lp.upper;
std::vector<bool> bounds_changed(original_lp.num_cols, false);
node->get_variable_bounds(entry.resolved_lower, entry.resolved_upper, bounds_changed);
bool feasible = node->get_variable_bounds(original_lp.lower,
original_lp.upper,
entry.resolved_lower,
entry.resolved_upper,
bounds_changed);
if (!feasible) { return; }
entry.node = node->detach_copy();
dive_queue.push_back(std::move(entry));
}
Expand Down
Loading
Loading