SCIP Doxygen Documentation
Loading...
Searching...
No Matches
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-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_samediff.h
26
* @brief Constraint handler stores the local branching decision data
27
* @author Timo Berthold
28
* @author Stefan Heinz
29
*
30
* This constraint handler is used to store the branching decision of the \ref BINPACKING_BRANCHING "Ryan/Foster branching rule"
31
* which is implemented in \ref branch_ryanfoster.c.
32
*
33
*/
34
35
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37
#ifndef __SCIP_CONS_SAMEDIFF_H__
38
#define __SCIP_CONS_SAMEDIFF_H__
39
40
41
#include "
scip/scip.h
"
42
43
/* type of constraint: differ or same */
44
enum
ConsType
45
{
46
DIFFER
= 0,
/**< constraint representing the branching decision differ(i,j) */
47
SAME
= 1
/**< constraint representing the branching decision same(i,j) */
48
};
49
typedef
enum
ConsType
CONSTYPE
;
50
51
/** creates the handler for element constraints and includes it in SCIP */
52
SCIP_RETCODE
SCIPincludeConshdlrSamediff
(
53
SCIP
*
scip
/**< SCIP data structure */
54
);
55
56
/** creates and captures a samediff constraint */
57
SCIP_RETCODE
SCIPcreateConsSamediff
(
58
SCIP
*
scip
,
/**< SCIP data structure */
59
SCIP_CONS
** cons,
/**< pointer to hold the created constraint */
60
const
char
* name,
/**< name of constraint */
61
int
itemid1,
/**< item id one */
62
int
itemid2,
/**< item id two */
63
CONSTYPE
type,
/**< stores whether the items have to be in the SAME or DIFFER packing */
64
SCIP_NODE
* node,
/**< the node in the B&B-tree at which the cons is sticking */
65
SCIP_Bool local
/**< is constraint only valid locally? */
66
);
67
68
/** returns item id one */
69
int
SCIPgetItemid1Samediff
(
70
SCIP
*
scip
,
/**< SCIP data structure */
71
SCIP_CONS
* cons
/**< samediff constraint */
72
);
73
74
/** returns item id two */
75
int
SCIPgetItemid2Samediff
(
76
SCIP
*
scip
,
/**< SCIP data structure */
77
SCIP_CONS
* cons
/**< samediff constraint */
78
);
79
80
/** return constraint type SAME or DIFFER */
81
CONSTYPE
SCIPgetTypeSamediff
(
82
SCIP
*
scip
,
/**< SCIP data structure */
83
SCIP_CONS
* cons
/**< samediff constraint */
84
);
85
86
#endif
CONSTYPE
enum ConsType CONSTYPE
Definition
cons_samediff.h:49
ConsType
ConsType
Definition
cons_samediff.h:45
SAME
@ SAME
Definition
cons_samediff.h:47
DIFFER
@ DIFFER
Definition
cons_samediff.h:46
SCIPgetItemid1Samediff
int SCIPgetItemid1Samediff(SCIP *scip, SCIP_CONS *cons)
Definition
cons_samediff.c:595
SCIPgetTypeSamediff
CONSTYPE SCIPgetTypeSamediff(SCIP *scip, SCIP_CONS *cons)
Definition
cons_samediff.c:627
SCIPgetItemid2Samediff
int SCIPgetItemid2Samediff(SCIP *scip, SCIP_CONS *cons)
Definition
cons_samediff.c:611
SCIPincludeConshdlrSamediff
SCIP_RETCODE SCIPincludeConshdlrSamediff(SCIP *scip)
Definition
cons_samediff.c:533
SCIPcreateConsSamediff
SCIP_RETCODE SCIPcreateConsSamediff(SCIP *scip, SCIP_CONS **cons, const char *name, int itemid1, int itemid2, CONSTYPE type, SCIP_NODE *node, SCIP_Bool local)
Definition
cons_samediff.c:559
scip
Definition
objbenders.h:44
scip.h
SCIP callable library.
SCIP_Cons
Definition
struct_cons.h:47
SCIP_Node
Definition
struct_tree.h:142
Scip
Definition
struct_scip.h:70
SCIP_RETCODE
enum SCIP_Retcode SCIP_RETCODE
Definition
type_retcode.h:63
examples
Binpacking
src
cons_samediff.h
© 2002-2024 by Zuse Institute Berlin (ZIB),
Imprint
Generated by
1.10.0