71 if (t_event != InvalidSolution && t_event != IncumbentSolution && t_event != PrunedSolution) {
75 const auto& side_effect_registry = this->side_effect_registry();
77 if (side_effect_registry.n_added_lazy_cuts > 0 || side_effect_registry.n_added_user_cuts > 0) {
81 std::ofstream file(m_filename, std::ios::app);
83 if (!file.is_open()) {
84 throw Exception(
"Could not open destination file.");
87 const auto& node = this->node();
89 const unsigned int id = node.id();
90 const auto status = node.info().status();
91 unsigned int parent_id;
92 std::stringstream branch_label;
93 double sum_of_infeasibilities = Inf;
98 parent_id = node.parent().id();
100 for (
const auto& branching_decision : node.info().variable_branching_decisions()) {
101 branch_label << branching_decision.variable.name() <<
" ";
102 if (branching_decision.type == LessOrEqual) {
103 branch_label <<
"≤";
105 branch_label <<
"≥";
107 branch_label <<
" " << branching_decision.bound;
110 for (
const auto& branching_decisions : node.info().constraint_branching_decisions()) {
111 branch_label << branching_decisions.temporary_constraint;
115 if (status == Optimal || status == Feasible) {
116 sum_of_infeasibilities = node.info().sum_of_infeasibilities();
119 file << this->time().count() <<
","
122 << node.level() <<
","
124 << node.info().objective_value() <<
","
125 << branch_label.str() <<
","
127 << sum_of_infeasibilities