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-2020 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 scipopt.org. */
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 */
51 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa);
52 
53 /** compares two constraint handlers w. r. to their enforcing priority */
55 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompEnfo);
56 
57 /** compares two constraint handlers w. r. to their feasibility check priority */
59 SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompCheck);
60 
61 /** gets name of constraint handler */
63 const char* SCIPconshdlrGetName(
64  SCIP_CONSHDLR* conshdlr /**< constraint handler */
65  );
66 
67 /** gets description of constraint handler */
69 const char* SCIPconshdlrGetDesc(
70  SCIP_CONSHDLR* conshdlr /**< constraint handler */
71  );
72 
73 /** gets user data of constraint handler */
76  SCIP_CONSHDLR* conshdlr /**< constraint handler */
77  );
78 
79 /** sets user data of constraint handler; user has to free old data in advance! */
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 */
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 */
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 */
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  */
122  SCIP_CONSHDLR* conshdlr /**< constraint handler */
123  );
124 
125 /** gets array with enforced constraints of constraint handler; this is local information */
128  SCIP_CONSHDLR* conshdlr /**< constraint handler */
129  );
130 
131 /** gets array with checked constraints of constraint handler; this is local information */
134  SCIP_CONSHDLR* conshdlr /**< constraint handler */
135  );
136 
137 /** gets array with delayed update constraints
138  *
139  * @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing.
140  */
143  SCIP_CONSHDLR* conshdlr /**< constraint handler */
144  );
145 
146 /** gets total number of existing transformed constraints of constraint handler */
149  SCIP_CONSHDLR* conshdlr /**< constraint handler */
150  );
151 
152 /** gets number of enforced constraints of constraint handler; this is local information */
155  SCIP_CONSHDLR* conshdlr /**< constraint handler */
156  );
157 
158 /** gets number of checked constraints of constraint handler; this is local information */
161  SCIP_CONSHDLR* conshdlr /**< constraint handler */
162  );
163 
164 /** gets number of active constraints of constraint handler
165  *
166  * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
167  * flag is TRUE) and the current node belongs to the corresponding sub tree.
168  */
171  SCIP_CONSHDLR* conshdlr /**< constraint handler */
172  );
173 
174 /** gets number of enabled constraints of constraint handler */
177  SCIP_CONSHDLR* conshdlr /**< constraint handler */
178  );
179 
180 /** gets number of constraints that have delayed updates */
183  SCIP_CONSHDLR* conshdlr /**< constraint handler */
184  );
185 
186 /** gets time in seconds used for setting up this constraint handler for new stages */
189  SCIP_CONSHDLR* conshdlr /**< constraint handler */
190  );
191 
192 /** gets time in seconds used for presolving in this constraint handler */
195  SCIP_CONSHDLR* conshdlr /**< constraint handler */
196  );
197 
198 /** gets time in seconds used for separation in this constraint handler */
201  SCIP_CONSHDLR* conshdlr /**< constraint handler */
202  );
203 
204 /** gets time in seconds used for LP enforcement in this constraint handler */
207  SCIP_CONSHDLR* conshdlr /**< constraint handler */
208  );
209 
210 /** gets time in seconds used for pseudo enforcement in this constraint handler */
213  SCIP_CONSHDLR* conshdlr /**< constraint handler */
214  );
215 
216 /** gets time in seconds used for relaxation enforcement in this constraint handler */
219  SCIP_CONSHDLR* conshdlr /**< constraint handler */
220  );
221 
222 /** gets time in seconds used for propagation in this constraint handler */
225  SCIP_CONSHDLR* conshdlr /**< constraint handler */
226  );
227 
228 /** gets time in seconds used for propagation in this constraint handler during strong branching */
231  SCIP_CONSHDLR* conshdlr /**< constraint handler */
232  );
233 
234 /** gets time in seconds used for feasibility checking in this constraint handler */
237  SCIP_CONSHDLR* conshdlr /**< constraint handler */
238  );
239 
240 /** gets time in seconds used for resolving propagation in this constraint handler */
243  SCIP_CONSHDLR* conshdlr /**< constraint handler */
244  );
245 
246 /** gets number of calls to the constraint handler's separation method */
249  SCIP_CONSHDLR* conshdlr /**< constraint handler */
250  );
251 
252 /** gets number of calls to the constraint handler's LP enforcing method */
255  SCIP_CONSHDLR* conshdlr /**< constraint handler */
256  );
257 
258 /** gets number of calls to the constraint handler's pseudo enforcing method */
261  SCIP_CONSHDLR* conshdlr /**< constraint handler */
262  );
263 
264 /** gets number of calls to the constraint handler's relaxation enforcing method */
267  SCIP_CONSHDLR* conshdlr /**< constraint handler */
268  );
269 
270 /** gets number of calls to the constraint handler's propagation method */
273  SCIP_CONSHDLR* conshdlr /**< constraint handler */
274  );
275 
276 /** gets number of calls to the constraint handler's checking method */
279  SCIP_CONSHDLR* conshdlr /**< constraint handler */
280  );
281 
282 /** gets number of calls to the constraint handler's resolve propagation method */
285  SCIP_CONSHDLR* conshdlr /**< constraint handler */
286  );
287 
288 /** gets total number of times, this constraint handler detected a cutoff */
291  SCIP_CONSHDLR* conshdlr /**< constraint handler */
292  );
293 
294 /** gets total number of cuts found by this constraint handler */
297  SCIP_CONSHDLR* conshdlr /**< constraint handler */
298  );
299 
300 /** gets total number of cuts found by this constraint handler applied to lp */
303  SCIP_CONSHDLR* conshdlr /**< constraint handler */
304  );
305 
306 /** gets total number of additional constraints added by this constraint handler */
309  SCIP_CONSHDLR* conshdlr /**< constraint handler */
310  );
311 
312 /** gets total number of domain reductions found by this constraint handler */
315  SCIP_CONSHDLR* conshdlr /**< constraint handler */
316  );
317 
318 /** gets number of children created by this constraint handler */
321  SCIP_CONSHDLR* conshdlr /**< constraint handler */
322  );
323 
324 /** gets maximum number of active constraints of constraint handler existing at the same time */
327  SCIP_CONSHDLR* conshdlr /**< constraint handler */
328  );
329 
330 /** gets initial number of active constraints of constraint handler */
333  SCIP_CONSHDLR* conshdlr /**< constraint handler */
334  );
335 
336 /** gets number of variables fixed in presolving method of constraint handler */
339  SCIP_CONSHDLR* conshdlr /**< constraint handler */
340  );
341 
342 /** gets number of variables aggregated in presolving method of constraint handler */
345  SCIP_CONSHDLR* conshdlr /**< constraint handler */
346  );
347 
348 /** gets number of variable types changed in presolving method of constraint handler */
351  SCIP_CONSHDLR* conshdlr /**< constraint handler */
352  );
353 
354 /** gets number of bounds changed in presolving method of constraint handler */
357  SCIP_CONSHDLR* conshdlr /**< constraint handler */
358  );
359 
360 /** gets number of holes added to domains of variables in presolving method of constraint handler */
363  SCIP_CONSHDLR* conshdlr /**< constraint handler */
364  );
365 
366 /** gets number of constraints deleted in presolving method of constraint handler */
369  SCIP_CONSHDLR* conshdlr /**< constraint handler */
370  );
371 
372 /** gets number of constraints added in presolving method of constraint handler */
375  SCIP_CONSHDLR* conshdlr /**< constraint handler */
376  );
377 
378 /** gets number of constraints upgraded in presolving method of constraint handler */
381  SCIP_CONSHDLR* conshdlr /**< constraint handler */
382  );
383 
384 /** gets number of coefficients changed in presolving method of constraint handler */
387  SCIP_CONSHDLR* conshdlr /**< constraint handler */
388  );
389 
390 /** gets number of constraint sides changed in presolving method of constraint handler */
393  SCIP_CONSHDLR* conshdlr /**< constraint handler */
394  );
395 
396 /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
399  SCIP_CONSHDLR* conshdlr /**< constraint handler */
400  );
401 
402 /** gets separation priority of constraint handler */
405  SCIP_CONSHDLR* conshdlr /**< constraint handler */
406  );
407 
408 /** gets enforcing priority of constraint handler */
411  SCIP_CONSHDLR* conshdlr /**< constraint handler */
412  );
413 
414 /** gets checking priority of constraint handler */
417  SCIP_CONSHDLR* conshdlr /**< constraint handler */
418  );
419 
420 /** gets separation frequency of constraint handler */
423  SCIP_CONSHDLR* conshdlr /**< constraint handler */
424  );
425 
426 /** gets propagation frequency of constraint handler */
429  SCIP_CONSHDLR* conshdlr /**< constraint handler */
430  );
431 
432 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
435  SCIP_CONSHDLR* conshdlr /**< constraint handler */
436  );
437 
438 /** needs constraint handler a constraint to be called? */
441  SCIP_CONSHDLR* conshdlr /**< constraint handler */
442  );
443 
444 /** does the constraint handler perform presolving? */
447  SCIP_CONSHDLR* conshdlr /**< constraint handler */
448  );
449 
450 /** should separation method be delayed, if other separators found cuts? */
453  SCIP_CONSHDLR* conshdlr /**< constraint handler */
454  );
455 
456 /** should propagation method be delayed, if other propagators found reductions? */
459  SCIP_CONSHDLR* conshdlr /**< constraint handler */
460  );
461 
462 /** was LP separation method delayed at the last call? */
465  SCIP_CONSHDLR* conshdlr /**< constraint handler */
466  );
467 
468 /** was primal solution separation method delayed at the last call? */
471  SCIP_CONSHDLR* conshdlr /**< constraint handler */
472  );
473 
474 /** was propagation method delayed at the last call? */
477  SCIP_CONSHDLR* conshdlr /**< constraint handler */
478  );
479 
480 /** is constraint handler initialized? */
483  SCIP_CONSHDLR* conshdlr /**< constraint handler */
484  );
485 
486 /** does the constraint handler have a copy function? */
489  SCIP_CONSHDLR* conshdlr /**< constraint handler */
490  );
491 
492 /** returns the timing mask of the propagation method of the constraint handler */
495  SCIP_CONSHDLR* conshdlr /**< constraint handler */
496  );
497 
498 /*
499  * Methods for constraint change sets
500  */
501 /** gets added constraints data for a constraint set change */
504  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to get data from */
505  SCIP_CONS*** conss, /**< reference to constraints array added in the conssetchg, or NULL */
506  int* nconss /**< reference to store the size of the constraints array, or NULL */
507  );
508 
509 /** sets the timing mask of the propagation method of the constraint handler */
512  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
513  SCIP_PROPTIMING proptiming /**< timing mask to be set */
514  );
515 
516 
517 /** returns the timing mask of the presolving method of the constraint handler */
520  SCIP_CONSHDLR* conshdlr /**< constraint handler */
521  );
522 
523 /** sets the timing mask of the presolving method of the constraint handler */
526  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
527  SCIP_PRESOLTIMING presoltiming /** timing mask to be set */
528  );
529 
530 /** @} */
531 
532 /*
533  * Constraint methods
534  */
535 
536 /**@addtogroup PublicConstraintMethods
537  *
538  * @{
539  */
540 
541 
542 /** returns the name of the constraint
543  *
544  * @note to change the name of a constraint, use SCIPchgConsName() from scip.h
545  */
547 const char* SCIPconsGetName(
548  SCIP_CONS* cons /**< constraint */
549  );
550 
551 /** returns the position of constraint in the corresponding handler's conss array */
553 int SCIPconsGetPos(
554  SCIP_CONS* cons /**< constraint */
555  );
556 
557 /** returns the constraint handler of the constraint */
560  SCIP_CONS* cons /**< constraint */
561  );
562 
563 /** returns the constraint data field of the constraint */
566  SCIP_CONS* cons /**< constraint */
567  );
568 
569 /** gets number of times, the constraint is currently captured */
571 int SCIPconsGetNUses(
572  SCIP_CONS* cons /**< constraint */
573  );
574 
575 /** for an active constraint, returns the depth in the tree at which the constraint was activated */
578  SCIP_CONS* cons /**< constraint */
579  );
580 
581 /** returns the depth in the tree at which the constraint is valid; returns INT_MAX, if the constraint is local
582  * and currently not active
583  */
586  SCIP_CONS* cons /**< constraint */
587  );
588 
589 /** returns TRUE iff constraint is active in the current node */
592  SCIP_CONS* cons /**< constraint */
593  );
594 
595 /** returns TRUE iff constraint has to be deactivated in update phase */
598  SCIP_CONS* cons /**< constraint */
599  );
600 
601 /** returns TRUE iff constraint is enabled in the current node */
604  SCIP_CONS* cons /**< constraint */
605  );
606 
607 /** returns TRUE iff constraint's separation is enabled in the current node */
610  SCIP_CONS* cons /**< constraint */
611  );
612 
613 /** returns TRUE iff constraint's propagation is enabled in the current node */
616  SCIP_CONS* cons /**< constraint */
617  );
618 
619 /** returns TRUE iff constraint is deleted or marked to be deleted */
622  SCIP_CONS* cons /**< constraint */
623  );
624 
625 /** returns TRUE iff constraint is marked obsolete */
628  SCIP_CONS* cons /**< constraint */
629  );
630 
631 /** returns TRUE iff constraint is marked as a conflict */
634  SCIP_CONS* cons /**< constraint */
635  );
636 
637 /** gets age of constraint */
640  SCIP_CONS* cons /**< constraint */
641  );
642 
643 /** returns TRUE iff the LP relaxation of constraint should be in the initial LP */
646  SCIP_CONS* cons /**< constraint */
647  );
648 
649 /** returns TRUE iff constraint should be separated during LP processing */
652  SCIP_CONS* cons /**< constraint */
653  );
654 
655 /** returns TRUE iff constraint should be enforced during node processing */
658  SCIP_CONS* cons /**< constraint */
659  );
660 
661 /** returns TRUE iff constraint should be checked for feasibility */
664  SCIP_CONS* cons /**< constraint */
665  );
666 
667 /** returns whether the constraint is marked for propagation */
670  SCIP_CONS* cons /**< constraint */
671  );
672 
673 /** returns TRUE iff constraint should be propagated during node processing */
676  SCIP_CONS* cons /**< constraint */
677  );
678 
679 /** returns TRUE iff constraint is globally valid */
682  SCIP_CONS* cons /**< constraint */
683  );
684 
685 /** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */
688  SCIP_CONS* cons /**< constraint */
689  );
690 
691 /** returns TRUE iff constraint is modifiable (subject to column generation) */
694  SCIP_CONS* cons /**< constraint */
695  );
696 
697 /** returns TRUE iff constraint is subject to aging */
700  SCIP_CONS* cons /**< constraint */
701  );
702 
703 /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
706  SCIP_CONS* cons /**< constraint */
707  );
708 
709 /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
712  SCIP_CONS* cons /**< constraint */
713  );
714 
715 /** returns TRUE iff constraint belongs to the global problem */
718  SCIP_CONS* cons /**< constraint */
719  );
720 
721 /** returns TRUE iff constraint is belonging to original space */
724  SCIP_CONS* cons /**< constraint */
725  );
726 
727 /** returns TRUE iff constraint is belonging to transformed space */
730  SCIP_CONS* cons /**< constraint */
731  );
732 
733 /** returns TRUE iff roundings for variables in constraint are locked */
736  SCIP_CONS* cons /**< constraint */
737  );
738 
739 /** returns TRUE iff roundings for variables in constraint's negation are locked */
742  SCIP_CONS* cons /**< constraint */
743  );
744 
745 /** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */
748  SCIP_CONS* cons /**< constraint */
749  );
750 
751 /** get number of times the roundings for variables in constraint are locked */
754  SCIP_CONS* cons /**< constraint */
755  );
756 
757 /** get number of times the roundings for variables in constraint's negation are locked */
760  SCIP_CONS* cons /**< constraint */
761  );
762 
763 /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
766  SCIP_CONS* cons, /**< constraint */
767  SCIP_LOCKTYPE locktype /**< variable lock type */
768  );
769 
770 /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
773  SCIP_CONS* cons, /**< constraint */
774  SCIP_LOCKTYPE locktype /**< variable lock type */
775  );
776 
777 /** returns TRUE iff roundings of the given locktype for variables in constraint or in constraint's negation are locked */
780  SCIP_CONS* cons, /**< constraint */
781  SCIP_LOCKTYPE locktype /**< variable lock type */
782  );
783 
784 /** get number of times the roundings of given locktype for variables in constraint are locked */
787  SCIP_CONS* cons, /**< constraint */
788  SCIP_LOCKTYPE locktype /**< variable lock type */
789  );
790 
791 /** get number of times the roundings of given locktype for variables in constraint's negation are locked */
794  SCIP_CONS* cons, /**< constraint */
795  SCIP_LOCKTYPE locktype /**< variable lock type */
796  );
797 
798 /** returns if the constraint was already added to a SCIP instance */
801  SCIP_CONS* cons /**< constraint */
802  );
803 
804 /** adds locks to (dis-)allow upgrading of constraint */
807  SCIP_CONS* cons, /**< constraint to add locks */
808  int nlocks /**< number of locks to add */
809  );
810 
811 /** gets number of locks against upgrading the constraint, 0 means this constraint can be upgraded */
814  SCIP_CONS* cons /**< constraint */
815  );
816 
817 #ifdef NDEBUG
818 
819 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
820  * speed up the algorithms.
821  */
822 
823 #define SCIPconsGetName(cons) (cons)->name
824 #define SCIPconsGetPos(cons) (cons)->consspos
825 #define SCIPconsGetHdlr(cons) (cons)->conshdlr
826 #define SCIPconsGetData(cons) (cons)->consdata
827 #define SCIPconsGetNUses(cons) (cons)->nuses
828 #define SCIPconsGetActiveDepth(cons) (cons)->activedepth
829 #define SCIPconsGetValidDepth(cons) (!(cons)->local ? 0 \
830  : !SCIPconsIsActive(cons) ? INT_MAX \
831  : (cons)->validdepth == -1 ? SCIPconsGetActiveDepth(cons) \
832  : (cons)->validdepth)
833 #define SCIPconsIsActive(cons) ((cons)->updateactivate || ((cons)->active && !(cons)->updatedeactivate))
834 #define SCIPconsIsEnabled(cons) ((cons)->updateenable || ((cons)->enabled && !(cons)->updatedisable))
835 #define SCIPconsIsSeparationEnabled(cons) \
836  (SCIPconsIsEnabled(cons) && ((cons)->updatesepaenable || ((cons)->sepaenabled && !(cons)->updatesepadisable)))
837 #define SCIPconsIsPropagationEnabled(cons) \
838  (SCIPconsIsEnabled(cons) && ((cons)->updatepropenable || ((cons)->propenabled && !(cons)->updatepropdisable)))
839 #define SCIPconsIsDeleted(cons) ((cons)->deleted)
840 #define SCIPconsIsObsolete(cons) ((cons)->updateobsolete || (cons)->obsolete)
841 #define SCIPconsIsConflict(cons) ((cons)->conflict)
842 #define SCIPconsGetAge(cons) (cons)->age
843 #define SCIPconsIsInitial(cons) (cons)->initial
844 #define SCIPconsIsSeparated(cons) (cons)->separate
845 #define SCIPconsIsEnforced(cons) (cons)->enforce
846 #define SCIPconsIsChecked(cons) (cons)->check
847 #define SCIPconsIsMarkedPropagate(cons) ((cons)->updatemarkpropagate || ((cons)->markpropagate && !(cons)->updateunmarkpropagate))
848 #define SCIPconsIsPropagated(cons) (cons)->propagate
849 #define SCIPconsIsGlobal(cons) !(cons)->local
850 #define SCIPconsIsLocal(cons) (cons)->local
851 #define SCIPconsIsModifiable(cons) (cons)->modifiable
852 #define SCIPconsIsDynamic(cons) (cons)->dynamic
853 #define SCIPconsIsRemovable(cons) (cons)->removable
854 #define SCIPconsIsStickingAtNode(cons) (cons)->stickingatnode
855 #define SCIPconsIsInProb(cons) ((cons)->addconssetchg == NULL && (cons)->addarraypos >= 0)
856 #define SCIPconsIsOriginal(cons) (cons)->original
857 #define SCIPconsIsTransformed(cons) !(cons)->original
858 #define SCIPconsIsLockedPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0)
859 #define SCIPconsIsLockedNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
860 #define SCIPconsIsLocked(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || (cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
861 #define SCIPconsGetNLocksPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL])
862 #define SCIPconsGetNLocksNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL])
863 #define SCIPconsIsLockedTypePos(cons, locktype) ((cons)->nlockspos[locktype] > 0)
864 #define SCIPconsIsLockedTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype] > 0)
865 #define SCIPconsIsLockedType(cons, locktype) ((cons)->nlockspos[locktype] > 0 || (cons)->nlocksneg[locktype] > 0)
866 #define SCIPconsGetNLocksTypePos(cons, locktype) ((cons)->nlockspos[locktype])
867 #define SCIPconsGetNLocksTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype])
868 #define SCIPconsIsAdded(cons) ((cons)->addarraypos >= 0)
869 #define SCIPconsGetNUpgradeLocks(cons) ((cons)->nupgradelocks)
870 
871 #endif
872 
873 /** @} */
874 
875 /**@addtogroup PublicProblemMethods
876  *
877  * public methods to query linear constraint classification statistics
878  *
879  * @{
880  */
881 
882 /** create linear constraint statistics */
885  SCIP* scip, /**< scip data structure */
886  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
887  );
888 
889 /** free linear constraint statistics */
892  SCIP* scip, /**< scip data structure */
893  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
894  );
895 
896 /** resets linear constraint statistics */
899  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
900  );
901 
902 /** returns the number of occurrences of a specific type of linear constraint */
905  SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
906  SCIP_LINCONSTYPE linconstype /**< linear constraint type */
907  );
908 
909 /** returns the total number of classified constraints */
912  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
913  );
914 
915 /** increases the number of occurrences of a specific type of linear constraint */
918  SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
919  SCIP_LINCONSTYPE linconstype, /**< linear constraint type */
920  int increment /**< positive increment */
921  );
922 
923 /** print linear constraint classification statistics */
926  SCIP* scip, /**< scip data structure */
927  FILE* file, /**< file handle or NULL to print to standard out */
928  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
929  );
930 
931 /** @} */
932 
933 #ifdef __cplusplus
934 }
935 #endif
936 
937 #endif
SCIP_EXPORT int SCIPconsGetPos(SCIP_CONS *cons)
Definition: cons.c:8087
SCIP_EXPORT void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:4197
SCIP_EXPORT int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4602
enum SCIP_LinConstype SCIP_LINCONSTYPE
Definition: type_cons.h:81
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8470
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasSolSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5156
SCIP_EXPORT SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5106
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedNeg(SCIP_CONS *cons)
Definition: cons.c:8406
SCIP_EXPORT SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition: cons.c:8174
SCIP_EXPORT void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7927
SCIP_EXPORT int SCIPlinConsStatsGetSum(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7961
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetUpdateConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4572
type definitions for miscellaneous datastructures
SCIP_EXPORT SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
Definition: cons.c:8216
SCIP_EXPORT SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4686
SCIP_EXPORT SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
Definition: cons.c:8316
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4906
SCIP_EXPORT SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
Definition: cons.c:8276
SCIP_DECL_CONSSEPALP(ConshdlrSubtour::scip_sepalp)
SCIP_EXPORT int SCIPlinConsStatsGetTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype)
Definition: cons.c:7948
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4786
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4796
SCIP_EXPORT SCIP_Bool SCIPconsIsInProb(SCIP_CONS *cons)
Definition: cons.c:8366
SCIP_EXPORT int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5046
SCIP_EXPORT int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4966
SCIP_EXPORT int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition: cons.c:8160
SCIP_EXPORT void SCIPconshdlrSetPropTiming(SCIP_CONSHDLR *conshdlr, SCIP_PROPTIMING proptiming)
Definition: cons.c:5206
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5136
SCIP_EXPORT void SCIPconssetchgGetAddedConsData(SCIP_CONSSETCHG *conssetchg, SCIP_CONS ***conss, int *nconss)
Definition: cons.c:5520
#define SCIP_EXPORT
Definition: def.h:100
SCIP_EXPORT SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
Definition: cons.c:8506
SCIP_EXPORT int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4582
SCIP_EXPORT int SCIPconsGetNUses(SCIP_CONS *cons)
Definition: cons.c:8117
SCIP_EXPORT SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
Definition: cons.c:8184
SCIP_EXPORT SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition: cons.c:8138
datastructures for constraints and constraint handlers
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedPos(SCIP_CONS *cons)
Definition: cons.c:8396
SCIP_EXPORT int SCIPconsGetNLocksTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8482
SCIP_EXPORT SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
Definition: cons.c:8246
SCIP_EXPORT SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7914
SCIP_EXPORT SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4736
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4549
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4716
SCIP_EXPORT void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: cons.c:4248
SCIP_EXPORT int SCIPconsGetNLocksTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8494
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4766
SCIP_DECL_CONSSEPASOL(ConshdlrSubtour::scip_sepasol)
SCIP_EXPORT void SCIPconshdlrSetSepa(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
Definition: cons.c:4208
SCIP_EXPORT int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4976
SCIP_EXPORT SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4666
SCIP_EXPORT int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4916
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8458
SCIP_EXPORT SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5116
SCIP_EXPORT SCIP_PROPTIMING SCIPconshdlrGetPropTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5196
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa)
Definition: cons.c:1951
SCIP_EXPORT SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
Definition: cons.c:8416
SCIP_EXPORT SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4676
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:87
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4776
SCIP_EXPORT int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4592
SCIP_EXPORT void SCIPconshdlrSetPresolTiming(SCIP_CONSHDLR *conshdlr, SCIP_PRESOLTIMING presoltiming)
Definition: cons.c:5228
SCIP_EXPORT void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
Definition: cons.c:4229
SCIP_EXPORT SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
Definition: cons.c:8195
SCIP_EXPORT int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5086
SCIP_EXPORT int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4926
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4559
SCIP_EXPORT int SCIPconshdlrGetNEnabledConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4626
SCIP_EXPORT SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
Definition: cons.c:8148
SCIP_EXPORT int SCIPconshdlrGetNUpdateConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4636
SCIP_EXPORT SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
Definition: cons.c:8107
SCIP_EXPORT int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4996
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
SCIP_EXPORT int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5006
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:56
SCIP_EXPORT SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
Definition: cons.c:8226
SCIP_EXPORT void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7987
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8446
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4826
SCIP_EXPORT int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5076
SCIP_EXPORT SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
Definition: cons.c:8346
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4696
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5126
SCIP_EXPORT int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
Definition: cons.c:8436
SCIP_EXPORT SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
Definition: cons.c:8236
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4936
SCIP_DECL_CONSPROP(ConshdlrSubtour::scip_prop)
SCIP_EXPORT void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7939
SCIP_EXPORT int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4946
SCIP_EXPORT SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4187
SCIP_EXPORT int SCIPconsGetNLocksPos(SCIP_CONS *cons)
Definition: cons.c:8426
SCIP_EXPORT SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition: cons.c:8386
SCIP_EXPORT SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4726
SCIP_EXPORT int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4616
SCIP_EXPORT const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4177
SCIP_EXPORT int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4986
SCIP_EXPORT SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
Definition: cons.c:8256
SCIP_EXPORT int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
Definition: cons.c:8528
SCIP_EXPORT SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
Definition: cons.c:8336
SCIP_EXPORT int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5096
SCIP_EXPORT SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition: cons.c:8306
SCIP_EXPORT int SCIPconsGetActiveDepth(SCIP_CONS *cons)
Definition: cons.c:8127
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4816
SCIP_EXPORT int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5026
SCIP_EXPORT SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
Definition: cons.c:8266
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsInitialized(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5176
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4539
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4886
SCIP_EXPORT int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5066
SCIP_EXPORT const char * SCIPconsGetName(SCIP_CONS *cons)
Definition: cons.c:8077
SCIP_EXPORT SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
Definition: cons.c:8206
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4806
#define SCIP_DECL_CONSENFORELAX(x)
Definition: type_cons.h:378
#define SCIP_Real
Definition: def.h:163
SCIP_EXPORT SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
Definition: cons.c:8097
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4836
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4896
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4706
#define SCIP_Longint
Definition: def.h:148
SCIP_EXPORT SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
Definition: cons.c:8356
SCIP_EXPORT const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4167
SCIP_EXPORT SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4746
SCIP_EXPORT int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5016
SCIP_EXPORT int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5056
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5166
SCIP_EXPORT SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
Definition: cons.c:8376
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:55
SCIP_EXPORT void SCIPlinConsStatsIncTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype, int increment)
Definition: cons.c:7971
SCIP_EXPORT SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
Definition: cons.c:8286
common defines and data types used in all packages of SCIP
SCIP_EXPORT int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4956
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasLPSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5146
SCIP_EXPORT SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5218
SCIP_EXPORT int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5036
SCIP_EXPORT SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
Definition: cons.c:8296
SCIP_EXPORT SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4756
SCIP_EXPORT void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
Definition: cons.c:8516
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4856
type definitions for constraints and constraint handlers
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsClonable(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5186
SCIP_EXPORT SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
Definition: cons.c:8326
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4846