class_stabilization.cpp
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
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-2018 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
44 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
45 /* #define SCIP_DEBUG */
46 #include "class_stabilization.h"
47 #include "pricer_gcg.h"
48 #include "gcg.h"
49 #include "pub_gcgcol.h"
50 #include "sepa_master.h"
51 #include "objscip/objscip.h"
52 #include "scip/cons_linear.h"
53 
54 namespace gcg {
55 
57  SCIP* scip,
58  PricingType* pricingtype_,
59  SCIP_Bool hybridascent_
60  ) :scip_(scip), stabcenterconsvals((SCIP_Real*) NULL), stabcenterconsvalssize(0), nstabcenterconsvals(0),
61  stabcentercutvals((SCIP_Real*) NULL), stabcentercutvalssize(0), nstabcentercutvals(0),
62  stabcenterlinkingconsvals((SCIP_Real*) NULL), nstabcenterlinkingconsvals(0),
63  stabcenterconv((SCIP_Real*) NULL), nstabcenterconv(0), dualdiffnorm(0.0),
64  subgradientconsvals(NULL), subgradientconsvalssize(0), nsubgradientconsvals(0),
65  subgradientcutvals(NULL), subgradientcutvalssize(0), nsubgradientcutvals(0),
66  subgradientlinkingconsvals(NULL), nsubgradientlinkingconsvals(0),
67  subgradientnorm(0.0), hybridfactor(0.0),
68  pricingtype(pricingtype_), alpha(0.8), alphabar(0.8), hybridascent(hybridascent_), beta(0.0), nodenr(-1), k(0), t(0), hasstabilitycenter(FALSE),stabcenterbound(-SCIPinfinity(scip)),
69  inmispricingschedule(FALSE), subgradientproduct(0.0)
70 {
71 
72 }
73 
75 {
76  SCIPfreeBlockMemoryArrayNull(scip_, &stabcenterconsvals, stabcenterconsvalssize); /*lint !e64*/
77  SCIPfreeBlockMemoryArrayNull(scip_, &stabcentercutvals, stabcentercutvalssize); /*lint !e64*/
78  SCIPfreeMemoryArrayNull(scip_, &stabcenterlinkingconsvals); /*lint !e64*/
79  SCIPfreeBlockMemoryArrayNull(scip_, &subgradientconsvals, subgradientconsvalssize); /*lint !e64*/
80  SCIPfreeBlockMemoryArrayNull(scip_, &subgradientcutvals, subgradientcutvalssize); /*lint !e64*/
81  SCIPfreeMemoryArrayNull(scip_, &subgradientlinkingconsvals); /*lint !e64*/
82  SCIPfreeBlockMemoryArrayNull(scip_, &stabcenterconv, nstabcenterconv); /*lint !e64*/
83  scip_ = (SCIP*) NULL;
84  stabcenterconsvals = (SCIP_Real*) NULL;
85  stabcentercutvals = (SCIP_Real*) NULL;
86  stabcenterlinkingconsvals = (SCIP_Real*) NULL;
87  stabcenterconv = (SCIP_Real*) NULL;
88  pricingtype = (PricingType*) NULL;
89  nodenr = -1;
90 
91 
92 }
93 
94 SCIP_RETCODE Stabilization::updateStabcenterconsvals()
95 {
96  SCIP* origprob = GCGmasterGetOrigprob(scip_);
97  int nconss = GCGgetNMasterConss(origprob);
98 
99  if( nconss == nstabcenterconsvals )
100  {
101  return SCIP_OKAY;
102  }
103 
104  if( nconss > stabcenterconsvalssize )
105  {
106  int oldsize = stabcenterconsvalssize;
107  stabcenterconsvalssize = SCIPcalcMemGrowSize(scip_, nconss);
108  SCIP_CALL( SCIPreallocBlockMemoryArray(scip_, &stabcenterconsvals, oldsize, stabcenterconsvalssize) );
109  }
110  assert(stabcenterconsvals != NULL);
111  BMSclearMemoryArray(&stabcenterconsvals[nstabcenterconsvals], (size_t)nconss-nstabcenterconsvals); /*lint !e866*/
112 
113  nstabcenterconsvals = nconss;
114 
115  return SCIP_OKAY;
116 }
117 
118 SCIP_RETCODE Stabilization::updateStabcentercutvals()
119 {
120  int ncuts = GCGsepaGetNCuts(scip_);
121 
122  if( ncuts == nstabcentercutvals )
123  {
124  return SCIP_OKAY;
125  }
126 
127  if( ncuts > stabcentercutvalssize )
128  {
129  int oldsize = stabcentercutvalssize;
130  stabcentercutvalssize = SCIPcalcMemGrowSize(scip_, ncuts);
131  SCIP_CALL( SCIPreallocBlockMemoryArray(scip_, &stabcentercutvals, oldsize, stabcentercutvalssize) );
132  }
133  assert(stabcentercutvals != NULL);
134  BMSclearMemoryArray(&stabcentercutvals[nstabcentercutvals], (size_t)ncuts-nstabcentercutvals); /*lint !e866*/
135 
136  nstabcentercutvals = ncuts;
137 
138  return SCIP_OKAY;
139 }
140 
141 SCIP_RETCODE Stabilization::updateSubgradientconsvals()
142 {
143  SCIP* origprob = GCGmasterGetOrigprob(scip_);
144  int nconss = GCGgetNMasterConss(origprob);
145 
146  if( nconss == nsubgradientconsvals )
147  {
148  return SCIP_OKAY;
149  }
150 
151  if( nconss > subgradientconsvalssize )
152  {
153  int oldsize = subgradientconsvalssize;
154  subgradientconsvalssize = SCIPcalcMemGrowSize(scip_, nconss);
155  SCIP_CALL( SCIPreallocBlockMemoryArray(scip_, &subgradientconsvals, oldsize, subgradientconsvalssize) );
156  }
157  assert(subgradientconsvals != NULL);
158  BMSclearMemoryArray(&subgradientconsvals[nsubgradientconsvals], (size_t)nconss-nsubgradientconsvals); /*lint !e866*/
159 
160  nsubgradientconsvals = nconss;
161 
162  return SCIP_OKAY;
163 }
164 
165 SCIP_RETCODE Stabilization::updateSubgradientcutvals()
166 {
167  int ncuts = GCGsepaGetNCuts(scip_);
168 
169  if( ncuts == nsubgradientcutvals )
170  {
171  return SCIP_OKAY;
172  }
173 
174  if( ncuts > subgradientcutvalssize )
175  {
176  int oldsize = subgradientcutvalssize;
177  subgradientcutvalssize = SCIPcalcMemGrowSize(scip_, ncuts);
178  SCIP_CALL( SCIPreallocBlockMemoryArray(scip_, &subgradientcutvals, oldsize, subgradientcutvalssize) );
179  }
180  assert(subgradientcutvals != NULL);
181  BMSclearMemoryArray(&subgradientcutvals[nsubgradientcutvals], (size_t)ncuts-nsubgradientcutvals); /*lint !e866*/
182 
183  nsubgradientcutvals = ncuts;
184 
185  return SCIP_OKAY;
186 }
187 
188 
190  int nlinkingconssnew
191  )
192 {
193 
194  SCIPfreeMemoryArrayNull(scip_, &stabcenterlinkingconsvals); /*lint !e64*/
195  SCIP_CALL( SCIPallocMemoryArray(scip_, &stabcenterlinkingconsvals, nlinkingconssnew) );
196 
197  if( hybridascent )
198  {
199  SCIPfreeMemoryArrayNull(scip_, &subgradientlinkingconsvals); /*lint !e64*/
200  SCIP_CALL( SCIPallocMemoryArray(scip_, &subgradientlinkingconsvals, nlinkingconssnew) );
201  BMSclearMemoryArray(subgradientlinkingconsvals, nlinkingconssnew);
202  }
203 
204  nstabcenterlinkingconsvals = nlinkingconssnew;
205  BMSclearMemoryArray(stabcenterlinkingconsvals, nstabcenterlinkingconsvals);
206 
207 
208  return SCIP_OKAY;
209 }
210 
212  int nconvconssnew
213  )
214 {
215  SCIPfreeBlockMemoryArrayNull(scip_, &stabcenterconv, nstabcenterconv); /*lint !e64*/
216  SCIP_CALL( SCIPallocBlockMemoryArray(scip_, &stabcenterconv, nconvconssnew) );
217 
218  nstabcenterconv = nconvconssnew;
219  BMSclearMemoryArray(stabcenterconv, nstabcenterconv);
220 
221  return SCIP_OKAY;
222 }
223 
225  int i
226  )
227 {
228  SCIP* origprob = GCGmasterGetOrigprob(scip_);
229  SCIP_Real subgradient = 0.0;
230 
231  assert(i < nstabcenterlinkingconsvals);
232  assert(nstabcenterlinkingconsvals<= GCGgetNVarLinkingconss(origprob));
233  assert(stabcenterlinkingconsvals != NULL);
234 
235  SCIP_CONS* cons = GCGgetVarLinkingconss(origprob)[i];
236 
237  if( hybridascent && hasstabilitycenter )
238  subgradient = subgradientlinkingconsvals[i];
239 
240  return computeDual(stabcenterlinkingconsvals[i], pricingtype->consGetDual(scip_, cons), subgradient, 0.0, 0.0);
241 }
242 
244  int i, /* index of the constraint */
245  SCIP_Real* dual /* return pointer for dual value */
246 )
247 {
248  SCIP* origprob = GCGmasterGetOrigprob(scip_);
249  SCIP_Real subgradient = 0.0;
250 #ifndef NDEBUG
251  int nconss = GCGgetNMasterConss(origprob);
252 #endif
253  assert(i < nconss);
254  assert(dual != NULL);
255 
256  SCIP_CONS* cons = GCGgetMasterConss(origprob)[i];
257 
258  if( i >= nstabcenterconsvals )
259  SCIP_CALL( updateStabcenterconsvals() );
260 
261  assert(i < nstabcenterconsvals);
262  assert(stabcenterconsvals != NULL);
263 
264  if( i >= nsubgradientconsvals && hybridascent )
265  SCIP_CALL( updateSubgradientconsvals() );
266 
267  if( hybridascent && hasstabilitycenter )
268  subgradient = subgradientconsvals[i];
269 
270  *dual = computeDual(stabcenterconsvals[i], pricingtype->consGetDual(scip_, cons), subgradient, SCIPgetLhsLinear(scip_, cons), SCIPgetRhsLinear(scip_, cons));
271  return SCIP_OKAY;
272 
273 }
274 
276  int i, /* index of the row */
277  SCIP_Real* dual /* return pointer for dual value */
278 )
279 {
280 #ifndef NDEBUG
281  int nrows = GCGsepaGetNCuts(scip_);
282 #endif
283  assert(i < nrows);
284  assert(dual != NULL);
285 
286  SCIP_ROW* row = GCGsepaGetMastercuts(scip_)[i];
287  SCIP_Real subgradient = 0.0;
288 
289  if( i >= nstabcentercutvals )
290  SCIP_CALL( updateStabcentercutvals() );
291 
292  assert(i < nstabcentercutvals);
293  assert(stabcentercutvals != NULL);
294 
295  if( i >= nsubgradientcutvals && hybridascent )
296  SCIP_CALL( updateSubgradientcutvals() );
297 
298  if( hybridascent && hasstabilitycenter )
299  {
300  assert(subgradientcutvals != NULL);
301  subgradient = subgradientcutvals[i];
302  }
303 
304  *dual = computeDual(stabcentercutvals[i], pricingtype->rowGetDual(row), subgradient, SCIProwGetLhs(row), SCIProwGetRhs(row));
305 
306  return SCIP_OKAY;
307 }
308 
310  int i
311  )
312 {
313  SCIP* origprob = GCGmasterGetOrigprob(scip_);
314 
315  assert(i < nstabcenterconv);
316  assert(nstabcenterconv<= GCGgetNPricingprobs(origprob));
317  assert(stabcenterconv != NULL);
318 
319  SCIP_CONS* cons = GCGgetConvCons(origprob, i);
320  SCIP_Real subgradient = 0.0;
321 
322  return computeDual(stabcenterconv[i], pricingtype->consGetDual(scip_, cons), subgradient, (SCIP_Real) GCGgetNIdenticalBlocks(origprob, i), (SCIP_Real) GCGgetNIdenticalBlocks(origprob, i));
323 }
324 
326  SCIP_Real lowerbound,
327  SCIP_Real* dualsolconv,
328  GCG_COL** pricingcols
329  )
330 {
331  assert(dualsolconv != NULL);
332  SCIPdebugMessage("Updating stability center: ");
333 
334  /* in case the bound is not improving and we have a stability center, do nothing */
335  if( SCIPisLE(scip_, lowerbound, stabcenterbound) && hasstabilitycenter )
336  {
337  SCIPdebugPrintf("no bound increase: %g <= %g\n", lowerbound, SCIPnodeGetLowerbound(SCIPgetCurrentNode(scip_)));
338  return SCIP_OKAY;
339  }
340 
341  SCIPdebugPrintf("bound increase: %g > %g\n", lowerbound, SCIPnodeGetLowerbound(SCIPgetCurrentNode(scip_)));
342 
343  /* first update the arrays */
344  SCIP_CALL( updateStabcenterconsvals() );
345  SCIP_CALL( updateStabcentercutvals() );
346 
347  if( hybridascent )
348  {
349  SCIP_CALL( updateSubgradientconsvals() );
350  SCIP_CALL( updateSubgradientcutvals() );
351  }
352 
353  /* get new dual values */
354  SCIP* origprob = GCGmasterGetOrigprob(scip_);
355 
356  int nconss = GCGgetNMasterConss(origprob);
357  int ncuts = GCGsepaGetNCuts(scip_);
358  int nprobs = GCGgetNPricingprobs(origprob);
359 
360  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
361  assert(nconss <= nstabcenterconsvals);
362  assert(ncuts <= nstabcentercutvals);
363 
364  for( int i = 0; i < nconss; ++i )
365  {
366  SCIP_CALL( consGetDual(i, &stabcenterconsvals[i]) );
367  }
368 
369  for( int i = 0; i < ncuts; ++i )
370  {
371  SCIP_CALL( rowGetDual(i, &stabcentercutvals[i]) );
372  }
373 
374  for( int i = 0; i < nstabcenterlinkingconsvals; ++i)
375  {
376  stabcenterlinkingconsvals[i] = linkingconsGetDual(i);
377  }
378 
379  for( int i = 0; i < nprobs; ++i )
380  {
381  if(!GCGisPricingprobRelevant(origprob, i))
382  continue;
383  stabcenterconv[i] = dualsolconv[i];
384  }
385 
386  if( hybridascent )
387  calculateSubgradient(pricingcols);
388 
389  hasstabilitycenter = TRUE;
390  stabcenterbound = lowerbound;
391 
392  return SCIP_OKAY;
393 }
394 
395 SCIP_Real Stabilization::computeDual(
396  SCIP_Real center,
397  SCIP_Real current,
398  SCIP_Real subgradient,
399  SCIP_Real lhs,
400  SCIP_Real rhs
401  ) const
402 {
403  SCIP_Real usedalpha = alpha;
404  SCIP_Real usedbeta = beta;
405 
406  if ( inmispricingschedule )
407  {
408  usedalpha = alphabar;
409  usedbeta = 0.0;
410  }
411 
412  if( hasstabilitycenter && (SCIPisZero(scip_, usedbeta) || SCIPisZero(scip_, usedalpha)) )
413  return usedalpha*center+(1.0-usedalpha)*current;
414  else if( hasstabilitycenter && SCIPisPositive(scip_, usedbeta) )
415  {
416  SCIP_Real dual = center + hybridfactor * (beta * (center + subgradient * dualdiffnorm / subgradientnorm) + (1.0 - beta) * current - center);
417 
418  /* make sure dual solution has the correct sign */
419  if( SCIPisInfinity(scip_, rhs) )
420  dual = MAX(dual, 0.0);
421  else if( SCIPisInfinity(scip_, -lhs) )
422  dual = MIN(dual, 0.0);
423 
424  return dual;
425  }
426  else
427  return current;
428 }
429 
430 void Stabilization::updateIterationCount()
431 {
432  ++t;
433 }
434 
435 void Stabilization::updateIterationCountMispricing()
436 {
437  ++k;
438 }
439 
441 {
442  if( nodenr != SCIPnodeGetNumber(SCIPgetCurrentNode(scip_)) )
443  {
444  nodenr = SCIPnodeGetNumber(SCIPgetCurrentNode(scip_));
445  k = 0;
446  t = 1;
447  alpha = 0.8;
448  hasstabilitycenter = FALSE;
449  stabcenterbound = -SCIPinfinity(scip_);
450  inmispricingschedule = FALSE;
451  }
452 }
453 
456 {
457  if( hasstabilitycenter && hybridascent && !inmispricingschedule )
458  {
459  /* first update the arrays */
460  SCIP_CALL( updateStabcenterconsvals() );
461  SCIP_CALL( updateStabcentercutvals() );
462 
463  SCIP_CALL( updateSubgradientconsvals() );
464  SCIP_CALL( updateSubgradientcutvals() );
465 
466  if( SCIPisPositive(scip_, alpha) )
467  {
468  calculateDualdiffnorm();
469  calculateBeta();
470  calculateHybridFactor();
471  }
472  }
473 
474  return SCIP_OKAY;
475 }
476 
478 {
479  SCIPdebugMessage("Alphabar update after mispricing\n");
480  updateIterationCountMispricing();
481  alphabar = MAX(0.0, 1-k*(1-alpha));
482  SCIPdebugMessage("alphabar updated to %g in mispricing iteration k=%d and node pricing iteration t=%d \n", alphabar, k, t);
483 }
484 
486 {
487  SCIPdebugMessage("Alpha update after successful pricing\n");
488  updateIterationCount();
489 
490  /* There is a sign error in the stabilization paper:
491  * if the scalar product (subgradientproduct) is positive, the angle is less than 90° and we want to decrease alpha
492  */
493  if( SCIPisNegative(scip_, subgradientproduct) )
494  {
495  increaseAlpha();
496  }
497  else
498  {
499  decreaseAlpha();
500  }
501 
502 }
503 
504 void Stabilization::increaseAlpha()
505 {
506  /* to avoid numerical problems, we assure alpha <= 0.9 */
507  alpha = MIN(0.9, alpha+(1-alpha)*0.1);
508 
509  SCIPdebugMessage("alpha increased to %g\n", alpha);
510 }
511 
512 void Stabilization::decreaseAlpha()
513 {
514  alpha = MAX(0.0, alpha-0.1);
515 
516  SCIPdebugMessage("alpha decreased to %g\n", alpha);
517 }
518 
519 SCIP_Real Stabilization::calculateSubgradientProduct(
520  GCG_COL** pricingcols
521  )
522 {
523  SCIP* origprob = GCGmasterGetOrigprob(scip_);
524  SCIP_CONS** origmasterconss = GCGgetLinearOrigMasterConss(origprob);
525  SCIP_CONS** masterconss = GCGgetMasterConss(origprob);
526  SCIP_CONS** linkingconss = GCGgetVarLinkingconss(origprob);
527  int nlinkingconss = GCGgetNVarLinkingconss(origprob);
528  int* linkingconsblocks = GCGgetVarLinkingconssBlock(origprob);
529  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
530  int nconss = GCGgetNMasterConss(origprob);
531  assert(nconss <= nstabcenterconsvals);
532  SCIP_ROW** mastercuts = GCGsepaGetMastercuts(scip_);
533  SCIP_ROW** origmastercuts = GCGsepaGetOrigcuts(scip_);
534  int ncuts = GCGsepaGetNCuts(scip_);
535  assert(ncuts <= nstabcentercutvals);
536 
537  SCIP_Real gradientproduct = 0.0;
538 
539  /* masterconss */
540  for( int i = 0; i < nconss; ++i )
541  {
542  SCIP_VAR** vars;
543  SCIP_Real* vals;
544  int nvars;
545  SCIP_Real lhs; /* can also be rhs, but we need only one */
546 
547  SCIP_CONS* origcons = origmasterconss[i];
548  nvars = SCIPgetNVarsLinear(origprob, origcons);
549  vars = SCIPgetVarsLinear(origprob, origcons);
550  vals = SCIPgetValsLinear(origprob, origcons);
551 
552  SCIP_Real dual = pricingtype->consGetDual(scip_, masterconss[i]);
553  SCIP_Real stabdual;
554 
555  SCIP_CALL( consGetDual(i, &stabdual) );
556 
557  assert(!SCIPisInfinity(scip_, ABS(dual)));
558 
559  if( SCIPisFeasPositive(scip_, stabdual) )
560  {
561  lhs = SCIPgetLhsLinear(origprob, origcons);
562  }
563  else if( SCIPisFeasNegative(scip_, stabdual) )
564  {
565  lhs = SCIPgetRhsLinear(origprob, origcons);
566  }
567  else
568  {
569  continue;
570  }
571 
572  for( int j = 0; j < nvars; ++j )
573  {
574  SCIP_Real val = 0.0;
575  assert(GCGvarIsOriginal(vars[j]));
576  if( GCGvarGetBlock(vars[j]) < 0 )
577  {
578  SCIP_VAR* mastervar = GCGoriginalVarGetMastervars(vars[j])[0];
579  assert(GCGvarIsMaster(mastervar));
580  val = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
581  assert( !SCIPisInfinity(scip_, val) );
582  }
583  else
584  {
585  int block = GCGvarGetBlock(vars[j]);
586  if( !GCGisPricingprobRelevant(origprob, block) )
587  continue;
588 
589  assert(pricingcols[block] != NULL);
590 
591  SCIP_VAR* pricingvar = GCGoriginalVarGetPricingVar(vars[j]);
592  assert(GCGvarIsPricing(pricingvar));
593  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
594  assert(pricingprob != NULL);
595  val = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
596  assert(!SCIPisInfinity(scip_, ABS(val)));
597  }
598  assert(stabcenterconsvals != NULL);
599  assert(vals != NULL);
600  gradientproduct -= (dual - stabcenterconsvals[i]) * vals[j] * val;
601  }
602 
603  assert(stabcenterconsvals != NULL);
604  assert(!SCIPisInfinity(scip_, ABS(lhs)));
605 
606  gradientproduct += (dual - stabcenterconsvals[i]) * lhs;
607  }
608 
609  /* mastercuts */
610  for( int i = 0; i < ncuts; ++i )
611  {
612  SCIP_COL** cols;
613  SCIP_Real* vals;
614  int nvars;
615  SCIP_Real lhs; /* can also be rhs, but we need only one */
616 
617  SCIP_ROW* origcut = origmastercuts[i];
618  nvars = SCIProwGetNNonz(origcut);
619  cols = SCIProwGetCols(origcut);
620  vals = SCIProwGetVals(origcut);
621 
622  SCIP_Real dual = pricingtype->rowGetDual(mastercuts[i]);
623  assert(!SCIPisInfinity(scip_, ABS(dual)));
624 
625  SCIP_Real stabdual;
626 
627  SCIP_CALL( rowGetDual(i, &stabdual) );
628 
629  if( SCIPisFeasGT(scip_, stabdual, 0.0) )
630  {
631  lhs = SCIProwGetLhs(origcut);
632  }
633  else if( SCIPisFeasLT(scip_, stabdual, 0.0) )
634  {
635  lhs = SCIProwGetRhs(origcut);
636  }
637  else
638  {
639  continue;
640  }
641  for( int j = 0; j < nvars; ++j )
642  {
643  SCIP_Real val = 0.0;
644  SCIP_VAR* var = SCIPcolGetVar(cols[j]);
645  assert(GCGvarIsOriginal(var));
646 
647  /* Linking or master variable */
648  if( GCGvarGetBlock(var) < 0 )
649  {
650  SCIP_VAR* mastervar = GCGoriginalVarGetMastervars(var)[0];
651  assert(GCGvarIsMaster(mastervar));
652  val = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
653  assert(!SCIPisInfinity(scip_, ABS(val)));
654  }
655  /* Variable in a pricing problem */
656  else
657  {
658  int block = GCGvarGetBlock(var);
659  if( !GCGisPricingprobRelevant(origprob, block) )
660  continue;
661 
662  assert(pricingcols[block] != NULL);
663 
664  SCIP_VAR* pricingvar = GCGoriginalVarGetPricingVar(var);
665  assert(GCGvarIsPricing(pricingvar));
666  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
667  assert(pricingprob != NULL);
668  val = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
669  assert(!SCIPisInfinity(scip_, ABS(val)));
670  }
671  assert(stabcentercutvals != NULL);
672  assert(vals != NULL);
673  gradientproduct -= (dual - stabcentercutvals[i]) * vals[j] * val;
674  }
675 
676  assert(!SCIPisInfinity(scip_, ABS(lhs)));
677  assert(stabcentercutvals != NULL);
678 
679  gradientproduct += (dual - stabcentercutvals[i]) * lhs;
680  }
681 
682  /* linkingconss */
683  for( int i = 0; i < nlinkingconss; ++i )
684  {
685  SCIP_VAR* mastervar;
686  SCIP_VAR* pricingvar;
687  SCIP_CONS* linkingcons = linkingconss[i];
688  int block = linkingconsblocks[i];
689  mastervar = SCIPgetVarsLinear(scip_, linkingcons)[0];
690  assert(GCGvarIsMaster(mastervar));
691 
692  pricingvar = GCGlinkingVarGetPricingVars(GCGmasterVarGetOrigvars(mastervar)[0])[block];
693  assert(GCGvarIsPricing(pricingvar));
694  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
695  assert(pricingprob != NULL);
696 
697  assert(stabcenterlinkingconsvals != NULL);
698  SCIP_Real dual = pricingtype->consGetDual(scip_, linkingcons) - stabcenterlinkingconsvals[i];
699 
700  SCIP_Real stabdual = linkingconsGetDual(i);
701 
702  if( SCIPisFeasZero(origprob, stabdual) )
703  continue;
704 
705  assert(pricingcols[block] != NULL);
706 
707  SCIP_Real masterval = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
708  SCIP_Real pricingval = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
709  assert(!SCIPisInfinity(scip_, ABS(masterval)));
710  assert(!SCIPisInfinity(scip_, ABS(pricingval)));
711  assert(!SCIPisInfinity(scip_, ABS(dual)));
712  gradientproduct -= dual * (masterval - pricingval);
713  }
714 
715  SCIPdebugMessage("Update gradient product with value %g.\n", gradientproduct);
716 
717  return gradientproduct;
718 }
719 
721 void Stabilization::calculateSubgradient(
722  GCG_COL** pricingcols
723 )
724 {
725  SCIP* origprob = GCGmasterGetOrigprob(scip_);
726  SCIP_CONS** origmasterconss = GCGgetLinearOrigMasterConss(origprob);
727 
728  SCIP_CONS** linkingconss = GCGgetVarLinkingconss(origprob);
729  int nlinkingconss = GCGgetNVarLinkingconss(origprob);
730  int* linkingconsblocks = GCGgetVarLinkingconssBlock(origprob);
731  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
732  int nconss = GCGgetNMasterConss(origprob);
733  assert(nconss <= nstabcenterconsvals);
734  SCIP_ROW** origmastercuts = GCGsepaGetOrigcuts(scip_);
735  int ncuts = GCGsepaGetNCuts(scip_);
736  assert(ncuts <= nstabcentercutvals);
737 
738  subgradientnorm = 0.0;
739 
740  /* masterconss */
741  for( int i = 0; i < nconss; ++i )
742  {
743  SCIP_VAR** vars;
744  SCIP_Real* vals;
745  int nvars;
746  SCIP_Real activity;
747  SCIP_Real infeasibility;
748 
749  SCIP_CONS* origcons = origmasterconss[i];
750  nvars = SCIPgetNVarsLinear(origprob, origcons);
751  vars = SCIPgetVarsLinear(origprob, origcons);
752  vals = SCIPgetValsLinear(origprob, origcons);
753 
754  SCIP_Real dual = stabcenterconsvals[i];
755  assert(!SCIPisInfinity(scip_, ABS(dual)));
756 
757  activity = 0.0;
758 
759  for( int j = 0; j < nvars; ++j )
760  {
761  SCIP_Real val = 0.0;
762  assert(GCGvarIsOriginal(vars[j]));
763  if( GCGvarGetBlock(vars[j]) < 0 )
764  {
765  SCIP_VAR* mastervar = GCGoriginalVarGetMastervars(vars[j])[0];
766  assert(GCGvarIsMaster(mastervar));
767  val = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
768  assert( !SCIPisInfinity(scip_, val) );
769  }
770  else
771  {
772  int block = GCGvarGetBlock(vars[j]);
773  if( !GCGisPricingprobRelevant(origprob, block) )
774  continue;
775 
776  assert(pricingcols[block] != NULL);
777 
778  SCIP_VAR* pricingvar = GCGoriginalVarGetPricingVar(vars[j]);
779  assert(GCGvarIsPricing(pricingvar));
780  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
781  assert(pricingprob != NULL);
782  val = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
783  assert(!SCIPisInfinity(scip_, ABS(val)));
784  }
785  assert(vals != NULL);
786  activity += vals[j] * val;
787  }
788 
789  infeasibility = 0.0;
790 
791  if( SCIPisFeasPositive(scip_, dual) /* || SCIPisInfinity(origprob, SCIPgetRhsLinear(origprob, origcons)) */)
792  {
793  infeasibility = SCIPgetLhsLinear(origprob, origcons) - activity;
794  }
795  else if( SCIPisFeasNegative(scip_, dual) /* || SCIPisInfinity(origprob, SCIPgetLhsLinear(origprob, origcons)) */)
796  {
797  infeasibility = SCIPgetRhsLinear(origprob, origcons) - activity;
798  }
799 
800  assert(subgradientconsvals != NULL);
801  assert(!SCIPisInfinity(scip_, SQR(infeasibility)));
802 
803  subgradientconsvals[i] = infeasibility;
804 
805  if( SCIPisPositive(scip_, SQR(infeasibility)) )
806  subgradientnorm += SQR(infeasibility);
807  }
808 
809  /* mastercuts */
810  for( int i = 0; i < ncuts; ++i )
811  {
812  SCIP_COL** cols;
813  SCIP_Real* vals;
814  int nvars;
815  SCIP_Real activity;
816  SCIP_Real infeasibility;
817 
818  SCIP_ROW* origcut = origmastercuts[i];
819  nvars = SCIProwGetNNonz(origcut);
820  cols = SCIProwGetCols(origcut);
821  vals = SCIProwGetVals(origcut);
822 
823  activity = 0.0;
824 
825  SCIP_Real dual = stabcentercutvals[i];
826  assert(!SCIPisInfinity(scip_, ABS(dual)));
827  for( int j = 0; j < nvars; ++j )
828  {
829  SCIP_Real val = 0.0;
830  SCIP_VAR* var = SCIPcolGetVar(cols[j]);
831  assert(GCGvarIsOriginal(var));
832 
833  /* Linking or master variable */
834  if( GCGvarGetBlock(var) < 0 )
835  {
836  SCIP_VAR* mastervar = GCGoriginalVarGetMastervars(var)[0];
837  assert(GCGvarIsMaster(mastervar));
838  val = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
839  assert(!SCIPisInfinity(scip_, ABS(val)));
840  }
841  /* Variable in a pricing problem */
842  else
843  {
844  int block = GCGvarGetBlock(var);
845  if( !GCGisPricingprobRelevant(origprob, block) )
846  continue;
847 
848  assert(pricingcols[block] != NULL);
849 
850  SCIP_VAR* pricingvar = GCGoriginalVarGetPricingVar(var);
851  assert(GCGvarIsPricing(pricingvar));
852  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
853  assert(pricingprob != NULL);
854  val = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
855  assert(!SCIPisInfinity(scip_, ABS(val)));
856  }
857  assert(stabcentercutvals != NULL);
858  assert(vals != NULL);
859  activity += vals[j] * val;
860  }
861 
862  infeasibility = 0.0;
863 
864  if( SCIPisFeasPositive(scip_, dual) )
865  {
866  infeasibility = SCIProwGetLhs(origcut) - activity;
867  }
868  else if( SCIPisFeasNegative(scip_, dual) )
869  {
870  infeasibility = SCIProwGetRhs(origcut) - activity;
871  }
872 
873  assert(subgradientcutvals != NULL);
874  assert(!SCIPisInfinity(scip_, SQR(infeasibility)));
875 
876  subgradientcutvals[i] = infeasibility;
877 
878  if( SCIPisPositive(scip_, SQR(infeasibility)) )
879  subgradientnorm += SQR(infeasibility);
880  }
881 
882  /* linkingconss */
883  for( int i = 0; i < nlinkingconss; ++i )
884  {
885  SCIP_VAR* mastervar;
886  SCIP_VAR* pricingvar;
887  SCIP_CONS* linkingcons = linkingconss[i];
888  int block = linkingconsblocks[i];
889  SCIP_Real activity;
890  SCIP_Real infeasibility;
891  mastervar = SCIPgetVarsLinear(scip_, linkingcons)[0];
892  assert(GCGvarIsMaster(mastervar));
893 
894  pricingvar = GCGlinkingVarGetPricingVars(GCGmasterVarGetOrigvars(mastervar)[0])[block];
895  assert(GCGvarIsPricing(pricingvar));
896  SCIP* pricingprob = GCGgetPricingprob(origprob, block);
897  assert(pricingprob != NULL);
898 
899  assert(pricingcols[block] != NULL);
900 
901  assert(stabcenterlinkingconsvals != NULL);
902  SCIP_Real masterval = SCIPgetSolVal(scip_, (SCIP_SOL*) NULL, mastervar);
903  SCIP_Real pricingval = GCGcolGetSolVal(pricingprob, pricingcols[block], pricingvar);
904  assert(!SCIPisInfinity(scip_, ABS(masterval)));
905  assert(!SCIPisInfinity(scip_, ABS(pricingval)));
906  activity = (masterval - pricingval);
907 
908  infeasibility = activity;
909 
910  assert(subgradientlinkingconsvals != NULL);
911  assert(!SCIPisInfinity(scip_, SQR(infeasibility)));
912 
913  subgradientlinkingconsvals[i] = infeasibility;
914 
915  if( SCIPisPositive(scip_, SQR(infeasibility)) )
916  subgradientnorm += SQR(infeasibility);
917  }
918 
919 
920  assert(!SCIPisNegative(scip_, subgradientnorm));
921 
922  subgradientnorm = SQRT(subgradientnorm);
923 
924  SCIPdebugMessage("Update subgradient and subgradientnorm with value %g.\n", subgradientnorm);
925 }
926 
928 void Stabilization::calculateDualdiffnorm()
929 {
930  SCIP* origprob = GCGmasterGetOrigprob(scip_);
931  SCIP_CONS** masterconss = GCGgetMasterConss(origprob);
932  SCIP_CONS** linkingconss = GCGgetVarLinkingconss(origprob);
933  int nlinkingconss = GCGgetNVarLinkingconss(origprob);
934  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
935  int nconss = GCGgetNMasterConss(origprob);
936  assert(nconss <= nstabcenterconsvals);
937  SCIP_ROW** mastercuts = GCGsepaGetMastercuts(scip_);
938  int ncuts = GCGsepaGetNCuts(scip_);
939  assert(ncuts <= nstabcentercutvals);
940 
941  dualdiffnorm = 0.0;
942 
943  /* masterconss */
944  assert(stabcenterconsvals != NULL);
945 
946  for( int i = 0; i < nconss; ++i )
947  {
948  SCIP_Real dualdiff = SQR(stabcenterconsvals[i] - pricingtype->consGetDual(scip_, masterconss[i]));
949 
950  if( SCIPisPositive(scip_, dualdiff) )
951  dualdiffnorm += dualdiff;
952  }
953 
954  /* mastercuts */
955  assert(stabcenterconsvals != NULL);
956 
957  for( int i = 0; i < ncuts; ++i )
958  {
959  SCIP_Real dualdiff = SQR(stabcentercutvals[i] - pricingtype->rowGetDual(mastercuts[i]));
960 
961  if( SCIPisPositive(scip_, dualdiff) )
962  dualdiffnorm += dualdiff;
963  }
964 
965  /* linkingconss */
966  assert(stabcenterlinkingconsvals != NULL);
967 
968  for( int i = 0; i < nlinkingconss; ++i )
969  {
970  SCIP_Real dualdiff = SQR(stabcenterlinkingconsvals[i] - pricingtype->consGetDual(scip_, linkingconss[i]));
971 
972  if( SCIPisPositive(scip_, dualdiff) )
973  dualdiffnorm += dualdiff;
974  }
975 
976  dualdiffnorm = SQRT(dualdiffnorm);
977  SCIPdebugMessage("Update dualdiffnorm with value %g.\n", dualdiffnorm);
978 }
979 
981 void Stabilization::calculateBeta()
982 {
983  SCIP* origprob = GCGmasterGetOrigprob(scip_);
984  SCIP_CONS** masterconss = GCGgetMasterConss(origprob);
985  SCIP_CONS** linkingconss = GCGgetVarLinkingconss(origprob);
986  int nlinkingconss = GCGgetNVarLinkingconss(origprob);
987  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
988  int nconss = GCGgetNMasterConss(origprob);
989  assert(nconss <= nstabcenterconsvals);
990  SCIP_ROW** mastercuts = GCGsepaGetMastercuts(scip_);
991  int ncuts = GCGsepaGetNCuts(scip_);
992  assert(ncuts <= nstabcentercutvals);
993 
994  beta = 0.0;
995 
996  /* masterconss */
997  assert(stabcenterconsvals != NULL);
998 
999  for( int i = 0; i < nconss; ++i )
1000  {
1001  SCIP_Real dualdiff = ABS(pricingtype->consGetDual(scip_, masterconss[i]) - stabcenterconsvals[i]);
1002  SCIP_Real product = dualdiff * ABS(subgradientconsvals[i]);
1003 
1004  if( SCIPisPositive(scip_, product) )
1005  beta += product;
1006  }
1007 
1008  /* mastercuts */
1009  assert(stabcentercutvals != NULL || ncuts == 0);
1010 
1011  for( int i = 0; i < ncuts; ++i )
1012  {
1013  SCIP_Real dualdiff = ABS(pricingtype->rowGetDual(mastercuts[i]) - stabcentercutvals[i]);
1014  SCIP_Real product = dualdiff * ABS(subgradientcutvals[i]);
1015 
1016  if( SCIPisPositive(scip_, product) )
1017  beta += product;
1018  }
1019 
1020  /* linkingconss */
1021  assert(stabcenterlinkingconsvals != NULL);
1022 
1023  for( int i = 0; i < nlinkingconss; ++i )
1024  {
1025  SCIP_Real dualdiff = ABS(pricingtype->consGetDual(scip_, linkingconss[i]) - stabcenterlinkingconsvals[i]);
1026  SCIP_Real product = dualdiff * ABS(subgradientlinkingconsvals[i]);
1027 
1028  if( SCIPisPositive(scip_, product) )
1029  beta += product;
1030  }
1031 
1032  if( SCIPisPositive(scip_, subgradientnorm) )
1033  beta = beta / (subgradientnorm * dualdiffnorm);
1034 
1035  SCIPdebugMessage("Update beta with value %g.\n", beta);
1036 
1037  assert( ( SCIPisPositive(scip_, beta) || SCIPisZero(scip_, subgradientnorm)) && SCIPisLE(scip_, beta, 1.0) );
1038 }
1039 
1041 void Stabilization::calculateHybridFactor()
1042 {
1043  SCIP* origprob = GCGmasterGetOrigprob(scip_);
1044  SCIP_CONS** masterconss = GCGgetMasterConss(origprob);
1045 
1046  SCIP_CONS** linkingconss = GCGgetVarLinkingconss(origprob);
1047  int nlinkingconss = GCGgetNVarLinkingconss(origprob);
1048  assert(nstabcenterlinkingconsvals <= GCGgetNVarLinkingconss(origprob) );
1049  int nconss = GCGgetNMasterConss(origprob);
1050  assert(nconss <= nstabcenterconsvals);
1051  SCIP_ROW** mastercuts = GCGsepaGetMastercuts(scip_);
1052  int ncuts = GCGsepaGetNCuts(scip_);
1053  assert(ncuts <= nstabcentercutvals);
1054 
1055  SCIP_Real divisornorm = 0.0;
1056 
1057  /* masterconss */
1058  assert(stabcenterconsvals != NULL);
1059 
1060  for( int i = 0; i < nconss; ++i )
1061  {
1062  SCIP_Real divisor = SQR((beta - 1.0) * stabcenterconsvals[i]
1063  + beta * (subgradientconsvals[i] * dualdiffnorm / subgradientnorm)
1064  + (1 - beta) * pricingtype->consGetDual(scip_, masterconss[i]));
1065 
1066  if( SCIPisPositive(scip_, divisor) )
1067  divisornorm += divisor;
1068  }
1069 
1070  /* mastercuts */
1071  assert(stabcenterconsvals != NULL);
1072 
1073  for( int i = 0; i < ncuts; ++i )
1074  {
1075  SCIP_Real divisor = SQR((beta - 1.0) * stabcentercutvals[i]
1076  + beta * (subgradientcutvals[i] * dualdiffnorm / subgradientnorm)
1077  + (1 - beta) * pricingtype->rowGetDual(mastercuts[i]));
1078 
1079  if( SCIPisPositive(scip_, divisor) )
1080  divisornorm += divisor;
1081  }
1082 
1083  /* linkingconss */
1084  assert(stabcenterlinkingconsvals != NULL);
1085 
1086  for( int i = 0; i < nlinkingconss; ++i )
1087  {
1088  SCIP_Real divisor = SQR((beta - 1.0) * stabcenterlinkingconsvals[i]
1089  + beta * (subgradientlinkingconsvals[i] * dualdiffnorm / subgradientnorm)
1090  + (1 - beta) * pricingtype->consGetDual(scip_, linkingconss[i]));
1091 
1092  if( SCIPisPositive(scip_, divisor) )
1093  divisornorm += divisor;
1094  }
1095 
1096  divisornorm = SQRT(divisornorm);
1097 
1098  hybridfactor = ((1 - alpha) * dualdiffnorm) / divisornorm;
1099 
1100  SCIPdebugMessage("Update hybridfactor with value %g.\n", hybridfactor);
1101 
1102  assert( SCIPisPositive(scip_, hybridfactor) );
1103 }
1104 
1105 
1107 {
1108  if( inmispricingschedule )
1109  return SCIPisGT(scip_, alphabar, 0.0);
1110  return SCIPisGT(scip_, alpha, 0.0);
1111 }
1112 
1115 )
1116 {
1117  inmispricingschedule = TRUE;
1118 }
1119 
1122 )
1123 {
1124  inmispricingschedule = FALSE;
1125  k=0;
1126 }
1127 
1130 ) const
1131 {
1132  return inmispricingschedule;
1133 }
1134 
1137  GCG_COL** pricingcols
1138 )
1139 {
1140  /* first update the arrays */
1141  SCIP_CALL( updateStabcenterconsvals() );
1142  SCIP_CALL( updateStabcentercutvals() );
1143 
1144  subgradientproduct = calculateSubgradientProduct(pricingcols);
1145 
1146  return SCIP_OKAY;
1147 }
1148 
1149 
1150 } /* namespace gcg */
SCIP_Bool GCGisPricingprobRelevant(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:3918
SCIP_Bool GCGvarIsOriginal(SCIP_VAR *var)
Definition: gcgvar.c:162
SCIP_RETCODE rowGetDual(int i, SCIP_Real *dual)
GCG interface methods.
SCIP_RETCODE updateSubgradientProduct(GCG_COL **pricingcols)
SCIP_RETCODE setNLinkingconsvals(int nlinkingconssnew)
SCIP * GCGgetPricingprob(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:3857
SCIP_Bool isInMispricingSchedule() const
SCIP_CONS ** GCGgetVarLinkingconss(SCIP *scip)
Definition: relax_gcg.c:4957
SCIP_RETCODE updateStabilityCenter(SCIP_Real lowerbound, SCIP_Real *dualsolconv, GCG_COL **pricingcols)
master separator
SCIP_CONS ** GCGgetMasterConss(SCIP *scip)
Definition: relax_gcg.c:4011
SCIP_CONS ** GCGgetLinearOrigMasterConss(SCIP *scip)
Definition: relax_gcg.c:4051
SCIP_Bool GCGvarIsMaster(SCIP_VAR *var)
Definition: gcgvar.c:148
int * GCGgetVarLinkingconssBlock(SCIP *scip)
Definition: relax_gcg.c:4976
int GCGgetNPricingprobs(SCIP *scip)
Definition: relax_gcg.c:3897
SCIP_ROW ** GCGsepaGetMastercuts(SCIP *scip)
Definition: sepa_master.c:437
virtual SCIP_Real rowGetDual(SCIP_ROW *row) const =0
public methods for working with gcg columns
SCIP_CONS * GCGgetConvCons(SCIP *scip, int blocknr)
Definition: relax_gcg.c:4070
struct GCG_Col GCG_COL
Definition: type_gcgcol.h:45
SCIP_Real GCGcolGetSolVal(SCIP *scip, GCG_COL *gcgcol, SCIP_VAR *var)
Definition: gcgcol.c:602
class with functions for dual variable smoothing
SCIP_VAR ** GCGlinkingVarGetPricingVars(SCIP_VAR *var)
Definition: gcgvar.c:391
GCG variable pricer.
int GCGvarGetBlock(SCIP_VAR *var)
Definition: gcgvar.c:936
SCIP_RETCODE consGetDual(int i, SCIP_Real *dual)
SCIP * GCGmasterGetOrigprob(SCIP *scip)
int GCGgetNVarLinkingconss(SCIP *scip)
Definition: relax_gcg.c:4995
SCIP_Bool GCGvarIsPricing(SCIP_VAR *var)
Definition: gcgvar.c:133
int GCGgetNMasterConss(SCIP *scip)
Definition: relax_gcg.c:3992
int GCGsepaGetNCuts(SCIP *scip)
Definition: sepa_master.c:418
SCIP_RETCODE setNConvconsvals(int nconvconssnew)
SCIP_VAR ** GCGmasterVarGetOrigvars(SCIP_VAR *var)
Definition: gcgvar.c:866
SCIP_VAR ** GCGoriginalVarGetMastervars(SCIP_VAR *var)
Definition: gcgvar.c:561
virtual SCIP_Real consGetDual(SCIP *scip, SCIP_CONS *cons) const =0
SCIP_ROW ** GCGsepaGetOrigcuts(SCIP *scip)
Definition: sepa_master.c:399
SCIP_VAR * GCGoriginalVarGetPricingVar(SCIP_VAR *var)
Definition: gcgvar.c:206
SCIP_Real convGetDual(int i)
SCIP_Real linkingconsGetDual(int i)
int GCGgetNIdenticalBlocks(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:3966