GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
hyperrowgraph_def.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* GCG --- Generic Column Generation */
5/* a Dantzig-Wolfe decomposition based extension */
6/* of the branch-cut-and-price framework */
7/* SCIP --- Solving Constraint Integer Programs */
8/* */
9/* Copyright (C) 2010-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file hyperrowgraph_def.h
30 * @brief Column hypergraph
31 * @author Martin Bergner
32 * @author Annika Thome
33 *
34 * Hypergraph with a node for every variable and a hyperedge for every constraint
35 */
36
37/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
38//#define SCIP_DEBUG
39
40#ifndef GCG_HYPERROWGRAPH_DEF_H_
41#define GCG_HYPERROWGRAPH_DEF_H_
42
43#include "graph/hyperrowgraph.h"
44#include "gcg/scip_misc.h"
47#include <set>
48#include <algorithm>
49#include <iostream>
50
51namespace gcg
52{
53template <class T>
55 GCG* gcgstruct, /**< GCG data structure */
56 Weights w /**< weights for the given graph */
57): MatrixGraph<T>(gcgstruct, w), graph(gcgstruct)
58{
59 this->graphiface = &graph;
60 this->name = std::string("hyperrow");
61}
62
63template <class T>
65{
66 // TODO Auto-generated destructor stub
67}
68
69
70/** writes the graph to the given file.
71 * The format is graph dependent
72 */
73template <class T>
75 int fd, /**< filename where the graph should be written to */
76 SCIP_Bool edgeweights /**< whether to write edgeweights */
77 )
78{
79 FILE* file;
80 SCIP* scip = GCGgetOrigprob(this->gcg);
81 file = fdopen(fd, "w");
82 if( file == NULL )
84
85 SCIPinfoMessage(scip, file, "%d %d %d\n", getNEdges(), getNNodes()+this->dummynodes, edgeweights ? 1 :0);
86
87 for( int i = 0; i < getNEdges(); ++i )
88 {
89 std::vector<int> neighbors = getHyperedgeNodes(i);
90
91 if( edgeweights )
92 {
93 SCIPinfoMessage(scip, file, "%d ", graph.getWeight(i+this->nvars));
94 }
95 for( size_t j = 0; j < neighbors.size(); ++j )
96 {
97 SCIPinfoMessage(scip, file, "%d ",neighbors[j]+1);
98 }
99 SCIPinfoMessage(scip, file, "\n");
100 }
101
102 if( !fclose(file) )
103 return SCIP_OKAY;
104 else
105 return SCIP_WRITEERROR;
106}
107
108template <class T>
110{
111 return this->nconss;
112}
113
114template <class T>
116{
117 return this->nvars;
118}
119
120template <class T>
122 int i
123 )
124{
125 assert(i >= 0);
126 assert(i < getNNodes());
127
128 return graph.getNNeighbors(i);
129}
130
131template <class T>
133 int i
134 )
135{
136 assert(i >= 0);
137 assert(i < getNEdges());
138
139 std::vector<int> neighbors = graph.getHyperedgeNodes(i);
140 return neighbors;
141}
142
143template <class T>
145 GCG_DECOMP** decomp /**< decomposition structure to generate */
146 )
147{
148 int nblocks;
149 SCIP_HASHMAP* constoblock = NULL;
150 SCIP* scip = GCGgetOrigprob(this->gcg);
151 int* nsubscipconss = NULL;
152 int i;
153 SCIP_CONS** conss = NULL;
154 SCIP_Bool emptyblocks = FALSE;
155 std::vector<int> partition = graph.getPartition();
156 conss = SCIPgetConss(scip);
157 nblocks = *(std::max_element(partition.begin(), partition.end()))+1;
158
159 SCIP_CALL( SCIPallocBufferArray(scip, &nsubscipconss, nblocks) );
160 BMSclearMemoryArray(nsubscipconss, nblocks);
161
162 SCIP_CALL( SCIPhashmapCreate(&constoblock, SCIPblkmem(scip), this->nconss) );
163
164 /* assign constraints to partition */
165 for( i = 0; i < this->nconss; i++ )
166 {
167
168 std::set<int> blocks;
169 std::vector<int> neighbors = getHyperedgeNodes(i);
170 for( size_t k = 0; k < neighbors.size(); ++k )
171 {
172 if( partition[neighbors[k]] >= 0 )
173 blocks.insert(partition[neighbors[k]]);
174 }
175 if( blocks.size() > 1 )
176 {
177 SCIP_CALL( SCIPhashmapInsert(constoblock, conss[i], (void*) (size_t) (nblocks+1)) );
178 }
179 else
180 {
181 int block = *(blocks.begin());
182 SCIP_CALL( SCIPhashmapInsert(constoblock, conss[i], (void*) (size_t) (block +1)) );
183 ++(nsubscipconss[block]);
184 }
185 }
186
187 /* first, make sure that there are constraints in every block, otherwise the hole thing is useless */
188 for( i = 0; i < nblocks; ++i )
189 {
190 if( nsubscipconss[i] == 0 )
191 {
192 SCIPdebugMessage("Block %d does not have any constraints!\n", i);
193 emptyblocks = TRUE;
194 }
195 }
196
197 if( !emptyblocks )
198 {
199 SCIP_CALL( GCGdecompCreate(this->gcg, decomp) );
200 SCIP_CALL( GCGfilloutDecompFromConstoblock(this->gcg, *decomp, constoblock, nblocks, FALSE) );
201 }
202 else {
203 SCIPhashmapFree(&constoblock);
204 *decomp = NULL;
205 }
206
207 SCIPfreeBufferArray(scip, &nsubscipconss);
208 return SCIP_OKAY;
209}
210
211template <class T>
213 PARTIALDECOMP** firstpartialdec,
214 PARTIALDECOMP** secondpartialdec,
215 DETPROBDATA* detprobdata
216 )
217{
218 int nblocks;
219 SCIP_HASHMAP* constoblock = NULL;
220 SCIP* scip = GCGgetOrigprob(this->gcg);
221 int* nsubscipconss = NULL;
222 int i;
223 SCIP_CONS** conss = NULL;
224 SCIP_Bool emptyblocks = FALSE;
225 std::vector<int> partition;
226
227 if( firstpartialdec == NULL && secondpartialdec == NULL )
228 return SCIP_INVALIDDATA;
229
230 partition = graph.getPartition();
231 conss = SCIPgetConss(scip);
232 nblocks = *(std::max_element(partition.begin(), partition.end()))+1;
233
234 SCIP_CALL( SCIPallocBufferArray(scip, &nsubscipconss, nblocks) );
235 BMSclearMemoryArray(nsubscipconss, nblocks);
236
237 SCIP_CALL( SCIPhashmapCreate(&constoblock, SCIPblkmem(scip), this->nconss) );
238
239 /* assign constraints to partition */
240 for( i = 0; i < this->nconss; i++ )
241 {
242
243 std::set<int> blocks;
244 std::vector<int> neighbors = getHyperedgeNodes(i);
245 for( size_t k = 0; k < neighbors.size(); ++k )
246 {
247 if( partition[neighbors[k]] >= 0 )
248 blocks.insert(partition[neighbors[k]]);
249 }
250 if( blocks.size() > 1 )
251 {
252 SCIP_CALL( SCIPhashmapInsert(constoblock, (void*) (size_t)detprobdata->getIndexForCons(conss[i]), (void*) (size_t) (nblocks+1)) );
253 }
254 else
255 {
256 int block = *(blocks.begin());
257 SCIP_CALL( SCIPhashmapInsert(constoblock, (void*) (size_t)detprobdata->getIndexForCons(conss[i]), (void*) (size_t) (block +1)) );
258 ++(nsubscipconss[block]);
259 }
260 }
261
262 /* first, make sure that there are constraints in every block, otherwise the hole thing is useless */
263 for( i = 0; i < nblocks; ++i )
264 {
265 if( nsubscipconss[i] == 0 )
266 {
267 SCIPdebugMessage("Block %d does not have any constraints!\n", i);
268 emptyblocks = TRUE;
269 }
270 }
271
272 if( !emptyblocks )
273 {
274 bool original = detprobdata->isAssignedToOrigProb();
275 if( firstpartialdec != NULL )
276 {
277 (*firstpartialdec) = new PARTIALDECOMP(this->gcg, original);
278 SCIP_CALL((*firstpartialdec)->filloutPartialdecFromConstoblock(constoblock, nblocks));
279 }
280 if( secondpartialdec != NULL )
281 {
282 (*secondpartialdec) = new PARTIALDECOMP(this->gcg, original);
283 SCIP_CALL((*secondpartialdec)->filloutBorderFromConstoblock(constoblock, nblocks));
284 }
285 SCIPhashmapFree(&constoblock);
286 }
287 else {
288 SCIPhashmapFree(&constoblock);
289 if( firstpartialdec != NULL )
290 {
291 *firstpartialdec = NULL;
292 }
293 if( secondpartialdec != NULL )
294 {
295 *secondpartialdec = NULL;
296 }
297 }
298
299 SCIPfreeBufferArray(scip, &nsubscipconss);
300 return SCIP_OKAY;
301}
302
303template <class T>
305 PARTIALDECOMP* oldpartialdec,
306 PARTIALDECOMP** firstpartialdec,
307 PARTIALDECOMP** secondpartialdec,
308 DETPROBDATA* detprobdata
309 )
310{
311 int nblocks;
312 SCIP_HASHMAP* constoblock = NULL;
313 SCIP* scip = GCGgetOrigprob(this->gcg);
314 int *nsubscipconss = NULL;
315 int i;
316 SCIP_Bool emptyblocks = FALSE;
317
318 assert(oldpartialdec != NULL);
319
320 if( firstpartialdec == NULL && secondpartialdec == NULL )
321 return SCIP_INVALIDDATA;
322
323 if( this->nconss == 0 )
324 {
325 if( firstpartialdec != NULL )
326 (*firstpartialdec) = NULL;
327 if( secondpartialdec != NULL )
328 (*secondpartialdec) = NULL;
329 return SCIP_OKAY;
330 }
331
332 std::vector<int> partition = graph.getPartition();
333 nblocks = *(std::max_element(partition.begin(), partition.end()))+1;
334
335 SCIP_CALL( SCIPallocBufferArray(scip, &nsubscipconss, nblocks) );
336 BMSclearMemoryArray(nsubscipconss, nblocks);
337
338 for( int b = 0; b < nblocks; ++b )
339 {
340 nsubscipconss[b] = 0;
341 }
342
343 SCIP_CALL( SCIPhashmapCreate(&constoblock, SCIPblkmem(scip), this->nconss) );
344
345 //fillout conssForGraph
346 vector<int> conssForGraph; /** stores the conss included by the graph */
347 vector<bool> conssBool(oldpartialdec->getNConss(), false); /**< true, if the cons will be part of the graph */
348 bool found;
349
350 for( int c = 0; c < oldpartialdec->getNOpenconss(); ++c )
351 {
352 int cons = oldpartialdec->getOpenconss()[c];
353 found = false;
354 for( int v = 0; v < oldpartialdec->getNOpenvars() && !found; ++v )
355 {
356 int var = oldpartialdec->getOpenvars()[v];
357 for( i = 0; i < detprobdata->getNVarsForCons(cons) && !found; ++i )
358 {
359 if( var == detprobdata->getVarsForCons(cons)[i] )
360 {
361 conssBool[cons] = true;
362 found = true;
363 }
364 }
365 }
366 }
367
368 for( int c = 0; c < oldpartialdec->getNOpenconss(); ++c )
369 {
370 int cons = oldpartialdec->getOpenconss()[c];
371 if( conssBool[cons] )
372 conssForGraph.push_back(cons);
373 }
374
375 /* assign constraints to partition */
376 for( i = 0; i < this->nconss; i++ )
377 {
378
379 std::set<int> blocks;
380 std::vector<int> neighbors = getHyperedgeNodes(i);
381 for( size_t k = 0; k < neighbors.size(); ++k )
382 {
383 if( partition[neighbors[k]] >= 0 )
384 blocks.insert(partition[neighbors[k]]);
385 }
386 if( blocks.size() > 1 )
387 {
388 SCIP_CALL( SCIPhashmapInsert(constoblock, (void*) (size_t) conssForGraph[i], (void*) (size_t) (nblocks+1)) );
389 }
390 else
391 {
392 int block = *(blocks.begin());
393 SCIP_CALL( SCIPhashmapInsert(constoblock, (void*) (size_t) conssForGraph[i], (void*) (size_t) (block +1)) );
394 ++(nsubscipconss[block]);
395 }
396 }
397
398 /* first, make sure that there are constraints in every block, otherwise the hole thing is useless */
399 for( i = 0; i < nblocks; ++i )
400 {
401 if( nsubscipconss[i] == 0 )
402 {
403 SCIPdebugMessage("Block %d does not have any constraints!\n", i);
404 emptyblocks = TRUE;
405 }
406 }
407
408 if( !emptyblocks )
409 {
410 if( firstpartialdec != NULL )
411 {
412 (*firstpartialdec) = new PARTIALDECOMP(oldpartialdec);
413 SCIP_CALL( (*firstpartialdec)->assignPartialdecFromConstoblock(constoblock, nblocks) );
414 }
415 if( secondpartialdec != NULL )
416 {
417 (*secondpartialdec) = new PARTIALDECOMP(oldpartialdec);
418 SCIP_CALL( (*secondpartialdec)->assignBorderFromConstoblock(constoblock, nblocks) );
419 }
420 SCIPhashmapFree(&constoblock);
421 }
422 else
423 {
424 SCIPhashmapFree(&constoblock);
425 *firstpartialdec = NULL;
426 *secondpartialdec = NULL;
427 }
428
429 SCIPfreeBufferArray(scip, &nsubscipconss);
430 return SCIP_OKAY;
431}
432
433template <class T>
435 SCIP_CONS** conss, /**< constraints for which graph should be created */
436 SCIP_VAR** vars, /**< variables for which graph should be created */
437 int nconss_, /**< number of constraints */
438 int nvars_ /**< number of variables */
439 )
440{
441 int i;
442 int j;
444 SCIP* scip = GCGgetOrigprob(this->gcg);
445
446 assert(conss != NULL);
447 assert(vars != NULL);
448 assert(nvars_ > 0);
449 assert(nconss_ > 0);
450
451 this->nvars = nvars_;
452 this->nconss = nconss_;
453
454 /* go through all variables */
455 for( i = 0; i < this->nvars; ++i )
456 {
457 TCLIQUE_WEIGHT weight;
458
459 /* calculate weight of node */
460 weight = this->weights.calculate(vars[i]);
461
462 this->graph.addNode(i, weight);
463 }
464
465 /* go through all constraints */
466 for( i = 0; i < this->nconss; ++i )
467 {
468 SCIP_VAR** curvars = NULL;
469 std::vector<int> hyperedge;
470 TCLIQUE_WEIGHT weight;
471
472 int ncurvars;
473 SCIP_CALL( SCIPgetConsNVars(scip, conss[i], &ncurvars, &success) );
475 if( ncurvars == 0 )
476 continue;
477
478 /*
479 * may work as is, as we are copying the constraint later regardless
480 * if there are variables in it or not
481 */
482 SCIP_CALL( SCIPallocBufferArray(scip, &curvars, ncurvars) );
483 SCIP_CALL( SCIPgetConsVars(scip, conss[i], curvars, ncurvars, &success) );
485
486 /** @todo skip all variables that have a zero coeffient or where all coefficients add to zero */
487 /** @todo Do more then one entry per variable actually work? */
488
489 for( j = 0; j < ncurvars; ++j )
490 {
491 SCIP_VAR* var1 = NULL;
492 int varIndex1;
493
495 var1 = SCIPvarGetProbvar(curvars[j]);
496 else
497 var1 = curvars[j];
498
499 if( !GCGisVarRelevant(var1) )
500 continue;
501
502 assert(var1 != NULL);
503 varIndex1 = SCIPvarGetProbindex(var1);
504 assert(varIndex1 >= 0);
505 assert(varIndex1 < this->nvars);
506
507 hyperedge.insert(hyperedge.end(), varIndex1);
508 }
509 /* calculate weight of hyperedge */
510 weight = this->weights.calculate(conss[i]);
511
512 this->graph.addHyperedge(hyperedge, weight);
513
514 SCIPfreeBufferArray(scip, &curvars);
515 }
516
517
518
519 this->graph.flush();
520 return SCIP_OKAY;
521}
522
523
524
525template <class T>
527 DETPROBDATA* detprobdata,
528 PARTIALDECOMP* partialdec
529 )
530{
531 int i;
532 int j;
533 unordered_map<int, int> oldToNewVarIndex;
534 TCLIQUE_WEIGHT weight;
535
536 vector<bool> varsBool(partialdec->getNVars(), false); /**< true, if the var will be part of the graph */
537 vector<bool> conssBool(partialdec->getNConss(), false); /**< true, if the cons will be part of the graph */
538 vector<int> conssForGraph; /** stores the conss included by the graph */
539 vector<int> varsForGraph; /** stores the vars included by the graph */
540
541 //fillout conssForGraph and varsForGraph
542 for(int c = 0; c < partialdec->getNOpenconss(); ++c)
543 {
544 int cons = partialdec->getOpenconss()[c];
545 for(int v = 0; v < partialdec->getNOpenvars(); ++v)
546 {
547 int var = partialdec->getOpenvars()[v];
548 for(i = 0; i < detprobdata->getNVarsForCons(cons); ++i)
549 {
550 if(var == detprobdata->getVarsForCons(cons)[i])
551 {
552 varsBool[var] = true;
553 conssBool[cons] = true;
554 }
555 }
556 }
557 }
558
559 for(int v = 0; v < partialdec->getNOpenvars(); ++v)
560 {
561 int var = partialdec->getOpenvars()[v];
562 if(varsBool[var])
563 varsForGraph.push_back(var);
564 }
565 for(int c = 0; c < partialdec->getNOpenconss(); ++c)
566 {
567 int cons = partialdec->getOpenconss()[c];
568 if(conssBool[cons])
569 conssForGraph.push_back(cons);
570 }
571
572 this->nconss = (int)conssForGraph.size();
573 this->nvars = (int)varsForGraph.size();
574
575 /* go through all variables */
576 for( i = 0; i < this->nvars; ++i )
577 {
578 int oldVarId = varsForGraph[i];
579 assert(varsBool[oldVarId]);
580
581 /* calculate weight of node */
582 weight = this->weights.calculate(detprobdata->getVar(oldVarId));
583
584 oldToNewVarIndex.insert({oldVarId,i});
585 this->graph.addNode(i, weight);
586 }
587
588 /* go through all open constraints */
589 for( i = 0; i < this->nconss; ++i )
590 {
591 std::vector<int> hyperedge;
592 int oldConsId = conssForGraph[i];
593
594 assert(conssBool[oldConsId]);
595
596 for( j = 0; j < detprobdata->getNVarsForCons(oldConsId); ++j )
597 {
598 int oldVarId = detprobdata->getVarsForCons(oldConsId)[j];
599 if(!varsBool[oldVarId])
600 continue;
601 hyperedge.insert(hyperedge.end(), oldToNewVarIndex[oldVarId]);
602 }
603 /* calculate weight of hyperedge */
604 weight = this->weights.calculate(detprobdata->getCons(oldConsId));
605 this->graph.addHyperedge(hyperedge, weight);
606 }
607
608
609 this->graph.flush();
610 return SCIP_OKAY;
611}
612
613
614} /* namespace gcg */
615
616#endif
SCIP_VAR * w
SCIP_VAR ** b
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
GCG_EXPORT int getIndexForCons(SCIP_CONS *cons)
returns the constraint index related to a SCIP constraint
GCG_EXPORT int getNVarsForCons(int consIndex)
returns the number of variables for a given constraint
GCG_EXPORT SCIP_VAR * getVar(int varIndex)
returns SCIP variable related to a variable index
GCG_EXPORT std::vector< int > & getVarsForCons(int consIndex)
returns the variable indices of the coefficient matrix for a constraint
GCG_EXPORT SCIP_CONS * getCons(int consIndex)
returns the SCIP constraint related to a constraint index
GCG_EXPORT SCIP_Bool isAssignedToOrigProb()
returns true if the matrix structure corresponds to the presolved problem
SCIP_RETCODE writeToFile(int fd, SCIP_Bool edgeweights)
virtual SCIP_RETCODE createDecompFromPartition(GCG_DECOMP **decomp)
HyperrowGraph(GCG *gcg, Weights w)
virtual SCIP_RETCODE createPartialdecFromPartition(PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata)
virtual SCIP_RETCODE createFromMatrix(SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_)
virtual int getNNeighbors(int i)
virtual SCIP_RETCODE createFromPartialMatrix(DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec)
virtual std::vector< int > getHyperedgeNodes(int i)
MatrixGraph(GCG *gcgstruct, Weights w)
std::string name
Definition matrixgraph.h:57
GraphInterface * graphiface
Definition matrixgraph.h:64
class to manage partial decompositions
GCG_EXPORT int getNConss()
Gets the number of constraints.
GCG_EXPORT int getNOpenvars()
Gets size of vector containing variables not assigned yet.
GCG_EXPORT PARTIALDECOMP(GCG *gcgstruct, bool originalProblem)
Standard constructor, creates empty partialdec with unique id.
GCG_EXPORT int getNOpenconss()
Gets size of vector containing constraints not assigned yet.
GCG_EXPORT int getNVars()
Gets number of vars.
GCG_EXPORT std::vector< int > & getOpenconss()
Gets vector containing constraints not assigned yet.
GCG_EXPORT std::vector< int > & getOpenvars()
Gets vector containing variables not assigned yet.
SCIP_RETCODE GCGfilloutDecompFromConstoblock(GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
Definition decomp.c:1479
SCIP_RETCODE GCGdecompCreate(GCG *gcg, GCG_DECOMP **decdecomp)
Definition decomp.c:480
#define SCIP_Bool
#define TRUE
#define FALSE
SCIP * GCGgetOrigprob(GCG *gcg)
Definition gcg.cpp:87
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool GCGisVarRelevant(SCIP_VAR *var)
Definition scip_misc.c:42
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIP_VAR * var
SCIP_VAR ** vars
int j
SCIP_Bool success
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
int i
SCIPfreeBufferArray(scip, &cycles)
Column hypergraph.
#define NULL
#define BMSclearMemoryArray(ptr, num)
various SCIP helper methods
int TCLIQUE_WEIGHT
struct SCIP_Cons SCIP_CONS
struct GCG_Decomp GCG_DECOMP
Definition type_decomp.h:45
struct Gcg GCG
Definition type_gcg.h:44
struct SCIP_HashMap SCIP_HASHMAP
SCIP_FILECREATEERROR
SCIP_INVALIDDATA
SCIP_WRITEERROR
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
SCIP_STAGE_TRANSFORMED
struct SCIP_Var SCIP_VAR