function add_new_solution!(tree::BnBTree{N,R,V,S}, node::AbstractNode) where {N,R,V,S<:DefaultSolution{N,V}}
sol = DefaultSolution(node.ub, get_relaxed_values(tree, node), node)
if isempty(tree.solutions)
push!(tree.solutions, sol)
else
tree.solutions[1] = sol
end
end
This assumes that the solution is computed from get_relaxed_values, the function should take other arguments for the solution itself and its value.
On example is when another subroutine (like a heuristic run at the node) is finding a feasible solution different from the relaxed vector