GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
pub_decomp.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 pub_decomp.h
30 * @ingroup PUBLICCOREAPI
31 * @brief public methods for working with decomposition structures
32 * @author Martin Bergner
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36#ifndef GCG_PUB_DECOMP_H__
37#define GCG_PUB_DECOMP_H__
38
39#include "gcg/def.h"
40#include "gcg/type_gcg.h"
41#include "gcg/type_decomp.h"
42#include "scip/type_scip.h"
43#include "scip/type_retcode.h"
44#include "scip/type_var.h"
45#include "scip/type_cons.h"
46#include "scip/type_misc.h"
47
48#include "gcg/type_detector.h"
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54/**
55 * @ingroup DECOMP
56 * @{
57 */
58
59/** score data structure
60 * @ingroup DATASTRUCTURES
61**/
63{
64 SCIP_Real borderscore; /**< score of the border */
65 SCIP_Real densityscore; /**< score of block densities */
66 SCIP_Real linkingscore; /**< score related to interlinking blocks */
67 SCIP_Real totalscore; /**< accumulated score */
68 SCIP_Real maxwhitescore; /**< score related to max white measure (i.e. fraction of white (nonblock and nonborder) matrix area ) */
69};
70typedef struct Dec_Scores DEC_SCORES;
71
72/** converts the GCG_DECTYPE enum to a string */
73const char *GCGdecompGetStrType(
74 GCG_DECTYPE type /**< decomposition type */
75 );
76
77/** initializes the decomposition to absolutely nothing */
80 GCG* gcg, /**< GCG data structure */
81 GCG_DECOMP** decomp /**< pointer to the decomposition data structure */
82 );
83
84/** frees the decomposition */
87 GCG* gcg, /**< GCG data structure */
88 GCG_DECOMP** decomp /**< pointer to the decomposition data structure */
89 );
90
91/** sets the type of the decomposition */
94 GCG_DECOMP* decomp, /**< decomposition data structure */
95 GCG_DECTYPE type /**< type of the decomposition */
96 );
97
98/** gets the type of the decomposition */
101 GCG_DECOMP* decomp /**< decomposition data structure */
102 );
103
106 GCG_DECOMP* decomp /**< decomposition data structure */
107 );
108
111 GCG* gcg, /**< GCG data structure */
112 GCG_DECOMP* decomp, /**< decomposition data structure */
113 SCIP_Real maxwhitescore /**< score related to max white measure (i.e. fraction of white (nonblock and nonborder) matrix area ) */
114 );
115
116/** sets the presolved flag for decomposition */
119 GCG_DECOMP* decomp, /**< decomposition data structure */
120 SCIP_Bool presolved /**< presolved flag for decomposition */
121 );
122
123/** gets the presolved flag for decomposition */
126 GCG_DECOMP* decomp /**< decomposition data structure */
127 );
128
129/** sets the number of blocks for decomposition */
132 GCG_DECOMP* decomp, /**< decomposition data structure */
133 int nblocks /**< number of blocks for decomposition */
134 );
135
136/** gets the number of blocks for decomposition */
139 GCG_DECOMP* decomp /**< decomposition data structure */
140 );
141
142/** copies the input subscipvars array to the given decomposition */
145 GCG* gcg, /**< GCG data structure */
146 GCG_DECOMP* decomp, /**< decomposition data structure */
147 SCIP_VAR*** subscipvars, /**< subscipvars array */
148 int* nsubscipvars /**< number of subscipvars per block */
149 );
150
151/** returns the subscipvars array of the given decomposition */
154 GCG_DECOMP* decomp /**< decomposition data structure */
155 );
156
157/** returns the nsubscipvars array of the given decomposition */
160 GCG_DECOMP* decomp /**< decomposition data structure */
161 );
162
163/** copies the input subscipconss array to the given decomposition */
166 GCG* gcg, /**< GCG data structure */
167 GCG_DECOMP* decomp, /**< decomposition data structure */
168 SCIP_CONS*** subscipconss, /**< subscipconss array */
169 int* nsubscipconss /**< number of subscipconss per block */
170 );
171
172/** returns the subscipconss array of the given decomposition */
175 GCG_DECOMP* decomp /**< decomposition data structure */
176 );
177
178/** returns the nsubscipconss array of the given decomposition */
181 GCG_DECOMP* decomp /**< decomposition data structure */
182 );
183
184/** copies the input linkingconss array to the given decomposition */
187 GCG* gcg, /**< GCG data structure */
188 GCG_DECOMP* decomp, /**< decomposition data structure */
189 SCIP_CONS** linkingconss, /**< linkingconss array */
190 int nlinkingconss /**< number of linkingconss per block */
191 );
192
193/** returns the linkingconss array of the given decomposition */
196 GCG_DECOMP* decomp /**< decomposition data structure */
197 );
198
199/** returns the nlinkingconss array of the given decomposition */
202 GCG_DECOMP* decomp /**< decomposition data structure */
203 );
204
205/** copies the input linkingvars array to the given decomposition */
208 GCG* gcg, /**< GCG data structure */
209 GCG_DECOMP* decomp, /**< decomposition data structure */
210 SCIP_VAR** linkingvars, /**< linkingvars array */
211 int nlinkingvars, /**< number of linkingvars per block */
212 int nfixedlinkingvars, /**< number of linking variables that are fixed */
213 int nmastervars /**< number of linkingvars that are purely master variables */
214 );
215
216/** returns the linkingvars array of the given decomposition */
219 GCG_DECOMP* decomp /**< decomposition data structure */
220 );
221
222/** returns the number of master variables of the given decomposition */
225 GCG_DECOMP* decomp /**< decomposition data structure */
226 );
227
228
229/** returns the nlinkingvars array of the given decomposition */
232 GCG_DECOMP* decomp /**< decomposition data structure */
233 );
234
235/** returns the nlinkingvars array of the given decomposition */
238 GCG_DECOMP* decomp /**< decomposition data structure */
239 );
240
241
242/** copies the input stairlinkingvars array to the given decomposition */
245 GCG* gcg, /**< GCG data structure */
246 GCG_DECOMP* decomp, /**< decomposition data structure */
247 SCIP_VAR*** stairlinkingvars, /**< stairlinkingvars array */
248 int* nstairlinkingvars /**< number of linkingvars per block */
249 );
250
251/** returns the stairlinkingvars array of the given decomposition */
254 GCG_DECOMP* decomp /**< decomposition data structure */
255 );
256
257/** returns the nstairlinkingvars array of the given decomposition */
260 GCG_DECOMP* decomp /**< decomposition data structure */
261 );
262
263/** returns the total number of stairlinkingvars array of the given decomposition */
266 GCG_DECOMP* decomp /**< decomposition data structure */
267 );
268
269
270/** sets the vartoblock hashmap of the given decomposition */
273 GCG_DECOMP* decomp, /**< decomposition data structure */
274 SCIP_HASHMAP* vartoblock /**< Vartoblock hashmap */
275 );
276
277/** returns the vartoblock hashmap of the given decomposition */
280 GCG_DECOMP* decomp /**< decomposition data structure */
281 );
282
283/** sets the constoblock hashmap of the given decomposition */
286 GCG_DECOMP* decomp, /**< decomposition data structure */
287 SCIP_HASHMAP* constoblock /**< Constoblock hashmap */
288 );
289
290/** returns the constoblock hashmap of the given decomposition */
293 GCG_DECOMP* decomp /**< decomposition data structure */
294 );
295
296/** sets the varindex hashmap of the given decomposition */
299 GCG_DECOMP* decomp, /**< decomposition data structure */
300 SCIP_HASHMAP* varindex /**< Varindex hashmap */
301 );
302
303/** returns the varindex hashmap of the given decomposition */
306 GCG_DECOMP* decomp /**< decomposition data structure */
307 );
308
309/** sets the consindex hashmap of the given decomposition */
312 GCG_DECOMP* decomp, /**< decomposition data structure */
313 SCIP_HASHMAP* consindex /**< Consindex hashmap */
314 );
315
316/** returns the consindex hashmap of the given decomposition */
319 GCG_DECOMP* decomp /**< decomposition data structure */
320 );
321
322/** completely initializes decomposition structure from the values of the hashmaps */
325 GCG* gcg, /**< GCG data structure */
326 GCG_DECOMP* decomp, /**< decomposition data structure */
327 SCIP_HASHMAP* vartoblock, /**< variable to block hashmap */
328 SCIP_HASHMAP* constoblock, /**< constraint to block hashmap */
329 int nblocks, /**< number of blocks */
330 SCIP_Bool staircase /**< should the decomposition be a staircase structure */
331 );
332
333/** completely fills out decomposition structure from only the constraint partition */
336 GCG* gcg, /**< GCG data structure */
337 GCG_DECOMP* decomp, /**< decomposition data structure */
338 SCIP_HASHMAP* constoblock, /**< constraint to block hashmap, start with 1 for first block and nblocks+1 for linking constraints */
339 int nblocks, /**< number of blocks */
340 SCIP_Bool staircase /**< should the decomposition be a staircase structure */
341 );
342
343/** sets the detector for the given decomposition */
346 GCG_DECOMP* decomp, /**< decomposition data structure */
347 GCG_DETECTOR* detector /**< detector data structure */
348 );
349
350/** gets the detector for the given decomposition */
353 GCG_DECOMP* decomp /**< decomposition data structure */
354 );
355
356/** gets the detectors for the given decomposition */
359 GCG_DECOMP* decomp /**< decomposition data structure */
360 );
361
362/** gets the number of detectors for the given decomposition */
365 GCG_DECOMP* decomp /**< decomposition data structure */
366 );
367
368/** gets the id of the original partialdec */
371 GCG_DECOMP* decomp /**< decomposition data structure */
372 );
373
374/** sets the detector clock times of the detectors of the detector chain */
377 GCG* gcg, /**< GCG data structure */
378 GCG_DECOMP* decomp, /**< decomposition data structure */
379 SCIP_Real* detectorClockTimes /**< time used by the detectors */
380 );
381
382/** gets the detector clock times of the detectors of the detector chain */
385 GCG_DECOMP* decomp /**< decomposition data structure */
386 );
387
388/** sets the detector clock times of the detectors of the detector chain */
391 GCG* gcg, /**< GCG data structure */
392 GCG_DECOMP* decomp, /**< decomposition data structure */
393 const char* detectorchainstring /**< string for the detector information working on that decomposition */
394 );
395
396
399 GCG* gcg, /**< GCG data structure */
400 GCG_DECOMP* decomp /**< decomposition data structure */
401 );
402
403
404/** sets the percentages of variables assigned to the border of the corresponding detectors (of the detector chain) on this decomposition */
407 GCG* gcg, /**< GCG data structure */
408 GCG_DECOMP* decomp, /**< decomposition data structure */
409 SCIP_Real* pctVarsToBorder
410 );
411
412/** gets the percentages of variables assigned to the border of the corresponding detectors (of the detector chain) on this decomposition */
415 GCG_DECOMP* decomp /**< decomposition data structure */
416 );
417
418/** sets the percentages of constraints assigned to the border of the corresponding detectors (of the detector chain) on this decomposition */
421 GCG* gcg, /**< GCG data structure */
422 GCG_DECOMP* decomp, /**< decomposition data structure */
423 SCIP_Real* pctConssToBorder
424 );
425
426/** gets the percentages of constraints assigned to the border of the corresponding detectors (of the detector chain) on this decomposition */
429 GCG_DECOMP* decomp /**< decomposition data structure */
430 );
431
432/** sets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
435 GCG* gcg, /**< GCG data structure */
436 GCG_DECOMP* decomp, /**< decomposition data structure */
437 SCIP_Real* pctVarsToBlock
438 );
439
440/** gets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
443 GCG_DECOMP* decomp /**< decomposition data structure */
444 );
445
446/** sets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
449 GCG* gcg, /**< GCG data structure */
450 GCG_DECOMP* decomp, /**< decomposition data structure */
451 SCIP_Real* pctConssToBlock
452 );
453
454/** gets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
457 GCG_DECOMP* decomp /**< decomposition data structure */
458 );
459
460
461/** sets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
464 GCG* gcg, /**< GCG data structure */
465 GCG_DECOMP* decomp, /**< decomposition data structure */
466 SCIP_Real* pctVarsFromOpen
467 );
468
469/** gets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
472 GCG_DECOMP* decomp /**< decomposition data structure */
473 );
474
475/** sets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
478 GCG* gcg, /**< GCG data structure */
479 GCG_DECOMP* decomp, /**< decomposition data structure */
480 SCIP_Real* pctConssToBorder
481 );
482
483/** gets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition */
486 GCG_DECOMP* decomp /**< decomposition data structure */
487 );
488
489/** sets the number of new blocks of the corresponding detectors (of the detector chain) on this decomposition */
492 GCG* gcg, /**< GCG data structure */
493 GCG_DECOMP* decomp, /**< decomposition data structure */
494 int* nNewBlocks /**< number of new blocks on this decomposition */
495 );
496
497/** gets the number of new blocks corresponding detectors (of the detector chain) on this decomposition */
500 GCG_DECOMP* decomp /**< decomposition data structure */
501 );
502
503/** transforms all constraints and variables, updating the arrays */
506 GCG* gcg, /**< GCG data structure */
507 GCG_DECOMP* decomp /**< decomposition data structure */
508 );
509
510/**
511 * Remove all those constraints that were removed from the problem after the decomposition had been created
512 */
515 GCG* gcg, /**< GCG data structure */
516 GCG_DECOMP* decomp /**< decomposition data structure */
517 );
518
519/**
520 * Adds all those constraints that were added to the problem after the decomposition as created
521 */
524 GCG* gcg, /**< GCG data structure */
525 GCG_DECOMP* decomp /**< decomposition data structure */
526 );
527
528/** checks the validity of the decomposition data structure */
531 GCG* gcg, /**< GCG data structure */
532 GCG_DECOMP* decomp /**< decomposition data structure */
533 );
534
535/** creates a decomposition with all constraints in the master */
538 GCG* gcg, /**< GCG data structure */
539 GCG_DECOMP** decomp, /**< decomposition data structure */
540 SCIP_Bool solveorigprob /**< is the original problem being solved? */
541 );
542
543/** creates a decomposition with provided constraints in the master
544 * The function will put the remaining constraints in one or more pricing problems
545 * depending on whether the subproblems decompose with no variables in common.
546 */
549 GCG* gcg, /**< GCG data structure */
550 GCG_DECOMP** decomp, /**< decomposition data structure */
551 SCIP_CONS** conss, /**< constraints to be put in the master */
552 int nconss /**< number of constraints in the master */
553 );
554
555/** return the number of variables and binary, integer, implied integer, continuous variables of all subproblems */
558 GCG* gcg, /**< GCG data structure */
559 GCG_DECOMP* decomp, /**< decomposition data structure */
560 int* nvars, /**< pointer to array of size nproblems to store number of subproblem vars or NULL */
561 int* nbinvars, /**< pointer to array of size nproblems to store number of binary subproblem vars or NULL */
562 int* nintvars, /**< pointer to array of size nproblems to store number of integer subproblem vars or NULL */
563 int* nimplvars, /**< pointer to array of size nproblems to store number of implied subproblem vars or NULL */
564 int* ncontvars, /**< pointer to array of size nproblems to store number of continuous subproblem vars or NULL */
565 int nproblems /**< size of the arrays*/
566 );
567
568/** return the number of variables and binary, integer, implied integer, continuous variables of the master */
571 GCG* gcg, /**< GCG data structure */
572 GCG_DECOMP* decomp, /**< decomposition data structure */
573 int* nvars, /**< pointer to store number of linking vars or NULL */
574 int* nbinvars, /**< pointer to store number of binary linking vars or NULL */
575 int* nintvars, /**< pointer to store number of integer linking vars or NULL */
576 int* nimplvars, /**< pointer to store number of implied linking vars or NULL */
577 int* ncontvars /**< pointer to store number of continuous linking vars or NULL */
578 );
579
580/**
581 * returns the number of nonzeros of each column of the constraint matrix both in the subproblem and in the master
582 * @note For linking variables, the number of nonzeros in the subproblems corresponds to the number on nonzeros
583 * in the border
584 *
585 * @note The arrays have to be allocated by the caller
586 *
587 * @pre This function assumes that constraints are partitioned in the decomp structure, no constraint is present in more than one block
588 *
589 */
592 GCG* gcg, /**< GCG data structure */
593 GCG_DECOMP* decomp, /**< decomposition data structure */
594 SCIP_VAR** vars, /**< pointer to array store variables belonging to density */
595 int nvars, /**< number of variables */
596 SCIP_CONS** conss, /**< pointer to array to store constraints belonging to the density */
597 int nconss, /**< number of constraints */
598 int* varsubproblemdensity, /**< pointer to array to store the nonzeros for the subproblems */
599 int* varmasterdensity, /**< pointer to array to store the nonzeros for the master */
600 int* conssubproblemdensity, /**< pointer to array to store the nonzeros for the subproblems */
601 int* consmasterdensity /**< pointer to array to store the nonzeros for the master */
602);
603
604/**
605 * calculates the number of up and down locks of variables for a given decomposition in both the original problem and the pricingproblems
606 *
607 * @note All arrays need to be allocated by the caller
608 *
609 * @warning This function needs a lot of memory (nvars*nblocks+1) array entries
610 */
613 GCG* gcg, /**< GCG data structure */
614 GCG_DECOMP* decomp, /**< decomposition data structure */
615 SCIP_VAR** vars, /**< pointer to array store variables belonging to density */
616 int nvars, /**< number of variables */
617 int nsubproblems, /**< number of sub problems */
618 int** subsciplocksdown, /**< pointer to two dimensional array to store the down locks for the subproblems */
619 int** subsciplocksup, /**< pointer to two dimensional array to store the down locks for the subproblems */
620 int* masterlocksdown, /**< pointer to array to store the down locks for the master */
621 int* masterlocksup /**< pointer to array to store the down locks for the master */
622 );
623
624/**
625 * returns the maximum white score ( if it is not calculated yet is decomp is evaluated)
626 */
629 GCG* gcg, /**< GCG data structure */
630 GCG_DECOMP* decomp /**< decomposition data structure */
631 );
632
633
634/** computes the score of the given decomposition based on the border, the average density score and the ratio of
635 * linking variables
636 */
639 GCG* gcg, /**< GCG data structure */
640 GCG_DECOMP* decomp, /**< decomposition data structure */
641 DEC_SCORES* score /**< returns the score of the decomposition */
642 );
643
644/** returns the number of constraints saved in the decomposition */
647 GCG_DECOMP* decomp /**< decomposition data structure */
648 );
649
650/** display statistics about the decomposition */
653 GCG* gcg, /**< GCG data structure */
654 FILE* file, /**< output file or NULL for standard output */
655 GCG_DECOMP* decomp /**< decomp that should be evaluated */
656 );
657
658/** returns whether both structures lead to the same decomposition */
661 GCG* gcg, /**< GCG data structure */
662 GCG_DECOMP* decomp1, /**< first decomp data structure */
663 GCG_DECOMP* decomp2 /**< second decomp data structure */
664);
665
666
667/** filters similar decompositions from a given list and moves them to the end
668 * @return the number of unique decompositions
669 */
672 GCG* gcg, /**< GCG data structure */
673 GCG_DECOMP** decs, /**< array of decompositions */
674 int ndecs /**< number of decompositions */
675);
676
677/** returns the number of the block that the constraint is with respect to the decomposition */
680 GCG* gcg, /**< GCG data structure */
681 GCG_DECOMP* decomp, /**< decomposition data structure */
682 SCIP_CONS* cons, /**< constraint to check */
683 int *block /**< block of the constraint (or nblocks for master) */
684);
685
686/** move a master constraint to pricing problem */
689 GCG* gcg, /**< GCG data structure */
690 GCG_DECOMP* decomp, /**< decomposition data structure */
691 int consindex, /**< index of constraint to move */
692 int block /**< block of the pricing problem where to move */
693 );
694
695/** tries to assign masterconss to pricing problem */
698 GCG* gcg, /**< GCG data structure */
699 GCG_DECOMP* decomp, /**< decomposition data structure */
700 int* transferred /**< number of master constraints reassigned */
701 );
702
703/** tries to assign masterconss to new pricing problem */
706 GCG* gcg, /**< GCG data structure */
707 GCG_DECOMP* decomp, /**< decomposition data structure */
708 GCG_DECOMP** newdecomp, /**< new decomposition, if successful */
709 int* transferred /**< number of master constraints reassigned */
710 );
711
712/** polish the decomposition and try to greedily assign master constraints to pricing problem where useful */
715 GCG* gcg, /**< GCG data structure */
716 GCG_DECOMP* decomp, /**< decomposition data structure */
717 GCG_DECOMP** newdecomp /**< new decomposition, if successful */
718 );
719
720/** permutes the decomposition according to the permutation seed */
723 GCG* gcg, /**< GCG data structure */
724 GCG_DECOMP* decomp, /**< decomposition data structure */
725 SCIP_RANDNUMGEN* randnumgen /**< random number generator */
726 );
727
728/** @} */
729#ifdef __cplusplus
730}
731
732#endif
733#endif
GCG_EXPORT SCIP_RETCODE GCGdecompSetDetectorChainString(GCG *gcg, GCG_DECOMP *decomp, const char *detectorchainstring)
Definition decomp.c:1730
void GCGdecompSetConsindex(GCG_DECOMP *decomp, SCIP_HASHMAP *consindex)
Definition decomp.c:1273
SCIP_Real * GCGdecompGetDetectorClockTimes(GCG_DECOMP *decomp)
Definition decomp.c:1721
SCIP_RETCODE GCGdetermineConsBlock(GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS *cons, int *block)
Definition decomp.c:4100
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctConssToBlock(GCG_DECOMP *decomp)
Definition decomp.c:1886
void GCGdecompSetPresolved(GCG_DECOMP *decomp, SCIP_Bool presolved)
Definition decomp.c:724
void GCGdecompSetMaxWhiteScore(GCG *gcg, GCG_DECOMP *decdecomp, SCIP_Real maxwhitescore)
Definition decomp.c:3296
GCG_DETECTOR ** GCGdecompGetDetectorChain(GCG_DECOMP *decomp)
Definition decomp.c:1626
SCIP_Bool GCGdecompGetPresolved(GCG_DECOMP *decomp)
Definition decomp.c:735
void GCGdecompSetDetector(GCG_DECOMP *decomp, GCG_DETECTOR *detector)
Definition decomp.c:1605
SCIP_VAR *** GCGdecompGetStairlinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1173
SCIP_VAR ** GCGdecompGetLinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1056
SCIP_RETCODE GCGcreateBasicDecomp(GCG *gcg, GCG_DECOMP **decomp, SCIP_Bool solveorigprob)
Definition decomp.c:2418
SCIP_RETCODE GCGdecompCheckConsistency(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:2297
SCIP_RETCODE GCGcreateDecompFromMasterconss(GCG *gcg, GCG_DECOMP **decomp, SCIP_CONS **masterconss, int nmasterconss)
Definition decomp.c:2748
int GCGdecompGetPartialdecID(GCG_DECOMP *decomp)
Definition decomp.c:1685
void GCGdecompSetVarindex(GCG_DECOMP *decomp, SCIP_HASHMAP *varindex)
Definition decomp.c:1253
SCIP_CONS *** GCGdecompGetSubscipconss(GCG_DECOMP *decomp)
Definition decomp.c:924
SCIP_HASHMAP * GCGdecompGetConstoblock(GCG_DECOMP *decomp)
Definition decomp.c:1243
SCIP_RETCODE GCGprintDecompStatistics(GCG *gcg, FILE *file, GCG_DECOMP *decomp)
Definition decomp.c:3827
SCIP_Real * GCGdecompGetDetectorPctConssToBorder(GCG_DECOMP *decomp)
Definition decomp.c:1816
int GCGdecompGetNLinkingconss(GCG_DECOMP *decomp)
Definition decomp.c:995
SCIP_Bool GCGdecompositionsAreEqual(GCG *gcg, GCG_DECOMP *decomp1, GCG_DECOMP *decomp2)
Definition decomp.c:3990
SCIP_RETCODE GCGdecompSetType(GCG_DECOMP *decomp, GCG_DECTYPE type)
Definition decomp.c:659
SCIP_RETCODE GCGdecompAddRemainingConss(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:2206
SCIP_RETCODE GCGfilloutDecompFromConstoblock(GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
Definition decomp.c:1479
SCIP_RETCODE GCGdecompTryAssignMasterconssToNewPricing(GCG *gcg, GCG_DECOMP *decomp, GCG_DECOMP **newdecomp, int *transferred)
Definition decomp.c:4279
SCIP_RETCODE GCGdecompCreate(GCG *gcg, GCG_DECOMP **decdecomp)
Definition decomp.c:480
SCIP_RETCODE GCGdecompSetSubscipvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***subscipvars, int *nsubscipvars)
Definition decomp.c:767
SCIP_Real * GCGdecompGetDetectorPctVarsFromOpen(GCG_DECOMP *decomp)
Definition decomp.c:1924
SCIP_RETCODE GCGdecompRemoveDeletedConss(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:2148
SCIP_RETCODE GCGcreatePolishedDecomp(GCG *gcg, GCG_DECOMP *decomp, GCG_DECOMP **newdecomp)
Definition decomp.c:4337
int * GCGdecompGetNNewBlocks(GCG_DECOMP *decomp)
Definition decomp.c:1997
SCIP_RETCODE GCGfilloutDecompFromHashmaps(GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
Definition decomp.c:1293
SCIP_CONS ** GCGdecompGetLinkingconss(GCG_DECOMP *decomp)
Definition decomp.c:985
void GCGdecompSetNNewBlocks(GCG *gcg, GCG_DECOMP *decomp, int *nNewBlocks)
Definition decomp.c:1970
int GCGdecompGetNMastervars(GCG_DECOMP *decomp)
Definition decomp.c:1089
void GCGgetLinkingVarsData(GCG *gcg, GCG_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
Definition decomp.c:2922
SCIP_RETCODE GCGdecompTryAssignMasterconssToExistingPricing(GCG *gcg, GCG_DECOMP *decomp, int *transferred)
Definition decomp.c:4229
GCG_EXPORT char * GCGdecompGetDetectorChainString(GCG *gcg, GCG_DECOMP *decomp)
Definition decomp.c:1745
GCG_DETECTOR * GCGdecompGetDetector(GCG_DECOMP *decomp)
Definition decomp.c:1616
SCIP_RETCODE GCGdecompSetLinkingvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **linkingvars, int nlinkingvars, int nfixedlinkingvars, int nmastervars)
Definition decomp.c:1007
int GCGdecompGetNTotalStairlinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1192
void GCGdecompSetVartoblock(GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock)
Definition decomp.c:1209
SCIP_RETCODE GCGdecompSetStairlinkingvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***stairlinkingvars, int *nstairlinkingvars)
Definition decomp.c:1101
void GCGdecompSetDetectorPctVarsToBorder(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBorder)
Definition decomp.c:1754
SCIP_HASHMAP * GCGdecompGetVartoblock(GCG_DECOMP *decomp)
Definition decomp.c:1221
SCIP_HASHMAP * GCGdecompGetConsindex(GCG_DECOMP *decomp)
Definition decomp.c:1284
void GCGdecompSetNBlocks(GCG_DECOMP *decomp, int nblocks)
Definition decomp.c:745
void GCGdecompSetDetectorPctConssFromOpen(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssFromOpen)
Definition decomp.c:1932
SCIP_RETCODE GCGdecompSetSubscipconss(GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS ***subscipconss, int *nsubscipconss)
Definition decomp.c:857
int GCGdecompGetNConss(GCG_DECOMP *decomp)
Definition decomp.c:3697
SCIP_RETCODE GCGdecompSetLinkingconss(GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS **linkingconss, int nlinkingconss)
Definition decomp.c:942
int * GCGdecompGetNSubscipvars(GCG_DECOMP *decomp)
Definition decomp.c:847
void GCGdecompSetDetectorPctVarsFromOpen(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsFromOpen)
Definition decomp.c:1895
void GCGdecompSetDetectorPctVarsToBlock(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBlock)
Definition decomp.c:1824
SCIP_Real GCGdecompGetMaxwhiteScore(GCG_DECOMP *decomp)
Definition decomp.c:713
SCIP_RETCODE GCGdecompEvaluateDecomposition(GCG *gcg, GCG_DECOMP *decdecomp, DEC_SCORES *score)
Definition decomp.c:3331
void GCGdecompSetDetectorClockTimes(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *detectorClockTimes)
Definition decomp.c:1694
SCIP_RETCODE GCGdecompFree(GCG *gcg, GCG_DECOMP **decdecomp)
Definition decomp.c:541
int GCGdecompGetNBlocks(GCG_DECOMP *decomp)
Definition decomp.c:757
SCIP_Real * GCGdecompGetDetectorPctVarsToBlock(GCG_DECOMP *decomp)
Definition decomp.c:1850
int GCGdecompGetNLinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1066
SCIP_VAR *** GCGdecompGetSubscipvars(GCG_DECOMP *decomp)
Definition decomp.c:837
SCIP_HASHMAP * GCGdecompGetVarindex(GCG_DECOMP *decomp)
Definition decomp.c:1264
void GCGdecompSetDetectorPctConssToBlock(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBlock)
Definition decomp.c:1858
void GCGdecompSetDetectorPctConssToBorder(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBorder)
Definition decomp.c:1788
GCG_DECTYPE GCGdecompGetType(GCG_DECOMP *decomp)
Definition decomp.c:703
SCIP_RETCODE GCGpermuteDecomp(GCG *gcg, GCG_DECOMP *decomp, SCIP_RANDNUMGEN *randnumgen)
Definition decomp.c:4384
SCIP_Real * GCGdecompGetDetectorPctConssFromOpen(GCG_DECOMP *decomp)
Definition decomp.c:1962
int GCGfilterSimilarDecompositions(GCG *gcg, GCG_DECOMP **decs, int ndecs)
Definition decomp.c:4057
int * GCGdecompGetNSubscipconss(GCG_DECOMP *decomp)
Definition decomp.c:933
int GCGdecompGetNFixedLinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1077
SCIP_RETCODE GCGgetDensityData(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, int *varsubproblemdensity, int *varmasterdensity, int *conssubproblemdensity, int *consmasterdensity)
Definition decomp.c:2972
const char * GCGdecompGetStrType(GCG_DECTYPE type)
Definition decomp.c:471
void GCGgetSubproblemVarsData(GCG *gcg, GCG_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars, int nproblems)
Definition decomp.c:2873
SCIP_RETCODE GCGdecompMoveLinkingConsToPricing(GCG *gcg, GCG_DECOMP *decomp, int consindex, int block)
Definition decomp.c:4192
int * GCGdecompGetNStairlinkingvars(GCG_DECOMP *decomp)
Definition decomp.c:1182
SCIP_RETCODE GCGgetVarLockData(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **vars, int nvars, int nsubproblems, int **subsciplocksdown, int **subsciplocksup, int *masterlocksdown, int *masterlocksup)
Definition decomp.c:3158
int GCGdecompGetDetectorChainSize(GCG_DECOMP *decomp)
Definition decomp.c:1663
SCIP_Real GCGdecompGetMaxWhiteScore(GCG *gcg, GCG_DECOMP *decdecomp)
Definition decomp.c:3313
SCIP_RETCODE GCGdecompTransform(GCG *gcg, GCG_DECOMP *decomp)
Definition decomp.c:2005
void GCGdecompSetConstoblock(GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock)
Definition decomp.c:1231
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctVarsToBorder(GCG_DECOMP *decomp)
Definition decomp.c:1780
common defines and data types used in all packages of GCG
#define GCG_EXPORT
Definition def.h:59
#define SCIP_Bool
#define SCIP_Real
SCIP_VAR ** vars
int nbinvars
int nintvars
int nvars
int nmastervars
struct Dec_Scores DEC_SCORES
Definition pub_decomp.h:70
SCIP_Real linkingscore
Definition pub_decomp.h:66
SCIP_Real borderscore
Definition pub_decomp.h:64
SCIP_Real totalscore
Definition pub_decomp.h:67
SCIP_Real maxwhitescore
Definition pub_decomp.h:68
SCIP_Real densityscore
Definition pub_decomp.h:65
struct SCIP_Cons SCIP_CONS
type definitions for decomposition information in GCG projects
enum Dectype GCG_DECTYPE
Definition type_decomp.h:57
struct GCG_Decomp GCG_DECOMP
Definition type_decomp.h:45
type definitions for detectors in GCG projects
struct GCG_Detector GCG_DETECTOR
struct Gcg GCG
Definition type_gcg.h:44
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_RandNumGen SCIP_RANDNUMGEN
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Var SCIP_VAR