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-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file 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 total number of existing transformed constraints of constraint handler */
140  SCIP_CONSHDLR* conshdlr /**< constraint handler */
141  );
142 
143 /** gets number of enforced constraints of constraint handler; this is local information */
146  SCIP_CONSHDLR* conshdlr /**< constraint handler */
147  );
148 
149 /** gets number of checked constraints of constraint handler; this is local information */
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  */
162  SCIP_CONSHDLR* conshdlr /**< constraint handler */
163  );
164 
165 /** gets number of enabled constraints of constraint handler */
168  SCIP_CONSHDLR* conshdlr /**< constraint handler */
169  );
170 
171 /** gets time in seconds used for setting up this constraint handler for new stages */
174  SCIP_CONSHDLR* conshdlr /**< constraint handler */
175  );
176 
177 /** gets time in seconds used for presolving in this constraint handler */
180  SCIP_CONSHDLR* conshdlr /**< constraint handler */
181  );
182 
183 /** gets time in seconds used for separation in this constraint handler */
186  SCIP_CONSHDLR* conshdlr /**< constraint handler */
187  );
188 
189 /** gets time in seconds used for LP enforcement in this constraint handler */
192  SCIP_CONSHDLR* conshdlr /**< constraint handler */
193  );
194 
195 /** gets time in seconds used for pseudo enforcement in this constraint handler */
198  SCIP_CONSHDLR* conshdlr /**< constraint handler */
199  );
200 
201 /** gets time in seconds used for relaxation enforcement in this constraint handler */
204  SCIP_CONSHDLR* conshdlr /**< constraint handler */
205  );
206 
207 /** gets time in seconds used for propagation in this constraint handler */
210  SCIP_CONSHDLR* conshdlr /**< constraint handler */
211  );
212 
213 /** gets time in seconds used for propagation in this constraint handler during strong branching */
216  SCIP_CONSHDLR* conshdlr /**< constraint handler */
217  );
218 
219 /** gets time in seconds used for feasibility checking in this constraint handler */
222  SCIP_CONSHDLR* conshdlr /**< constraint handler */
223  );
224 
225 /** gets time in seconds used for resolving propagation in this constraint handler */
228  SCIP_CONSHDLR* conshdlr /**< constraint handler */
229  );
230 
231 /** gets number of calls to the constraint handler's separation method */
234  SCIP_CONSHDLR* conshdlr /**< constraint handler */
235  );
236 
237 /** gets number of calls to the constraint handler's LP enforcing method */
240  SCIP_CONSHDLR* conshdlr /**< constraint handler */
241  );
242 
243 /** gets number of calls to the constraint handler's pseudo enforcing method */
246  SCIP_CONSHDLR* conshdlr /**< constraint handler */
247  );
248 
249 /** gets number of calls to the constraint handler's relaxation enforcing method */
252  SCIP_CONSHDLR* conshdlr /**< constraint handler */
253  );
254 
255 /** gets number of calls to the constraint handler's propagation method */
258  SCIP_CONSHDLR* conshdlr /**< constraint handler */
259  );
260 
261 /** gets number of calls to the constraint handler's checking method */
264  SCIP_CONSHDLR* conshdlr /**< constraint handler */
265  );
266 
267 /** gets number of calls to the constraint handler's resolve propagation method */
270  SCIP_CONSHDLR* conshdlr /**< constraint handler */
271  );
272 
273 /** gets total number of times, this constraint handler detected a cutoff */
276  SCIP_CONSHDLR* conshdlr /**< constraint handler */
277  );
278 
279 /** gets total number of cuts found by this constraint handler */
282  SCIP_CONSHDLR* conshdlr /**< constraint handler */
283  );
284 
285 /** gets total number of cuts found by this constraint handler applied to lp */
288  SCIP_CONSHDLR* conshdlr /**< constraint handler */
289  );
290 
291 /** gets total number of additional constraints added by this constraint handler */
294  SCIP_CONSHDLR* conshdlr /**< constraint handler */
295  );
296 
297 /** gets total number of domain reductions found by this constraint handler */
300  SCIP_CONSHDLR* conshdlr /**< constraint handler */
301  );
302 
303 /** gets number of children created by this constraint handler */
306  SCIP_CONSHDLR* conshdlr /**< constraint handler */
307  );
308 
309 /** gets maximum number of active constraints of constraint handler existing at the same time */
312  SCIP_CONSHDLR* conshdlr /**< constraint handler */
313  );
314 
315 /** gets initial number of active constraints of constraint handler */
318  SCIP_CONSHDLR* conshdlr /**< constraint handler */
319  );
320 
321 /** gets number of variables fixed in presolving method of constraint handler */
324  SCIP_CONSHDLR* conshdlr /**< constraint handler */
325  );
326 
327 /** gets number of variables aggregated in presolving method of constraint handler */
330  SCIP_CONSHDLR* conshdlr /**< constraint handler */
331  );
332 
333 /** gets number of variable types changed in presolving method of constraint handler */
336  SCIP_CONSHDLR* conshdlr /**< constraint handler */
337  );
338 
339 /** gets number of bounds changed in presolving method of constraint handler */
342  SCIP_CONSHDLR* conshdlr /**< constraint handler */
343  );
344 
345 /** gets number of holes added to domains of variables in presolving method of constraint handler */
348  SCIP_CONSHDLR* conshdlr /**< constraint handler */
349  );
350 
351 /** gets number of constraints deleted in presolving method of constraint handler */
354  SCIP_CONSHDLR* conshdlr /**< constraint handler */
355  );
356 
357 /** gets number of constraints added in presolving method of constraint handler */
360  SCIP_CONSHDLR* conshdlr /**< constraint handler */
361  );
362 
363 /** gets number of constraints upgraded in presolving method of constraint handler */
366  SCIP_CONSHDLR* conshdlr /**< constraint handler */
367  );
368 
369 /** gets number of coefficients changed in presolving method of constraint handler */
372  SCIP_CONSHDLR* conshdlr /**< constraint handler */
373  );
374 
375 /** gets number of constraint sides changed in presolving method of constraint handler */
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 */
384  SCIP_CONSHDLR* conshdlr /**< constraint handler */
385  );
386 
387 /** gets separation priority of constraint handler */
390  SCIP_CONSHDLR* conshdlr /**< constraint handler */
391  );
392 
393 /** gets enforcing priority of constraint handler */
396  SCIP_CONSHDLR* conshdlr /**< constraint handler */
397  );
398 
399 /** gets checking priority of constraint handler */
402  SCIP_CONSHDLR* conshdlr /**< constraint handler */
403  );
404 
405 /** gets separation frequency of constraint handler */
408  SCIP_CONSHDLR* conshdlr /**< constraint handler */
409  );
410 
411 /** gets propagation frequency of constraint handler */
414  SCIP_CONSHDLR* conshdlr /**< constraint handler */
415  );
416 
417 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
420  SCIP_CONSHDLR* conshdlr /**< constraint handler */
421  );
422 
423 /** needs constraint handler a constraint to be called? */
426  SCIP_CONSHDLR* conshdlr /**< constraint handler */
427  );
428 
429 /** does the constraint handler perform presolving? */
432  SCIP_CONSHDLR* conshdlr /**< constraint handler */
433  );
434 
435 /** should separation method be delayed, if other separators found cuts? */
438  SCIP_CONSHDLR* conshdlr /**< constraint handler */
439  );
440 
441 /** should propagation method be delayed, if other propagators found reductions? */
444  SCIP_CONSHDLR* conshdlr /**< constraint handler */
445  );
446 
447 /** was LP separation method delayed at the last call? */
450  SCIP_CONSHDLR* conshdlr /**< constraint handler */
451  );
452 
453 /** was primal solution separation method delayed at the last call? */
456  SCIP_CONSHDLR* conshdlr /**< constraint handler */
457  );
458 
459 /** was propagation method delayed at the last call? */
462  SCIP_CONSHDLR* conshdlr /**< constraint handler */
463  );
464 
465 /** is constraint handler initialized? */
468  SCIP_CONSHDLR* conshdlr /**< constraint handler */
469  );
470 
471 /** does the constraint handler have a copy function? */
474  SCIP_CONSHDLR* conshdlr /**< constraint handler */
475  );
476 
477 /** returns the timing mask of the propagation method of the constraint handler */
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 */
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 */
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 */
505  SCIP_CONSHDLR* conshdlr /**< constraint handler */
506  );
507 
508 /** sets the timing mask of the presolving method of the constraint handler */
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  */
532 const char* SCIPconsGetName(
533  SCIP_CONS* cons /**< constraint */
534  );
535 
536 /** returns the position of constraint in the corresponding handler's conss array */
538 int SCIPconsGetPos(
539  SCIP_CONS* cons /**< constraint */
540  );
541 
542 /** returns the constraint handler of the constraint */
545  SCIP_CONS* cons /**< constraint */
546  );
547 
548 /** returns the constraint data field of the constraint */
551  SCIP_CONS* cons /**< constraint */
552  );
553 
554 /** gets number of times, the constraint is currently captured */
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 */
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  */
571  SCIP_CONS* cons /**< constraint */
572  );
573 
574 /** returns TRUE iff constraint is active in the current node */
577  SCIP_CONS* cons /**< constraint */
578  );
579 
580 /** returns TRUE iff constraint has to be deactivated in update phase */
583  SCIP_CONS* cons /**< constraint */
584  );
585 
586 /** returns TRUE iff constraint is enabled in the current node */
589  SCIP_CONS* cons /**< constraint */
590  );
591 
592 /** returns TRUE iff constraint's separation is enabled in the current node */
595  SCIP_CONS* cons /**< constraint */
596  );
597 
598 /** returns TRUE iff constraint's propagation is enabled in the current node */
601  SCIP_CONS* cons /**< constraint */
602  );
603 
604 /** returns TRUE iff constraint is deleted or marked to be deleted */
607  SCIP_CONS* cons /**< constraint */
608  );
609 
610 /** returns TRUE iff constraint is marked obsolete */
613  SCIP_CONS* cons /**< constraint */
614  );
615 
616 /** returns TRUE iff constraint is marked as a conflict */
619  SCIP_CONS* cons /**< constraint */
620  );
621 
622 /** gets age of constraint */
625  SCIP_CONS* cons /**< constraint */
626  );
627 
628 /** returns TRUE iff the LP relaxation of constraint should be in the initial LP */
631  SCIP_CONS* cons /**< constraint */
632  );
633 
634 /** returns TRUE iff constraint should be separated during LP processing */
637  SCIP_CONS* cons /**< constraint */
638  );
639 
640 /** returns TRUE iff constraint should be enforced during node processing */
643  SCIP_CONS* cons /**< constraint */
644  );
645 
646 /** returns TRUE iff constraint should be checked for feasibility */
649  SCIP_CONS* cons /**< constraint */
650  );
651 
652 /** returns whether the constraint is marked for propagation */
655  SCIP_CONS* cons /**< constraint */
656  );
657 
658 /** returns TRUE iff constraint should be propagated during node processing */
661  SCIP_CONS* cons /**< constraint */
662  );
663 
664 /** returns TRUE iff constraint is globally valid */
667  SCIP_CONS* cons /**< constraint */
668  );
669 
670 /** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */
673  SCIP_CONS* cons /**< constraint */
674  );
675 
676 /** returns TRUE iff constraint is modifiable (subject to column generation) */
679  SCIP_CONS* cons /**< constraint */
680  );
681 
682 /** returns TRUE iff constraint is subject to aging */
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 */
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 */
697  SCIP_CONS* cons /**< constraint */
698  );
699 
700 /** returns TRUE iff constraint belongs to the global problem */
703  SCIP_CONS* cons /**< constraint */
704  );
705 
706 /** returns TRUE iff constraint is belonging to original space */
709  SCIP_CONS* cons /**< constraint */
710  );
711 
712 /** returns TRUE iff constraint is belonging to transformed space */
715  SCIP_CONS* cons /**< constraint */
716  );
717 
718 /** returns TRUE iff roundings for variables in constraint are locked */
721  SCIP_CONS* cons /**< constraint */
722  );
723 
724 /** returns TRUE iff roundings for variables in constraint's negation are locked */
727  SCIP_CONS* cons /**< constraint */
728  );
729 
730 /** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */
733  SCIP_CONS* cons /**< constraint */
734  );
735 
736 /** get number of times the roundings for variables in constraint are locked */
739  SCIP_CONS* cons /**< constraint */
740  );
741 
742 /** get number of times the roundings for variables in constraint's negation are locked */
745  SCIP_CONS* cons /**< constraint */
746  );
747 
748 /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
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 */
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 */
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 */
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 */
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 */
786  SCIP_CONS* cons /**< constraint */
787  );
788 
789 /** adds locks to (dis-)allow upgrading of constraint */
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 */
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 */
870  SCIP* scip, /**< scip data structure */
871  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
872  );
873 
874 /** free linear constraint statistics */
877  SCIP* scip, /**< scip data structure */
878  SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
879  );
880 
881 /** resets linear constraint statistics */
884  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
885  );
886 
887 /** returns the number of occurrences of a specific type of linear constraint */
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 */
897  SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
898  );
899 
900 /** increases the number of occurrences of a specific type of linear constraint */
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 */
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
SCIP_EXPORT int SCIPconsGetPos(SCIP_CONS *cons)
Definition: cons.c:8086
SCIP_EXPORT void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:4221
SCIP_EXPORT int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4613
enum SCIP_LinConstype SCIP_LINCONSTYPE
Definition: type_cons.h:76
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8469
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasSolSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5157
SCIP_EXPORT SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5107
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedNeg(SCIP_CONS *cons)
Definition: cons.c:8405
SCIP_EXPORT SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition: cons.c:8173
SCIP_EXPORT void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7928
SCIP_EXPORT int SCIPlinConsStatsGetSum(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7961
type definitions for miscellaneous datastructures
SCIP_EXPORT SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
Definition: cons.c:8215
SCIP_EXPORT SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4687
SCIP_EXPORT SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
Definition: cons.c:8315
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4907
SCIP_EXPORT SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
Definition: cons.c:8275
SCIP_DECL_CONSSEPALP(ConshdlrSubtour::scip_sepalp)
SCIP_EXPORT int SCIPlinConsStatsGetTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype)
Definition: cons.c:7949
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4787
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4797
SCIP_EXPORT SCIP_Bool SCIPconsIsInProb(SCIP_CONS *cons)
Definition: cons.c:8365
SCIP_EXPORT int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5047
SCIP_EXPORT int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4967
SCIP_EXPORT int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition: cons.c:8159
SCIP_EXPORT void SCIPconshdlrSetPropTiming(SCIP_CONSHDLR *conshdlr, SCIP_PROPTIMING proptiming)
Definition: cons.c:5207
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5137
SCIP_EXPORT void SCIPconssetchgGetAddedConsData(SCIP_CONSSETCHG *conssetchg, SCIP_CONS ***conss, int *nconss)
Definition: cons.c:5521
#define SCIP_EXPORT
Definition: def.h:98
SCIP_EXPORT SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
Definition: cons.c:8505
SCIP_EXPORT int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4593
SCIP_EXPORT int SCIPconsGetNUses(SCIP_CONS *cons)
Definition: cons.c:8116
SCIP_EXPORT SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
Definition: cons.c:8183
SCIP_EXPORT SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition: cons.c:8137
datastructures for constraints and constraint handlers
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedPos(SCIP_CONS *cons)
Definition: cons.c:8395
SCIP_EXPORT int SCIPconsGetNLocksTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8481
SCIP_EXPORT SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
Definition: cons.c:8245
SCIP_EXPORT SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition: cons.c:7915
SCIP_EXPORT SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4737
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4573
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4717
SCIP_EXPORT void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: cons.c:4272
SCIP_EXPORT int SCIPconsGetNLocksTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8493
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4767
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:4232
SCIP_EXPORT int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4977
SCIP_EXPORT SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4667
SCIP_EXPORT int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4917
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8457
SCIP_EXPORT SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5117
SCIP_EXPORT SCIP_PROPTIMING SCIPconshdlrGetPropTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5197
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa)
Definition: cons.c:1950
SCIP_EXPORT SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
Definition: cons.c:8415
SCIP_EXPORT SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4677
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:87
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4777
SCIP_EXPORT int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4603
SCIP_EXPORT void SCIPconshdlrSetPresolTiming(SCIP_CONSHDLR *conshdlr, SCIP_PRESOLTIMING presoltiming)
Definition: cons.c:5229
SCIP_EXPORT void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
Definition: cons.c:4253
SCIP_EXPORT SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
Definition: cons.c:8194
SCIP_EXPORT int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5087
SCIP_EXPORT int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4927
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4583
SCIP_EXPORT int SCIPconshdlrGetNEnabledConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4637
SCIP_EXPORT SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
Definition: cons.c:8147
SCIP_EXPORT SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
Definition: cons.c:8106
SCIP_EXPORT int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4997
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
SCIP_EXPORT int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5007
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:51
SCIP_EXPORT SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
Definition: cons.c:8225
SCIP_EXPORT void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7986
SCIP_EXPORT SCIP_Bool SCIPconsIsLockedTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition: cons.c:8445
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4827
SCIP_EXPORT int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5077
SCIP_EXPORT SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
Definition: cons.c:8345
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4697
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5127
SCIP_EXPORT int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
Definition: cons.c:8435
SCIP_EXPORT SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
Definition: cons.c:8235
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4937
SCIP_DECL_CONSPROP(ConshdlrSubtour::scip_prop)
SCIP_EXPORT void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
Definition: cons.c:7940
SCIP_EXPORT int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4947
SCIP_EXPORT SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4211
SCIP_EXPORT int SCIPconsGetNLocksPos(SCIP_CONS *cons)
Definition: cons.c:8425
SCIP_EXPORT SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition: cons.c:8385
SCIP_EXPORT SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4727
SCIP_EXPORT int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4627
SCIP_EXPORT const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4201
SCIP_EXPORT int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4987
SCIP_EXPORT SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
Definition: cons.c:8255
SCIP_EXPORT int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
Definition: cons.c:8527
SCIP_EXPORT SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
Definition: cons.c:8335
SCIP_EXPORT int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5097
SCIP_EXPORT SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition: cons.c:8305
SCIP_EXPORT int SCIPconsGetActiveDepth(SCIP_CONS *cons)
Definition: cons.c:8126
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4817
SCIP_EXPORT int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5027
SCIP_EXPORT SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
Definition: cons.c:8265
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsInitialized(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5177
SCIP_EXPORT SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4563
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4887
SCIP_EXPORT int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5067
SCIP_EXPORT const char * SCIPconsGetName(SCIP_CONS *cons)
Definition: cons.c:8076
SCIP_EXPORT SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
Definition: cons.c:8205
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4807
#define SCIP_DECL_CONSENFORELAX(x)
Definition: type_cons.h:373
#define SCIP_Real
Definition: def.h:164
SCIP_EXPORT SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
Definition: cons.c:8096
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4837
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4897
SCIP_EXPORT SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4707
#define SCIP_Longint
Definition: def.h:149
SCIP_EXPORT SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
Definition: cons.c:8355
SCIP_EXPORT const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4191
SCIP_EXPORT SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4747
SCIP_EXPORT int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5017
SCIP_EXPORT int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5057
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5167
SCIP_EXPORT SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
Definition: cons.c:8375
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:50
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:8285
common defines and data types used in all packages of SCIP
SCIP_EXPORT int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4957
SCIP_EXPORT SCIP_Bool SCIPconshdlrWasLPSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5147
SCIP_EXPORT SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5219
SCIP_EXPORT int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5037
SCIP_EXPORT SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
Definition: cons.c:8295
SCIP_EXPORT SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4757
SCIP_EXPORT void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
Definition: cons.c:8515
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4857
type definitions for constraints and constraint handlers
SCIP_EXPORT SCIP_Bool SCIPconshdlrIsClonable(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5187
SCIP_EXPORT SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
Definition: cons.c:8325
SCIP_EXPORT SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4847