14#ifndef BRANCHANDBOUND1TREE_BRANCH_AND_BOUND_H
15#define BRANCHANDBOUND1TREE_BRANCH_AND_BOUND_H
18#include "../data_structures/b_and_b_data.h"
BBNodeType
The labels used to identify the type of a SubProblem.
BBNodeType mst_to_one_tree(SubProblem *currentSubproblem, Graph *graph)
Transforms a MST into a 1Tree.
void clean_matrix(SubProblem *subProblem)
Clean the matrix of constraints of a SubProblem.
static Problem * problem
The pointer to the problem to solve.
bool compare_subproblems(const SubProblem *a, const SubProblem *b)
Compare two OPEN SubProblems.
bool check_feasibility(Graph *graph)
Check if the Graph associated to the Problem is feasible.
void branch(SubProblemsList *openSubProblems, SubProblem *subProblem)
The Shutler's branching rule.
void branch_and_bound(Problem *current_problem)
The Branch and Bound algorithm.
void nearest_prob_neighbour(unsigned short start_node)
This function is used to find the first feasible tour.
void dfs(SubProblem *subProblem)
A Depth First Search algorithm on a Graph.
int variable_fixing(SubProblem *subProblem)
The function used to fix the edge variables to be mandatory or forbidden.
void copy_constraints(SubProblem *subProblem, const SubProblem *otherSubProblem)
Copy the matrix of constraints of a SubProblem into another.
void print_subProblem(const SubProblem *subProblem)
Get all metrics of a certain SubProblem.
unsigned short find_candidate_node(void)
Select the candidate Node, i.e. the starting vertex of the tour.
bool check_hamiltonian(SubProblem *subProblem)
Function that checks if the 1Tree of a SubProblem is a tour.
bool infer_constraints(SubProblem *subProblem)
Infer the values of some edge variables of a SubProblem.
void set_problem(Problem *current_problem)
Define the problem to solve.
void bound(SubProblem *currentSubProb)
The Held-Karp bound function with the subgradient algorithm.
bool time_limit_reached(void)
Check if the time limit has been reached.
void print_problem(void)
Get all metrics of the problem.
The declaration of the functions needed to compute the MST with Kruskal's algorithm.
The declaration of the functions needed to compute the MST with Prim's algorithm.
The struct used to represent the overall problem.
The struct used to represent a SubProblem or node of the Branch and Bound tree.
The list of open SubProblems.