Scippy

SCIP

Solving Constraint Integer Programs

probdata_binpacking.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-2019 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 visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file probdata_binpacking.c
17  * @brief Problem data for binpacking problem
18  * @author Timo Berthold
19  * @author Stefan Heinz
20  *
21  * This file handles the main problem data used in that project. For more details see \ref BINPACKING_PROBLEMDATA page.
22  *
23  * @page BINPACKING_PROBLEMDATA Main problem data
24  *
25  * The problem data is accessible in all plugins. The function SCIPgetProbData() returns the pointer to that
26  * structure. We use this data structure to store all the information of the binpacking problem. Since this structure is
27  * not visible in the other plugins, we implemented setter and getter functions to access this data. The problem data
28  * structure SCIP_ProbData is shown below.
29  *
30  * \code
31  * ** @brief Problem data which is accessible in all places
32  * *
33  * * This problem data is used to store the input of the binpacking instance, all variables which are created, and all
34  * * constraints.
35  * *
36  * struct SCIP_ProbData
37  * {
38  * SCIP_VAR** vars; **< all exiting variables in the problem *
39  * SCIP_CONS** conss; **< set partitioning constraints for each item exactly one *
40  * SCIP_Longint* weights; **< array of item weights *
41  * int* ids; **< array of item ids *
42  * int nvars; **< number of generated variables *
43  * int varssize; **< size of the variable array *
44  * int nitems; **< number of items *
45  * SCIP_Longint capacity; **< bin capacity *
46  * };
47  * \endcode
48  *
49  * The function SCIPprobdataCreate(), which is called in the \ref reader_bpa.c "reader plugin" after the input file was
50  * parsed, initializes the problem data structure and creates the problem in the SCIP environment. For this, it creates
51  * for each item of the binpacking problem one set covering constraint and creates an initial set of variables for the
52  * packings. Note that the set covering constraints have to have the <code>modifiable</code>-flag set to TRUE. This is
53  * necessary to tell the solver that these constraints are not completed yet. This means, during the search new
54  * variables/packings might be added. The solver needs this information because certain reductions are not allowed.
55  * See the body of the function SCIPprobdataCreate() for more details.
56  *
57  * A list of all interface methods can be found in probdata_binpacking.h.
58  */
59 
60 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
61 
62 #include <string.h>
63 
64 #include "probdata_binpacking.h"
65 #include "vardata_binpacking.h"
66 #include "pricer_binpacking.h"
67 
68 #include "scip/cons_setppc.h"
69 #include "scip/scip.h"
70 
71 /** @brief Problem data which is accessible in all places
72  *
73  * This problem data is used to store the input of the binpacking, all variables which are created, and all
74  * constrsaints.
75  */
76 struct SCIP_ProbData
77 {
78  SCIP_VAR** vars; /**< all exiting variables in the problem */
79  SCIP_CONS** conss; /**< set partitioning constraints for each item exactly one */
80  SCIP_Longint* weights; /**< array of item weights */
81  int* ids; /**< array of item ids */
82  int nvars; /**< number of generated variables */
83  int varssize; /**< size of the variable array */
84  int nitems; /**< number of items */
85  SCIP_Longint capacity; /**< bin capacity */
86 };
87 
88 
89 /**@name Event handler properties
90  *
91  * @{
92  */
93 
94 #define EVENTHDLR_NAME "addedvar"
95 #define EVENTHDLR_DESC "event handler for catching added variables"
96 
97 /**@} */
98 
99 /**@name Callback methods of event handler
100  *
101  * @{
102  */
103 
104 /** execution method of event handler */
105 static
106 SCIP_DECL_EVENTEXEC(eventExecAddedVar)
107 { /*lint --e{715}*/
108  assert(eventhdlr != NULL);
109  assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0);
110  assert(event != NULL);
111  assert(SCIPeventGetType(event) == SCIP_EVENTTYPE_VARADDED);
112 
113  SCIPdebugMsg(scip, "exec method of event handler for added variable to probdata\n");
114 
115  /* add new variable to probdata */
117 
118  return SCIP_OKAY;
119 }
120 
121 /**@} */
122 
123 
124 /**@name Local methods
125  *
126  * @{
127  */
128 
129 /** creates problem data */
130 static
132  SCIP* scip, /**< SCIP data structure */
133  SCIP_PROBDATA** probdata, /**< pointer to problem data */
134  SCIP_VAR** vars, /**< all exist variables */
135  SCIP_CONS** conss, /**< set partitioning constraints for each job exactly one */
136  SCIP_Longint* weights, /**< array containing the item weights */
137  int* ids, /**< array of item ids */
138  int nvars, /**< number of variables */
139  int nitems, /**< number of items */
140  SCIP_Longint capacity /**< bin capacity */
141  )
142 {
143  assert(scip != NULL);
144  assert(probdata != NULL);
145 
146  /* allocate memory */
147  SCIP_CALL( SCIPallocBlockMemory(scip, probdata) );
148 
149  if( nvars > 0 )
150  {
151  /* copy variable array */
152  SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &(*probdata)->vars, vars, nvars) );
153  }
154  else
155  (*probdata)->vars = NULL;
156 
157  /* duplicate arrays */
158  SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &(*probdata)->conss, conss, nitems) );
159  SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &(*probdata)->weights, weights, nitems) );
160  SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &(*probdata)->ids, ids, nitems) );
161 
162  (*probdata)->nvars = nvars;
163  (*probdata)->varssize = nvars;
164  (*probdata)->nitems = nitems;
165  (*probdata)->capacity = capacity;
166 
167  return SCIP_OKAY;
168 }
169 
170 /** frees the memory of the given problem data */
171 static
173  SCIP* scip, /**< SCIP data structure */
174  SCIP_PROBDATA** probdata /**< pointer to problem data */
175  )
176 {
177  int i;
178 
179  assert(scip != NULL);
180  assert(probdata != NULL);
181 
182  /* release all variables */
183  for( i = 0; i < (*probdata)->nvars; ++i )
184  {
185  SCIP_CALL( SCIPreleaseVar(scip, &(*probdata)->vars[i]) );
186  }
187 
188  /* release all constraints */
189  for( i = 0; i < (*probdata)->nitems; ++i )
190  {
191  SCIP_CALL( SCIPreleaseCons(scip, &(*probdata)->conss[i]) );
192  }
193 
194  /* free memory of arrays */
195  SCIPfreeBlockMemoryArray(scip, &(*probdata)->vars, (*probdata)->varssize);
196  SCIPfreeBlockMemoryArray(scip, &(*probdata)->conss, (*probdata)->nitems);
197  SCIPfreeBlockMemoryArray(scip, &(*probdata)->weights, (*probdata)->nitems);
198  SCIPfreeBlockMemoryArray(scip, &(*probdata)->ids, (*probdata)->nitems);
199 
200  /* free probdata */
201  SCIPfreeBlockMemory(scip, probdata);
202 
203  return SCIP_OKAY;
204 }
205 
206 /** create initial columns */
207 static
209  SCIP* scip, /**< SCIP data structure */
210  SCIP_PROBDATA* probdata /**< problem data */
211  )
212 {
213  SCIP_CONS** conss;
214  SCIP_VARDATA* vardata;
215  SCIP_VAR* var;
216  char name[SCIP_MAXSTRLEN];
217 
218  int* ids;
219  SCIP_Longint* weights;
220  int nitems;
221 
222  int i;
223 
224  conss = probdata->conss;
225  ids = probdata->ids;
226  weights = probdata->weights;
227  nitems = probdata->nitems;
228 
229  /* create start solution each item in exactly one bin */
230  for( i = 0; i < nitems; ++i )
231  {
232  int a;
233 
234  (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "item_%d", ids[i]);
235 
236  SCIPdebugMsg(scip, "create variable for item %d with weight = %"SCIP_LONGINT_FORMAT"\n", ids[i], weights[i]);
237 
238  /* create variable for the packing pattern which contains only this item */
239  SCIP_CALL( SCIPcreateVarBinpacking(scip, &var, name, 1.0, TRUE, TRUE, NULL) );
240 
241  /* add variable to the problem */
242  SCIP_CALL( SCIPaddVar(scip, var) );
243 
244  /* store variable in the problme data */
245  SCIP_CALL( SCIPprobdataAddVar(scip, probdata, var) );
246 
247  /* add variable to corresponding set covering constraint */
248  SCIP_CALL( SCIPaddCoefSetppc(scip, conss[i], var) );
249 
250  /* create the variable data for the variable; the variable data contains the information in which constraints the
251  * variable appears */
252  a = i;
253  SCIP_CALL( SCIPvardataCreateBinpacking(scip, &vardata, &a, 1) );
254 
255  /* add the variable data to the variable */
256  SCIPvarSetData(var, vardata);
257 
258  /* change the upper bound of the binary variable to lazy since the upper bound is already enforced
259  * due to the objective function the set covering constraint;
260  * The reason for doing is that, is to avoid the bound of x <= 1 in the LP relaxation since this bound
261  * constraint would produce a dual variable which might have a positive reduced cost
262  */
263  SCIP_CALL( SCIPchgVarUbLazy(scip, var, 1.0) );
264 
265  /* release variable */
266  SCIP_CALL( SCIPreleaseVar(scip, &var) );
267  }
268 
269  return SCIP_OKAY;
270 }
271 
272 /**@} */
273 
274 /**@name Callback methods of problem data
275  *
276  * @{
277  */
278 
279 /** frees user data of original problem (called when the original problem is freed) */
280 static
281 SCIP_DECL_PROBDELORIG(probdelorigBinpacking)
282 {
283  SCIPdebugMsg(scip, "free original problem data\n");
284 
285  SCIP_CALL( probdataFree(scip, probdata) );
286 
287  return SCIP_OKAY;
288 }
289 
290 /** creates user data of transformed problem by transforming the original user problem data
291  * (called after problem was transformed) */
292 static
293 SCIP_DECL_PROBTRANS(probtransBinpacking)
294 {
295  /* create transform probdata */
296  SCIP_CALL( probdataCreate(scip, targetdata, sourcedata->vars, sourcedata->conss, sourcedata->weights, sourcedata->ids,
297  sourcedata->nvars, sourcedata->nitems, sourcedata->capacity) );
298 
299  /* transform all constraints */
300  SCIP_CALL( SCIPtransformConss(scip, (*targetdata)->nitems, (*targetdata)->conss, (*targetdata)->conss) );
301 
302  /* transform all variables */
303  SCIP_CALL( SCIPtransformVars(scip, (*targetdata)->nvars, (*targetdata)->vars, (*targetdata)->vars) );
304 
305  return SCIP_OKAY;
306 }
307 
308 /** frees user data of transformed problem (called when the transformed problem is freed) */
309 static
310 SCIP_DECL_PROBDELTRANS(probdeltransBinpacking)
311 {
312  SCIPdebugMsg(scip, "free transformed problem data\n");
313 
314  SCIP_CALL( probdataFree(scip, probdata) );
315 
316  return SCIP_OKAY;
317 }
318 
319 /** solving process initialization method of transformed data (called before the branch and bound process begins) */
320 static
321 SCIP_DECL_PROBINITSOL(probinitsolBinpacking)
322 {
323  SCIP_EVENTHDLR* eventhdlr;
324 
325  assert(probdata != NULL);
326 
327  /* catch variable added event */
328  eventhdlr = SCIPfindEventhdlr(scip, "addedvar");
329  assert(eventhdlr != NULL);
330 
332 
333  return SCIP_OKAY;
334 }
335 
336 /** solving process deinitialization method of transformed data (called before the branch and bound data is freed) */
337 static
338 SCIP_DECL_PROBEXITSOL(probexitsolBinpacking)
339 { /*lint --e{715}*/
340  SCIP_EVENTHDLR* eventhdlr;
341 
342  assert(probdata != NULL);
343 
344  /* drop variable added event */
345  eventhdlr = SCIPfindEventhdlr(scip, "addedvar");
346  assert(eventhdlr != NULL);
347 
349 
350  return SCIP_OKAY;
351 }
352 
353 /**@} */
354 
355 
356 /**@name Interface methods
357  *
358  * @{
359  */
360 
361 /** sets up the problem data */
363  SCIP* scip, /**< SCIP data structure */
364  const char* probname, /**< problem name */
365  int* ids, /**< array of item ids */
366  SCIP_Longint* weights, /**< array containing the item weights */
367  int nitems, /**< number of items */
368  SCIP_Longint capacity /**< bin capacity */
369  )
370 {
371  SCIP_PROBDATA* probdata;
372  SCIP_CONS** conss;
373  char name[SCIP_MAXSTRLEN];
374  int i;
375 
376  assert(scip != NULL);
377 
378  /* create event handler if it does not exist yet */
379  if( SCIPfindEventhdlr(scip, EVENTHDLR_NAME) == NULL )
380  {
382  }
383 
384  /* create problem in SCIP and add non-NULL callbacks via setter functions */
385  SCIP_CALL( SCIPcreateProbBasic(scip, probname) );
386 
387  SCIP_CALL( SCIPsetProbDelorig(scip, probdelorigBinpacking) );
388  SCIP_CALL( SCIPsetProbTrans(scip, probtransBinpacking) );
389  SCIP_CALL( SCIPsetProbDeltrans(scip, probdeltransBinpacking) );
390  SCIP_CALL( SCIPsetProbInitsol(scip, probinitsolBinpacking) );
391  SCIP_CALL( SCIPsetProbExitsol(scip, probexitsolBinpacking) );
392 
393  /* set objective sense */
395 
396  /* tell SCIP that the objective will be always integral */
397  SCIP_CALL( SCIPsetObjIntegral(scip) );
398 
399  SCIP_CALL( SCIPallocBufferArray(scip, &conss, nitems) );
400 
401  /* create set covering constraints for each item */
402  for( i = 0; i < nitems; ++i )
403  {
404  (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "item_%d", ids[i]);
405 
406  SCIP_CALL( SCIPcreateConsBasicSetcover(scip, &conss[i], name, 0, NULL) );
407 
408  /* declare constraint modifiable for adding variables during pricing */
409  SCIP_CALL( SCIPsetConsModifiable(scip, conss[i], TRUE) );
410  SCIP_CALL( SCIPaddCons(scip, conss[i]) );
411  }
412 
413  /* create problem data */
414  SCIP_CALL( probdataCreate(scip, &probdata, NULL, conss, weights, ids, 0, nitems, capacity) );
415 
416  SCIP_CALL( createInitialColumns(scip, probdata) );
417 
418  /* set user problem data */
419  SCIP_CALL( SCIPsetProbData(scip, probdata) );
420 
421  SCIP_CALL( SCIPpricerBinpackingActivate(scip, conss, weights, ids, nitems, capacity) );
422 
423  /* free local buffer arrays */
424  SCIPfreeBufferArray(scip, &conss);
425 
426  return SCIP_OKAY;
427 }
428 
429 /** returns array of item ids */
431  SCIP_PROBDATA* probdata /**< problem data */
432  )
433 {
434  return probdata->ids;
435 }
436 
437 /** returns array of item weights */
439  SCIP_PROBDATA* probdata /**< problem data */
440  )
441 {
442  return probdata->weights;
443 }
444 
445 /** returns number of items */
447  SCIP_PROBDATA* probdata /**< problem data */
448  )
449 {
450  return probdata->nitems;
451 }
452 
453 /** returns bin capacity */
455  SCIP_PROBDATA* probdata /**< problem data */
456  )
457 {
458  return probdata->capacity;
459 }
460 
461 /** returns array of all variables itemed in the way they got generated */
463  SCIP_PROBDATA* probdata /**< problem data */
464  )
465 {
466  return probdata->vars;
467 }
468 
469 /** returns number of variables */
471  SCIP_PROBDATA* probdata /**< problem data */
472  )
473 {
474  return probdata->nvars;
475 }
476 
477 /** returns array of set partitioning constrains */
479  SCIP_PROBDATA* probdata /**< problem data */
480  )
481 {
482  return probdata->conss;
483 }
484 
485 /** adds given variable to the problem data */
487  SCIP* scip, /**< SCIP data structure */
488  SCIP_PROBDATA* probdata, /**< problem data */
489  SCIP_VAR* var /**< variables to add */
490  )
491 {
492  /* check if enough memory is left */
493  if( probdata->varssize == probdata->nvars )
494  {
495  int newsize;
496  newsize = MAX(100, probdata->varssize * 2);
497  SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &probdata->vars, probdata->varssize, newsize) );
498  probdata->varssize = newsize;
499  }
500 
501  /* caputure variables */
502  SCIP_CALL( SCIPcaptureVar(scip, var) );
503 
504  probdata->vars[probdata->nvars] = var;
505  probdata->nvars++;
506 
507  SCIPdebugMsg(scip, "added variable to probdata; nvars = %d\n", probdata->nvars);
508 
509  return SCIP_OKAY;
510 }
511 
512 /**@} */
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
Definition: scip_mem.h:116
#define EVENTHDLR_NAME
SCIP_RETCODE SCIPpricerBinpackingActivate(SCIP *scip, SCIP_CONS **conss, SCIP_Longint *weights, int *ids, int nitems, SCIP_Longint capacity)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
Definition: scip_mem.h:105
#define NULL
Definition: def.h:246
SCIP_RETCODE SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
Definition: cons_setppc.c:9229
static SCIP_DECL_PROBDELTRANS(probdeltransBinpacking)
#define SCIP_MAXSTRLEN
Definition: def.h:267
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: scip_event.c:172
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
Definition: scip_var.c:1251
SCIP_RETCODE SCIPchgVarUbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazyub)
Definition: scip_var.c:5085
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
Definition: scip_cons.c:1639
SCIP_RETCODE SCIPsetProbExitsol(SCIP *scip, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: scip_prob.c:328
Binpacking variable pricer.
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:314
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:107
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10253
#define TRUE
Definition: def.h:71
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *ids, SCIP_Longint *weights, int nitems, SCIP_Longint capacity)
SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
Definition: scip_prob.c:1070
static SCIP_DECL_PROBEXITSOL(probexitsolBinpacking)
#define EVENTHDLR_DESC
Variable data containing the ids of constraints in which the variable appears.
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:114
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
Definition: scip_event.c:302
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:142
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
Definition: scip_mem.h:97
#define SCIPdebugMsg
Definition: scip_message.h:88
SCIP_VAR ** SCIPprobdataGetVars(SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:223
SCIP_RETCODE SCIPtransformVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:1392
static SCIP_RETCODE probdataCreate(SCIP *scip, SCIP_PROBDATA **probdata, SCIP_VAR **vars, SCIP_CONS **conss, SCIP_Longint *weights, int *ids, int nvars, int nitems, SCIP_Longint capacity)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Definition: scip_mem.h:111
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip_prob.c:1298
static SCIP_DECL_PROBTRANS(probtransBinpacking)
SCIP_RETCODE SCIPsetObjIntegral(SCIP *scip)
Definition: scip_prob.c:1575
SCIP_RETCODE SCIPcreateVarBinpacking(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real obj, SCIP_Bool initial, SCIP_Bool removable, SCIP_VARDATA *vardata)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_prob.c:2822
SCIP_Longint * SCIPprobdataGetWeights(SCIP_PROBDATA *probdata)
static SCIP_DECL_EVENTEXEC(eventExecAddedVar)
SCIP_Longint SCIPprobdataGetCapacity(SCIP_PROBDATA *probdata)
#define SCIP_CALL(x)
Definition: def.h:358
static SCIP_DECL_PROBINITSOL(probinitsolBinpacking)
SCIP_RETCODE SCIPcreateConsBasicSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
Definition: cons_setppc.c:9214
SCIP_RETCODE SCIPvardataCreateBinpacking(SCIP *scip, SCIP_VARDATA **vardata, int *consids, int nconsids)
int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata)
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:130
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1018
SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: scip_prob.c:264
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:354
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:995
Problem data for binpacking problem.
int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata)
SCIP_CONS ** SCIPprobdataGetConss(SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPprobdataAddVar(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_VAR *var)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:388
int SCIPprobdataGetNVars(SCIP_PROBDATA *probdata)
static SCIP_RETCODE probdataFree(SCIP *scip, SCIP_PROBDATA **probdata)
#define SCIP_LONGINT_FORMAT
Definition: def.h:149
SCIP_RETCODE SCIPsetProbInitsol(SCIP *scip, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: scip_prob.c:306
#define MAX(x, y)
Definition: def.h:215
static SCIP_DECL_PROBDELORIG(probdelorigBinpacking)
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:44
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_prob.c:1724
SCIP_PROBDATA * SCIPgetProbData(SCIP *scip)
Definition: scip_prob.c:1020
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip_cons.c:1187
static SCIP_RETCODE createInitialColumns(SCIP *scip, SCIP_PROBDATA *probdata)
SCIP_VAR * a
Definition: circlepacking.c:57
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1217
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
Definition: scip_cons.c:1438
#define SCIP_Longint
Definition: def.h:142
SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: scip_prob.c:285
SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: scip_prob.c:243
#define SCIP_EVENTTYPE_VARADDED
Definition: type_event.h:56
void SCIPvarSetData(SCIP_VAR *var, SCIP_VARDATA *vardata)
Definition: var.c:16760
SCIP callable library.