Scippy

SCIP

Solving Constraint Integer Programs

objconshdlr.cpp
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-2014 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 objconshdlr.cpp
17  * @brief C++ wrapper for constraint handlers
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #include <cassert>
24 
25 #include "objconshdlr.h"
26 
27 
28 
29 
30 /*
31  * Data structures
32  */
33 
34 /** constraint handler data */
35 struct SCIP_ConshdlrData
36 {
37  scip::ObjConshdlr* objconshdlr; /**< constraint handler object */
38  SCIP_Bool deleteobject; /**< should the constraint handler object be deleted when conshdlr is freed? */
39 };
40 
41 
42 
43 
44 /*
45  * Callback methods of constraint handler
46  */
47 
48 extern "C"
49 {
50 
51 /** copy method for constraint handler plugins (called when SCIP copies plugins) */
52 static
53 SCIP_DECL_CONSHDLRCOPY(conshdlrCopyObj)
54 { /*lint --e{715}*/
55  SCIP_CONSHDLRDATA* conshdlrdata;
56 
57  assert(scip != NULL);
58 
59  conshdlrdata = SCIPconshdlrGetData(conshdlr);
60  assert(conshdlrdata != NULL);
61  assert(conshdlrdata->objconshdlr != NULL);
62  assert(conshdlrdata->objconshdlr->scip_ != scip);
63 
64  if( conshdlrdata->objconshdlr->iscloneable() )
65  {
66  scip::ObjConshdlr* newobjconshdlr;
67  newobjconshdlr = dynamic_cast<scip::ObjConshdlr*> (conshdlrdata->objconshdlr->clone(scip, valid));
68 
69  /* call include method of constraint handler object */
70  SCIP_CALL( SCIPincludeObjConshdlr(scip, newobjconshdlr, TRUE) );
71  }
72 
73  return SCIP_OKAY;
74 }
75 
76 /** destructor of constraint handler to free user data (called when SCIP is exiting) */
77 static
78 SCIP_DECL_CONSFREE(consFreeObj)
79 { /*lint --e{715}*/
80  SCIP_CONSHDLRDATA* conshdlrdata;
81 
82  conshdlrdata = SCIPconshdlrGetData(conshdlr);
83  assert(conshdlrdata != NULL);
84  assert(conshdlrdata->objconshdlr != NULL);
85  assert(conshdlrdata->objconshdlr->scip_ == scip);
86 
87  /* call virtual method of conshdlr object */
88  SCIP_CALL( conshdlrdata->objconshdlr->scip_free(scip, conshdlr) );
89 
90  /* free conshdlr object */
91  if( conshdlrdata->deleteobject )
92  delete conshdlrdata->objconshdlr;
93 
94  /* free conshdlr data */
95  delete conshdlrdata;
96  SCIPconshdlrSetData(conshdlr, NULL); /*lint !e64*/
97 
98  return SCIP_OKAY;
99 }
100 
101 
102 /** initialization method of constraint handler (called after problem was transformed) */
103 static
104 SCIP_DECL_CONSINIT(consInitObj)
105 { /*lint --e{715}*/
106  SCIP_CONSHDLRDATA* conshdlrdata;
107 
108  conshdlrdata = SCIPconshdlrGetData(conshdlr);
109  assert(conshdlrdata != NULL);
110  assert(conshdlrdata->objconshdlr != NULL);
111  assert(conshdlrdata->objconshdlr->scip_ == scip);
112 
113  /* call virtual method of conshdlr object */
114  SCIP_CALL( conshdlrdata->objconshdlr->scip_init(scip, conshdlr, conss, nconss) );
115 
116  return SCIP_OKAY;
117 }
118 
119 
120 /** deinitialization method of constraint handler (called before transformed problem is freed) */
121 static
122 SCIP_DECL_CONSEXIT(consExitObj)
123 { /*lint --e{715}*/
124  SCIP_CONSHDLRDATA* conshdlrdata;
125 
126  conshdlrdata = SCIPconshdlrGetData(conshdlr);
127  assert(conshdlrdata != NULL);
128  assert(conshdlrdata->objconshdlr != NULL);
129 
130  /* call virtual method of conshdlr object */
131  SCIP_CALL( conshdlrdata->objconshdlr->scip_exit(scip, conshdlr, conss, nconss) );
132 
133  return SCIP_OKAY;
134 }
135 
136 
137 /** presolving initialization method of constraint handler (called when presolving is about to begin) */
138 static
139 SCIP_DECL_CONSINITPRE(consInitpreObj)
140 { /*lint --e{715}*/
141  SCIP_CONSHDLRDATA* conshdlrdata;
142 
143  conshdlrdata = SCIPconshdlrGetData(conshdlr);
144  assert(conshdlrdata != NULL);
145  assert(conshdlrdata->objconshdlr != NULL);
146 
147  /* call virtual method of conshdlr object */
148  SCIP_CALL( conshdlrdata->objconshdlr->scip_initpre(scip, conshdlr, conss, nconss) );
149 
150  return SCIP_OKAY;
151 }
152 
153 
154 /** presolving deinitialization method of constraint handler (called after presolving has been finished) */
155 static
156 SCIP_DECL_CONSEXITPRE(consExitpreObj)
157 { /*lint --e{715}*/
158  SCIP_CONSHDLRDATA* conshdlrdata;
159 
160  conshdlrdata = SCIPconshdlrGetData(conshdlr);
161  assert(conshdlrdata != NULL);
162  assert(conshdlrdata->objconshdlr != NULL);
163 
164  /* call virtual method of conshdlr object */
165  SCIP_CALL( conshdlrdata->objconshdlr->scip_exitpre(scip, conshdlr, conss, nconss) );
166 
167  return SCIP_OKAY;
168 }
169 
170 
171 /** solving process initialization method of constraint handler (called when branch and bound process is about to begin) */
172 static
173 SCIP_DECL_CONSINITSOL(consInitsolObj)
174 { /*lint --e{715}*/
175  SCIP_CONSHDLRDATA* conshdlrdata;
176 
177  conshdlrdata = SCIPconshdlrGetData(conshdlr);
178  assert(conshdlrdata != NULL);
179  assert(conshdlrdata->objconshdlr != NULL);
180 
181  /* call virtual method of conshdlr object */
182  SCIP_CALL( conshdlrdata->objconshdlr->scip_initsol(scip, conshdlr, conss, nconss) );
183 
184  return SCIP_OKAY;
185 }
186 
187 
188 /** solving process deinitialization method of constraint handler (called before branch and bound process data is freed) */
189 static
190 SCIP_DECL_CONSEXITSOL(consExitsolObj)
191 { /*lint --e{715}*/
192  SCIP_CONSHDLRDATA* conshdlrdata;
193 
194  conshdlrdata = SCIPconshdlrGetData(conshdlr);
195  assert(conshdlrdata != NULL);
196  assert(conshdlrdata->objconshdlr != NULL);
197 
198  /* call virtual method of conshdlr object */
199  SCIP_CALL( conshdlrdata->objconshdlr->scip_exitsol(scip, conshdlr, conss, nconss, restart) );
200 
201  return SCIP_OKAY;
202 }
203 
204 
205 /** frees specific constraint data */
206 static
207 SCIP_DECL_CONSDELETE(consDeleteObj)
208 { /*lint --e{715}*/
209  SCIP_CONSHDLRDATA* conshdlrdata;
210 
211  conshdlrdata = SCIPconshdlrGetData(conshdlr);
212  assert(conshdlrdata != NULL);
213  assert(conshdlrdata->objconshdlr != NULL);
214 
215  /* call virtual method of conshdlr object */
216  SCIP_CALL( conshdlrdata->objconshdlr->scip_delete(scip, conshdlr, cons, consdata) );
217 
218  return SCIP_OKAY;
219 }
220 
221 
222 /** transforms constraint data into data belonging to the transformed problem */
223 static
224 SCIP_DECL_CONSTRANS(consTransObj)
225 { /*lint --e{715}*/
226  SCIP_CONSHDLRDATA* conshdlrdata;
227 
228  conshdlrdata = SCIPconshdlrGetData(conshdlr);
229  assert(conshdlrdata != NULL);
230  assert(conshdlrdata->objconshdlr != NULL);
231 
232  /* call virtual method of conshdlr object */
233  SCIP_CALL( conshdlrdata->objconshdlr->scip_trans(scip, conshdlr, sourcecons, targetcons) );
234 
235  return SCIP_OKAY;
236 }
237 
238 
239 /** LP initialization method of constraint handler */
240 static
241 SCIP_DECL_CONSINITLP(consInitlpObj)
242 { /*lint --e{715}*/
243  SCIP_CONSHDLRDATA* conshdlrdata;
244 
245  conshdlrdata = SCIPconshdlrGetData(conshdlr);
246  assert(conshdlrdata != NULL);
247  assert(conshdlrdata->objconshdlr != NULL);
248 
249  /* call virtual method of conshdlr object */
250  SCIP_CALL( conshdlrdata->objconshdlr->scip_initlp(scip, conshdlr, conss, nconss) );
251 
252  return SCIP_OKAY;
253 }
254 
255 
256 /** separation method of constraint handler for LP solutions */
257 static
258 SCIP_DECL_CONSSEPALP(consSepalpObj)
259 { /*lint --e{715}*/
260  SCIP_CONSHDLRDATA* conshdlrdata;
261 
262  conshdlrdata = SCIPconshdlrGetData(conshdlr);
263  assert(conshdlrdata != NULL);
264  assert(conshdlrdata->objconshdlr != NULL);
265 
266  /* call virtual method of conshdlr object */
267  SCIP_CALL( conshdlrdata->objconshdlr->scip_sepalp(scip, conshdlr, conss, nconss, nusefulconss, result) );
268 
269  return SCIP_OKAY;
270 }
271 
272 
273 /** separation method of constraint handler for arbitrary primal solutions */
274 static
275 SCIP_DECL_CONSSEPASOL(consSepasolObj)
276 { /*lint --e{715}*/
277  SCIP_CONSHDLRDATA* conshdlrdata;
278 
279  conshdlrdata = SCIPconshdlrGetData(conshdlr);
280  assert(conshdlrdata != NULL);
281  assert(conshdlrdata->objconshdlr != NULL);
282 
283  /* call virtual method of conshdlr object */
284  SCIP_CALL( conshdlrdata->objconshdlr->scip_sepasol(scip, conshdlr, conss, nconss, nusefulconss, sol, result) );
285 
286  return SCIP_OKAY;
287 }
288 
289 
290 /** constraint enforcing method of constraint handler for LP solutions */
291 static
292 SCIP_DECL_CONSENFOLP(consEnfolpObj)
293 { /*lint --e{715}*/
294  SCIP_CONSHDLRDATA* conshdlrdata;
295 
296  conshdlrdata = SCIPconshdlrGetData(conshdlr);
297  assert(conshdlrdata != NULL);
298  assert(conshdlrdata->objconshdlr != NULL);
299 
300  /* call virtual method of conshdlr object */
301  SCIP_CALL( conshdlrdata->objconshdlr->scip_enfolp(scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
302 
303  return SCIP_OKAY;
304 }
305 
306 
307 /** constraint enforcing method of constraint handler for pseudo solutions */
308 static
309 SCIP_DECL_CONSENFOPS(consEnfopsObj)
310 { /*lint --e{715}*/
311  SCIP_CONSHDLRDATA* conshdlrdata;
312 
313  conshdlrdata = SCIPconshdlrGetData(conshdlr);
314  assert(conshdlrdata != NULL);
315  assert(conshdlrdata->objconshdlr != NULL);
316 
317  /* call virtual method of conshdlr object */
318  SCIP_CALL( conshdlrdata->objconshdlr->scip_enfops(scip, conshdlr, conss, nconss, nusefulconss,
319  solinfeasible, objinfeasible, result) );
320 
321  return SCIP_OKAY;
322 }
323 
324 
325 /** feasibility check method of constraint handler for primal solutions */
326 static
327 SCIP_DECL_CONSCHECK(consCheckObj)
328 { /*lint --e{715}*/
329  SCIP_CONSHDLRDATA* conshdlrdata;
330 
331  conshdlrdata = SCIPconshdlrGetData(conshdlr);
332  assert(conshdlrdata != NULL);
333  assert(conshdlrdata->objconshdlr != NULL);
334 
335  /* call virtual method of conshdlr object */
336  SCIP_CALL( conshdlrdata->objconshdlr->scip_check(scip, conshdlr, conss, nconss, sol,
337  checkintegrality, checklprows, printreason, result) );
338 
339  return SCIP_OKAY;
340 }
341 
342 
343 /** domain propagation method of constraint handler */
344 static
345 SCIP_DECL_CONSPROP(consPropObj)
346 { /*lint --e{715}*/
347  SCIP_CONSHDLRDATA* conshdlrdata;
348 
349  conshdlrdata = SCIPconshdlrGetData(conshdlr);
350  assert(conshdlrdata != NULL);
351  assert(conshdlrdata->objconshdlr != NULL);
352 
353  /* call virtual method of conshdlr object */
354  SCIP_CALL( conshdlrdata->objconshdlr->scip_prop(scip, conshdlr, conss, nconss, nusefulconss, nmarkedconss, proptiming, result) );
355 
356  return SCIP_OKAY;
357 }
358 
359 
360 /** presolving method of constraint handler */
361 static
362 SCIP_DECL_CONSPRESOL(consPresolObj)
363 { /*lint --e{715}*/
364  SCIP_CONSHDLRDATA* conshdlrdata;
365 
366  conshdlrdata = SCIPconshdlrGetData(conshdlr);
367  assert(conshdlrdata != NULL);
368  assert(conshdlrdata->objconshdlr != NULL);
369 
370  /* call virtual method of conshdlr object */
371  SCIP_CALL( conshdlrdata->objconshdlr->scip_presol(scip, conshdlr, conss, nconss, nrounds,
372  nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes,
373  nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides,
374  nfixedvars, naggrvars, nchgvartypes, nchgbds, naddholes,
375  ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides, result) );
376 
377  return SCIP_OKAY;
378 }
379 
380 
381 /** propagation conflict resolving method of constraint handler */
382 static
383 SCIP_DECL_CONSRESPROP(consRespropObj)
384 { /*lint --e{715}*/
385  SCIP_CONSHDLRDATA* conshdlrdata;
386 
387  conshdlrdata = SCIPconshdlrGetData(conshdlr);
388  assert(conshdlrdata != NULL);
389  assert(conshdlrdata->objconshdlr != NULL);
390 
391  /* call virtual method of conshdlr object */
392  SCIP_CALL( conshdlrdata->objconshdlr->scip_resprop(scip, conshdlr, cons, infervar, inferinfo, boundtype, bdchgidx,
393  relaxedbd, result) );
394 
395  return SCIP_OKAY;
396 }
397 
398 
399 /** variable rounding lock method of constraint handler */
400 static
401 SCIP_DECL_CONSLOCK(consLockObj)
402 { /*lint --e{715}*/
403  SCIP_CONSHDLRDATA* conshdlrdata;
404 
405  conshdlrdata = SCIPconshdlrGetData(conshdlr);
406  assert(conshdlrdata != NULL);
407  assert(conshdlrdata->objconshdlr != NULL);
408 
409  /* call virtual method of conshdlr object */
410  SCIP_CALL( conshdlrdata->objconshdlr->scip_lock(scip, conshdlr, cons, nlockspos, nlocksneg) );
411 
412  return SCIP_OKAY;
413 }
414 
415 
416 /** constraint activation notification method of constraint handler */
417 static
418 SCIP_DECL_CONSACTIVE(consActiveObj)
419 { /*lint --e{715}*/
420  SCIP_CONSHDLRDATA* conshdlrdata;
421 
422  conshdlrdata = SCIPconshdlrGetData(conshdlr);
423  assert(conshdlrdata != NULL);
424  assert(conshdlrdata->objconshdlr != NULL);
425 
426  /* call virtual method of conshdlr object */
427  SCIP_CALL( conshdlrdata->objconshdlr->scip_active(scip, conshdlr, cons) );
428 
429  return SCIP_OKAY;
430 }
431 
432 
433 /** constraint deactivation notification method of constraint handler */
434 static
435 SCIP_DECL_CONSDEACTIVE(consDeactiveObj)
436 { /*lint --e{715}*/
437  SCIP_CONSHDLRDATA* conshdlrdata;
438 
439  conshdlrdata = SCIPconshdlrGetData(conshdlr);
440  assert(conshdlrdata != NULL);
441  assert(conshdlrdata->objconshdlr != NULL);
442 
443  /* call virtual method of conshdlr object */
444  SCIP_CALL( conshdlrdata->objconshdlr->scip_deactive(scip, conshdlr, cons) );
445 
446  return SCIP_OKAY;
447 }
448 
449 
450 /** constraint enabling notification method of constraint handler */
451 static
452 SCIP_DECL_CONSENABLE(consEnableObj)
453 { /*lint --e{715}*/
454  SCIP_CONSHDLRDATA* conshdlrdata;
455 
456  conshdlrdata = SCIPconshdlrGetData(conshdlr);
457  assert(conshdlrdata != NULL);
458  assert(conshdlrdata->objconshdlr != NULL);
459 
460  /* call virtual method of conshdlr object */
461  SCIP_CALL( conshdlrdata->objconshdlr->scip_enable(scip, conshdlr, cons) );
462 
463  return SCIP_OKAY;
464 }
465 
466 
467 /** constraint disabling notification method of constraint handler */
468 static
469 SCIP_DECL_CONSDISABLE(consDisableObj)
470 { /*lint --e{715}*/
471  SCIP_CONSHDLRDATA* conshdlrdata;
472 
473  conshdlrdata = SCIPconshdlrGetData(conshdlr);
474  assert(conshdlrdata != NULL);
475  assert(conshdlrdata->objconshdlr != NULL);
476 
477  /* call virtual method of conshdlr object */
478  SCIP_CALL( conshdlrdata->objconshdlr->scip_disable(scip, conshdlr, cons) );
479 
480  return SCIP_OKAY;
481 }
482 
483 /** variable deletion method of constraint handler */
484 static
485 SCIP_DECL_CONSDELVARS(consDelVarsObj)
486 { /*lint --e{715}*/
487  SCIP_CONSHDLRDATA* conshdlrdata;
488 
489  conshdlrdata = SCIPconshdlrGetData(conshdlr);
490  assert(conshdlrdata != NULL);
491  assert(conshdlrdata->objconshdlr != NULL);
492 
493  /* call virtual method of conshdlr object */
494  SCIP_CALL( conshdlrdata->objconshdlr->scip_delvars(scip, conshdlr, conss, nconss) );
495 
496  return SCIP_OKAY;
497 }
498 
499 /** constraint display method of constraint handler */
500 static
501 SCIP_DECL_CONSPRINT(consPrintObj)
502 { /*lint --e{715}*/
503  SCIP_CONSHDLRDATA* conshdlrdata;
504 
505  conshdlrdata = SCIPconshdlrGetData(conshdlr);
506  assert(conshdlrdata != NULL);
507  assert(conshdlrdata->objconshdlr != NULL);
508 
509  /* call virtual method of conshdlr object */
510  SCIP_CALL( conshdlrdata->objconshdlr->scip_print(scip, conshdlr, cons, file) );
511 
512  return SCIP_OKAY;
513 }
514 
515 /** constraint copying method of constraint handler */
516 static
517 SCIP_DECL_CONSCOPY(consCopyObj)
518 { /*lint --e{715}*/
519  SCIP_CONSHDLRDATA* sourceconshdlrdata;
520 
521  sourceconshdlrdata = SCIPconshdlrGetData(sourceconshdlr);
522  assert(sourceconshdlrdata != NULL);
523  assert(sourceconshdlrdata->objconshdlr != NULL);
524 
525  /* call virtual method of conshdlr object */
526  SCIP_CALL( sourceconshdlrdata->objconshdlr->scip_copy(scip, cons, name, sourcescip, sourceconshdlr, sourcecons, varmap, consmap,
527  initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) );
528 
529  return SCIP_OKAY;
530 }
531 
532 /** constraint parsing method of constraint handler */
533 static
534 SCIP_DECL_CONSPARSE(consParseObj)
535 { /*lint --e{715}*/
536  SCIP_CONSHDLRDATA* conshdlrdata;
537 
538  conshdlrdata = SCIPconshdlrGetData(conshdlr);
539  assert(conshdlrdata != NULL);
540  assert(conshdlrdata->objconshdlr != NULL);
541 
542  /* call virtual method of conshdlr object */
543  SCIP_CALL( conshdlrdata->objconshdlr->scip_parse(scip, conshdlr, cons, name, str,
544  initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, success) );
545 
546  return SCIP_OKAY;
547 }
548 
549 /** constraint method of constraint handler which returns the variables (if possible) */
550 static
551 SCIP_DECL_CONSGETVARS(consGetVarsObj)
552 { /*lint --e{715}*/
553  SCIP_CONSHDLRDATA* conshdlrdata;
554 
555  conshdlrdata = SCIPconshdlrGetData(conshdlr);
556  assert(conshdlrdata != NULL);
557  assert(conshdlrdata->objconshdlr != NULL);
558 
559  /* call virtual method of conshdlr object */
560  SCIP_CALL( conshdlrdata->objconshdlr->scip_getvars(scip, conshdlr, cons, vars, varssize, success) );
561 
562  return SCIP_OKAY;
563 }
564 
565 /** constraint method of constraint handler which returns the number of variables (if possible) */
566 static
567 SCIP_DECL_CONSGETNVARS(consGetNVarsObj)
568 { /*lint --e{715}*/
569  SCIP_CONSHDLRDATA* conshdlrdata;
570 
571  conshdlrdata = SCIPconshdlrGetData(conshdlr);
572  assert(conshdlrdata != NULL);
573  assert(conshdlrdata->objconshdlr != NULL);
574 
575  /* call virtual method of conshdlr object */
576  SCIP_CALL( conshdlrdata->objconshdlr->scip_getnvars(scip, conshdlr, cons, nvars, success) );
577 
578  return SCIP_OKAY;
579 }
580 }
581 
582 
583 /*
584  * constraint handler specific interface methods
585  */
586 
587 /** creates the constraint handler for the given constraint handler object and includes it in SCIP */
589  SCIP* scip, /**< SCIP data structure */
590  scip::ObjConshdlr* objconshdlr, /**< constraint handler object */
591  SCIP_Bool deleteobject /**< should the constraint handler object be deleted when conshdlr is freed? */
592  )
593 {
594  SCIP_CONSHDLRDATA* conshdlrdata;
595 
596  assert(scip != NULL);
597  assert(objconshdlr != NULL);
598  assert(objconshdlr->scip_ == scip);
599 
600  /* create obj constraint handler data */
601  conshdlrdata = new SCIP_CONSHDLRDATA;
602  conshdlrdata->objconshdlr = objconshdlr;
603  conshdlrdata->deleteobject = deleteobject;
604 
605  /* include constraint handler */
606  SCIP_CALL( SCIPincludeConshdlr(scip, objconshdlr->scip_name_, objconshdlr->scip_desc_,
607  objconshdlr->scip_sepapriority_, objconshdlr->scip_enfopriority_, objconshdlr->scip_checkpriority_,
608  objconshdlr->scip_sepafreq_, objconshdlr->scip_propfreq_, objconshdlr->scip_eagerfreq_,
609  objconshdlr->scip_maxprerounds_,
610  objconshdlr->scip_delaysepa_, objconshdlr->scip_delayprop_, objconshdlr->scip_delaypresol_,
611  objconshdlr->scip_needscons_, objconshdlr->scip_timingmask_,
612  conshdlrCopyObj,
613  consFreeObj, consInitObj, consExitObj,
614  consInitpreObj, consExitpreObj, consInitsolObj, consExitsolObj,
615  consDeleteObj, consTransObj, consInitlpObj,
616  consSepalpObj, consSepasolObj, consEnfolpObj, consEnfopsObj, consCheckObj,
617  consPropObj, consPresolObj, consRespropObj, consLockObj,
618  consActiveObj, consDeactiveObj,
619  consEnableObj, consDisableObj, consDelVarsObj,
620  consPrintObj, consCopyObj, consParseObj,
621  consGetVarsObj, consGetNVarsObj, conshdlrdata) ); /*lint !e429*/
622 
623  return SCIP_OKAY; /*lint !e429*/
624 }
625 
626 /** returns the conshdlr object of the given name, or 0 if not existing */
628  SCIP* scip, /**< SCIP data structure */
629  const char* name /**< name of constraint handler */
630  )
631 {
632  SCIP_CONSHDLR* conshdlr;
633  SCIP_CONSHDLRDATA* conshdlrdata;
634 
635  conshdlr = SCIPfindConshdlr(scip, name);
636  if( conshdlr == NULL )
637  return 0;
638 
639  conshdlrdata = SCIPconshdlrGetData(conshdlr);
640  assert(conshdlrdata != NULL);
641 
642  return conshdlrdata->objconshdlr;
643 }
644 
645 /** returns the conshdlr object for the given constraint handler */
647  SCIP* scip, /**< SCIP data structure */
648  SCIP_CONSHDLR* conshdlr /**< constraint handler */
649  )
650 {
651  SCIP_CONSHDLRDATA* conshdlrdata;
652 
653  conshdlrdata = SCIPconshdlrGetData(conshdlr);
654  assert(conshdlrdata != NULL);
655 
656  return conshdlrdata->objconshdlr;
657 }
658