SCIP-SDP  3.2.0
cons_sdp.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of SCIPSDP - a solving framework for mixed-integer */
4 /* semidefinite programs based on SCIP. */
5 /* */
6 /* Copyright (C) 2011-2013 Discrete Optimization, TU Darmstadt */
7 /* EDOM, FAU Erlangen-Nürnberg */
8 /* 2014-2020 Discrete Optimization, TU Darmstadt */
9 /* */
10 /* */
11 /* This program is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public License */
13 /* as published by the Free Software Foundation; either version 3 */
14 /* of the License, or (at your option) any later version. */
15 /* */
16 /* This program is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19 /* GNU Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public License */
22 /* along with this program; if not, write to the Free Software */
23 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
24 /* */
25 /* */
26 /* Based on SCIP - Solving Constraint Integer Programs */
27 /* Copyright (C) 2002-2020 Zuse Institute Berlin */
28 /* SCIP is distributed under the terms of the SCIP Academic Licence, */
29 /* see file COPYING in the SCIP distribution. */
30 /* */
31 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
32 
45 #ifndef __SCIP_CONSHDLR_SDP_H__
46 #define __SCIP_CONSHDLR_SDP_H__
47 
48 #include "scip/scip.h"
49 
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
56 SCIP_EXPORT
57 SCIP_RETCODE SCIPincludeConshdlrSdp(
58  SCIP* scip
59  );
60 
62 SCIP_EXPORT
63 SCIP_RETCODE SCIPincludeConshdlrSdpRank1(
64  SCIP* scip
65  );
66 
68 SCIP_EXPORT
69 SCIP_RETCODE SCIPcreateConsSdp(
70  SCIP* scip,
71  SCIP_CONS** cons,
72  const char* name,
73  int nvars,
74  int nnonz,
75  int blocksize,
76  int* nvarnonz,
77  int** col,
78  int** row,
79  SCIP_Real** val,
80  SCIP_VAR** vars,
81  int constnnonz,
82  int* constcol,
83  int* constrow,
84  SCIP_Real* constval
85  );
86 
88 SCIP_EXPORT
89 SCIP_RETCODE SCIPcreateConsSdpRank1(
90  SCIP* scip,
91  SCIP_CONS** cons,
92  const char* name,
93  int nvars,
94  int nnonz,
95  int blocksize,
96  int* nvarnonz,
97  int** col,
98  int** row,
99  SCIP_Real** val,
100  SCIP_VAR** vars,
101  int constnnonz,
102  int* constcol,
103  int* constrow,
104  SCIP_Real* constval
105  );
106 
110 SCIP_EXPORT
112  int i,
113  int j
114  );
115 
122 SCIP_EXPORT
123 SCIP_RETCODE SCIPconsSdpGetData(
124  SCIP* scip,
125  SCIP_CONS* cons,
126  int* nvars,
127  int* nnonz,
128  int* blocksize,
129  int* arraylength,
130  int* nvarnonz,
132  int** col,
133  int** row,
134  SCIP_Real** val,
135  SCIP_VAR** vars,
136  int* constnnonz,
138  int* constcol,
139  int* constrow,
140  SCIP_Real* constval,
141  SCIP_Bool* rankone,
142  int** maxevsubmat,
143  SCIP_Bool* addedquadcons
144  );
145 
150 SCIP_EXPORT
151 SCIP_RETCODE SCIPconsSdpGetNNonz(
152  SCIP* scip,
153  SCIP_CONS* cons,
154  int* nnonz,
155  int* constnnonz
156  );
157 
159 SCIP_EXPORT
161  SCIP* scip,
162  SCIP_CONS* cons
163  );
164 
166 SCIP_EXPORT
167 SCIP_RETCODE SCIPconsSdpGetFullAj(
168  SCIP* scip,
169  SCIP_CONS* cons,
170  int j,
171  SCIP_Real* Aj
172  );
173 
175 SCIP_EXPORT
176 SCIP_RETCODE SCIPconsSdpGetFullConstMatrix(
177  SCIP* scip,
178  SCIP_CONS* cons,
179  SCIP_Real* mat
180  );
181 
183 SCIP_EXPORT
185  SCIP* scip,
186  SCIP_CONS* cons,
187  SCIP_Real* mat
188  );
189 
191 SCIP_EXPORT
192 SCIP_RETCODE SCIPconsSdpCheckSdpCons(
193  SCIP* scip,
194  SCIP_CONS* cons,
195  SCIP_SOL* sol,
196  SCIP_Bool printreason,
197  SCIP_RESULT* result
198  );
199 
210 SCIP_EXPORT
211 SCIP_RETCODE SCIPconsSdpGuessInitialPoint(
212  SCIP* scip,
213  SCIP_CONS* cons,
214  SCIP_Real* lambdastar
215  );
216 
218 SCIP_EXPORT
220  SCIP* scip,
221  SCIP_CONS* cons
222  );
223 
225 SCIP_EXPORT
226 SCIP_Real SCIPconsSdpGetMaxSdpCoef(
227  SCIP* scip,
228  SCIP_CONS* cons
229  );
230 
236 SCIP_EXPORT
238  SCIP_CONS* cons
239  );
240 
245 SCIP_EXPORT
247  SCIP* scip,
248  SCIP_CONS* cons,
249  SCIP_SOL* sol,
250  int* length,
252  int* row,
253  int* col,
254  SCIP_Real* val
255  );
256 
258 SCIP_EXPORT
260  SCIP_CONS* cons
261  );
262 
264 SCIP_EXPORT
265 SCIP_RETCODE SCIPconsSdpGetMaxEVSubmat(
266  SCIP_CONS* cons,
267  int** maxevsubmat
269  );
270 
272 SCIP_EXPORT
273 SCIP_Bool SCIPconsSdpAddedQuadCons(
274  SCIP_CONS* cons
275  );
276 
277 #ifdef __cplusplus
278 }
279 #endif
280 
281 #endif
SCIP_EXPORT SCIP_Bool SCIPconsSdpShouldBeRankOne(SCIP_CONS *cons)
Definition: cons_sdp.c:5099
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSdp(SCIP *scip)
Definition: cons_sdp.c:4420
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetFullConstMatrix(SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat)
Definition: cons_sdp.c:4787
SCIP_EXPORT int SCIPconsSdpGetBlocksize(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:4735
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsSdpRank1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, int nnonz, int blocksize, int *nvarnonz, int **col, int **row, SCIP_Real **val, SCIP_VAR **vars, int constnnonz, int *constcol, int *constrow, SCIP_Real *constval)
Definition: cons_sdp.c:5269
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetFullAj(SCIP *scip, SCIP_CONS *cons, int j, SCIP_Real *Aj)
Definition: cons_sdp.c:4752
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsSdp(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, int nnonz, int blocksize, int *nvarnonz, int **col, int **row, SCIP_Real **val, SCIP_VAR **vars, int constnnonz, int *constcol, int *constrow, SCIP_Real *constval)
Definition: cons_sdp.c:5150
SCIP_EXPORT SCIP_Real SCIPconsSdpGetMaxSdpCoef(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:4972
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetData(SCIP *scip, SCIP_CONS *cons, int *nvars, int *nnonz, int *blocksize, int *arraylength, int *nvarnonz, int **col, int **row, SCIP_Real **val, SCIP_VAR **vars, int *constnnonz, int *constcol, int *constrow, SCIP_Real *constval, SCIP_Bool *rankone, int **maxevsubmat, SCIP_Bool *addedquadcons)
Definition: cons_sdp.c:4603
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpCheckSdpCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_RESULT *result)
Definition: cons_sdp.c:540
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSdpRank1(SCIP *scip)
Definition: cons_sdp.c:4513
SCIP_EXPORT int SCIPconsSdpComputeUbSparseSdpMatrixLength(SCIP_CONS *cons)
Definition: cons_sdp.c:5006
SCIP_EXPORT SCIP_Bool SCIPconsSdpAddedQuadCons(SCIP_CONS *cons)
Definition: cons_sdp.c:5135
SCIP_EXPORT SCIP_Real SCIPconsSdpGetMaxConstEntry(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:4956
SCIP_EXPORT int SCIPconsSdpCompLowerTriangPos(int i, int j)
Definition: cons_sdp.c:4585
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetLowerTriangConstMatrix(SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat)
Definition: cons_sdp.c:4821
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGuessInitialPoint(SCIP *scip, SCIP_CONS *cons, SCIP_Real *lambdastar)
Definition: cons_sdp.c:4860
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetMaxEVSubmat(SCIP_CONS *cons, int **maxevsubmat)
Definition: cons_sdp.c:5114
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpComputeSparseSdpMatrix(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, int *length, int *row, int *col, SCIP_Real *val)
Definition: cons_sdp.c:5034
char name[SCIP_MAXSTRLEN]
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetNNonz(SCIP *scip, SCIP_CONS *cons, int *nnonz, int *constnnonz)
Definition: cons_sdp.c:4710