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_relax.h 26 * @ingroup INTERNALAPI 27 * @brief data structures for relaxators 28 * @author Tobias Achterberg 29 */ 30 31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 32 33 #ifndef __SCIP_STRUCT_RELAX_H__ 34 #define __SCIP_STRUCT_RELAX_H__ 35 36 37 #include "scip/def.h" 38 #include "scip/type_clock.h" 39 #include "scip/type_relax.h" 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 /** relaxators data */ 46 struct SCIP_Relax 47 { 48 SCIP_Longint ncalls; /**< number of times, this relaxator was called */ 49 SCIP_Longint ncutoffs; /**< number of times, this relaxator cut off a node */ 50 SCIP_Longint nimprbounds; /**< number of times, this relaxator improves the node's lower bound (w.r.t. SCIPisRelGT) */ 51 SCIP_Longint naddedconss; /**< number of times, this relaxator added constraints */ 52 SCIP_Longint nreduceddom; /**< number of times, this relaxator reduced variable domains */ 53 SCIP_Longint nseparated; /**< number of times, this relaxator separated cuts */ 54 SCIP_Longint lastsolvednode; /**< last total nodes counter, where the current relaxation was solved */ 55 char* name; /**< name of relaxator */ 56 char* desc; /**< description of relaxator */ 57 SCIP_DECL_RELAXCOPY ((*relaxcopy)); /**< copy method of relaxator or NULL if you don't want to copy your plugin into sub-SCIPs */ 58 SCIP_DECL_RELAXFREE ((*relaxfree)); /**< destructor of relaxator */ 59 SCIP_DECL_RELAXINIT ((*relaxinit)); /**< initialize relaxator */ 60 SCIP_DECL_RELAXEXIT ((*relaxexit)); /**< deinitialize relaxator */ 61 SCIP_DECL_RELAXINITSOL((*relaxinitsol)); /**< solving process initialization method of relaxator */ 62 SCIP_DECL_RELAXEXITSOL((*relaxexitsol)); /**< solving process deinitialization method of relaxator */ 63 SCIP_DECL_RELAXEXEC ((*relaxexec)); /**< execution method of relaxator */ 64 SCIP_RELAXDATA* relaxdata; /**< relaxators local data */ 65 SCIP_CLOCK* setuptime; /**< time spent for setting up this relaxator for the next stages */ 66 SCIP_CLOCK* relaxclock; /**< relaxation time */ 67 SCIP_Real imprtime; /**< time spent for executing relaxator when improving bound (or cutoff) */ 68 int priority; /**< priority of the relaxator */ 69 int freq; /**< frequency for calling relaxator */ 70 SCIP_Bool initialized; /**< is relaxator initialized? */ 71 }; 72 73 /** relaxation information data */ 74 struct SCIP_Relaxation 75 { 76 SCIP_Real relaxsolobjval; 77 SCIP_Bool relaxsolvalid; 78 SCIP_Bool relaxsolincludeslp; 79 SCIP_Bool relaxsolzero; 80 SCIP_RELAX* lastsolrelax; /**< relaxator of the most recent relaxation solution */ 81 }; 82 83 84 #ifdef __cplusplus 85 } 86 #endif 87 88 #endif 89