Scippy

SCIP

Solving Constraint Integer Programs

struct_concsolver.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_concsolver.h
17  * @ingroup INTERNALAPI
18  * @brief datastructures for concurrent solvers
19  * @author Leona Gottwald
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_STRUCT_CONCSOLVER_H__
25 #define __SCIP_STRUCT_CONCSOLVER_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_concsolver.h"
30 #include "scip/type_clock.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** concurrent solver data structure */
38 {
39  int ninstances; /**< number of instances created from this concurrent solver type */
40  SCIP_Real prefprio; /**< the weight of the concurrent */
41  char* name; /**< name of concurrent solver */
42  SCIP_CONCSOLVERTYPEDATA* data; /**< user data of concurrent solver type */
43  SCIP_DECL_CONCSOLVERCREATEINST ((*concsolvercreateinst)); /**< creates an instance of the concurrent solver */
44  SCIP_DECL_CONCSOLVERDESTROYINST ((*concsolverdestroyinst)); /**< destroys an instance of the concurrent solver */
45  SCIP_DECL_CONCSOLVERINITSEEDS ((*concsolverinitseeds)); /**< initialize random seeds of concurrent solver */
46  SCIP_DECL_CONCSOLVEREXEC ((*concsolverexec)); /**< execution method of concurrent solver */
47  SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA ((*concsolvercopysolvdata));/**< copies the solving data */
48  SCIP_DECL_CONCSOLVERSTOP ((*concsolverstop)); /**< terminate solving in concurrent solver */
49  SCIP_DECL_CONCSOLVERSYNCWRITE ((*concsolversyncwrite)); /**< synchronization method of concurrent solver for sharing it's data */
50  SCIP_DECL_CONCSOLVERSYNCREAD ((*concsolversyncread)); /**< synchronization method of concurrent solver for reading shared data */
51  SCIP_DECL_CONCSOLVERTYPEFREEDATA ((*concsolvertypefreedata));/**< frees user data of concurrent solver type */
52 };
53 
54 /** concurrent solver data structure */
56 {
57  SCIP_CONCSOLVERTYPE* type; /**< type of this concurrent solver */
58  int idx; /**< index of initialized exernal solver */
59  char* name; /**< name of concurrent solver */
60  SCIP_CONCSOLVERDATA* data; /**< user data of concurrent solver */
61  SCIP_SYNCDATA* syncdata; /**< most recent synchronization data that has been read */
62  SCIP_Longint nsyncs; /**< total number of synchronizations */
63  SCIP_Real timesincelastsync; /**< time since the last synchronization */
64  SCIP_Real syncdelay; /**< current delay of synchronization data */
65  SCIP_Real syncfreq; /**< current synchronization frequency of the concurrent solver */
66  SCIP_Real solvingtime; /**< solving time with wall clock */
67  SCIP_Bool stopped; /**< flag to store if the concurrent solver has been stopped
68  * through the SCIPconcsolverStop function */
69  SCIP_Longint nlpiterations; /**< number of lp iterations the concurrent solver used */
70  SCIP_Longint nnodes; /**< number of nodes the concurrent solver used */
71  SCIP_Longint nsolsrecvd; /**< number of solutions the concurrent solver received */
72  SCIP_Longint nsolsshared; /**< number of solutions the concurrent solver found */
73  SCIP_Longint ntighterbnds; /**< number of tighter global variable bounds the concurrent solver received */
74  SCIP_Longint ntighterintbnds; /**< number of tighter global variable bounds the concurrent solver received
75  * on integer variables */
76  SCIP_CLOCK* totalsynctime; /**< total time used for synchronization, including idle time */
77 };
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif
SCIP_Longint nsyncs
struct SCIP_ConcSolverTypeData SCIP_CONCSOLVERTYPEDATA
SCIP_DECL_CONCSOLVERTYPEFREEDATA((*concsolvertypefreedata))
SCIP_DECL_CONCSOLVERSTOP((*concsolverstop))
SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA((*concsolvercopysolvdata))
SCIP_Longint ntighterbnds
SCIP_DECL_CONCSOLVERSYNCWRITE((*concsolversyncwrite))
SCIP_DECL_CONCSOLVERDESTROYINST((*concsolverdestroyinst))
SCIP_Longint nsolsshared
SCIP_DECL_CONCSOLVEREXEC((*concsolverexec))
SCIP_Longint nsolsrecvd
SCIP_CLOCK * totalsynctime
struct SCIP_SyncData SCIP_SYNCDATA
SCIP_DECL_CONCSOLVERCREATEINST((*concsolvercreateinst))
SCIP_DECL_CONCSOLVERSYNCREAD((*concsolversyncread))
SCIP_CONCSOLVERTYPE * type
#define SCIP_Bool
Definition: def.h:70
SCIP_CONCSOLVERTYPEDATA * data
type definitions for clocks and timing issues
SCIP_Longint ntighterintbnds
SCIP_SYNCDATA * syncdata
SCIP_CONCSOLVERDATA * data
#define SCIP_Real
Definition: def.h:163
#define SCIP_Longint
Definition: def.h:148
SCIP_DECL_CONCSOLVERINITSEEDS((*concsolverinitseeds))
SCIP_Longint nlpiterations
common defines and data types used in all packages of SCIP
SCIP_Longint nnodes
struct SCIP_ConcSolverData SCIP_CONCSOLVERDATA
SCIP_Real timesincelastsync
type definitions for concurrent solvers