Skip to content

Commit 7deb912

Browse files
authored
Merge pull request Pyomo#3691 from anatoliy-kuznetsov/scip-nodes
Add reporting of SCIP node count to solver results
2 parents 5b97f0d + 8f60248 commit 7deb912

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

pyomo/solvers/plugins/solvers/SCIPAMPL.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def _postsolve(self):
255255

256256
results.solver.time = log_dict['solving_time']
257257
results.solver.gap = log_dict['gap']
258+
results.solver.node_count = log_dict['solving_nodes']
258259
results.solver.primal_bound = log_dict['primal_bound']
259260
results.solver.dual_bound = log_dict['dual_bound']
260261

pyomo/solvers/tests/mip/test_scip_log_data.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,29 @@ def test_scip_some_more():
198198
list_extra_data_expected = [
199199
(), # problem_lp_unbounded(),
200200
(), # problem_lp_infeasible(),
201-
('Time', 'Gap', 'Primal bound', 'Dual bound'), # problem_lp_optimal(),
201+
(
202+
'Time',
203+
'Gap',
204+
'Node count',
205+
'Primal bound',
206+
'Dual bound',
207+
), # problem_lp_optimal(),
202208
(), # problem_milp_unbounded(),
203209
(), # problem_milp_infeasible(),
204-
('Time', 'Gap', 'Primal bound', 'Dual bound'), # problem_milp_optimal(),
205-
('Time', 'Gap', 'Primal bound', 'Dual bound'), # problem_milp_feasible()
210+
(
211+
'Time',
212+
'Gap',
213+
'Node count',
214+
'Primal bound',
215+
'Dual bound',
216+
), # problem_milp_optimal(),
217+
(
218+
'Time',
219+
'Gap',
220+
'Node count',
221+
'Primal bound',
222+
'Dual bound',
223+
), # problem_milp_feasible()
206224
]
207225

208226
# **************************************************************************

0 commit comments

Comments
 (0)