Scippy

SCIP

Solving Constraint Integer Programs

reader_ccg.c
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-2017 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file reader_ccg.c
17  * @brief Graph file reader (actually, only a writer)
18  * @author Marc Pfetsch
19  *
20  * Write a weighted column/variable graph, i.e., the nodes correspond to the columns (variables) of
21  * the constraint matrix. Two nodes are adjacent if the corresponding columns/variables appear
22  * in a common row/constraint (with nonzero coefficient). The weight is obtained by summing for
23  * each row that produces an edge the absolute values of coefficients in the row; hence, we avoid
24  * parallel edges.
25  *
26  * This graph gives an indication of the connectivity structure of the constraint matrix.
27  *
28  * The graph is output in DIMACS graph format.
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #include <stdlib.h>
34 #include <assert.h>
35 #include <string.h>
36 
37 #include "scip/reader_ccg.h"
38 #include "scip/cons_knapsack.h"
39 #include "scip/cons_linear.h"
40 #include "scip/cons_logicor.h"
41 #include "scip/cons_setppc.h"
42 #include "scip/cons_varbound.h"
43 
44 #define READER_NAME "ccgreader"
45 #define READER_DESC "file writer for column connectivity graph file format"
46 #define READER_EXTENSION "ccg"
47 
48 /*
49  * Data structures
50  */
51 
52 
53 /* graph data structure */
54 struct sparseGraph
55 {
56  unsigned int n; /**< number of nodes */
57  unsigned int m; /**< number of edges */
58  int** A; /**< adjacency list (= adjacent nodes) for each node (-1 for end of list) */
59  SCIP_Real** W; /**< weights for each edge */
60  unsigned int* deg; /**< degree each node */
61  unsigned int* size; /**< size of A/w for each node */
62 };
63 
64 typedef struct sparseGraph SparseGraph;
65 
66 
67 /*
68  * Local methods (for writing)
69  */
70 
71 /** initialize graph */
72 static
74  SCIP* scip, /**< SCIP data structure */
75  SparseGraph* G, /**< graph to free */
76  unsigned int nNodes, /**< number of nodes */
77  unsigned int initSize /**< initial size of lists */
78  )
79 {
80  unsigned int i;
81 
82  G->n = nNodes;
83  G->m = 0;
84 
85  SCIP_CALL( SCIPallocBufferArray(scip, &G->deg, (int) nNodes) );
86  SCIP_CALL( SCIPallocBufferArray(scip, &G->size, (int) nNodes) );
87  SCIP_CALL( SCIPallocBufferArray(scip, &G->A, (int) nNodes) );
88  SCIP_CALL( SCIPallocBufferArray(scip, &G->W, (int) nNodes) );
89 
90  for( i = 0; i < nNodes; ++i )
91  {
92  G->deg[i] = 0;
93  G->size[i] = initSize;
94 
95  SCIP_CALL( SCIPallocBufferArray(scip, &(G->A[i]), (int) initSize) ); /*lint !e866 */
96  SCIP_CALL( SCIPallocBufferArray(scip, &(G->W[i]), (int) initSize) ); /*lint !e866 */
97 
98  G->A[i][0] = -1;
99  }
100 
101  return SCIP_OKAY;
102 }
103 
104 
105 /** frees graph */
106 static
108  SCIP* scip, /**< SCIP data structure */
109  SparseGraph* G /**< graph to free */
110  )
111 {
112  unsigned int i;
113 
114  for( i = 0; i < G->n; ++i )
115  {
116  SCIPfreeBufferArray(scip, &G->A[i]);
117  SCIPfreeBufferArray(scip, &G->W[i]);
118  }
119 
120  SCIPfreeBufferArray(scip, &G->W);
121  SCIPfreeBufferArray(scip, &G->A);
122  SCIPfreeBufferArray(scip, &G->size);
123  SCIPfreeBufferArray(scip, &G->deg);
124 }
125 
126 
127 /** check whether there is enough capacity for one additional edge in the given adjacency list */
128 static
130  SCIP* scip, /**< SCIP data structure */
131  SparseGraph* G, /**< graph */
132  unsigned int node /**< list for node */
133  )
134 {
135  if( G->deg[node] + 2 > G->size[node] )
136  {
137  unsigned int newSize;
138  newSize = G->size[node] * 2;
139  SCIP_CALL( SCIPreallocBufferArray(scip, &(G->A[node]), (int) newSize) ); /*lint !e866 */
140  SCIP_CALL( SCIPreallocBufferArray(scip, &(G->W[node]), (int) newSize) ); /*lint !e866 */
141  G->size[node] = newSize;
142  }
143 
144  return SCIP_OKAY;
145 }
146 
147 
148 /** transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant */
149 static
151  SCIP* scip, /**< SCIP data structure */
152  SCIP_VAR** vars, /**< vars array to get active variables for */
153  SCIP_Real* scalars, /**< scalars a_1, ..., a_n inrc/scip/reader_graph.c linear sum a_1*x_1 + ... + a_n*x_n + c */
154  int* nvars, /**< pointer to number of variables and values in vars and vals array */
155  SCIP_Real* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c */
156  SCIP_Bool transformed /**< transformed constraint? */
157  )
158 {
159  int requiredsize;
160  int v;
161 
162  assert( scip != NULL );
163  assert( vars != NULL );
164  assert( scalars != NULL );
165  assert( nvars != NULL );
166  assert( constant != NULL );
167 
168  if( transformed )
169  {
170  SCIP_CALL( SCIPgetProbvarLinearSum(scip, vars, scalars, nvars, *nvars, constant, &requiredsize, TRUE) );
171 
172  if( requiredsize > *nvars )
173  {
174  SCIP_CALL( SCIPreallocBufferArray(scip, &vars, requiredsize) );
175  SCIP_CALL( SCIPreallocBufferArray(scip, &scalars, requiredsize) );
176 
177  SCIP_CALL( SCIPgetProbvarLinearSum(scip, vars, scalars, nvars, requiredsize, constant, &requiredsize, TRUE) );
178  assert( requiredsize <= *nvars );
179  }
180  }
181  else
182  {
183  for( v = 0; v < *nvars; ++v )
184  SCIP_CALL( SCIPvarGetOrigvarSum(&vars[v], &scalars[v], constant) );
185  }
186  return SCIP_OKAY;
187 }
188 
189 
190 /* Generate edges from given row
191  *
192  * We avoid parallel edges. Each row generates a clique in the graph.
193  */
194 static
196  SCIP* scip, /**< SCIP data structure */
197  SCIP_VAR** vars, /**< array of constraint variables */
198  SCIP_Real* vals, /**< array of constraint values */
199  int nvars, /**< number of constraint variables */
200  SparseGraph* G /**< graph */
201  )
202 {
203  int i, j;
204  SCIP_Real w;
205 
206  assert( scip != NULL );
207  assert( nvars > 0 );
208 
209  /* compute weight */
210  w = 0;
211  for( i = 0; i < nvars; ++i )
212  w += ABS(vals[i]);
213 
214  /* generate edges */
215  for( i = 0; i < nvars; ++i )
216  {
217  int s;
218  s = SCIPvarGetProbindex(vars[i]);
219  assert( s >= 0 );
220 
221  for( j = i+1; j < nvars; ++j )
222  {
223  unsigned int k;
224  int t;
225  int a;
226  t = SCIPvarGetProbindex(vars[j]);
227  assert( t >= 0 );
228 
229  /* search whether edge is already present */
230  k = 0;
231  a = G->A[s][k];
232  while( a >= 0 )
233  {
234  /* if we found edge, add weight */
235  if( a == t )
236  {
237  G->W[s][k] += w;
238  break;
239  }
240  a = G->A[s][++k];
241  assert( k <= G->size[s] );
242  }
243 
244  /* add new edge */
245  if( a < 0 )
246  {
247  /* forward edge */
248  SCIP_CALL( ensureEdgeCapacity(scip, G, (unsigned int) s) );
249  k = G->deg[s];
250  assert( G->A[s][k] == -1 );
251 
252  G->A[s][k] = t;
253  G->W[s][k] = w;
254 
255  G->A[s][k+1] = -1; /*lint !e679*/
256  ++G->deg[s];
257 
258  /* backward edge */
259  SCIP_CALL( ensureEdgeCapacity(scip, G, (unsigned int) t) );
260  k = G->deg[t];
261  assert( G->A[t][k] == -1 );
262 
263  G->A[t][k] = s;
264  G->W[t][k] = w;
265 
266  G->A[t][k+1] = -1; /*lint !e679*/
267  ++G->deg[t];
268 
269  /* increase number of edges */
270  ++G->m;
271  }
272  }
273  }
274 
275  return SCIP_OKAY;
276 }
277 
278 
279 /** handle given linear constraint information */
280 static
282  SCIP* scip, /**< SCIP data structure */
283  SCIP_VAR** vars, /**< array of variables */
284  SCIP_Real* vals, /**< array of coefficients values (or NULL if all coefficient values are 1) */
285  int nvars, /**< number of variables */
286  SCIP_Bool transformed, /**< transformed constraint? */
287  SparseGraph* G /**< graph */
288  )
289 {
290  int v;
291  SCIP_VAR** activevars;
292  SCIP_Real* activevals;
293  int nactivevars;
294  SCIP_Real activeconstant = 0.0;
295 
296  assert( scip != NULL );
297  assert( nvars > 0 );
298 
299  /* duplicate variable and value array */
300  nactivevars = nvars;
301  SCIP_CALL( SCIPduplicateBufferArray(scip, &activevars, vars, nactivevars ) );
302  if( vals != NULL )
303  SCIP_CALL( SCIPduplicateBufferArray(scip, &activevals, vals, nactivevars ) );
304  else
305  {
306  SCIP_CALL( SCIPallocBufferArray(scip, &activevals, nactivevars) );
307 
308  for( v = 0; v < nactivevars; ++v )
309  activevals[v] = 1.0;
310  }
311 
312  /* retransform given variables to active variables */
313  SCIP_CALL( getActiveVariables(scip, activevars, activevals, &nactivevars, &activeconstant, transformed) );
314 
315  /* print constraint */
316  SCIP_CALL( createEdgesFromRow(scip, activevars, activevals, nactivevars, G) );
317 
318  /* free buffer arrays */
319  SCIPfreeBufferArray(scip, &activevars);
320  SCIPfreeBufferArray(scip, &activevals);
321 
322  return SCIP_OKAY;
323 }
324 
325 
326 /*
327  * Callback methods of reader
328  */
329 
330 /** copy method for reader plugins (called when SCIP copies plugins) */
331 static
332 SCIP_DECL_READERCOPY(readerCopyCcg)
333 { /*lint --e{715}*/
334  assert(scip != NULL);
335  assert(reader != NULL);
336  assert(strcmp(SCIPreaderGetName(reader), READER_NAME) == 0);
337 
338  /* call inclusion method of reader */
340 
341  return SCIP_OKAY;
342 }
343 
344 
345 /** problem writing method of reader */
346 static
347 SCIP_DECL_READERWRITE(readerWriteCcg)
348 { /*lint --e{715}*/
349 
350  SCIP_CALL( SCIPwriteCcg(scip, file, name, transformed, vars, nvars, conss, nconss, result) );
351 
352  return SCIP_OKAY;
353 }
354 
355 /*
356  * reader specific interface methods
357  */
358 
359 /** includes the ccg file reader in SCIP */
361  SCIP* scip /**< SCIP data structure */
362  )
363 {
364  SCIP_READER* reader;
365 
366  /* include reader */
368 
369  assert(reader != NULL);
370 
371  /* set non-fundamental callbacks via setter functions */
372  SCIP_CALL( SCIPsetReaderCopy(scip, reader, readerCopyCcg) );
373  SCIP_CALL( SCIPsetReaderWrite(scip, reader, readerWriteCcg) );
374 
375  return SCIP_OKAY;
376 }
377 
378 
379 /** writes problem to file */
381  SCIP* scip, /**< SCIP data structure */
382  FILE* file, /**< output file, or NULL if standard output should be used */
383  const char* name, /**< problem name */
384  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
385  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
386  int nvars, /**< number of active variables in the problem */
387  SCIP_CONS** conss, /**< array with constraints of the problem */
388  int nconss, /**< number of constraints in the problem */
389  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
390  )
391 { /*lint --e{715}*/
392  int c;
393  int v;
394  int i;
395 
396  SCIP_CONSHDLR* conshdlr;
397  const char* conshdlrname;
398  SCIP_CONS* cons;
399 
400  SCIP_VAR** consvars;
401  SCIP_Real* consvals;
402  int nconsvars;
403 
404  SparseGraph G;
405 
406  assert( scip != NULL );
407  assert( nvars >= 0 );
408 
409  /* initialize graph */
410  SCIP_CALL( initGraph(scip, &G, (unsigned int) nvars, 10) );
411 
412  /* check all constraints */
413  for( c = 0; c < nconss; ++c)
414  {
415  cons = conss[c];
416  assert( cons != NULL);
417 
418  /* in case the transformed is written only constraint are posted which are enabled in the current node */
419  assert(!transformed || SCIPconsIsEnabled(cons));
420 
421  conshdlr = SCIPconsGetHdlr(cons);
422  assert( conshdlr != NULL );
423 
424  conshdlrname = SCIPconshdlrGetName(conshdlr);
425  assert( transformed == SCIPconsIsTransformed(cons) );
426 
427  if( strcmp(conshdlrname, "linear") == 0 )
428  {
429  consvars = SCIPgetVarsLinear(scip, cons);
430  nconsvars = SCIPgetNVarsLinear(scip, cons);
431  assert( consvars != NULL || nconsvars == 0 );
432 
433  if( nconsvars > 0 )
434  {
435  SCIP_CALL( handleLinearCons(scip, SCIPgetVarsLinear(scip, cons), SCIPgetValsLinear(scip, cons),
436  SCIPgetNVarsLinear(scip, cons), transformed, &G) );
437  }
438  }
439  else if( strcmp(conshdlrname, "setppc") == 0 )
440  {
441  consvars = SCIPgetVarsSetppc(scip, cons);
442  nconsvars = SCIPgetNVarsSetppc(scip, cons);
443  assert( consvars != NULL || nconsvars == 0 );
444 
445  if( nconsvars > 0 )
446  {
447  SCIP_CALL( handleLinearCons(scip, consvars, NULL, nconsvars, transformed, &G) );
448  }
449  }
450  else if( strcmp(conshdlrname, "logicor") == 0 )
451  {
452  consvars = SCIPgetVarsLogicor(scip, cons);
453  nconsvars = SCIPgetNVarsLogicor(scip, cons);
454  assert( consvars != NULL || nconsvars == 0 );
455 
456  if( nconsvars > 0 )
457  {
458  SCIP_CALL( handleLinearCons(scip, SCIPgetVarsLogicor(scip, cons), NULL, SCIPgetNVarsLogicor(scip, cons), transformed, &G) );
459  }
460  }
461  else if( strcmp(conshdlrname, "knapsack") == 0 )
462  {
463  SCIP_Longint* w;
464 
465  consvars = SCIPgetVarsKnapsack(scip, cons);
466  nconsvars = SCIPgetNVarsKnapsack(scip, cons);
467  assert( consvars != NULL || nconsvars == 0 );
468 
469  /* copy Longint array to SCIP_Real array */
470  w = SCIPgetWeightsKnapsack(scip, cons);
471  SCIP_CALL( SCIPallocBufferArray(scip, &consvals, nconsvars) );
472  for( v = 0; v < nconsvars; ++v )
473  consvals[v] = (SCIP_Real)w[v];
474 
475  if( nconsvars > 0 )
476  {
477  SCIP_CALL( handleLinearCons(scip, consvars, consvals, nconsvars, transformed, &G) );
478  }
479  SCIPfreeBufferArray(scip, &consvals);
480  }
481  else if( strcmp(conshdlrname, "varbound") == 0 )
482  {
483  SCIP_CALL( SCIPallocBufferArray(scip, &consvars, 2) );
484  SCIP_CALL( SCIPallocBufferArray(scip, &consvals, 2) );
485 
486  consvars[0] = SCIPgetVarVarbound(scip, cons);
487  consvars[1] = SCIPgetVbdvarVarbound(scip, cons);
488 
489  consvals[0] = 1.0;
490  consvals[1] = SCIPgetVbdcoefVarbound(scip, cons);
491 
492  SCIP_CALL( handleLinearCons(scip, consvars, consvals, 2, transformed, &G) );
493 
494  SCIPfreeBufferArray(scip, &consvars);
495  SCIPfreeBufferArray(scip, &consvals);
496  }
497  else
498  {
499  SCIPwarningMessage(scip, "constraint handler <%s> cannot print requested format\n", conshdlrname );
500  SCIPinfoMessage(scip, file, "\\ ");
501  SCIP_CALL( SCIPprintCons(scip, cons, file) );
502  SCIPinfoMessage(scip, file, ";\n");
503  }
504  }
505 
506  /* output graph */
507  SCIPinfoMessage(scip, file, "c graph generated from %s\n", name);
508  SCIPinfoMessage(scip, file, "p edge %d %d\n", nvars, G.m);
509 
510  for( i = 0; i < nvars; ++i )
511  {
512  unsigned int k;
513  int a;
514 
515  k = 0;
516  a = G.A[i][k];
517  while( a >= 0 )
518  {
519  /* only output edges from lower to higher number */
520  if( i < a )
521  {
522  /* note: node numbers start with 1 in the DIMACS format */
523  SCIPinfoMessage(scip, file, "e %d %d %f\n", i+1, a+1, G.W[i][k]);
524  }
525 
526  a = G.A[i][++k];
527  assert( k <= G.size[i] );
528  }
529  assert( k == G.deg[i] );
530  }
531 
532  freeGraph(scip, &G);
533 
534  *result = SCIP_SUCCESS;
535 
536  return SCIP_OKAY;
537 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
#define READER_DESC
Definition: reader_ccg.c:45
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
Definition: reader_ccg.c:150
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition: cons.c:7978
Constraint handler for variable bound constraints .
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
Definition: cons_setppc.c:9172
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
const char * SCIPreaderGetName(SCIP_READER *reader)
Definition: reader.c:515
#define TRUE
Definition: def.h:63
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
int SCIPvarGetProbindex(SCIP_VAR *var)
Definition: var.c:16862
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition: cons.c:8190
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE ensureEdgeCapacity(SCIP *scip, SparseGraph *G, unsigned int node)
Definition: reader_ccg.c:129
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip.h:21999
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip.h:22003
Constraint handler for the set partitioning / packing / covering constraints .
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip.c:1260
SCIP_RETCODE SCIPincludeReaderCcg(SCIP *scip)
Definition: reader_ccg.c:360
static SCIP_DECL_READERCOPY(readerCopyCcg)
Definition: reader_ccg.c:332
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip.c:1336
Constraint handler for knapsack constraints of the form , x binary and .
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4113
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
#define NULL
Definition: lpi_spx1.cpp:137
#define READER_EXTENSION
Definition: reader_ccg.c:46
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
#define SCIP_CALL(x)
Definition: def.h:316
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
Definition: scip.c:18950
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip.h:21991
#define SCIP_Bool
Definition: def.h:61
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
Definition: scip.c:5236
Column connectivity graph file reader (actually, only a writer)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
Definition: scip.c:28746
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
Definition: cons.c:7901
SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite)))
Definition: scip.c:5346
Constraint handler for linear constraints in their most general form, .
SCIP_RETCODE SCIPwriteCcg(SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
Definition: reader_ccg.c:380
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: var.c:12080
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip.c:5274
static SCIP_RETCODE createEdgesFromRow(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SparseGraph *G)
Definition: reader_ccg.c:195
static void freeGraph(SCIP *scip, SparseGraph *G)
Definition: reader_ccg.c:107
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
Definition: cons_setppc.c:9193
struct sparseGraph SparseGraph
Definition: reader_ccg.c:64
static const SCIP_Real scalars[]
Definition: lp.c:5573
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE initGraph(SCIP *scip, SparseGraph *G, unsigned int nNodes, unsigned int initSize)
Definition: reader_ccg.c:73
#define SCIP_Real
Definition: def.h:145
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE handleLinearCons(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool transformed, SparseGraph *G)
Definition: reader_ccg.c:281
static SCIP_DECL_READERWRITE(readerWriteCcg)
Definition: reader_ccg.c:347
#define SCIP_Longint
Definition: def.h:130
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
#define READER_NAME
Definition: reader_ccg.c:44
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
#define SCIPreallocBufferArray(scip, ptr, num)
Definition: scip.h:21995