Repository: Pyomo/pyomo

Issue:
SCIPAMPL failing to read solving time from log file
## Summary

From the code seems that SCIPAMPL expects a single float as the solving time like '43.98', however it got a bigger string like '43.98 (over 1 runs: 43.98)'

### Traceback 
```python
File venv/lib/python3.10/site-packages/pyomo/opt/base/solvers.py:636, in OptSolver.solve(self, *args, **kwds)
    630 if self._report_timing:
    631     print(
    632         "      %6.2f seconds required for solver"
    633         % (solve_completion_time - presolve_completion_time)
    634     )
--> 636 result = self._postsolve()
    637 result._smap_id = self._smap_id
    638 result._smap = None

File venv/lib/python3.10/site-packages/pyomo/solvers/plugins/solvers/SCIPAMPL.py:256, in SCIPAMPL._postsolve(self)
    252 results = self.process_output(self._rc)
    254 # read results from the log file
--> 256 log_dict = self.read_scip_log(self._log_file)
    258 if len(log_dict) != 0:
    259     # if any were read, store them
    261     results.solver.time = log_dict['solving_time']

File venv/lib/python3.10/site-packages/pyomo/solvers/plugins/solvers/SCIPAMPL.py:457, in SCIPAMPL.read_scip_log(filename)
    453 # get data
    455 solver_status = scip_lines[0][colon_position + 2 : scip_lines[0].index('\n')]
--> 457 solving_time = float(
    458     scip_lines[1][colon_position + 2 : scip_lines[1].index('\n')]
    459 )
    461 try:
    462     solving_nodes = int(
    463         scip_lines[2][colon_position + 2 : scip_lines[2].index('(')]
    464     )

ValueError: could not convert string to float: '43.98 (over 1 runs: 43.98)'
```
### Information on your system

Pyomo version: 6.7.1
Python version: 3.10.12
Operating system: Ubuntu 22.04
How Pyomo was installed (PyPI, conda, source): PyPI
Solver (if applicable): SCIP 9.0




Discussion:

Resolving patch:
diff --git a/pyomo/solvers/plugins/solvers/SCIPAMPL.py b/pyomo/solvers/plugins/solvers/SCIPAMPL.py
--- a/pyomo/solvers/plugins/solvers/SCIPAMPL.py
+++ b/pyomo/solvers/plugins/solvers/SCIPAMPL.py
@@ -455,7 +455,7 @@ def read_scip_log(filename: str):
         solver_status = scip_lines[0][colon_position + 2 : scip_lines[0].index('\n')]
 
         solving_time = float(
-            scip_lines[1][colon_position + 2 : scip_lines[1].index('\n')]
+            scip_lines[1][colon_position + 2 : scip_lines[1].index('\n')].split(' ')[0]
         )
 
         try:


Test patch:
diff --git a/pyomo/solvers/tests/mip/test_scip.py b/pyomo/solvers/tests/mip/test_scip.py
--- a/pyomo/solvers/tests/mip/test_scip.py
+++ b/pyomo/solvers/tests/mip/test_scip.py
@@ -106,6 +106,12 @@ def test_scip_solve_from_instance_options(self):
         results.write(filename=_out, times=False, format='json')
         self.compare_json(_out, join(currdir, "test_scip_solve_from_instance.baseline"))
 
+    def test_scip_solve_from_instance_with_reoptimization(self):
+        # Test scip with re-optimization option enabled
+        # This case changes the Scip output results which may break the results parser
+        self.scip.options['reoptimization/enable'] = True
+        self.test_scip_solve_from_instance()
+
 
 if __name__ == "__main__":
     deleteFiles = False