Scippy

SCIP

Solving Constraint Integer Programs

pricer.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2017 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file pricer.c
17  * @brief methods for variable pricers
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #include <assert.h>
25 #include <string.h>
26 
27 #include "scip/def.h"
28 #include "scip/set.h"
29 #include "scip/clock.h"
30 #include "scip/paramset.h"
31 #include "scip/lp.h"
32 #include "scip/prob.h"
33 #include "scip/pricestore.h"
34 #include "scip/scip.h"
35 #include "scip/pricer.h"
36 #include "scip/pub_message.h"
37 #include "scip/pub_misc.h"
38 
39 #include "scip/struct_pricer.h"
40 
41 
42 
43 /** compares two pricers w. r. to their activity and their priority */
44 SCIP_DECL_SORTPTRCOMP(SCIPpricerComp)
45 { /*lint --e{715}*/
46  if( ((SCIP_PRICER*)elem1)->active != ((SCIP_PRICER*)elem2)->active )
47  return ((SCIP_PRICER*)elem1)->active ? -1 : +1;
48  else
49  return ((SCIP_PRICER*)elem2)->priority - ((SCIP_PRICER*)elem1)->priority;
50 }
51 
52 /** comparison method for sorting pricers w.r.t. to their name */
53 SCIP_DECL_SORTPTRCOMP(SCIPpricerCompName)
54 {
55  if( ((SCIP_PRICER*)elem1)->active != ((SCIP_PRICER*)elem2)->active )
56  return ((SCIP_PRICER*)elem1)->active ? -1 : +1;
57  else
58  return strcmp(SCIPpricerGetName((SCIP_PRICER*)elem1), SCIPpricerGetName((SCIP_PRICER*)elem2));
59 }
60 
61 /** method to call, when the priority of a pricer was changed */
62 static
63 SCIP_DECL_PARAMCHGD(paramChgdPricerPriority)
64 { /*lint --e{715}*/
65  SCIP_PARAMDATA* paramdata;
66 
67  paramdata = SCIPparamGetData(param);
68  assert(paramdata != NULL);
69 
70  /* use SCIPsetPricerPriority() to mark the pricers unsorted */
71  SCIP_CALL( SCIPsetPricerPriority(scip, (SCIP_PRICER*)paramdata, SCIPparamGetInt(param)) ); /*lint !e740*/
72 
73  return SCIP_OKAY;
74 }
75 
76 /** copies the given pricer to a new scip */
78  SCIP_PRICER* pricer, /**< pricer */
79  SCIP_SET* set, /**< SCIP_SET of SCIP to copy to */
80  SCIP_Bool* valid /**< was the copying process valid? */
81  )
82 {
83  assert(pricer != NULL);
84  assert(set != NULL);
85  assert(valid != NULL);
86  assert(set->scip != NULL);
87 
88  if( pricer->pricercopy != NULL )
89  {
90  SCIPsetDebugMsg(set, "including pricer %s in subscip %p\n", SCIPpricerGetName(pricer), (void*)set->scip);
91  SCIP_CALL( pricer->pricercopy(set->scip, pricer, valid) );
92  }
93  return SCIP_OKAY;
94 }
95 
96 /** creates a variable pricer
97  * To use the variable pricer for solving a problem, it first has to be activated with a call to SCIPactivatePricer().
98  */
100  SCIP_PRICER** pricer, /**< pointer to variable pricer data structure */
101  SCIP_SET* set, /**< global SCIP settings */
102  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
103  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
104  const char* name, /**< name of variable pricer */
105  const char* desc, /**< description of variable pricer */
106  int priority, /**< priority of the variable pricer */
107  SCIP_Bool delay, /**< should the pricer be delayed until no other pricers or already existing
108  * problem variables with negative reduced costs are found */
109  SCIP_DECL_PRICERCOPY ((*pricercopy)), /**< copy method of pricer or NULL if you don't want to copy your plugin into sub-SCIPs */
110  SCIP_DECL_PRICERFREE ((*pricerfree)), /**< destructor of variable pricer */
111  SCIP_DECL_PRICERINIT ((*pricerinit)), /**< initialize variable pricer */
112  SCIP_DECL_PRICEREXIT ((*pricerexit)), /**< deinitialize variable pricer */
113  SCIP_DECL_PRICERINITSOL((*pricerinitsol)),/**< solving process initialization method of variable pricer */
114  SCIP_DECL_PRICEREXITSOL((*pricerexitsol)),/**< solving process deinitialization method of variable pricer */
115  SCIP_DECL_PRICERREDCOST((*pricerredcost)),/**< reduced cost pricing method of variable pricer for feasible LPs */
116  SCIP_DECL_PRICERFARKAS((*pricerfarkas)), /**< Farkas pricing method of variable pricer for infeasible LPs */
117  SCIP_PRICERDATA* pricerdata /**< variable pricer data */
118  )
119 {
120  char paramname[SCIP_MAXSTRLEN];
121  char paramdesc[SCIP_MAXSTRLEN];
122 
123  assert(pricer != NULL);
124  assert(name != NULL);
125  assert(desc != NULL);
126  assert(pricerredcost != NULL);
127 
128  SCIP_ALLOC( BMSallocMemory(pricer) );
129  SCIP_ALLOC( BMSduplicateMemoryArray(&(*pricer)->name, name, strlen(name)+1) );
130  SCIP_ALLOC( BMSduplicateMemoryArray(&(*pricer)->desc, desc, strlen(desc)+1) );
131  (*pricer)->priority = priority;
132  (*pricer)->pricercopy = pricercopy;
133  (*pricer)->pricerfree = pricerfree;
134  (*pricer)->pricerinit = pricerinit;
135  (*pricer)->pricerexit = pricerexit;
136  (*pricer)->pricerinitsol = pricerinitsol;
137  (*pricer)->pricerexitsol = pricerexitsol;
138  (*pricer)->pricerredcost = pricerredcost;
139  (*pricer)->pricerfarkas = pricerfarkas;
140  (*pricer)->pricerdata = pricerdata;
141  SCIP_CALL( SCIPclockCreate(&(*pricer)->setuptime, SCIP_CLOCKTYPE_DEFAULT) );
142  SCIP_CALL( SCIPclockCreate(&(*pricer)->pricerclock, SCIP_CLOCKTYPE_DEFAULT) );
143  (*pricer)->ncalls = 0;
144  (*pricer)->nvarsfound = 0;
145  (*pricer)->delay = delay;
146  (*pricer)->active = FALSE;
147  (*pricer)->initialized = FALSE;
148 
149  /* add parameters */
150  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "pricers/%s/priority", name);
151  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "priority of pricer <%s>", name);
152  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
153  &(*pricer)->priority, FALSE, priority, INT_MIN/4, INT_MAX/4,
154  paramChgdPricerPriority, (SCIP_PARAMDATA*)(*pricer)) ); /*lint !e740*/
155 
156  return SCIP_OKAY;
157 }
158 
159 /** calls destructor and frees memory of variable pricer */
161  SCIP_PRICER** pricer, /**< pointer to variable pricer data structure */
162  SCIP_SET* set /**< global SCIP settings */
163  )
164 {
165  assert(pricer != NULL);
166  assert(*pricer != NULL);
167  assert(!(*pricer)->initialized);
168  assert(set != NULL);
169 
170  /* call destructor of variable pricer */
171  if( (*pricer)->pricerfree != NULL )
172  {
173  SCIP_CALL( (*pricer)->pricerfree(set->scip, *pricer) );
174  }
175 
176  SCIPclockFree(&(*pricer)->pricerclock);
177  SCIPclockFree(&(*pricer)->setuptime);
178  BMSfreeMemoryArray(&(*pricer)->name);
179  BMSfreeMemoryArray(&(*pricer)->desc);
180  BMSfreeMemory(pricer);
181 
182  return SCIP_OKAY;
183 }
184 
185 /** initializes variable pricer */
187  SCIP_PRICER* pricer, /**< variable pricer */
188  SCIP_SET* set /**< global SCIP settings */
189  )
190 {
191  assert(pricer != NULL);
192  assert(pricer->active);
193  assert(set != NULL);
194 
195  if( pricer->initialized )
196  {
197  SCIPerrorMessage("variable pricer <%s> already initialized\n", pricer->name);
198  return SCIP_INVALIDCALL;
199  }
200 
201  if( set->misc_resetstat )
202  {
203  SCIPclockReset(pricer->setuptime);
204  SCIPclockReset(pricer->pricerclock);
205 
206  pricer->ncalls = 0;
207  pricer->nvarsfound = 0;
208  }
209 
210  if( pricer->pricerinit != NULL )
211  {
212  /* start timing */
213  SCIPclockStart(pricer->setuptime, set);
214 
215  SCIP_CALL( pricer->pricerinit(set->scip, pricer) );
216 
217  /* stop timing */
218  SCIPclockStop(pricer->setuptime, set);
219  }
220  pricer->initialized = TRUE;
221 
222  return SCIP_OKAY;
223 }
224 
225 /** calls exit method of variable pricer */
227  SCIP_PRICER* pricer, /**< variable pricer */
228  SCIP_SET* set /**< global SCIP settings */
229  )
230 {
231  assert(pricer != NULL);
232  assert(pricer->active);
233  assert(set != NULL);
234 
235  if( !pricer->initialized )
236  {
237  SCIPerrorMessage("variable pricer <%s> not initialized\n", pricer->name);
238  return SCIP_INVALIDCALL;
239  }
240 
241  if( pricer->pricerexit != NULL )
242  {
243  /* start timing */
244  SCIPclockStart(pricer->setuptime, set);
245 
246  SCIP_CALL( pricer->pricerexit(set->scip, pricer) );
247 
248  /* stop timing */
249  SCIPclockStop(pricer->setuptime, set);
250  }
251  pricer->initialized = FALSE;
252 
253  return SCIP_OKAY;
254 }
255 
256 /** informs variable pricer that the branch and bound process is being started */
258  SCIP_PRICER* pricer, /**< variable pricer */
259  SCIP_SET* set /**< global SCIP settings */
260  )
261 {
262  assert(pricer != NULL);
263  assert(set != NULL);
264 
265  /* call solving process initialization method of variable pricer */
266  if( pricer->pricerinitsol != NULL )
267  {
268  /* start timing */
269  SCIPclockStart(pricer->setuptime, set);
270 
271  SCIP_CALL( pricer->pricerinitsol(set->scip, pricer) );
272 
273  /* stop timing */
274  SCIPclockStop(pricer->setuptime, set);
275  }
276 
277  return SCIP_OKAY;
278 }
279 
280 /** informs variable pricer that the branch and bound process data is being freed */
282  SCIP_PRICER* pricer, /**< variable pricer */
283  SCIP_SET* set /**< global SCIP settings */
284  )
285 {
286  assert(pricer != NULL);
287  assert(set != NULL);
288 
289  /* call solving process deinitialization method of variable pricer */
290  if( pricer->pricerexitsol != NULL )
291  {
292  /* start timing */
293  SCIPclockStart(pricer->setuptime, set);
294 
295  SCIP_CALL( pricer->pricerexitsol(set->scip, pricer) );
296 
297  /* stop timing */
298  SCIPclockStop(pricer->setuptime, set);
299  }
300 
301  return SCIP_OKAY;
302 }
303 
304 /** activates pricer such that it is called in LP solving loop */
306  SCIP_PRICER* pricer, /**< variable pricer */
307  SCIP_SET* set /**< global SCIP settings */
308  )
309 {
310  assert(pricer != NULL);
311  assert(set != NULL);
312  assert(set->stage == SCIP_STAGE_PROBLEM);
313 
314  if( !pricer->active )
315  {
316  pricer->active = TRUE;
317  set->nactivepricers++;
318  set->pricerssorted = FALSE;
319  }
320 
321  return SCIP_OKAY;
322 }
323 
324 /** deactivates pricer such that it is no longer called in LP solving loop */
326  SCIP_PRICER* pricer, /**< variable pricer */
327  SCIP_SET* set /**< global SCIP settings */
328  )
329 {
330  assert(pricer != NULL);
331  assert(set != NULL);
332  assert(set->stage == SCIP_STAGE_PROBLEM);
333 
334  if( pricer->active )
335  {
336  pricer->active = FALSE;
337  set->nactivepricers--;
338  set->pricerssorted = FALSE;
339  }
340 
341  return SCIP_OKAY;
342 }
343 
344 /** calls reduced cost pricing method of variable pricer */
346  SCIP_PRICER* pricer, /**< variable pricer */
347  SCIP_SET* set, /**< global SCIP settings */
348  SCIP_PROB* prob, /**< transformed problem */
349  SCIP_Real* lowerbound, /**< local lower bound computed by the pricer */
350  SCIP_Bool* stopearly, /**< should pricing be stopped, although new variables were added? */
351  SCIP_RESULT* result /**< result of the pricing process */
352  )
353 {
354  int oldnvars;
355 
356  assert(pricer != NULL);
357  assert(pricer->active);
358  assert(pricer->pricerredcost != NULL);
359  assert(set != NULL);
360  assert(prob != NULL);
361  assert(lowerbound != NULL);
362  assert(result != NULL);
363 
364  SCIPsetDebugMsg(set, "executing reduced cost pricing of variable pricer <%s>\n", pricer->name);
365 
366  oldnvars = prob->nvars;
367 
368  /* start timing */
369  SCIPclockStart(pricer->pricerclock, set);
370 
371  /* call external method */
372  SCIP_CALL( pricer->pricerredcost(set->scip, pricer, lowerbound, stopearly, result) );
373 
374  /* stop timing */
375  SCIPclockStop(pricer->pricerclock, set);
376 
377  /* evaluate result */
378  pricer->ncalls++;
379  pricer->nvarsfound += prob->nvars - oldnvars;
380 
381  return SCIP_OKAY;
382 }
383 
384 /** calls Farkas pricing method of variable pricer */
386  SCIP_PRICER* pricer, /**< variable pricer */
387  SCIP_SET* set, /**< global SCIP settings */
388  SCIP_PROB* prob, /**< transformed problem */
389  SCIP_RESULT* result /**< result of the pricing process */
390  )
391 {
392  int oldnvars;
393 
394  assert(pricer != NULL);
395  assert(pricer->active);
396  assert(set != NULL);
397  assert(prob != NULL);
398 
399  /* check, if pricer implemented a Farkas pricing algorithm */
400  if( pricer->pricerfarkas == NULL )
401  return SCIP_OKAY;
402 
403  SCIPsetDebugMsg(set, "executing Farkas pricing of variable pricer <%s>\n", pricer->name);
404 
405  oldnvars = prob->nvars;
406 
407  /* start timing */
408  SCIPclockStart(pricer->pricerclock, set);
409 
410  /* call external method */
411  SCIP_CALL( pricer->pricerfarkas(set->scip, pricer, result) );
412 
413  /* stop timing */
414  SCIPclockStop(pricer->pricerclock, set);
415 
416  /* evaluate result */
417  pricer->ncalls++;
418  pricer->nvarsfound += prob->nvars - oldnvars;
419 
420  return SCIP_OKAY;
421 }
422 
423 /** depending on the LP's solution status, calls reduced cost or Farkas pricing method of variable pricer */
425  SCIP_PRICER* pricer, /**< variable pricer */
426  SCIP_SET* set, /**< global SCIP settings */
427  SCIP_PROB* prob, /**< transformed problem */
428  SCIP_LP* lp, /**< LP data */
429  SCIP_PRICESTORE* pricestore, /**< pricing storage */
430  SCIP_Real* lowerbound, /**< local lower bound computed by the pricer */
431  SCIP_Bool* stopearly, /**< should pricing be stopped, although new variables were added? */
432  SCIP_RESULT* result /**< result of the pricing process */
433  )
434 {
435  assert(pricer != NULL);
436  assert(lowerbound != NULL);
437  assert(stopearly != NULL);
438  assert(result != NULL);
439 
440  /* set lowerbound, stopearly, and result pointer */
441  *lowerbound = - SCIPsetInfinity(set);
442  *stopearly = FALSE;
443  *result = SCIP_SUCCESS;
444 
445  /* check if pricer should be delayed */
446  if( pricer->delay && SCIPpricestoreGetNVars(pricestore) > 0 )
447  return SCIP_OKAY;
448 
450  {
451  SCIP_CALL( SCIPpricerFarkas(pricer, set, prob, result) );
452  }
453  else
454  {
455  *result = SCIP_DIDNOTRUN;
456  SCIP_CALL( SCIPpricerRedcost(pricer, set, prob, lowerbound, stopearly, result) );
457  }
458 
459  return SCIP_OKAY;
460 }
461 
462 /** gets user data of variable pricer */
464  SCIP_PRICER* pricer /**< variable pricer */
465  )
466 {
467  assert(pricer != NULL);
468 
469  return pricer->pricerdata;
470 }
471 
472 /** sets user data of variable pricer; user has to free old data in advance! */
474  SCIP_PRICER* pricer, /**< variable pricer */
475  SCIP_PRICERDATA* pricerdata /**< new variable pricer user data */
476  )
477 {
478  assert(pricer != NULL);
479 
480  pricer->pricerdata = pricerdata;
481 }
482 
483 /** sets copy callback of pricer */
485  SCIP_PRICER* pricer, /**< variable pricer */
486  SCIP_DECL_PRICERCOPY ((*pricercopy)) /**< copy callback of pricer */
487  )
488 {
489  assert(pricer != NULL);
490 
491  pricer->pricercopy = pricercopy;
492 }
493 
494 /** sets destructor callback of pricer */
496  SCIP_PRICER* pricer, /**< pricer */
497  SCIP_DECL_PRICERFREE ((*pricerfree)) /**< destructor of pricer */
498  )
499 {
500  assert(pricer != NULL);
501 
502  pricer->pricerfree = pricerfree;
503 }
504 
505 /** sets initialization callback of pricer */
507  SCIP_PRICER* pricer, /**< pricer */
508  SCIP_DECL_PRICERINIT ((*pricerinit)) /**< initialize pricer */
509  )
510 {
511  assert(pricer != NULL);
512 
513  pricer->pricerinit = pricerinit;
514 }
515 
516 /** sets deinitialization callback of pricer */
518  SCIP_PRICER* pricer, /**< pricer */
519  SCIP_DECL_PRICEREXIT ((*pricerexit)) /**< deinitialize pricer */
520  )
521 {
522  assert(pricer != NULL);
523 
524  pricer->pricerexit = pricerexit;
525 }
526 
527 /** sets solving process initialization callback of pricer */
529  SCIP_PRICER* pricer, /**< pricer */
530  SCIP_DECL_PRICERINITSOL ((*pricerinitsol))/**< solving process initialization callback of pricer */
531  )
532 {
533  assert(pricer != NULL);
534 
535  pricer->pricerinitsol = pricerinitsol;
536 }
537 
538 /** sets solving process deinitialization callback of pricer */
540  SCIP_PRICER* pricer, /**< pricer */
541  SCIP_DECL_PRICEREXITSOL ((*pricerexitsol))/**< solving process deinitialization callback of pricer */
542  )
543 {
544  assert(pricer != NULL);
545 
546  pricer->pricerexitsol = pricerexitsol;
547 }
548 
549 /** gets name of variable pricer */
550 const char* SCIPpricerGetName(
551  SCIP_PRICER* pricer /**< variable pricer */
552  )
553 {
554  assert(pricer != NULL);
555 
556  return pricer->name;
557 }
558 
559 /** gets description of variable pricer */
560 const char* SCIPpricerGetDesc(
561  SCIP_PRICER* pricer /**< variable pricer */
562  )
563 {
564  assert(pricer != NULL);
565 
566  return pricer->desc;
567 }
568 
569 /** gets priority of variable pricer */
571  SCIP_PRICER* pricer /**< variable pricer */
572  )
573 {
574  assert(pricer != NULL);
575 
576  return pricer->priority;
577 }
578 
579 /** sets priority of variable pricer */
581  SCIP_PRICER* pricer, /**< variable pricer */
582  SCIP_SET* set, /**< global SCIP settings */
583  int priority /**< new priority of the variable pricer */
584  )
585 {
586  assert(pricer != NULL);
587  assert(set != NULL);
588 
589  pricer->priority = priority;
590  set->pricerssorted = FALSE;
591 }
592 
593 /** gets the number of times, the pricer was called and tried to find a variable with negative reduced costs */
595  SCIP_PRICER* pricer /**< variable pricer */
596  )
597 {
598  assert(pricer != NULL);
599 
600  return pricer->ncalls;
601 }
602 
603 /** gets the number of variables with negative reduced costs found by this pricer */
605  SCIP_PRICER* pricer /**< variable pricer */
606  )
607 {
608  assert(pricer != NULL);
609 
610  return pricer->nvarsfound;
611 }
612 
613 /** gets time in seconds used in this pricer for setting up for next stages */
615  SCIP_PRICER* pricer /**< variable pricer */
616  )
617 {
618  assert(pricer != NULL);
619 
620  return SCIPclockGetTime(pricer->setuptime);
621 }
622 
623 /** gets time in seconds used in this pricer */
625  SCIP_PRICER* pricer /**< variable pricer */
626  )
627 {
628  assert(pricer != NULL);
629 
630  return SCIPclockGetTime(pricer->pricerclock);
631 }
632 
633 /** enables or disables all clocks of \p pricer, depending on the value of the flag */
635  SCIP_PRICER* pricer, /**< the pricer for which all clocks should be enabled or disabled */
636  SCIP_Bool enable /**< should the clocks of the pricer be enabled? */
637  )
638 {
639  assert(pricer != NULL);
640 
641  SCIPclockEnableOrDisable(pricer->setuptime, enable);
642  SCIPclockEnableOrDisable(pricer->pricerclock, enable);
643 }
644 
645 /** returns whether the given pricer is in use in the current problem */
647  SCIP_PRICER* pricer /**< variable pricer */
648  )
649 {
650  assert(pricer != NULL);
651 
652  return pricer->active;
653 }
654 
655 /** returns whether the pricer should be delayed until no other pricer finds a new variable */
657  SCIP_PRICER* pricer /**< variable pricer */
658  )
659 {
660  assert(pricer != NULL);
661 
662  return pricer->delay;
663 }
664 
665 /** is variable pricer initialized? */
667  SCIP_PRICER* pricer /**< variable pricer */
668  )
669 {
670  assert(pricer != NULL);
671 
672  return pricer->initialized;
673 }
674 
675 
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPpricerEnableOrDisableClocks(SCIP_PRICER *pricer, SCIP_Bool enable)
Definition: pricer.c:634
SCIP_RETCODE SCIPsetPricerPriority(SCIP *scip, SCIP_PRICER *pricer, int priority)
Definition: scip.c:5729
SCIP_RETCODE SCIPpricerInit(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:186
SCIP_RETCODE SCIPpricerDeactivate(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:325
void SCIPpricerSetInit(SCIP_PRICER *pricer, SCIP_DECL_PRICERINIT((*pricerinit)))
Definition: pricer.c:506
void SCIPpricerSetData(SCIP_PRICER *pricer, SCIP_PRICERDATA *pricerdata)
Definition: pricer.c:473
void SCIPpricerSetExitsol(SCIP_PRICER *pricer, SCIP_DECL_PRICEREXITSOL((*pricerexitsol)))
Definition: pricer.c:539
const char * SCIPpricerGetName(SCIP_PRICER *pricer)
Definition: pricer.c:550
int SCIPpricestoreGetNVars(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:601
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
Definition: paramset.c:661
#define SCIP_MAXSTRLEN
Definition: def.h:259
internal methods for clocks and timing issues
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:76
static SCIP_DECL_PARAMCHGD(paramChgdPricerPriority)
Definition: pricer.c:63
SCIP_Real SCIPpricerGetTime(SCIP_PRICER *pricer)
Definition: pricer.c:624
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition: set.c:5636
#define SCIP_DECL_PRICEREXIT(x)
Definition: type_pricer.h:70
SCIP_Bool SCIPpricerIsActive(SCIP_PRICER *pricer)
Definition: pricer.c:646
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:350
#define FALSE
Definition: def.h:64
SCIP_RETCODE SCIPpricerInitsol(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:257
#define SCIP_DECL_PRICERINIT(x)
Definition: type_pricer.h:62
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:280
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10011
#define TRUE
Definition: def.h:63
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPpricerRedcost(SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *lowerbound, SCIP_Bool *stopearly, SCIP_RESULT *result)
Definition: pricer.c:345
void SCIPpricerSetFree(SCIP_PRICER *pricer, SCIP_DECL_PRICERFREE((*pricerfree)))
Definition: pricer.c:495
SCIP_PRICERDATA * SCIPpricerGetData(SCIP_PRICER *pricer)
Definition: pricer.c:463
static GRAPHNODE ** active
#define SCIP_DECL_PRICEREXITSOL(x)
Definition: type_pricer.h:92
internal methods for handling parameter settings
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
Definition: clock.c:250
#define BMSfreeMemory(ptr)
Definition: memory.h:127
#define SCIP_DECL_PRICERCOPY(x)
Definition: type_pricer.h:46
SCIP_Bool delay
Definition: struct_pricer.h:55
SCIP_RETCODE SCIPpricerCopyInclude(SCIP_PRICER *pricer, SCIP_SET *set, SCIP_Bool *valid)
Definition: pricer.c:77
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
Definition: lp.c:12612
internal methods for LP management
void SCIPpricerSetPriority(SCIP_PRICER *pricer, SCIP_SET *set, int priority)
Definition: pricer.c:580
SCIP_RETCODE SCIPpricerExit(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:226
int SCIPpricerGetPriority(SCIP_PRICER *pricer)
Definition: pricer.c:570
void SCIPpricerSetCopy(SCIP_PRICER *pricer, SCIP_DECL_PRICERCOPY((*pricercopy)))
Definition: pricer.c:484
#define BMSfreeMemoryArray(ptr)
Definition: memory.h:129
internal methods for storing and manipulating the main problem
#define SCIPerrorMessage
Definition: pub_message.h:45
#define SCIP_DECL_PRICERFARKAS(x)
Definition: type_pricer.h:165
void SCIPclockReset(SCIP_CLOCK *clck)
Definition: clock.c:199
SCIP_CLOCK * setuptime
Definition: struct_pricer.h:50
SCIP_RETCODE SCIPpricerFree(SCIP_PRICER **pricer, SCIP_SET *set)
Definition: pricer.c:160
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:428
SCIP_DECL_SORTPTRCOMP(SCIPpricerComp)
Definition: pricer.c:44
internal methods for variable pricers
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:350
SCIP_CLOCK * pricerclock
Definition: struct_pricer.h:51
internal methods for storing priced variables
SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: set.c:2813
SCIP_PRICERDATA * pricerdata
Definition: struct_pricer.h:49
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:125
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:160
SCIP_RETCODE SCIPpricerFarkas(SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_RESULT *result)
Definition: pricer.c:385
SCIP_Bool initialized
Definition: struct_pricer.h:58
public data structures and miscellaneous methods
SCIP_RETCODE SCIPpricerCreate(SCIP_PRICER **pricer, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_Bool delay, SCIP_DECL_PRICERCOPY((*pricercopy)), SCIP_DECL_PRICERFREE((*pricerfree)), SCIP_DECL_PRICERINIT((*pricerinit)), SCIP_DECL_PRICEREXIT((*pricerexit)), SCIP_DECL_PRICERINITSOL((*pricerinitsol)), SCIP_DECL_PRICEREXITSOL((*pricerexitsol)), SCIP_DECL_PRICERREDCOST((*pricerredcost)), SCIP_DECL_PRICERFARKAS((*pricerfarkas)), SCIP_PRICERDATA *pricerdata)
Definition: pricer.c:99
#define SCIP_Bool
Definition: def.h:61
#define SCIP_DECL_PRICERINITSOL(x)
Definition: type_pricer.h:81
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:175
SCIP_RETCODE SCIPpricerExitsol(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:281
#define SCIPsetDebugMsg
Definition: set.h:1913
void SCIPpricerSetInitsol(SCIP_PRICER *pricer, SCIP_DECL_PRICERINITSOL((*pricerinitsol)))
Definition: pricer.c:528
SCIP_RETCODE SCIPpricerActivate(SCIP_PRICER *pricer, SCIP_SET *set)
Definition: pricer.c:305
SCIP_Bool SCIPpricerIsDelayed(SCIP_PRICER *pricer)
Definition: pricer.c:656
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:716
SCIP_Bool active
Definition: struct_pricer.h:57
SCIP_Bool SCIPpricerIsInitialized(SCIP_PRICER *pricer)
Definition: pricer.c:666
public methods for message output
int SCIPpricerGetNCalls(SCIP_PRICER *pricer)
Definition: pricer.c:594
#define SCIP_Real
Definition: def.h:149
const char * SCIPpricerGetDesc(SCIP_PRICER *pricer)
Definition: pricer.c:560
SCIP_Real SCIPpricerGetSetupTime(SCIP_PRICER *pricer)
Definition: pricer.c:614
#define BMSallocMemory(ptr)
Definition: memory.h:101
data structures for variable pricers
int SCIPpricerGetNVarsFound(SCIP_PRICER *pricer)
Definition: pricer.c:604
struct SCIP_PricerData SCIP_PRICERDATA
Definition: type_pricer.h:36
#define SCIP_DECL_PRICERFREE(x)
Definition: type_pricer.h:54
common defines and data types used in all packages of SCIP
void SCIPpricerSetExit(SCIP_PRICER *pricer, SCIP_DECL_PRICEREXIT((*pricerexit)))
Definition: pricer.c:517
SCIP_RETCODE SCIPpricerExec(SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_Real *lowerbound, SCIP_Bool *stopearly, SCIP_RESULT *result)
Definition: pricer.c:424
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:419
#define SCIP_ALLOC(x)
Definition: def.h:361
#define SCIP_DECL_PRICERREDCOST(x)
Definition: type_pricer.h:130
SCIP callable library.