Repository: Pyomo/pyomo

Issue:
Pyomo 6.4 can't use scip 8.0.1
As title, when I use scip to solve my problem, it can't start to solve problem:
<img width="962" alt="image" src="https://user-images.githubusercontent.com/40459148/192074500-058f3fe4-5b16-4681-b870-90f3679885a0.png">


Discussion:
What version of pyomo are you using?
<img width="349" alt="image" src="https://user-images.githubusercontent.com/40459148/192987702-4ee6fbc9-1cdd-438c-a182-660a242b7c16.png">

@qiniuweihe is this still an issue for you? If so, please post the solver output by adding the option `tee=True` to your call to `solve`.

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
@@ -19,7 +19,7 @@
 
 from pyomo.opt.base import ProblemFormat, ResultsFormat
 from pyomo.opt.base.solvers import _extract_version, SolverFactory
-from pyomo.opt.results import SolverStatus, TerminationCondition, SolutionStatus 
+from pyomo.opt.results import SolverStatus, TerminationCondition, SolutionStatus , ProblemSense
 from pyomo.opt.solver import SystemCallSolver
 
 import logging
@@ -77,8 +77,8 @@ def _default_executable(self):
         # revert to scipampl for older versions
         executable = Executable("scipampl")
         if not executable:
-            logger.warning("Could not locate the 'scipampl' executable or"
-                           " the 'scip' executable since 8.0.0, which is "
+            logger.warning("Could not locate the 'scip' executable or"
+                           " the older 'scipampl' executable, which is "
                            "required for solver %s" % self.name)
             self.enable = False
             return None
@@ -108,7 +108,7 @@ def create_command_line(self, executable, problem_files):
         #
         if self._log_file is None:
             self._log_file = TempfileManager.\
-                             create_tempfile(suffix="_scipampl.log")
+                             create_tempfile(suffix="_scip.log")
 
         fname = problem_files[0]
         if '.' in fname:
@@ -396,6 +396,10 @@ def _postsolve(self):
             if len(results.solution) > 0:
                 results.solution(0).status = \
                     SolutionStatus.optimal
+            if results.problem.sense == ProblemSense.minimize:
+                results.problem.lower_bound = results.solver.primal_bound
+            else:
+                results.problem.upper_bound = results.solver.primal_bound
                     
         # WARNING # infeasible='infeasible' # Demonstrated that the problem is infeasible
           


Test patch:
diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml
--- a/.github/workflows/test_branches.yml
+++ b/.github/workflows/test_branches.yml
@@ -308,7 +308,7 @@ jobs:
                 || echo "WARNING: Gurobi is not available"
             conda install -q -y -c fico-xpress xpress \
                 || echo "WARNING: Xpress Community Edition is not available"
-            for PKG in cyipopt pymumps; do
+            for PKG in cyipopt pymumps scip; do
                 conda install -q -y -c conda-forge $PKG \
                     || echo "WARNING: $PKG is not available"
             done
diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml
--- a/.github/workflows/test_pr_and_main.yml
+++ b/.github/workflows/test_pr_and_main.yml
@@ -334,7 +334,7 @@ jobs:
                 || echo "WARNING: Gurobi is not available"
             conda install -q -y -c fico-xpress xpress \
                 || echo "WARNING: Xpress Community Edition is not available"
-            for PKG in cyipopt pymumps; do
+            for PKG in cyipopt pymumps scip; do
                 conda install -q -y -c conda-forge $PKG \
                     || echo "WARNING: $PKG is not available"
             done
diff --git a/pyomo/solvers/tests/mip/test_factory.py b/pyomo/solvers/tests/mip/test_factory.py
--- a/pyomo/solvers/tests/mip/test_factory.py
+++ b/pyomo/solvers/tests/mip/test_factory.py
@@ -60,7 +60,7 @@ def test_solver_factory(self):
         """
         SolverFactory.register('stest3')(MockSolver)
         ans = sorted(SolverFactory)
-        tmp = ['_mock_asl', '_mock_cbc', '_mock_cplex', '_mock_glpk', 'cbc', 'cplex', 'glpk', 'stest3', 'asl']
+        tmp = ['_mock_asl', '_mock_cbc', '_mock_cplex', '_mock_glpk', 'cbc', 'cplex', 'glpk', 'scip', 'stest3', 'asl']
         tmp.sort()
         self.assertTrue(set(tmp) <= set(ans), msg="Set %s is not a subset of set %s" %(tmp,ans))
 
diff --git a/pyomo/solvers/tests/mip/test_scip_solve_from_instance.baseline b/pyomo/solvers/tests/mip/test_scip_solve_from_instance.baseline
--- a/pyomo/solvers/tests/mip/test_scip_solve_from_instance.baseline
+++ b/pyomo/solvers/tests/mip/test_scip_solve_from_instance.baseline
@@ -1,12 +1,12 @@
 {
     "Problem": [
         {
-            "Lower bound": -Infinity, 
+            "Lower bound": -Infinity,
             "Number of constraints": 0, 
             "Number of objectives": 1, 
             "Number of variables": 1, 
             "Sense": "unknown", 
-            "Upper bound": Infinity
+            "Upper bound": 1.0
         }
     ], 
     "Solution": [
@@ -42,4 +42,4 @@
             "Time": 0
         }
     ]
-}
\ No newline at end of file
+}
diff --git a/pyomo/solvers/tests/testcases.py b/pyomo/solvers/tests/testcases.py
--- a/pyomo/solvers/tests/testcases.py
+++ b/pyomo/solvers/tests/testcases.py
@@ -199,12 +199,12 @@
 
 ExpectedFailures['scip', 'nl', 'SOS2_simple'] = \
     (lambda v: v <= (3, 1, 0, 9),
-    "SCIP (scipampl) does not recognize sos2 constraints "
+    "SCIP (scip) does not recognize sos2 constraints "
     "inside NL files. A ticket has been filed.")
 
 ExpectedFailures['scip', 'nl', 'SOS1_simple'] = \
     (lambda v: v <= (3, 1, 0, 9),
-    "SCIP (scipampl) does not recognize sos1 constraints "
+    "SCIP (scip) does not recognize sos1 constraints "
     "inside NL files. A ticket has been filed.")
 
 #