Scippy

SCIP

Solving Constraint Integer Programs

cons_lop.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-2019 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_lop.h
17  * @brief constraint handler for linear ordering constraints
18  * @author Marc Pfetsch
19  *
20  * This constraint ensures that a given square matrix of binary variables corresponds to a
21  * tournament, i.e., it is an acyclic orientation of the complete graph. This encodes a linear order
22  * as follows. The rows and columns correspond to the elements of the set to be ordered. A variable
23  * x[i][j] is 1 if and only if element i appears before j in the order.
24  *
25  * In this constraint handler we only add the symmetry equations and separate the triangle
26  * inequalities yielding a correct IP model.
27  *
28  * The variables on the diagonal are ignored.
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __LOP_CONS_LOP_H__
34 #define __LOP_CONS_LOP_H__
35 
36 
37 #include <scip/scip.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /** creates the handler for linear ordering constraints and includes it in SCIP */
44 extern
46  SCIP* scip /**< SCIP data structure */
47  );
48 
49 /** creates and captures a linear ordering constraint */
50 extern
52  SCIP* scip, /**< SCIP data structure */
53  SCIP_CONS** cons, /**< pointer to hold the created constraint */
54  const char* name, /**< name of constraint */
55  int n, /**< number of elements */
56  SCIP_VAR*** vars, /**< n x n matrix of binary variables */
57  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? */
58  SCIP_Bool separate, /**< should the constraint be separated during LP processing? */
59  SCIP_Bool enforce, /**< should the constraint be enforced during node processing? */
60  SCIP_Bool check, /**< should the constraint be checked for feasibility? */
61  SCIP_Bool propagate, /**< should the constraint be propagated during node processing? */
62  SCIP_Bool local, /**< is constraint only valid locally? */
63  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? */
64  SCIP_Bool dynamic, /**< is constraint subject to aging? */
65  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */
66  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
67  * if it may be moved to a more global node? */
68  );
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_Bool
Definition: def.h:69
SCIP_RETCODE SCIPincludeConshdlrLOP(SCIP *scip)
Definition: cons_lop.c:1159
SCIP callable library.
SCIP_RETCODE SCIPcreateConsLOP(SCIP *scip, SCIP_CONS **cons, const char *name, int n, SCIP_VAR ***vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_lop.c:1188