Scippy

SCIP

Solving Constraint Integer Programs

cons_samediff.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-2018 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file cons_samediff.h
17  * @brief Constraint handler stores the local branching decision data
18  * @author Timo Berthold
19  * @author Stefan Heinz
20  *
21  * This constraint handler is used to store the branching decision of the \ref BINPACKING_BRANCHING "Ryan/Foster branching rule"
22  * which is implemented in \ref branch_ryanfoster.c.
23  *
24  */
25 
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
27 
28 #ifndef __SCIP_CONS_SAMEDIFF_H__
29 #define __SCIP_CONS_SAMEDIFF_H__
30 
31 
32 #include "scip/scip.h"
33 
34 /* type of constraint: differ or same */
36 {
37  DIFFER = 0, /**< constraint representing the branching decision differ(i,j) */
38  SAME = 1 /**< constraint representing the branching decision same(i,j) */
39 };
40 typedef enum ConsType CONSTYPE;
41 
42 /** creates the handler for element constraints and includes it in SCIP */
43 extern
45  SCIP* scip /**< SCIP data structure */
46  );
47 
48 /** creates and captures a samediff constraint */
49 extern
51  SCIP* scip, /**< SCIP data structure */
52  SCIP_CONS** cons, /**< pointer to hold the created constraint */
53  const char* name, /**< name of constraint */
54  int itemid1, /**< item id one */
55  int itemid2, /**< item id two */
56  CONSTYPE type, /**< stores whether the items have to be in the SAME or DIFFER packing */
57  SCIP_NODE* node, /**< the node in the B&B-tree at which the cons is sticking */
58  SCIP_Bool local /**< is constraint only valid locally? */
59  );
60 
61 /** returns item id one */
62 extern
64  SCIP* scip, /**< SCIP data structure */
65  SCIP_CONS* cons /**< samediff constraint */
66  );
67 
68 /** returns item id two */
69 extern
71  SCIP* scip, /**< SCIP data structure */
72  SCIP_CONS* cons /**< samediff constraint */
73  );
74 
75 /** return constraint type SAME or DIFFER */
76 extern
78  SCIP* scip, /**< SCIP data structure */
79  SCIP_CONS* cons /**< samediff constraint */
80  );
81 
82 #endif
CONSTYPE
Definition: reader_osil.c:59
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
ConsType
Definition: cons_samediff.h:35
#define SCIP_Bool
Definition: def.h:62
int SCIPgetItemid2Samediff(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeConshdlrSamediff(SCIP *scip)
CONSTYPE SCIPgetTypeSamediff(SCIP *scip, SCIP_CONS *cons)
enum ConsType CONSTYPE
Definition: cons_samediff.h:40
int SCIPgetItemid1Samediff(SCIP *scip, SCIP_CONS *cons)
SCIP callable library.
SCIP_RETCODE SCIPcreateConsSamediff(SCIP *scip, SCIP_CONS **cons, const char *name, int itemid1, int itemid2, CONSTYPE type, SCIP_NODE *node, SCIP_Bool local)