Scippy

SCIP

Solving Constraint Integer Programs

pub_misc_linear.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 pub_misc_linear.h
17  * @ingroup INTERNALAPI
18  * @brief internal miscellaneous methods for linear constraints
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_MISC_LINEAR_H__
25 #define __SCIP_MISC_LINEAR_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_cons.h"
31 #include "scip/type_lp.h"
32 #include "scip/type_var.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** returns the right-hand side of an arbitrary SCIP constraint that can be represented as a single linear constraint
39  *
40  * @note The success pointer indicates if the individual contraint handler was able to return the involved values
41  */
42 extern
44  SCIP* scip, /**< SCIP data structure */
45  SCIP_CONS* cons, /**< constraint for which right-hand side is queried */
46  SCIP_Bool* success /**< pointer to store whether a valid right-hand side was returned */
47  );
48 
49 /** returns the left-hand side of an arbitrary SCIP constraint that can be represented as a single linear constraint
50  *
51  * @note The success pointer indicates if the individual contraint handler was able to return the involved values
52  */
53 extern
55  SCIP* scip, /**< SCIP data structure */
56  SCIP_CONS* cons, /**< constraint to get left hand side for */
57  SCIP_Bool* success /**< pointer to store whether a valid left-hand side was returned */
58  );
59 
60 /** returns the value array of an arbitrary SCIP constraint that can be represented as a single linear constraint
61  *
62  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
63  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
64  *
65  * @note The success pointer indicates if the individual contraint handler was able to return the involved values
66  */
67 extern
69  SCIP* scip, /**< SCIP data structure */
70  SCIP_CONS* cons, /**< constraint for which the coefficients are wanted */
71  SCIP_Real* vals, /**< array to store the coefficients of the constraint */
72  int varssize, /**< available slots in vals array needed to check if the array is large enough */
73  SCIP_Bool* success /**< pointer to store whether the coefficients are successfully copied */
74  );
75 
76 /** returns the dual farkas solution of an arbitrary SCIP constraint that can be represented as a single linear constraint
77  *
78  * @note The success pointer indicates if the individual contraint handler was able to return the dual farkas solution
79  */
80 extern
82  SCIP* scip, /**< SCIP data structure */
83  SCIP_CONS* cons, /**< constraint to get left hand side for */
84  SCIP_Real* dualfarkas, /**< pointer to store the dual farkas solution */
85  SCIP_Bool* success /**< pointer to store whether the dual farkas solution is successfully returned */
86  );
87 
88 /** returns the dual solution of an arbitrary SCIP constraint that can be represented as a single linear constraint
89  *
90  * @note The success pointer indicates if the individual contraint handler was able to return the dual solution
91  */
93  SCIP* scip, /**< SCIP data structure */
94  SCIP_CONS* cons, /**< constraint to get left hand side for */
95  SCIP_Real* dualsol, /**< pointer to store the dual solution */
96  SCIP_Bool* success /**< pointer to store whether the dual solution is successfully returned */
97  );
98 
99 /** returns the row of an arbitrary SCIP constraint that can be represented as a single linear constraint
100  * or NULL of no row is awailable
101  */
102 extern
104  SCIP* scip, /**< SCIP data structure */
105  SCIP_CONS* cons /**< constraint to get left hand side for */
106  );
107 
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif
SCIP_ROW * SCIPconsGetRow(SCIP *scip, SCIP_CONS *cons)
Definition: misc_linear.c:402
SCIP_Real SCIPconsGetRhs(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
Definition: misc_linear.c:38
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
void SCIPconsGetDualsol(SCIP *scip, SCIP_CONS *cons, SCIP_Real *dualsol, SCIP_Bool *success)
Definition: misc_linear.c:347
type definitions for LP management
type definitions for problem variables
void SCIPconsGetDualfarkas(SCIP *scip, SCIP_CONS *cons, SCIP_Real *dualfarkas, SCIP_Bool *success)
Definition: misc_linear.c:291
#define SCIP_Bool
Definition: def.h:62
SCIP_Real SCIPconsGetLhs(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
Definition: misc_linear.c:102
SCIP_RETCODE SCIPgetConsVals(SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int varssize, SCIP_Bool *success)
Definition: misc_linear.c:169
#define SCIP_Real
Definition: def.h:150
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers