1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB)                      */
7    	/*                                                                           */
8    	/*  Licensed under the Apache License, Version 2.0 (the "License");          */
9    	/*  you may not use this file except in compliance with the License.         */
10   	/*  You may obtain a copy of the License at                                  */
11   	/*                                                                           */
12   	/*      http://www.apache.org/licenses/LICENSE-2.0                           */
13   	/*                                                                           */
14   	/*  Unless required by applicable law or agreed to in writing, software      */
15   	/*  distributed under the License is distributed on an "AS IS" BASIS,        */
16   	/*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17   	/*  See the License for the specific language governing permissions and      */
18   	/*  limitations under the License.                                           */
19   	/*                                                                           */
20   	/*  You should have received a copy of the Apache-2.0 license                */
21   	/*  along with SCIP; see the file LICENSE. If not visit scipopt.org.         */
22   	/*                                                                           */
23   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24   	
25   	/**@file   struct_cutpool.h
26   	 * @ingroup INTERNALAPI
27   	 * @brief  datastructures for storing cuts in a cut pool
28   	 * @author Tobias Achterberg
29   	 */
30   	
31   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32   	
33   	#ifndef __SCIP_STRUCT_CUTPOOL_H__
34   	#define __SCIP_STRUCT_CUTPOOL_H__
35   	
36   	
37   	#include "scip/def.h"
38   	#include "scip/type_clock.h"
39   	#include "scip/type_misc.h"
40   	#include "scip/type_lp.h"
41   	#include "scip/type_cutpool.h"
42   	
43   	#ifdef __cplusplus
44   	extern "C" {
45   	#endif
46   	
47   	/** datastructure for cuts in a cut pool */
48   	struct SCIP_Cut
49   	{
50   	   SCIP_ROW*             row;                /**< LP row of this cut */
51   	   SCIP_Longint          processedlp;        /**< last LP, where this cut was processed in separation of the LP solution */
52   	   SCIP_Longint          processedlpsol;     /**< last LP, where this cut was processed in separation of other solutions */
53   	   int                   age;                /**< age of the cut: number of successive times, the cut was not violated */
54   	   int                   pos;                /**< position of cut in the cuts array of the cut pool */
55   	};
56   	
57   	/** storage for pooled cuts */
58   	struct SCIP_Cutpool
59   	{
60   	   SCIP_Longint          ncalls;             /**< number of times, the cutpool was separated */
61   	   SCIP_Longint          nrootcalls;         /**< number of times, the cutpool was separated at the root */
62   	   SCIP_Longint          ncutsfound;         /**< total number of cuts that were added to the pool */
63   	   SCIP_Longint          ncutsadded;         /**< total number of cuts that were added from the pool */
64   	   SCIP_CLOCK*           poolclock;          /**< separation time */
65   	   SCIP_HASHTABLE*       hashtable;          /**< hash table to identify already stored cuts */
66   	   SCIP_CUT**            cuts;               /**< stored cuts of the pool */
67   	   SCIP_Longint          processedlp;        /**< last LP that has been processed for separating the LP */
68   	   SCIP_Longint          processedlpsol;     /**< last LP that has been processed for separating other solutions */
69   	   SCIP_Real             processedlpefficacy;/**< minimal efficacy used in last processed LP */
70   	   SCIP_Real             processedlpsolefficacy;/**< minimal efficacy used in last processed LP for separating other solutions */
71   	   int                   cutssize;           /**< size of cuts array */
72   	   int                   ncuts;              /**< number of cuts stored in the pool */
73   	   int                   nremovablecuts;     /**< number of cuts stored in the pool that are marked to be removable */
74   	   int                   agelimit;           /**< maximum age a cut can reach before it is deleted from the pool */
75   	   int                   firstunprocessed;   /**< first cut that has not been processed in the last LP */
76   	   int                   firstunprocessedsol;/**< first cut that has not been processed in the last LP when separating other solutions */
77   	   SCIP_Longint          maxncuts;           /**< maximal number of cuts stored in the pool at the same time */
78   	   SCIP_Bool             globalcutpool;      /**< is this the global cut pool of SCIP? */
79   	};
80   	
81   	#ifdef __cplusplus
82   	}
83   	#endif
84   	
85   	#endif
86