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 pub_cutpool.h 26 * @ingroup PUBLICCOREAPI 27 * @brief public methods 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_PUB_CUTPOOL_H__ 34 #define __SCIP_PUB_CUTPOOL_H__ 35 36 37 #include "scip/def.h" 38 #include "scip/type_cutpool.h" 39 #include "scip/type_lp.h" 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 /**@addtogroup PublicCutMethods 46 * 47 * @{ 48 */ 49 50 /** gets the row of the cut */ 51 SCIP_EXPORT 52 SCIP_ROW* SCIPcutGetRow( 53 SCIP_CUT* cut /**< cut */ 54 ); 55 56 /** gets the age of the cut: the number of consecutive cut pool separation rounds where the cut was neither in the LP nor violated */ 57 SCIP_EXPORT 58 int SCIPcutGetAge( 59 SCIP_CUT* cut /**< cut */ 60 ); 61 62 /** returns the ratio of LPs where the row belonging to this cut was active in an LP solution, i.e. 63 * where the age of its row has not been increased 64 * 65 * @see SCIPcutGetAge() to get the age of a cut 66 */ 67 SCIP_EXPORT 68 SCIP_Real SCIPcutGetLPActivityQuot( 69 SCIP_CUT* cut /**< cut */ 70 ); 71 72 /** gets array of cuts in the cut pool */ 73 SCIP_EXPORT 74 SCIP_CUT** SCIPcutpoolGetCuts( 75 SCIP_CUTPOOL* cutpool /**< cut pool */ 76 ); 77 78 /** get number of cuts in the cut pool */ 79 SCIP_EXPORT 80 int SCIPcutpoolGetNCuts( 81 SCIP_CUTPOOL* cutpool /**< cut pool */ 82 ); 83 84 /** get maximum number of cuts that were stored in the cut pool at the same time */ 85 SCIP_EXPORT 86 SCIP_Longint SCIPcutpoolGetMaxNCuts( 87 SCIP_CUTPOOL* cutpool /**< cut pool */ 88 ); 89 90 /** gets time in seconds used for separating cuts from the pool */ 91 SCIP_EXPORT 92 SCIP_Real SCIPcutpoolGetTime( 93 SCIP_CUTPOOL* cutpool /**< cut pool */ 94 ); 95 96 /** get number of times the cut pool was separated */ 97 SCIP_EXPORT 98 SCIP_Longint SCIPcutpoolGetNCalls( 99 SCIP_CUTPOOL* cutpool /**< cut pool */ 100 ); 101 102 /** get number of times the cut pool was separated at the root */ 103 SCIP_EXPORT 104 SCIP_Longint SCIPcutpoolGetNRootCalls( 105 SCIP_CUTPOOL* cutpool /**< cut pool */ 106 ); 107 108 /** get total number of cuts that were separated from the cut pool */ 109 SCIP_EXPORT 110 SCIP_Longint SCIPcutpoolGetNCutsFound( 111 SCIP_CUTPOOL* cutpool /**< cut pool */ 112 ); 113 114 /** get total number of cuts that were added from the cut pool to sepastore */ 115 SCIP_EXPORT 116 SCIP_Longint SCIPcutpoolGetNCutsAdded( 117 SCIP_CUTPOOL* cutpool /**< cut pool */ 118 ); 119 /** @} */ 120 121 #ifdef __cplusplus 122 } 123 #endif 124 125 #endif 126