GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
score_strong.cpp
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 score_strong.cpp
30 * @brief strong score
31 * @author Jurgen Lentz
32 */
33
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35
36#include <sstream>
37
38#include <scip/scipdefplugins.h>
39
42#include "gcg/cons_decomp.h"
43#include "gcg/cons_decomp.hpp"
44#include "gcg/scip_misc.h"
45#include "gcg/score.h"
46#include "gcg/score_strong.h"
47
48
49/* score properties */
50#define SCORE_NAME "strong decomposition score"
51#define SCORE_SHORTNAME "strong"
52#define SCORE_DESC "strong decomposition score"
53
54#define DEFAULT_STRONGTIMELIMIT 30. /**< timelimit for strong decompotition score calculation per partialdec */
55#define DEFAULT_DUALVALRANDOMMETHOD 1 /**< default value for method to dual initialization of dual values for strong decomposition: 1) naive, 2) expected equal, 3) expected overestimation */
56#define DEFAULT_COEFFACTORORIGVSRANDOM 0.5 /**< default value for convex coefficient for orig dual val (1-this coef is factor for random dual value) */
57
58#define DEFAULT_SCORECOEF_FASTBENEFICIAL 1. /**< coefficient for fast & beneficial in strong decomposition score computation */
59#define DEFAULT_SCORECOEF_MEDIUMBENEFICIAL 0.75 /**< coefficient for not fast but beneficial in strong decomposition score computation */
60#define DEFAULT_SCORECOEF_FASTNOTBENEFICIAL 0.3 /**< coefficient for fast & not beneficial in strong decomposition score computation */
61#define DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL 0.1 /**< coefficient for not & not beneficial in strong decomposition score computation */
62#define DEFAULT_RANDPARTIALDEC 23 /**< initial random partialdec */
63
64/*
65 * Data structures
66 */
67struct GCG_ScoreData
68{
69 std::vector<SCIP_Real>* dualvalsrandom; /**< vector of random dual values, used for strong detection scores */
70 std::vector<SCIP_Real>* dualvalsoptimaloriglp; /**< vector of dual values of the optimal solved original lp, used for strong detection scores */
71 int strongdetectiondualvalrandommethod; /**< method to dual initialization of dual values for strong decomposition: 1) naive, 2) expected equal, 3) expected overestimation */
72 SCIP_Real coeffactororigvsrandom; /**< convex coefficient for orig dual val (1-this coef is factor for random dual value) */
73 SCIP_Bool dualvalsoptimaloriglpcalculated; /**< are the optimal dual values from original lp calulated? used for strong detection scores */
74 SCIP_Bool dualvalsrandomset; /**< are the random dual values set, used for strong detection scores */
75 SCIP_Real strongtimelimit; /**< timelimit for calculating strong decomposition score for one partialdec */
76};
77
78// TODO ref add comments! this is used in strong decomposition score calculation in @see shuffleDualvalsRandom()
86
87/*
88 * Local methods
89 */
90
91/* put your local methods here, and declare them static */
92
93/**
94 * @brief method that shuffles randomly and set dual variable values, used for strong detection score
95 * @returns scip return code
96 */
97static
99 GCG* gcg, /**< GCG data structure */
100 GCG_SCORE* score, /**< score */
101 SCIP_Bool transformed /**< whether the problem is tranformed yet */
102 )
103{
104 GCG_SCOREDATA* scoredata = GCGscoreGetData(score);
106 GCG_RANDOM_DUAL_METHOD usedmethod;
107 SCIP_RANDNUMGEN* randnumgen;
108
109 int method;
110 int nconss = SCIPgetNConss(scip);
111
112 SCIPgetIntParam(scip, "detection/scores/strong/dualvalrandommethod", &method);
113
114 /* default method == 1 */
115 usedmethod = GCG_RANDOM_DUAL_NAIVE;
116
117 if( method == 2 )
119 else if( method == 3 )
121
122 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "set dual val random method to %d. \n", method );
123
124 scoredata->dualvalsrandom->clear();
125 scoredata->dualvalsrandom->resize(nconss, 0.);
126
127 /* create random number generator */
128 // TODO ref replace default for random partialdec with parameter
130
132
133 /* shuffle dual multipliers of constraints*/
134
135 /* 1) naive approach */
136 if( usedmethod == GCG_RANDOM_DUAL_NAIVE )
137 {
138 for( int c = 0; c < nconss; ++c )
139 {
140 SCIP_Real dualval;
141 SCIP_Real factor;
142 SCIP_CONS* cons;
143
144 cons = detprobdata->getCons(c);
145 if( SCIPisInfinity( scip, -GCGconsGetLhs(scip, cons) ))
146 {
147 SCIP_Real modifier;
148 modifier = 0.;
150 modifier = -1.;
151
152 factor = MAX(1., ABS(GCGconsGetRhs(scip, cons) ) );
153 dualval = SCIPrandomGetReal(randnumgen, 0.+modifier, 1.+modifier ) * factor;
154 }
155 else if( SCIPisInfinity( scip, GCGconsGetRhs(scip, cons) ) )
156 {
157 SCIP_Real modifier;
158 modifier = 0.;
160 modifier = -1.;
161
162 factor = MAX(1., ABS(GCGconsGetLhs(scip, cons) ) );
163 dualval = SCIPrandomGetReal(randnumgen, 0.+modifier, 1.+modifier ) * factor;
164 }
165 else
166 {
167 factor = MAX(1., ABS(GCGconsGetLhs(scip, cons) ) );
168 factor = MAX( factor, ABS(GCGconsGetRhs(scip, cons) ) );
169 dualval = SCIPrandomGetReal(randnumgen, -1., 1. ) * factor;
170 }
171
172 (*scoredata->dualvalsrandom)[c] = dualval;
173 }
174
175 } /* end naive approach */
176 /* expected equal and expected overestimated approach */
177 else if( usedmethod == GCG_RANDOM_DUAL_EXPECTED_EQUAL || usedmethod == GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE )
178 {
179 SCIP_Real largec = 0.;
180 for( int v = 0; v < SCIPgetNVars(scip); ++v )
181 largec += ABS( SCIPvarGetObj(detprobdata->getVar(v)) );
182
183 for( int c = 0; c < nconss; ++c )
184 {
185 SCIP_Real dualval;
186 SCIP_CONS* cons;
187 cons = detprobdata->getCons(c);
188 double lambda;
189
190 SCIP_Real divisor = 0.;
191
192 SCIP_Real randomval;
193 int nvarsincons = GCGconsGetNVars(scip, cons);
194 SCIP_Real* valsincons = NULL;
195
196 /* get values of variables in this constraint */
197 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &valsincons, nvarsincons) );
198 GCGconsGetVals(scip, cons, valsincons, nvarsincons);
199
200 /* add coefficients to divisor */
201 for( int v = 0; v < nvarsincons; ++v )
202 {
203 divisor += ABS( valsincons[v] );
204 }
205 if ( usedmethod == GCG_RANDOM_DUAL_EXPECTED_EQUAL )
206 divisor *= nconss;
207
208 /* 1/lambda is the expected value of the distribution */
209 lambda = divisor / largec;
210
211 /* formula for exponential distribution requires a uniform random number in (0,1). */
212 do
213 {
214 randomval = SCIPrandomGetReal(randnumgen, 0.0, 1.0);
215 }
216 while (randomval == 0.0 || randomval == 1.0);
217 randomval = -std::log(randomval) / lambda;
218
219 if( SCIPisInfinity(scip, -GCGconsGetLhs(scip, cons)) )
220 {
221 SCIP_Real modifier;
222 modifier = 1.;
224 modifier = -1.;
225
226 dualval = modifier * randomval;
227 }
228 else if( SCIPisInfinity(scip, GCGconsGetRhs(scip, cons)) )
229 {
230 SCIP_Real modifier;
231 modifier = 1.;
233 modifier = -1.;
234
235 dualval = modifier * randomval;
236
237 }
238 else
239 {
240 SCIP_Real helpval = SCIPrandomGetReal(randnumgen, -1., 1. );
241
242 if ( helpval < 0. )
243 dualval = -1. * randomval ;
244 else dualval = randomval;
245 }
246
247 (*scoredata->dualvalsrandom)[c] = dualval;
248
249 /* free storage for variables in cons */
250 SCIPfreeBufferArrayNull(scip, &valsincons);
251 }
252 }
253
254 return SCIP_OKAY;
255}
256
257/**
258 * @brief return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated
259 * @returns the a random value of the dual variable of the corresponding
260 */
261static
263 GCG* gcg, /**< GCG data structure */
264 GCG_SCORE* score, /**< score */
265 int consindex, /**< consindex index of constraint the value is asked for */
266 SCIP_Bool transformed /**< is the problem transformed yet */
267 )
268{
269 GCG_SCOREDATA* scoredata = GCGscoreGetData(score);
270
271 if( !scoredata->dualvalsrandomset )
272 shuffleDualvalsRandom(gcg, score, transformed);
273 scoredata->dualvalsrandomset = TRUE;
274
275 return (*scoredata->dualvalsrandom)[consindex];
276}
277
278/**
279 * @brief method to calculate and set the optimal dual values from original lp, used for strong detection score
280 * @returns scip return code
281 */
282static
284 GCG* gcg, /**< GCG data structure */
285 GCG_SCORE* score, /**< score */
286 SCIP_Bool transformed /**< whether the problem is transormed yet */
287 )
288{
289 GCG_SCOREDATA* scoredata = GCGscoreGetData(score);
291 SCIP* scipcopy;
292 SCIP_HASHMAP* origtocopiedconss;
293 SCIP_Bool valid;
294 int nvars;
295 SCIP_VAR** copiedvars;
296 int nconss;
297
298 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "started calculating optimal dual values for original lp\n");
299
300 SCIPhashmapCreate(&origtocopiedconss, SCIPblkmem(scip), SCIPgetNConss(scip));
301
302 SCIPcreate(&scipcopy);
303
304 SCIPcopy(scip, scipcopy, NULL, origtocopiedconss, "", FALSE, FALSE, FALSE, FALSE, &valid);
305
306 nconss = SCIPgetNConss(scip);
307 nvars = SCIPgetNVars(scipcopy);
308 copiedvars = SCIPgetVars(scipcopy);
309
310 scoredata->dualvalsoptimaloriglp->clear();
311 scoredata->dualvalsoptimaloriglp->resize(nconss, 0.);
312
313 for( int var = 0; var < nvars ; ++var )
314 {
315 SCIP_VAR* copyvar = copiedvars[var];
316 SCIP_Bool infeasible;
317
318 if( SCIPvarGetType(copyvar) == SCIP_VARTYPE_BINARY )
319 SCIPchgVarUbGlobal(scipcopy, copyvar, 1.);
320
321 SCIPchgVarType(scipcopy, copyvar, SCIP_VARTYPE_CONTINUOUS, &infeasible);
322 }
323
324 copiedvars = SCIPgetVars(scipcopy);
325
326 /* deactivate presolving */
327 SCIPsetIntParam(scipcopy, "presolving/maxrounds", 0);
328
329 /* deactivate separating */
330 SCIPsetIntParam(scipcopy, "separating/maxrounds", 0);
331 SCIPsetIntParam(scipcopy, "separating/maxroundsroot", 0);
332
333 /* deactivate propagating */
334 SCIPsetIntParam(scipcopy, "propagating/maxrounds", 0);
335 SCIPsetIntParam(scipcopy, "propagating/maxroundsroot", 0);
336
337 /* solve lp */
338 SCIPsetIntParam(scipcopy, "lp/solvefreq", 1);
339
340 /* only root node */
341 SCIPsetLongintParam(scipcopy, "limits/nodes", 1);
342
343 SCIPsetIntParam(scipcopy, "display/verblevel", SCIP_VERBLEVEL_FULL);
344
345 SCIPtransformProb(scipcopy);
346
347 SCIPsolve(scipcopy);
348
350
351 for( int c = 0; c < nconss; ++c )
352 {
353 SCIP_CONS* cons;
354 SCIP_CONS* copiedcons;
355 SCIP_CONS* transcons = NULL;
356
357 cons = detprobdata->getCons(c);
358 if( !transformed )
359 {
360 SCIPgetTransformedCons(scip, cons, &transcons);
361 if( transcons )
362 cons = transcons;
363 else
364 {
365 SCIPwarningMessage(scip, "Could not find constraint for random dual variable initialization when calculating strong decomposition score; skipping cons: %s \n", SCIPconsGetName(cons));
366 continue;
367 }
368 }
369 copiedcons = (SCIP_CONS*) SCIPhashmapGetImage(origtocopiedconss, (void*) cons);
370
371 assert(copiedcons != NULL);
372 assert( !SCIPconsIsTransformed(copiedcons) );
373
374 transcons = NULL;
375 SCIPgetTransformedCons(scipcopy, copiedcons, &transcons);
376 if( transcons != NULL )
377 copiedcons = transcons;
378
379 (*scoredata->dualvalsoptimaloriglp)[c] = GCGconsGetDualsol(scipcopy, copiedcons);
380 if( !SCIPisFeasEQ(scip, 0., (*scoredata->dualvalsoptimaloriglp)[c]) )
381 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "optimal dual sol of constraint %s is %f \n", SCIPconsGetName(cons), (*scoredata->dualvalsoptimaloriglp)[c]);
382 }
383
384 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "finished calculating optimal dual values for original lp, start freeing\n");
385
386 SCIPhashmapFree(&origtocopiedconss);
387 SCIPfree(&scipcopy);
388
389 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "finished freeing\n");
390
391 return SCIP_OKAY;
392}
393
394/**
395 * @brief returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the detprobdata; if it is not calculated yet it will be calculated
396 * @returns the value of the optimal lp relaxation dual value of the given constraint rid correspondoning problem of the detprobdata
397 */
398static
400 GCG* gcg, /**< GCG data structure */
401 GCG_SCORE* score, /**< score */
402 int consindex, /**< consindex index of constraint the value is asked for */
403 SCIP_Bool transformed /**< is the problem transformed yet */
404 )
405{
406 GCG_SCOREDATA* scoredata = GCGscoreGetData(score);
407
408 if( !scoredata->dualvalsoptimaloriglpcalculated )
409 calculateDualvalsOptimalOrigLP(gcg, score, transformed);
411
412 return (*scoredata->dualvalsoptimaloriglp)[consindex];
413}
414
415/** @brief sets the pricing problem parameters
416 * @returns scip return code
417*/
418static
420 SCIP* scip, /**< SCIP data structure of the pricing problem */
421 int clocktype, /**< clocktype to use in the pricing problem */
422 SCIP_Real infinity, /**< values larger than this are considered infinity in the pricing problem */
423 SCIP_Real epsilon, /**< absolute values smaller than this are considered zero in the pricing problem */
424 SCIP_Real sumepsilon, /**< absolute values of sums smaller than this are considered zero in the pricing problem */
425 SCIP_Real feastol, /**< feasibility tolerance for constraints in the pricing problem */
426 SCIP_Real lpfeastolfactor, /**< primal feasibility tolerance factor of LP solver in the pricing problem */
427 SCIP_Real dualfeastol, /**< feasibility tolerance for reduced costs in LP solution in the pricing problem */
428 SCIP_Bool enableppcuts, /**< should ppcuts be stored for sepa_basis */
429 SCIP_Real timelimit /**< limit of time */
430 )
431{
432 assert(scip != NULL);
433
434 GCGsetPricingProblemParameters(GCG_DECTYPE_UNKNOWN, scip, clocktype, infinity, epsilon, sumepsilon, feastol, lpfeastolfactor,
435 dualfeastol, enableppcuts);
436
437 SCIP_CALL( SCIPsetRealParam(scip, "limits/time", timelimit ) );
438
439 return SCIP_OKAY;
440}
441
442/** @brief creates the pricing problem constraints
443 * @returns scip return code
444 */
445static
447 SCIP* scip, /**< SCIP data structure */
448 SCIP* subscip, /**< the relaxator data data structure */
449 gcg::PARTIALDECOMP* partialdec, /**< partialdec corresponding to the decomposition to test */
450 int block, /**< which pricing problem */
451 SCIP_HASHMAP* hashorig2pricingvar /**< hashmap mapping original to corresponding pricing variables */
452 )
453{
454 SCIP_CONS* newcons;
455 SCIP_HASHMAP* hashorig2pricingconstmp;
456 int c;
457 char name[SCIP_MAXSTRLEN];
459
460 assert(scip != NULL);
461
462 gcg::DETPROBDATA* detprobdata = partialdec->getDetprobdata();
463
464 SCIP_CALL( SCIPhashmapCreate(&hashorig2pricingconstmp, SCIPblkmem(scip), detprobdata->getNConss() ) ); /*lint !e613*/
465
466 assert(hashorig2pricingvar != NULL);
467
468 for( c = 0; c < partialdec->getNConssForBlock(block); ++c )
469 {
470 SCIP_CONS* cons;
471
472 cons = detprobdata->getCons(partialdec->getConssForBlock(block)[c]);
473
474 SCIPdebugMessage("copying %s to pricing problem %d\n", SCIPconsGetName(cons), block);
475 if( !SCIPconsIsActive(cons) )
476 {
477 SCIPdebugMessage("skipping, cons <%s> inactive\n", SCIPconsGetName(cons) );
478 continue;
479 }
480 SCIP_CALL( SCIPgetTransformedCons(scip, cons, &cons) );
481 assert(cons != NULL);
482
483 /* copy the constraint */
484 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "p%d_%s", block, SCIPconsGetName(cons));
485 SCIP_CALL( SCIPgetConsCopy(scip, subscip, cons, &newcons, SCIPconsGetHdlr(cons),
486 hashorig2pricingvar, hashorig2pricingconstmp, name,
488
489 /* constraint was successfully copied */
491
492 SCIP_CALL( SCIPaddCons(subscip, newcons) );
493#ifndef NDEBUG
494 {
495 SCIP_VAR** curvars;
496 int ncurvars;
497
498 ncurvars = GCGconsGetNVars(subscip, newcons);
499 curvars = NULL;
500 if( ncurvars > 0 )
501 {
502 SCIP_CALL( SCIPallocBufferArray(scip, &curvars, ncurvars) );
503 SCIP_CALL( GCGconsGetVars(subscip, newcons, curvars, ncurvars) );
504
505 SCIPfreeBufferArrayNull(scip, &curvars);
506 }
507 }
508#endif
509SCIP_CALL( SCIPreleaseCons(subscip, &newcons) );
510 }
511
512 SCIPhashmapFree(&hashorig2pricingconstmp);
513
514 return SCIP_OKAY;
515}
516
517
518
519
520/*
521 * score callback methods
522 */
523
524/** destructor of score to free user data (called when GCG is exiting) */
525static
526GCG_DECL_SCOREFREE(scoreFreeStrong)
527{
528 GCG_SCOREDATA* scoredata;
529
530 assert(gcg != NULL);
531
532 scoredata = GCGscoreGetData(score);
533 assert(scoredata != NULL);
534 assert(strcmp(GCGscoreGetName(score), SCORE_NAME) == 0);
535
536 delete scoredata->dualvalsoptimaloriglp;
537 delete scoredata->dualvalsrandom;
538
539 SCIPfreeMemory(GCGgetOrigprob(gcg), &scoredata);
540
541 return SCIP_OKAY;
542}
543
544static
545GCG_DECL_SCORECALC(scoreCalcStrong)
546{
547 /** @todo use and introduce scip parameter limit (for a pricing problem to be considered fractional solvable) of difference optimal value of LP-Relaxation and optimal value of artificial pricing problem */
548 /* SCIP_Real gaplimitsolved; */
549
550 /** @todo use and introduce scip parameter weighted limit (for a pricing problem to be considered fractional solvable) difference optimal value of LP-Relaxation and optimal value of artificial pricing problem */
551 /* SCIP_Real gaplimitbeneficial; */
552
553 GCG_SCOREDATA* scoredata = GCGscoreGetData(score);
555
556 SCIP_Bool hittimelimit;
557 SCIP_Bool errorpricing;
558 int npricingconss = 0;
559
561 SCIP_Real epsilon;
562 SCIP_Real sumepsilon;
563 SCIP_Real feastol;
564 SCIP_Real lpfeastolfactor;
565 SCIP_Real dualfeastol;
566 SCIP_Bool enableppcuts;
567
568 SCIP_Bool benefical;
569 SCIP_Bool fast;
570
571 int clocktype;
572 SCIP_Real dualvalmethodcoef;
573
574 /* score works only on presolved */
576 if( partialdec->isAssignedToOrigProb() )
577 {
578 *scorevalue = 0;
579 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, NULL, " \n Attention! Strong decomposition score is not implemented for decomps belonging to the original problem \n\n");
580 return SCIP_OKAY;
581 }
582
583 *scorevalue = 0.;
584
585 /* ***** get all relevant parameters ***** */
586 SCIPgetRealParam(scip, "detection/scores/strong/coeffactororigvsrandom", &dualvalmethodcoef);
587
588 /* get numerical tolerances of the original SCIP instance in order to use the same numerical tolerances in master and pricing problems */
589 SCIP_CALL( SCIPgetRealParam(scip, "numerics/infinity", &infinity) );
590 SCIP_CALL( SCIPgetRealParam(scip, "numerics/epsilon", &epsilon) );
591 SCIP_CALL( SCIPgetRealParam(scip, "numerics/sumepsilon", &sumepsilon) );
592 SCIP_CALL( SCIPgetRealParam(scip, "numerics/feastol", &feastol) );
593 SCIP_CALL( SCIPgetRealParam(scip, "numerics/lpfeastolfactor", &lpfeastolfactor) ); // changed from "numerics/lpfeastol"
594 SCIP_CALL( SCIPgetRealParam(scip, "numerics/dualfeastol", &dualfeastol) );
595
596 /* get clocktype of the original SCIP instance in order to use the same clocktype in master and pricing problems */
597 SCIP_CALL( SCIPgetIntParam(scip, "timing/clocktype", &clocktype) );
598
599 enableppcuts = FALSE;
600 SCIP_CALL( SCIPgetBoolParam(scip, "sepa/basis/enableppcuts", &enableppcuts) );
601
602 SCIP_Real timelimitfast = 0.1 * scoredata->strongtimelimit;
603
604 /* get number of pricingconss */
605 for( int block = 0; block < partialdec->getNBlocks(); ++block )
606 {
607 npricingconss += partialdec->getNConssForBlock(block);
608 }
609
610 /* for every pricing problem calculate a corresponding score coeff and break if a pricing problem cannot be solved in the timelimit */
611 for( int block = 0; block < partialdec->getNBlocks(); ++block )
612 {
613 SCIP* subscip;
614 char name[SCIP_MAXSTRLEN];
615 SCIP_HASHMAP* hashpricingvartoindex;
616 SCIP_HASHMAP* hashorig2pricingvar;
617 SCIP_Real score_coef;
618 SCIP_Real weight_subproblem;
619 std::stringstream subname;
620
621 /* init all parameters */
622 hittimelimit = FALSE;
623 errorpricing = FALSE;
624
625 subname << "temp_pp_" << block << ".lp";
626
627 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "started calculate strong decomposition subproblem for block %d \n", block );
628
629 std::vector<SCIP_VAR*> indextopricingvar = std::vector<SCIP_VAR*>(SCIPgetNVars(scip), NULL);
630
631 SCIP_CALL( SCIPhashmapCreate(&hashpricingvartoindex, SCIPblkmem(scip), SCIPgetNVars(scip)) ); /*lint !e613*/
632 SCIP_CALL( SCIPhashmapCreate(&hashorig2pricingvar, SCIPblkmem(scip), SCIPgetNVars(scip)) ); /*lint !e613*/
633
634 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "testpricing_block_%d", block);
635
636 benefical = FALSE;
637 fast = FALSE;
638 score_coef = 0.0;
639 weight_subproblem = (SCIP_Real) partialdec->getNConssForBlock(block) / npricingconss;
640
641 /* build subscip */
642 SCIP_CALL( SCIPcreate(&subscip) );
644 SCIP_CALL( setTestpricingProblemParameters(subscip, clocktype, infinity, epsilon, sumepsilon, feastol, lpfeastolfactor, dualfeastol, enableppcuts, scoredata->strongtimelimit) );
645 SCIP_CALL( SCIPsetIntParam(subscip, "presolving/maxrounds", 0) );
646 SCIP_CALL( SCIPsetIntParam(subscip, "lp/solvefreq", 1) );
647 SCIP_CALL( SCIPcreateProb(subscip, name, NULL, NULL, NULL, NULL, NULL, NULL, NULL) );
648
649 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "started calculate strong decomposition, timelimit: %f timelimitfast: %f \n", scoredata->strongtimelimit, timelimitfast );
650
651 /* copy variables */
652 gcg::DETPROBDATA* detprobdata = partialdec->getDetprobdata();
653 for( int var = 0; var < partialdec->getNVarsForBlock(block); ++var )
654 {
655 int varid;
656 SCIP_VAR* origprobvar;
657 SCIP_VAR* pricingprobvar;
659
660 varid = partialdec->getVarsForBlock(block)[var];
661
662 if ( partialdec->isAssignedToOrigProb() )
663 origprobvar = detprobdata->getVar(varid);
664 else
665 origprobvar = SCIPvarGetProbvar(detprobdata->getVar(varid));
666
667 /* calculate obj val from shuffled */
668 obj = SCIPvarGetObj(origprobvar);
669 for( int c = 0; c < detprobdata->getNConssForVar(varid); ++c )
670 {
671 int consid;
672 SCIP_Real dualval;
673
674 dualval = 0.;
675
676 consid = detprobdata->getConssForVar(varid)[c];
677 if ( partialdec->isConsMastercons(consid) )
678 {
679 if( SCIPisEQ( scip, dualvalmethodcoef, 0.0) )
680 dualval = getDualvalRandom(gcg, score, consid, partialdec->isAssignedToOrigProb());
681 else if( SCIPisEQ( scip, dualvalmethodcoef, 1.0) )
682 dualval = getDualvalOptimalLP(gcg, score, consid, partialdec->isAssignedToOrigProb());
683 else
684 dualval = dualvalmethodcoef * getDualvalOptimalLP(gcg, score, consid, partialdec->isAssignedToOrigProb()) + (1. - dualvalmethodcoef) * getDualvalRandom(gcg, score, consid, partialdec->isAssignedToOrigProb());
685 obj -= dualval * detprobdata->getVal(consid, varid);
686 }
687 }
688
689 /* round variable objective coeffs to decrease numerical troubles */
690 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "pr%d_%s", block, SCIPvarGetName(origprobvar));
691 SCIP_CALL( SCIPcreateVar(subscip, &pricingprobvar, name, SCIPvarGetLbGlobal(origprobvar),
692 SCIPvarGetUbGlobal(origprobvar), obj, SCIPvarGetType(origprobvar),
693 TRUE, FALSE, NULL, NULL, NULL, NULL, NULL) );
694 SCIPhashmapSetImage(hashorig2pricingvar, origprobvar, pricingprobvar);
695 SCIPhashmapSetImage(hashpricingvartoindex, pricingprobvar, (void*) (size_t)varid);
696 indextopricingvar[varid] = pricingprobvar;
697 SCIP_CALL( SCIPaddVar(subscip, pricingprobvar) );
698 }
699
700 /* copy constraints */
701 SCIP_CALL( createTestPricingprobConss(scip, subscip, partialdec, block, hashorig2pricingvar) );
702
703 /* transform subscip */
704 SCIP_CALL(SCIPtransformProb(subscip) );
705
706 /* solve subscip */
707 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "started solving subproblem for block %d \n", block );
708 SCIP_CALL( SCIPsolve(subscip) );
709 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "finished solving subproblem in %f seconds \n", SCIPgetSolvingTime(subscip) );
710
711 if( SCIPgetStatus(subscip) != SCIP_STATUS_OPTIMAL )
712 {
713 if( SCIPgetStatus(subscip) == SCIP_STATUS_TIMELIMIT )
714 hittimelimit = TRUE;
715 else
716 errorpricing = TRUE;
717 }
718
719 if( errorpricing || hittimelimit )
720 {
721 if( hittimelimit )
722 SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "Hit timelimit in pricing problem %d \n.", block);
723 else
724 SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "Error in pricing problem %d \n.", block);
725
726 *scorevalue = 0.;
727 SCIPhashmapFree(&hashpricingvartoindex);
728 SCIPfree(&subscip);
729
730 return SCIP_OKAY;
731 }
732
733 /* get coefficient */
734 if( !SCIPisEQ( scip, SCIPgetFirstLPLowerboundRoot(subscip), SCIPgetDualbound(subscip) ) )
735 benefical = TRUE;
736
737 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "first dual bound: %f ; dual bound end: %f \n",SCIPgetFirstLPLowerboundRoot(subscip), SCIPgetDualbound(subscip) );
738
739 if( SCIPisFeasLE( scip, SCIPgetSolvingTime(subscip), timelimitfast ) )
740 fast = TRUE;
741
742 if ( fast && benefical )
744
745 if ( !fast && benefical )
747
748 if ( fast && !benefical )
750
751 if ( !fast && !benefical )
753
754 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "scorecoef for subproblem %d is %f with weighting factor %f\n", block, score_coef, weight_subproblem );
755
756 *scorevalue += score_coef * weight_subproblem;
757
758 /* free stuff */
759 for( int var = 0; var < partialdec->getNVarsForBlock(block); ++var )
760 {
761 int varid = partialdec->getVarsForBlock(block)[var];
762 SCIPreleaseVar(subscip, &indextopricingvar[varid]);
763 }
764
765 SCIPhashmapFree(&hashpricingvartoindex);
766
767 SCIPfree(&subscip);
768 }// end for blocks
769
770 return SCIP_OKAY;
771}
772
773
774
775
776/*
777 * score specific interface methods
778 */
779
780/** creates the strong decomposition score and includes it in SCIP */
782 GCG* gcg /**< GCG data structure */
783 )
784{
785 GCG_SCOREDATA* scoredata = NULL;
787 SCIP_CALL( SCIPallocMemory(scip, &scoredata) );
788
789 scoredata->dualvalsrandom = new std::vector<SCIP_Real>();
790 scoredata->dualvalsoptimaloriglp = new std::vector<SCIP_Real>();
791 scoredata->dualvalsrandomset = FALSE;
793
794 assert(scoredata != NULL);
795
796 SCIP_CALL(
798 scoreFreeStrong, scoreCalcStrong) );
799
800 SCIP_CALL( SCIPaddRealParam(scip, "detection/scores/strong/timelimit",
801 "Timelimit for strong decompositions score calculation per partialdec in seconds", &scoredata->strongtimelimit, FALSE,
802 DEFAULT_STRONGTIMELIMIT, 0., INT_MAX, NULL, NULL) );
803
804 SCIP_CALL( SCIPaddIntParam(scip, "detection/scores/strong/dualvalrandommethod",
805 "Method for random dual values use for strong decomposition: 1: naive, 2: expected equality exponential distributed, 3: expected overestimation exponential distributed ",
808
809 SCIP_CALL( SCIPaddRealParam(scip, "detection/scores/strong/coeffactororigvsrandom",
810 "Convex coefficient for orig dual val, i.e. (1-this coef) is factor for random dual value", &scoredata->coeffactororigvsrandom, FALSE,
812
813 return SCIP_OKAY;
814}
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
GCG_EXPORT std::vector< int > & getConssForVar(int varIndex)
returns the constraint indices of the coefficient matrix for a variable
GCG_EXPORT int getNConss()
returns the number of variables considered in the detprobdata
GCG_EXPORT int getNConssForVar(int varIndex)
returns the number of constraints for a given variable where the var has a nonzero entry in
GCG_EXPORT SCIP_VAR * getVar(int varIndex)
returns SCIP variable related to a variable index
GCG_EXPORT SCIP_Real getVal(int row, int col)
returns a coefficient from the coefficient matrix
GCG_EXPORT SCIP_CONS * getCons(int consIndex)
returns the SCIP constraint related to a constraint index
class to manage partial decompositions
GCG_EXPORT bool isConsMastercons(int cons)
Gets whether the cons is a master cons.
GCG_EXPORT std::vector< int > & getConssForBlock(int block)
returns array containing constraints assigned to a block
GCG_EXPORT DETPROBDATA * getDetprobdata()
Gets the corresponding detprobdata.
GCG_EXPORT int getNVarsForBlock(int block)
Gets size of the vector containing vars assigned to a block.
GCG_EXPORT bool isAssignedToOrigProb()
Gets whether the partialdec is from the original problem.
GCG_EXPORT int getNConssForBlock(int block)
Gets size of the vector containing conss assigned to a block.
GCG_EXPORT std::vector< int > & getVarsForBlock(int block)
Gets array containing vars of a block.
GCG_EXPORT int getNBlocks()
Gets the number of blocks.
DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved(GCG *gcg)
help method to access detprobdata for transformed problem
DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig(GCG *gcg)
help method to access detprobdata for unpresolved problem
PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID(GCG *gcg, int partialdecid)
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
constraint handler for structure detection
C++ interface of cons_decomp.
#define SCIP_MAXSTRLEN
#define SCIP_Bool
#define SCIP_Real
#define ABS(x)
#define MAX(x, y)
#define SCIP_CALL_ABORT(x)
#define TRUE
#define FALSE
#define infinity
SCIP_RETCODE SCIPcopy(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
SCIP * GCGgetOrigprob(GCG *gcg)
Definition gcg.cpp:87
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_OBJSENSE SCIPgetObjsense(SCIP *scip)
SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Real GCGconsGetRhs(SCIP *scip, SCIP_CONS *cons)
Definition scip_misc.c:109
SCIP_Real GCGconsGetDualsol(SCIP *scip, SCIP_CONS *cons)
Definition scip_misc.c:367
SCIP_RETCODE GCGconsGetVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars)
Definition scip_misc.c:487
SCIP_Real GCGconsGetLhs(SCIP *scip, SCIP_CONS *cons)
Definition scip_misc.c:207
SCIP_RETCODE GCGconsGetVals(SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int nvals)
Definition scip_misc.c:618
int GCGconsGetNVars(SCIP *scip, SCIP_CONS *cons)
Definition scip_misc.c:433
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
GCG_EXPORT GCG_SCOREDATA * GCGscoreGetData(GCG_SCORE *score)
Definition score.c:123
GCG_EXPORT const char * GCGscoreGetName(GCG_SCORE *score)
Definition score.c:145
GCG_EXPORT SCIP_RETCODE GCGincludeScore(GCG *gcg, const char *name, const char *shortname, const char *description, GCG_SCOREDATA *scoredata, GCG_DECL_SCOREFREE((*scorefree)),)
creates a score and includes it in GCG
Definition score.c:50
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_Real SCIPgetFirstLPLowerboundRoot(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIP_VAR * var
SCIP_Bool success
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
int nvars
SCIP_Real obj
#define NULL
SCIP_RETCODE GCGsetPricingProblemParameters(GCG_DECTYPE dectype, SCIP *pricingprob, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts)
Definition relax_gcg.c:865
various SCIP helper methods
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
internal methods for scores
#define SCORE_SHORTNAME
#define SCORE_NAME
#define SCORE_DESC
#define DEFAULT_SCORECOEF_FASTBENEFICIAL
#define DEFAULT_STRONGTIMELIMIT
#define DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL
SCIP_RETCODE GCGincludeScoreStrongDecomp(GCG *gcg)
#define DEFAULT_RANDPARTIALDEC
static SCIP_RETCODE createTestPricingprobConss(SCIP *scip, SCIP *subscip, gcg::PARTIALDECOMP *partialdec, int block, SCIP_HASHMAP *hashorig2pricingvar)
creates the pricing problem constraints
enum GCG_Random_dual_methods GCG_RANDOM_DUAL_METHOD
#define DEFAULT_DUALVALRANDOMMETHOD
static SCIP_Real getDualvalRandom(GCG *gcg, GCG_SCORE *score, int consindex, SCIP_Bool transformed)
return the a random value of the dual variable of the corresponding ; if it is not calculated yet it ...
#define DEFAULT_SCORECOEF_FASTNOTBENEFICIAL
static SCIP_RETCODE calculateDualvalsOptimalOrigLP(GCG *gcg, GCG_SCORE *score, SCIP_Bool transformed)
method to calculate and set the optimal dual values from original lp, used for strong detection score
static SCIP_RETCODE shuffleDualvalsRandom(GCG *gcg, GCG_SCORE *score, SCIP_Bool transformed)
method that shuffles randomly and set dual variable values, used for strong detection score
#define DEFAULT_COEFFACTORORIGVSRANDOM
#define DEFAULT_SCORECOEF_MEDIUMBENEFICIAL
static SCIP_RETCODE setTestpricingProblemParameters(SCIP *scip, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts, SCIP_Real timelimit)
sets the pricing problem parameters
GCG_Random_dual_methods
@ GCG_RANDOM_DUAL_EXPECTED_EQUAL
@ GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE
@ GCG_RANDOM_DUAL_NAIVE
static SCIP_Real getDualvalOptimalLP(GCG *gcg, GCG_SCORE *score, int consindex, SCIP_Bool transformed)
returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning...
strong score
std::vector< SCIP_Real > * dualvalsoptimaloriglp
std::vector< SCIP_Real > * dualvalsrandom
int strongdetectiondualvalrandommethod
SCIP_Bool dualvalsoptimaloriglpcalculated
SCIP_Bool dualvalsrandomset
SCIP_Real coeffactororigvsrandom
SCIP_Real strongtimelimit
struct SCIP_Cons SCIP_CONS
@ GCG_DECTYPE_UNKNOWN
Definition type_decomp.h:50
struct Gcg GCG
Definition type_gcg.h:44
SCIP_VERBLEVEL_MINIMAL
SCIP_VERBLEVEL_HIGH
SCIP_VERBLEVEL_FULL
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_RandNumGen SCIP_RANDNUMGEN
SCIP_OBJSENSE_MAXIMIZE
SCIP_OBJSENSE_MINIMIZE
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
#define GCG_DECL_SCOREFREE(x)
Definition type_score.h:55
struct GCG_Score GCG_SCORE
Definition type_score.h:45
struct GCG_ScoreData GCG_SCOREDATA
Definition type_score.h:46
#define GCG_DECL_SCORECALC(x)
Definition type_score.h:66
SCIP_STATUS_OPTIMAL
SCIP_STATUS_TIMELIMIT
struct SCIP_Var SCIP_VAR
SCIP_VARTYPE_CONTINUOUS
SCIP_VARTYPE_BINARY