Scippy

SCIP

Solving Constraint Integer Programs

pub_cons.h
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-2018 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 pub_cons.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for managing constraints
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_CONS_H__
25 #define __SCIP_PUB_CONS_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_misc.h"
30 #include "scip/type_cons.h"
31 
32 #ifdef NDEBUG
33 #include "scip/struct_cons.h"
34 #endif
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * Constraint handler methods
42  */
43 
44 /**@addtogroup PublicConshdlrMethods
45  *
46  * @{
47  */
48 
49 /** compares two constraint handlers w. r. to their separation priority */
50 extern
51 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa);
52 
53 /** compares two constraint handlers w. r. to their enforcing priority */
54 extern
55 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompEnfo);
56 
57 /** compares two constraint handlers w. r. to their feasibility check priority */
58 extern
59 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompCheck);
60 
61 /** gets name of constraint handler */
62 extern
63 const char* SCIPconshdlrGetName(
64  SCIP_CONSHDLR* conshdlr /**< constraint handler */
65  );
66 
67 /** gets description of constraint handler */
68 extern
69 const char* SCIPconshdlrGetDesc(
70  SCIP_CONSHDLR* conshdlr /**< constraint handler */
71  );
72 
73 /** gets user data of constraint handler */
74 extern
76  SCIP_CONSHDLR* conshdlr /**< constraint handler */
77  );
78 
79 /** sets user data of constraint handler; user has to free old data in advance! */
80 extern
82  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
83  SCIP_CONSHDLRDATA* conshdlrdata /**< new constraint handler user data */
84  );
85 
86 /** sets all separation related callbacks of the constraint handler */
87 extern
89  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
90  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
91  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
92  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
93  int sepapriority, /**< priority of the constraint handler for separation */
94  SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
95  );
96 
97 /** sets both the propagation callback and the propagation frequency of the constraint handler */
98 extern
100  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
101  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
102  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
103  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
104  SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */
105  );
106 
107 /** sets the relaxation enforcement method of the constraint handler */
108 extern
110  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
111  SCIP_DECL_CONSENFORELAX ((*consenforelax)) /**< constraint copying method */
112  );
113 
114 /** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
115  * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
116  *
117  * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
118  * flag is TRUE) and the current node belongs to the corresponding sub tree.
119  */
120 extern
122  SCIP_CONSHDLR* conshdlr /**< constraint handler */
123  );
124 
125 /** gets array with enforced constraints of constraint handler; this is local information */
126 extern
128  SCIP_CONSHDLR* conshdlr /**< constraint handler */
129  );
130 
131 /** gets array with checked constraints of constraint handler; this is local information */
132 extern
134  SCIP_CONSHDLR* conshdlr /**< constraint handler */
135  );
136 
137 /** gets total number of existing transformed constraints of constraint handler */
138 extern
140  SCIP_CONSHDLR* conshdlr /**< constraint handler */
141  );
142 
143 /** gets number of enforced constraints of constraint handler; this is local information */
144 extern
146  SCIP_CONSHDLR* conshdlr /**< constraint handler */
147  );
148 
149 /** gets number of checked constraints of constraint handler; this is local information */
150 extern
152  SCIP_CONSHDLR* conshdlr /**< constraint handler */
153  );
154 
155 /** gets number of active constraints of constraint handler
156  *
157  * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
158  * flag is TRUE) and the current node belongs to the corresponding sub tree.
159  */
160 extern
162  SCIP_CONSHDLR* conshdlr /**< constraint handler */
163  );
164 
165 /** gets number of enabled constraints of constraint handler */
166 extern
168  SCIP_CONSHDLR* conshdlr /**< constraint handler */
169  );
170 
171 /** gets time in seconds used for setting up this constraint handler for new stages */
172 extern
174  SCIP_CONSHDLR* conshdlr /**< constraint handler */
175  );
176 
177 /** gets time in seconds used for presolving in this constraint handler */
178 extern
180  SCIP_CONSHDLR* conshdlr /**< constraint handler */
181  );
182 
183 /** gets time in seconds used for separation in this constraint handler */
184 extern
186  SCIP_CONSHDLR* conshdlr /**< constraint handler */
187  );
188 
189 /** gets time in seconds used for LP enforcement in this constraint handler */
190 extern
192  SCIP_CONSHDLR* conshdlr /**< constraint handler */
193  );
194 
195 /** gets time in seconds used for pseudo enforcement in this constraint handler */
196 extern
198  SCIP_CONSHDLR* conshdlr /**< constraint handler */
199  );
200 
201 /** gets time in seconds used for relaxation enforcement in this constraint handler */
202 extern
204  SCIP_CONSHDLR* conshdlr /**< constraint handler */
205  );
206 
207 /** gets time in seconds used for propagation in this constraint handler */
208 extern
210  SCIP_CONSHDLR* conshdlr /**< constraint handler */
211  );
212 
213 /** gets time in seconds used for propagation in this constraint handler during strong branching */
214 extern
216  SCIP_CONSHDLR* conshdlr /**< constraint handler */
217  );
218 
219 /** gets time in seconds used for feasibility checking in this constraint handler */
220 extern
222  SCIP_CONSHDLR* conshdlr /**< constraint handler */
223  );
224 
225 /** gets time in seconds used for resolving propagation in this constraint handler */
226 extern
228  SCIP_CONSHDLR* conshdlr /**< constraint handler */
229  );
230 
231 /** gets number of calls to the constraint handler's separation method */
232 extern
234  SCIP_CONSHDLR* conshdlr /**< constraint handler */
235  );
236 
237 /** gets number of calls to the constraint handler's LP enforcing method */
238 extern
240  SCIP_CONSHDLR* conshdlr /**< constraint handler */
241  );
242 
243 /** gets number of calls to the constraint handler's pseudo enforcing method */
244 extern
246  SCIP_CONSHDLR* conshdlr /**< constraint handler */
247  );
248 
249 /** gets number of calls to the constraint handler's relaxation enforcing method */
250 extern
252  SCIP_CONSHDLR* conshdlr /**< constraint handler */
253  );
254 
255 /** gets number of calls to the constraint handler's propagation method */
256 extern
258  SCIP_CONSHDLR* conshdlr /**< constraint handler */
259  );
260 
261 /** gets number of calls to the constraint handler's checking method */
262 extern
264  SCIP_CONSHDLR* conshdlr /**< constraint handler */
265  );
266 
267 /** gets number of calls to the constraint handler's resolve propagation method */
268 extern
270  SCIP_CONSHDLR* conshdlr /**< constraint handler */
271  );
272 
273 /** gets total number of times, this constraint handler detected a cutoff */
274 extern
276  SCIP_CONSHDLR* conshdlr /**< constraint handler */
277  );
278 
279 /** gets total number of cuts found by this constraint handler */
280 extern
282  SCIP_CONSHDLR* conshdlr /**< constraint handler */
283  );
284 
285 /** gets total number of cuts found by this constraint handler applied to lp */
286 extern
288  SCIP_CONSHDLR* conshdlr /**< constraint handler */
289  );
290 
291 /** gets total number of additional constraints added by this constraint handler */
292 extern
294  SCIP_CONSHDLR* conshdlr /**< constraint handler */
295  );
296 
297 /** gets total number of domain reductions found by this constraint handler */
298 extern
300  SCIP_CONSHDLR* conshdlr /**< constraint handler */
301  );
302 
303 /** gets number of children created by this constraint handler */
304 extern
306  SCIP_CONSHDLR* conshdlr /**< constraint handler */
307  );
308 
309 /** gets maximum number of active constraints of constraint handler existing at the same time */
310 extern
312  SCIP_CONSHDLR* conshdlr /**< constraint handler */
313  );
314 
315 /** gets initial number of active constraints of constraint handler */
316 extern
318  SCIP_CONSHDLR* conshdlr /**< constraint handler */
319  );
320 
321 /** gets number of variables fixed in presolving method of constraint handler */
322 extern
324  SCIP_CONSHDLR* conshdlr /**< constraint handler */
325  );
326 
327 /** gets number of variables aggregated in presolving method of constraint handler */
328 extern
330  SCIP_CONSHDLR* conshdlr /**< constraint handler */
331  );
332 
333 /** gets number of variable types changed in presolving method of constraint handler */
334 extern
336  SCIP_CONSHDLR* conshdlr /**< constraint handler */
337  );
338 
339 /** gets number of bounds changed in presolving method of constraint handler */
340 extern
342  SCIP_CONSHDLR* conshdlr /**< constraint handler */
343  );
344 
345 /** gets number of holes added to domains of variables in presolving method of constraint handler */
346 extern
348  SCIP_CONSHDLR* conshdlr /**< constraint handler */
349  );
350 
351 /** gets number of constraints deleted in presolving method of constraint handler */
352 extern
354  SCIP_CONSHDLR* conshdlr /**< constraint handler */
355  );
356 
357 /** gets number of constraints added in presolving method of constraint handler */
358 extern
360  SCIP_CONSHDLR* conshdlr /**< constraint handler */
361  );
362 
363 /** gets number of constraints upgraded in presolving method of constraint handler */
364 extern
366  SCIP_CONSHDLR* conshdlr /**< constraint handler */
367  );
368 
369 /** gets number of coefficients changed in presolving method of constraint handler */
370 extern
372  SCIP_CONSHDLR* conshdlr /**< constraint handler */
373  );
374 
375 /** gets number of constraint sides changed in presolving method of constraint handler */
376 extern
378  SCIP_CONSHDLR* conshdlr /**< constraint handler */
379  );
380 
381 /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
382 extern
384  SCIP_CONSHDLR* conshdlr /**< constraint handler */
385  );
386 
387 /** gets separation priority of constraint handler */
388 extern
390  SCIP_CONSHDLR* conshdlr /**< constraint handler */
391  );
392 
393 /** gets enforcing priority of constraint handler */
394 extern
396  SCIP_CONSHDLR* conshdlr /**< constraint handler */
397  );
398 
399 /** gets checking priority of constraint handler */
400 extern
402  SCIP_CONSHDLR* conshdlr /**< constraint handler */
403  );
404 
405 /** gets separation frequency of constraint handler */
406 extern
408  SCIP_CONSHDLR* conshdlr /**< constraint handler */
409  );
410 
411 /** gets propagation frequency of constraint handler */
412 extern
414  SCIP_CONSHDLR* conshdlr /**< constraint handler */
415  );
416 
417 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
418 extern
420  SCIP_CONSHDLR* conshdlr /**< constraint handler */
421  );
422 
423 /** needs constraint handler a constraint to be called? */
424 extern
426  SCIP_CONSHDLR* conshdlr /**< constraint handler */
427  );
428 
429 /** does the constraint handler perform presolving? */
430 extern
432  SCIP_CONSHDLR* conshdlr /**< constraint handler */
433  );
434 
435 /** should separation method be delayed, if other separators found cuts? */
436 extern
438  SCIP_CONSHDLR* conshdlr /**< constraint handler */
439  );
440 
441 /** should propagation method be delayed, if other propagators found reductions? */
442 extern
444  SCIP_CONSHDLR* conshdlr /**< constraint handler */
445  );
446 
447 /** was LP separation method delayed at the last call? */
448 extern
450  SCIP_CONSHDLR* conshdlr /**< constraint handler */
451  );
452 
453 /** was primal solution separation method delayed at the last call? */
454 extern
456  SCIP_CONSHDLR* conshdlr /**< constraint handler */
457  );
458 
459 /** was propagation method delayed at the last call? */
460 extern
462  SCIP_CONSHDLR* conshdlr /**< constraint handler */
463  );
464 
465 /** is constraint handler initialized? */
466 extern
468  SCIP_CONSHDLR* conshdlr /**< constraint handler */
469  );
470 
471 /** does the constraint handler have a copy function? */
472 extern
474  SCIP_CONSHDLR* conshdlr /**< constraint handler */
475  );
476 
477 /** returns the timing mask of the propagation method of the constraint handler */
478 extern
480  SCIP_CONSHDLR* conshdlr /**< constraint handler */
481  );
482 
483 /*
484  * Methods for constraint change sets
485  */
486 /** gets added constraints data for a constraint set change */
487 extern
489  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to get data from */
490  SCIP_CONS*** conss, /**< reference to constraints array added in the conssetchg, or NULL */
491  int* nconss /**< reference to store the size of the constraints array, or NULL */
492  );
493 
494 /** sets the timing mask of the propagation method of the constraint handler */
495 extern
497  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
498  SCIP_PROPTIMING proptiming /**< timing mask to be set */
499  );
500 
501 
502 /** returns the timing mask of the presolving method of the constraint handler */
503 extern
505  SCIP_CONSHDLR* conshdlr /**< constraint handler */
506  );
507 
508 /** sets the timing mask of the presolving method of the constraint handler */
509 extern
511  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
512  SCIP_PRESOLTIMING presoltiming /** timing mask to be set */
513  );
514 
515 /* @} */
516 
517 /*
518  * Constraint methods
519  */
520 
521 /**@addtogroup PublicConstraintMethods
522  *
523  * @{
524  */
525 
526 
527 /** returns the name of the constraint
528  *
529  * @note to change the name of a constraint, use SCIPchgConsName() from scip.h
530  */
531 extern
532 const char* SCIPconsGetName(
533  SCIP_CONS* cons /**< constraint */
534  );
535 
536 /** returns the position of constraint in the corresponding handler's conss array */
537 extern
538 int SCIPconsGetPos(
539  SCIP_CONS* cons /**< constraint */
540  );
541 
542 /** returns the constraint handler of the constraint */
543 extern
545  SCIP_CONS* cons /**< constraint */
546  );
547 
548 /** returns the constraint data field of the constraint */
549 extern
551  SCIP_CONS* cons /**< constraint */
552  );
553 
554 /** gets number of times, the constraint is currently captured */
555 extern
556 int SCIPconsGetNUses(
557  SCIP_CONS* cons /**< constraint */
558  );
559 
560 /** for an active constraint, returns the depth in the tree at which the constraint was activated */
561 extern
563  SCIP_CONS* cons /**< constraint */
564  );
565 
566 /** returns the depth in the tree at which the constraint is valid; returns INT_MAX, if the constraint is local
567  * and currently not active
568  */
569 extern
571  SCIP_CONS* cons /**< constraint */
572  );
573 
574 /** returns TRUE iff constraint is active in the current node */
575 extern
577  SCIP_CONS* cons /**< constraint */
578  );
579 
580 /** returns TRUE iff constraint has to be deactivated in update phase */
581 extern
583  SCIP_CONS* cons /**< constraint */
584  );
585 
586 /** returns TRUE iff constraint is enabled in the current node */
587 extern
589  SCIP_CONS* cons /**< constraint */
590  );
591 
592 /** returns TRUE iff constraint's separation is enabled in the current node */
593 extern
595  SCIP_CONS* cons /**< constraint */
596  );
597 
598 /** returns TRUE iff constraint's propagation is enabled in the current node */
599 extern
601  SCIP_CONS* cons /**< constraint */
602  );
603 
604 /** returns TRUE iff constraint is deleted or marked to be deleted */
605 extern
607  SCIP_CONS* cons /**< constraint */
608  );
609 
610 /** returns TRUE iff constraint is marked obsolete */
611 extern
613  SCIP_CONS* cons /**< constraint */
614  );
615 
616 /** returns TRUE iff constraint is marked as a conflict */
617 extern
619  SCIP_CONS* cons /**< constraint */
620  );
621 
622 /** gets age of constraint */
623 extern
625  SCIP_CONS* cons /**< constraint */
626  );
627 
628 /** returns TRUE iff the LP relaxation of constraint should be in the initial LP */
629 extern
631  SCIP_CONS* cons /**< constraint */
632  );
633 
634 /** returns TRUE iff constraint should be separated during LP processing */
635 extern
637  SCIP_CONS* cons /**< constraint */
638  );
639 
640 /** returns TRUE iff constraint should be enforced during node processing */
641 extern
643  SCIP_CONS* cons /**< constraint */
644  );
645 
646 /** returns TRUE iff constraint should be checked for feasibility */
647 extern
649  SCIP_CONS* cons /**< constraint */
650  );
651 
652 /** returns whether the constraint is marked for propagation */
653 extern
655  SCIP_CONS* cons /**< constraint */
656  );
657 
658 /** returns TRUE iff constraint should be propagated during node processing */
659 extern
661  SCIP_CONS* cons /**< constraint */
662  );
663 
664 /** returns TRUE iff constraint is globally valid */
665 extern
667  SCIP_CONS* cons /**< constraint */
668  );
669 
670 /** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */
671 extern
673  SCIP_CONS* cons /**< constraint */
674  );
675 
676 /** returns TRUE iff constraint is modifiable (subject to column generation) */
677 extern
679  SCIP_CONS* cons /**< constraint */
680  );
681 
682 /** returns TRUE iff constraint is subject to aging */
683 extern
685  SCIP_CONS* cons /**< constraint */
686  );
687 
688 /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
689 extern
691  SCIP_CONS* cons /**< constraint */
692  );
693 
694 /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
695 extern
697  SCIP_CONS* cons /**< constraint */
698  );
699 
700 /** returns TRUE iff constraint belongs to the global problem */
701 extern
703  SCIP_CONS* cons /**< constraint */
704  );
705 
706 /** returns TRUE iff constraint is belonging to original space */
707 extern
709  SCIP_CONS* cons /**< constraint */
710  );
711 
712 /** returns TRUE iff constraint is belonging to transformed space */
713 extern
715  SCIP_CONS* cons /**< constraint */
716  );
717 
718 /** returns TRUE iff roundings for variables in constraint are locked */
719 extern
721  SCIP_CONS* cons /**< constraint */
722  );
723 
724 /** returns TRUE iff roundings for variables in constraint's negation are locked */
725 extern
727  SCIP_CONS* cons /**< constraint */
728  );
729 
730 /** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */
731 extern
733  SCIP_CONS* cons /**< constraint */
734  );
735 
736 /** get number of times the roundings for variables in constraint are locked */
737 extern
739  SCIP_CONS* cons /**< constraint */
740  );
741 
742 /** get number of times the roundings for variables in constraint's negation are locked */
743 extern
745  SCIP_CONS* cons /**< constraint */
746  );
747 
748 /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
749 extern
751  SCIP_CONS* cons, /**< constraint */
752  SCIP_LOCKTYPE locktype /**< variable lock type */
753  );
754 
755 /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
756 extern
758  SCIP_CONS* cons, /**< constraint */
759  SCIP_LOCKTYPE locktype /**< variable lock type */
760  );
761 
762 /** returns TRUE iff roundings of the given locktype for variables in constraint or in constraint's negation are locked */
763 extern
765  SCIP_CONS* cons, /**< constraint */
766  SCIP_LOCKTYPE locktype /**< variable lock type */
767  );
768 
769 /** get number of times the roundings of given locktype for variables in constraint are locked */
770 extern
772  SCIP_CONS* cons, /**< constraint */
773  SCIP_LOCKTYPE locktype /**< variable lock type */
774  );
775 
776 /** get number of times the roundings of given locktype for variables in constraint's negation are locked */
777 extern
779  SCIP_CONS* cons, /**< constraint */
780  SCIP_LOCKTYPE locktype /**< variable lock type */
781  );
782 
783 /** returns if the constraint was already added to a SCIP instance */
784 extern
786  SCIP_CONS* cons /**< constraint */
787  );
788 
789 /** adds locks to (dis-)allow upgrading of constraint */
790 extern
792  SCIP_CONS* cons, /**< constraint to add locks */
793  int nlocks /**< number of locks to add */
794  );
795 
796 /** gets number of locks against upgrading the constraint, 0 means this constraint can be upgraded */
797 extern
799  SCIP_CONS* cons /**< constraint */
800  );
801 
802 #ifdef NDEBUG
803 
804 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
805  * speed up the algorithms.
806  */
807 
808 #define SCIPconsGetName(cons) (cons)->name
809 #define SCIPconsGetPos(cons) (cons)->consspos
810 #define SCIPconsGetHdlr(cons) (cons)->conshdlr
811 #define SCIPconsGetData(cons) (cons)->consdata
812 #define SCIPconsGetNUses(cons) (cons)->nuses
813 #define SCIPconsGetActiveDepth(cons) (cons)->activedepth
814 #define SCIPconsGetValidDepth(cons) (!(cons)->local ? 0 \
815  : !SCIPconsIsActive(cons) ? INT_MAX \
816  : (cons)->validdepth == -1 ? SCIPconsGetActiveDepth(cons) \
817  : (cons)->validdepth)
818 #define SCIPconsIsActive(cons) ((cons)->updateactivate || ((cons)->active && !(cons)->updatedeactivate))
819 #define SCIPconsIsEnabled(cons) ((cons)->updateenable || ((cons)->enabled && !(cons)->updatedisable))
820 #define SCIPconsIsSeparationEnabled(cons) \
821  (SCIPconsIsEnabled(cons) && ((cons)->updatesepaenable || ((cons)->sepaenabled && !(cons)->updatesepadisable)))
822 #define SCIPconsIsPropagationEnabled(cons) \
823  (SCIPconsIsEnabled(cons) && ((cons)->updatepropenable || ((cons)->propenabled && !(cons)->updatepropdisable)))
824 #define SCIPconsIsDeleted(cons) ((cons)->deleted)
825 #define SCIPconsIsObsolete(cons) ((cons)->updateobsolete || (cons)->obsolete)
826 #define SCIPconsIsConflict(cons) ((cons)->conflict)
827 #define SCIPconsGetAge(cons) (cons)->age
828 #define SCIPconsIsInitial(cons) (cons)->initial
829 #define SCIPconsIsSeparated(cons) (cons)->separate
830 #define SCIPconsIsEnforced(cons) (cons)->enforce
831 #define SCIPconsIsChecked(cons) (cons)->check
832 #define SCIPconsIsMarkedPropagate(cons) ((cons)->updatemarkpropagate || ((cons)->markpropagate && !(cons)->updateunmarkpropagate))
833 #define SCIPconsIsPropagated(cons) (cons)->propagate
834 #define SCIPconsIsGlobal(cons) !(cons)->local
835 #define SCIPconsIsLocal(cons) (cons)->local
836 #define SCIPconsIsModifiable(cons) (cons)->modifiable
837 #define SCIPconsIsDynamic(cons) (cons)->dynamic
838 #define SCIPconsIsRemovable(cons) (cons)->removable
839 #define SCIPconsIsStickingAtNode(cons) (cons)->stickingatnode
840 #define SCIPconsIsInProb(cons) ((cons)->addconssetchg == NULL && (cons)->addarraypos >= 0)
841 #define SCIPconsIsOriginal(cons) (cons)->original
842 #define SCIPconsIsTransformed(cons) !(cons)->original
843 #define SCIPconsIsLockedPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0)
844 #define SCIPconsIsLockedNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
845 #define SCIPconsIsLocked(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || (cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
846 #define SCIPconsGetNLocksPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL])
847 #define SCIPconsGetNLocksNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL])
848 #define SCIPconsIsLockedTypePos(cons, locktype) ((cons)->nlockspos[locktype] > 0)
849 #define SCIPconsIsLockedTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype] > 0)
850 #define SCIPconsIsLockedType(cons, locktype) ((cons)->nlockspos[locktype] > 0 || (cons)->nlocksneg[locktype] > 0)
851 #define SCIPconsGetNLocksTypePos(cons, locktype) ((cons)->nlockspos[locktype])
852 #define SCIPconsGetNLocksTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype])
853 #define SCIPconsIsAdded(cons) ((cons)->addarraypos >= 0)
854 #define SCIPconsGetNUpgradeLocks(cons) ((cons)->nupgradelocks)
855 
856 #endif
857 
858 /* @} */
859 
860 /**@addtogroup PublicProblemMethods
861  *
862  * public methods to query linear constraint classification statistics
863  *
864  * @{
865  */
866 
867 /** create linear constraint statistics */
868 extern
870  SCIP* scip, /**< scip data structure */
871  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
872  );
873 
874 /** free linear constraint statistics */
875 extern
877  SCIP* scip, /**< scip data structure */
878  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
879  );
880 
881 /** resets linear constraint statistics */
882 extern
884  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
885  );
886 
887 /** returns the number of occurrences of a specific type of linear constraint */
888 extern
890  SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
891  SCIP_LINCONSTYPE linconstype /**< linear constraint type */
892  );
893 
894 /** returns the total number of classified constraints */
895 extern
897  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
898  );
899 
900 /** increases the number of occurrences of a specific type of linear constraint */
901 extern
903  SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
904  SCIP_LINCONSTYPE linconstype, /**< linear constraint type */
905  int increment /**< positive increment */
906  );
907 
908 /** print linear constraint classification statistics */
909 extern
911  SCIP* scip, /**< scip data structure */
912  FILE* file, /**< file handle or NULL to print to standard out */
913  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
914  );
915 
916 /* @} */
917 
918 #ifdef __cplusplus
919 }
920 #endif
921 
922 #endif
void SCIPconshdlrSetPropTiming(SCIP_CONSHDLR *conshdlr, SCIP_PROPTIMING proptiming)
Definition: cons.c:5207
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:4221
SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4573
enum SCIP_LinConstype SCIP_LINCONSTYPE
Definition: type_cons.h:76
SCIP_Bool SCIPconshdlrIsSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5127
void SCIPconssetchgGetAddedConsData(SCIP_CONSSETCHG *conssetchg, SCIP_CONS ***conss, int *nconss)
Definition: cons.c:5521
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition: cons.c:8173
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
Definition: cons.c:8335
type definitions for miscellaneous datastructures
int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition: cons.c:8159
int SCIPlinConsStatsGetTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype)
Definition: cons.c:7949
SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa)
Definition: cons.c:1950
SCIP_DECL_CONSSEPALP(ConshdlrSubtour::scip_sepalp)
SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4897
SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4837
SCIP_Bool SCIPconshdlrIsPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5137
void SCIPlinConsStatsIncTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype, int increment)
Definition: cons.c:7971
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
Definition: cons.c:8505
int SCIPconshdlrGetNEnabledConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4637
datastructures for constraints and constraint handlers
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4563
SCIP_Bool SCIPconsIsLockedTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8457
SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5117
int SCIPconsGetPos(SCIP_CONS *cons)
Definition: cons.c:8086
void SCIPconshdlrSetPresolTiming(SCIP_CONSHDLR *conshdlr, SCIP_PRESOLTIMING presoltiming)
Definition: cons.c:5229
SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5219
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
Definition: cons.c:8355
SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4697
int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5007
SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4857
void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7986
SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4847
void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7940
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition: cons.c:8385
SCIP_Bool SCIPconsIsInProb(SCIP_CONS *cons)
Definition: cons.c:8365
SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4707
int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
Definition: cons.c:8435
SCIP_DECL_CONSSEPASOL(ConshdlrSubtour::scip_sepasol)
SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4737
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5077
void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
Definition: cons.c:4253
SCIP_Bool SCIPconsIsLockedNeg(SCIP_CONS *cons)
Definition: cons.c:8405
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
Definition: cons.c:8345
SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4817
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4201
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition: cons.c:8137
int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4927
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5047
SCIP_PROPTIMING SCIPconshdlrGetPropTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5197
int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4937
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition: cons.c:8305
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
Definition: cons.c:8375
SCIP_Bool SCIPconshdlrIsClonable(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5187
int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5027
int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4967
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5067
int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5097
int SCIPconsGetNLocksTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8493
void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: cons.c:4272
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
Definition: cons.c:8415
int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4603
SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
Definition: cons.c:8235
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:87
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4191
SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4747
SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4827
SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4687
const char * SCIPconsGetName(SCIP_CONS *cons)
Definition: cons.c:8076
int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4987
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
Definition: cons.c:8295
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4211
int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5017
SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4807
int SCIPconsGetNLocksPos(SCIP_CONS *cons)
Definition: cons.c:8425
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5087
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4887
int SCIPconsGetNLocksTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8481
void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7928
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
Definition: cons.c:8315
void SCIPconshdlrSetSepa(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
Definition: cons.c:4232
SCIP_Bool SCIPconsIsLockedPos(SCIP_CONS *cons)
Definition: cons.c:8395
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:51
SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5107
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4593
SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4757
SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4777
#define SCIP_Bool
Definition: def.h:62
SCIP_DECL_CONSPROP(ConshdlrSubtour::scip_prop)
SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
Definition: cons.c:8147
SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4797
SCIP_Bool SCIPconshdlrWasPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5167
SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4677
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
Definition: cons.c:8194
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
Definition: cons.c:8096
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
Definition: cons.c:8205
SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4787
SCIP_Bool SCIPconshdlrWasLPSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5147
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
Definition: cons.c:8275
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
Definition: cons.c:8245
SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4727
SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4717
int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5057
SCIP_Bool SCIPconshdlrIsInitialized(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5177
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4627
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
Definition: cons.c:8527
int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5037
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8469
SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
Definition: cons.c:8183
int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4957
int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4917
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
Definition: cons.c:8106
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4583
int SCIPlinConsStatsGetSum(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7961
#define SCIP_DECL_CONSENFORELAX(x)
Definition: type_cons.h:373
SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4907
#define SCIP_Real
Definition: def.h:150
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
Definition: cons.c:8325
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4613
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
Definition: cons.c:8265
SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4767
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
Definition: cons.c:8255
#define SCIP_Longint
Definition: def.h:135
SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
Definition: cons.c:8215
int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4947
int SCIPconsGetNUses(SCIP_CONS *cons)
Definition: cons.c:8116
int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4997
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:50
SCIP_Bool SCIPconsIsLockedTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8445
int SCIPconsGetActiveDepth(SCIP_CONS *cons)
Definition: cons.c:8126
SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
Definition: cons.c:8225
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
Definition: cons.c:8515
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
Definition: cons.c:8285
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7915
SCIP_Bool SCIPconshdlrWasSolSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5157
int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4977
SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4667
type definitions for constraints and constraint handlers