SCIP-SDP  4.0.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-2021 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-2021 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 
71 SCIP_EXPORT
72 SCIP_RETCODE SCIPcreateConsSdp(
73  SCIP* scip,
74  SCIP_CONS** cons,
75  const char* name,
76  int nvars,
77  int nnonz,
78  int blocksize,
79  int* nvarnonz,
80  int** col,
81  int** row,
82  SCIP_Real** val,
83  SCIP_VAR** vars,
84  int constnnonz,
85  int* constcol,
86  int* constrow,
87  SCIP_Real* constval,
88  SCIP_Bool removeduplicates
89  );
90 
95 SCIP_EXPORT
96 SCIP_RETCODE SCIPcreateConsSdpRank1(
97  SCIP* scip,
98  SCIP_CONS** cons,
99  const char* name,
100  int nvars,
101  int nnonz,
102  int blocksize,
103  int* nvarnonz,
104  int** col,
105  int** row,
106  SCIP_Real** val,
107  SCIP_VAR** vars,
108  int constnnonz,
109  int* constcol,
110  int* constrow,
111  SCIP_Real* constval,
112  SCIP_Bool removeduplicates
113  );
114 
118 SCIP_EXPORT
120  int i,
121  int j
122  );
123 
130 SCIP_EXPORT
131 SCIP_RETCODE SCIPconsSdpGetData(
132  SCIP* scip,
133  SCIP_CONS* cons,
134  int* nvars,
135  int* nnonz,
136  int* blocksize,
137  int* arraylength,
138  int* nvarnonz,
140  int** col,
141  int** row,
142  SCIP_Real** val,
143  SCIP_VAR** vars,
144  int* constnnonz,
146  int* constcol,
147  int* constrow,
148  SCIP_Real* constval,
149  SCIP_Bool* rankone,
150  int** maxevsubmat,
151  SCIP_Bool* addedquadcons
152  );
153 
158 SCIP_EXPORT
159 SCIP_RETCODE SCIPconsSdpGetNNonz(
160  SCIP* scip,
161  SCIP_CONS* cons,
162  int* nnonz,
163  int* constnnonz
164  );
165 
167 SCIP_EXPORT
169  SCIP* scip,
170  SCIP_CONS* cons
171  );
172 
174 SCIP_EXPORT
175 SCIP_VAR** SCIPconsSdpGetVars(
176  SCIP* scip,
177  SCIP_CONS* cons
178  );
179 
181 SCIP_EXPORT
183  SCIP* scip,
184  SCIP_CONS* cons
185  );
186 
188 SCIP_EXPORT
189 SCIP_RETCODE SCIPconsSdpGetFullAj(
190  SCIP* scip,
191  SCIP_CONS* cons,
192  int j,
193  SCIP_Real* Aj
194  );
195 
197 SCIP_EXPORT
198 SCIP_RETCODE SCIPconsSdpGetFullConstMatrix(
199  SCIP* scip,
200  SCIP_CONS* cons,
201  SCIP_Real* mat
202  );
203 
205 SCIP_EXPORT
207  SCIP* scip,
208  SCIP_CONS* cons,
209  SCIP_Real* mat
210  );
211 
222 SCIP_EXPORT
223 SCIP_RETCODE SCIPconsSdpGuessInitialPoint(
224  SCIP* scip,
225  SCIP_CONS* cons,
226  SCIP_Real* lambdastar
227  );
228 
230 SCIP_EXPORT
232  SCIP* scip,
233  SCIP_CONS* cons
234  );
235 
237 SCIP_EXPORT
238 SCIP_Real SCIPconsSdpGetMaxSdpCoef(
239  SCIP* scip,
240  SCIP_CONS* cons
241  );
242 
248 SCIP_EXPORT
250  SCIP_CONS* cons
251  );
252 
257 SCIP_EXPORT
259  SCIP* scip,
260  SCIP_CONS* cons,
261  SCIP_SOL* sol,
262  int* length,
264  int* row,
265  int* col,
266  SCIP_Real* val
267  );
268 
270 SCIP_EXPORT
272  SCIP_CONS* cons
273  );
274 
276 SCIP_EXPORT
277 SCIP_RETCODE SCIPconsSdpGetMaxEVSubmat(
278  SCIP_CONS* cons,
279  int** maxevsubmat
281  );
282 
284 SCIP_EXPORT
285 SCIP_Bool SCIPconsSdpAddedQuadCons(
286  SCIP_CONS* cons
287  );
288 
289 #ifdef __cplusplus
290 }
291 #endif
292 
293 #endif
SCIP_EXPORT SCIP_Bool SCIPconsSdpShouldBeRankOne(SCIP_CONS *cons)
Definition: cons_sdp.c:8513
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSdp(SCIP *scip)
Definition: cons_sdp.c:7664
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetFullConstMatrix(SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat)
Definition: cons_sdp.c:8201
SCIP_EXPORT int SCIPconsSdpGetBlocksize(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:8149
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetFullAj(SCIP *scip, SCIP_CONS *cons, int j, SCIP_Real *Aj)
Definition: cons_sdp.c:8166
SCIP_EXPORT SCIP_Real SCIPconsSdpGetMaxSdpCoef(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:8386
SCIP_EXPORT int SCIPconsSdpGetNVars(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:8115
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, SCIP_Bool removeduplicates)
Definition: cons_sdp.c:8567
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:7983
SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSdpRank1(SCIP *scip)
Definition: cons_sdp.c:7853
SCIP_EXPORT int SCIPconsSdpComputeUbSparseSdpMatrixLength(SCIP_CONS *cons)
Definition: cons_sdp.c:8420
SCIP_EXPORT SCIP_Bool SCIPconsSdpAddedQuadCons(SCIP_CONS *cons)
Definition: cons_sdp.c:8549
SCIP_EXPORT SCIP_Real SCIPconsSdpGetMaxConstEntry(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:8370
SCIP_EXPORT int SCIPconsSdpCompLowerTriangPos(int i, int j)
Definition: cons_sdp.c:7965
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, SCIP_Bool removeduplicates)
Definition: cons_sdp.c:8794
SCIP_EXPORT SCIP_VAR ** SCIPconsSdpGetVars(SCIP *scip, SCIP_CONS *cons)
Definition: cons_sdp.c:8132
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetLowerTriangConstMatrix(SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat)
Definition: cons_sdp.c:8235
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGuessInitialPoint(SCIP *scip, SCIP_CONS *cons, SCIP_Real *lambdastar)
Definition: cons_sdp.c:8274
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetMaxEVSubmat(SCIP_CONS *cons, int **maxevsubmat)
Definition: cons_sdp.c:8528
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:8448
SCIP_EXPORT SCIP_RETCODE SCIPconsSdpGetNNonz(SCIP *scip, SCIP_CONS *cons, int *nnonz, int *constnnonz)
Definition: cons_sdp.c:8090