1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the class library                   */
4    	/*       SoPlex --- the Sequential object-oriented simPlex.                  */
5    	/*                                                                           */
6    	/*    Copyright (C) 1996-2022 Konrad-Zuse-Zentrum                            */
7    	/*                            fuer Informationstechnik Berlin                */
8    	/*                                                                           */
9    	/*  SoPlex is distributed under the terms of the ZIB Academic Licence.       */
10   	/*                                                                           */
11   	/*  You should have received a copy of the ZIB Academic License              */
12   	/*  along with SoPlex; see the file COPYING. If not email to soplex@zib.de.  */
13   	/*                                                                           */
14   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15   	
16   	#include <iostream>
17   	
18   	#include "soplex/spxdefines.h"
(1) Event include_recursion: #include file "/sapmnt/home1/d029903/my_work/SCIPSoPlex_coverity/scipoptsuite-8.0.1/soplex/src/soplex/spxautopr.h" includes itself: spxautopr.h -> spxautopr.hpp -> spxautopr.h
(2) Event caretline: ^
19   	#include "soplex/spxautopr.h"
20   	#include "soplex/spxout.h"
21   	
22   	namespace soplex
23   	{
24   	
25   	template <class R>
26   	void SPxAutoPR<R>::load(SPxSolverBase<R>* p_solver)
27   	{
28   	   steep.load(p_solver);
29   	   devex.load(p_solver);
30   	   this->thesolver = p_solver;
31   	   setType(p_solver->type());
32   	}
33   	
34   	template <class R>
35   	void SPxAutoPR<R>::clear()
36   	{
37   	   steep.clear();
38   	   devex.clear();
39   	   this->thesolver = nullptr;
40   	}
41   	
42   	template <class R>
43   	void SPxAutoPR<R>::setEpsilon(R eps)
44   	{
45   	   steep.setEpsilon(eps);
46   	   devex.setEpsilon(eps);
47   	   this->theeps = eps;
48   	}
49   	
50   	template <class R>
51   	void SPxAutoPR<R>::setType(typename SPxSolverBase<R>::Type tp)
52   	{
53   	   activepricer->setType(tp);
54   	}
55   	
56   	template <class R>
57   	void SPxAutoPR<R>::setRep(typename SPxSolverBase<R>::Representation rep)
58   	{
59   	   steep.setRep(rep);
60   	   devex.setRep(rep);
61   	}
62   	
63   	template <class R>
64   	bool SPxAutoPR<R>::setActivePricer(typename SPxSolverBase<R>::Type type)
65   	{
66   	   // switch to steep as soon as switchIters is reached
67   	   if(activepricer == &devex && this->thesolver->iterations() >= switchIters)
68   	   {
69   	      activepricer = &steep;
70   	      activepricer->setType(type);
71   	      return true;
72   	   }
73   	
74   	
75   	   // use devex for the iterations < switchIters
76   	   else if(activepricer == &steep && this->thesolver->iterations() < switchIters)
77   	   {
78   	      activepricer = &devex;
79   	      activepricer->setType(type);
80   	      return true;
81   	   }
82   	
83   	   return false;
84   	}
85   	
86   	template <class R>
87   	int SPxAutoPR<R>::selectLeave()
88   	{
89   	   if(setActivePricer(SPxSolverBase<R>::LEAVE))
90   	      MSG_INFO1((*this->thesolver->spxout),
91   	                (*this->thesolver->spxout) << " --- active pricer: " << activepricer->getName() << std::endl;)
92   	
93   	      return activepricer->selectLeave();
94   	}
95   	
96   	template <class R>
97   	void SPxAutoPR<R>::left4(int n, SPxId id)
98   	{
99   	   activepricer->left4(n, id);
100  	}
101  	
102  	template <class R>
103  	SPxId SPxAutoPR<R>::selectEnter()
104  	{
105  	   if(setActivePricer(SPxSolverBase<R>::ENTER))
106  	      MSG_INFO1((*this->thesolver->spxout),
107  	                (*this->thesolver->spxout) << " --- active pricer: " << activepricer->getName() << std::endl;)
108  	
109  	      return activepricer->selectEnter();
110  	}
111  	
112  	template <class R>
113  	void SPxAutoPR<R>::entered4(SPxId id, int n)
114  	{
115  	   activepricer->entered4(id, n);
116  	}
117  	
118  	} // namespace soplex
119