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