SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
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-2023 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file pub_cons.h
26 * @ingroup PUBLICCOREAPI
27 * @brief public methods for managing constraints
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_PUB_CONS_H__
34#define __SCIP_PUB_CONS_H__
35
36
37#include "scip/def.h"
38#include "scip/type_misc.h"
39#include "scip/type_cons.h"
40
41#ifdef NDEBUG
42#include "scip/struct_cons.h"
43#endif
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/*
50 * Constraint handler methods
51 */
52
53/**@addtogroup PublicConshdlrMethods
54 *
55 * @{
56 */
57
58/** compares two constraint handlers w. r. to their separation priority */
61
62/** compares two constraint handlers w. r. to their enforcing priority */
65
66/** compares two constraint handlers w. r. to their feasibility check priority */
69
70/** gets name of constraint handler */
72const char* SCIPconshdlrGetName(
73 SCIP_CONSHDLR* conshdlr /**< constraint handler */
74 );
75
76/** gets description of constraint handler */
78const char* SCIPconshdlrGetDesc(
79 SCIP_CONSHDLR* conshdlr /**< constraint handler */
80 );
81
82/** gets user data of constraint handler */
85 SCIP_CONSHDLR* conshdlr /**< constraint handler */
86 );
87
88/** sets user data of constraint handler; user has to free old data in advance! */
91 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
92 SCIP_CONSHDLRDATA* conshdlrdata /**< new constraint handler user data */
93 );
94
95/** sets all separation related callbacks of the constraint handler */
98 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
99 SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
100 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
101 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
102 int sepapriority, /**< priority of the constraint handler for separation */
103 SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
104 );
105
106/** sets both the propagation callback and the propagation frequency of the constraint handler */
109 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
110 SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
111 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
112 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
113 SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */
114 );
115
116/** sets the relaxation enforcement method of the constraint handler */
119 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
120 SCIP_DECL_CONSENFORELAX ((*consenforelax)) /**< constraint copying method */
121 );
122
123/** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
124 * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
125 *
126 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
127 * flag is TRUE) and the current node belongs to the corresponding sub tree.
128 */
131 SCIP_CONSHDLR* conshdlr /**< constraint handler */
132 );
133
134/** gets array with enforced constraints of constraint handler; this is local information */
137 SCIP_CONSHDLR* conshdlr /**< constraint handler */
138 );
139
140/** gets array with checked constraints of constraint handler; this is local information */
143 SCIP_CONSHDLR* conshdlr /**< constraint handler */
144 );
145
146/** gets array with delayed update constraints
147 *
148 * @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing.
149 */
152 SCIP_CONSHDLR* conshdlr /**< constraint handler */
153 );
154
155/** gets total number of existing transformed constraints of constraint handler */
158 SCIP_CONSHDLR* conshdlr /**< constraint handler */
159 );
160
161/** gets number of enforced constraints of constraint handler; this is local information */
164 SCIP_CONSHDLR* conshdlr /**< constraint handler */
165 );
166
167/** gets number of checked constraints of constraint handler; this is local information */
170 SCIP_CONSHDLR* conshdlr /**< constraint handler */
171 );
172
173/** gets number of active constraints of constraint handler
174 *
175 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
176 * flag is TRUE) and the current node belongs to the corresponding sub tree.
177 */
180 SCIP_CONSHDLR* conshdlr /**< constraint handler */
181 );
182
183/** gets number of enabled constraints of constraint handler */
186 SCIP_CONSHDLR* conshdlr /**< constraint handler */
187 );
188
189/** gets number of constraints that have delayed updates */
192 SCIP_CONSHDLR* conshdlr /**< constraint handler */
193 );
194
195/** gets time in seconds used for setting up this constraint handler for new stages */
198 SCIP_CONSHDLR* conshdlr /**< constraint handler */
199 );
200
201/** gets time in seconds used for presolving in this constraint handler */
204 SCIP_CONSHDLR* conshdlr /**< constraint handler */
205 );
206
207/** gets time in seconds used for separation in this constraint handler */
210 SCIP_CONSHDLR* conshdlr /**< constraint handler */
211 );
212
213/** gets time in seconds used for LP enforcement in this constraint handler */
216 SCIP_CONSHDLR* conshdlr /**< constraint handler */
217 );
218
219/** gets time in seconds used for pseudo enforcement in this constraint handler */
222 SCIP_CONSHDLR* conshdlr /**< constraint handler */
223 );
224
225/** gets time in seconds used for relaxation enforcement in this constraint handler */
228 SCIP_CONSHDLR* conshdlr /**< constraint handler */
229 );
230
231/** gets time in seconds used for propagation in this constraint handler */
234 SCIP_CONSHDLR* conshdlr /**< constraint handler */
235 );
236
237/** gets time in seconds used for propagation in this constraint handler during strong branching */
240 SCIP_CONSHDLR* conshdlr /**< constraint handler */
241 );
242
243/** gets time in seconds used for feasibility checking in this constraint handler */
246 SCIP_CONSHDLR* conshdlr /**< constraint handler */
247 );
248
249/** gets time in seconds used for resolving propagation in this constraint handler */
252 SCIP_CONSHDLR* conshdlr /**< constraint handler */
253 );
254
255/** gets number of calls to the constraint handler's separation method */
257SCIP_Longint SCIPconshdlrGetNSepaCalls(
258 SCIP_CONSHDLR* conshdlr /**< constraint handler */
259 );
260
261/** gets number of calls to the constraint handler's LP enforcing method */
263SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(
264 SCIP_CONSHDLR* conshdlr /**< constraint handler */
265 );
266
267/** gets number of calls to the constraint handler's pseudo enforcing method */
269SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(
270 SCIP_CONSHDLR* conshdlr /**< constraint handler */
271 );
272
273/** gets number of calls to the constraint handler's relaxation enforcing method */
276 SCIP_CONSHDLR* conshdlr /**< constraint handler */
277 );
278
279/** gets number of calls to the constraint handler's propagation method */
281SCIP_Longint SCIPconshdlrGetNPropCalls(
282 SCIP_CONSHDLR* conshdlr /**< constraint handler */
283 );
284
285/** gets number of calls to the constraint handler's checking method */
287SCIP_Longint SCIPconshdlrGetNCheckCalls(
288 SCIP_CONSHDLR* conshdlr /**< constraint handler */
289 );
290
291/** gets number of calls to the constraint handler's resolve propagation method */
294 SCIP_CONSHDLR* conshdlr /**< constraint handler */
295 );
296
297/** gets total number of times, this constraint handler detected a cutoff */
299SCIP_Longint SCIPconshdlrGetNCutoffs(
300 SCIP_CONSHDLR* conshdlr /**< constraint handler */
301 );
302
303/** gets total number of cuts found by this constraint handler */
305SCIP_Longint SCIPconshdlrGetNCutsFound(
306 SCIP_CONSHDLR* conshdlr /**< constraint handler */
307 );
308
309/** gets total number of cuts found by this constraint handler applied to lp */
311SCIP_Longint SCIPconshdlrGetNCutsApplied(
312 SCIP_CONSHDLR* conshdlr /**< constraint handler */
313 );
314
315/** gets total number of additional constraints added by this constraint handler */
317SCIP_Longint SCIPconshdlrGetNConssFound(
318 SCIP_CONSHDLR* conshdlr /**< constraint handler */
319 );
320
321/** gets total number of domain reductions found by this constraint handler */
324 SCIP_CONSHDLR* conshdlr /**< constraint handler */
325 );
326
327/** gets number of children created by this constraint handler */
329SCIP_Longint SCIPconshdlrGetNChildren(
330 SCIP_CONSHDLR* conshdlr /**< constraint handler */
331 );
332
333/** gets maximum number of active constraints of constraint handler existing at the same time */
336 SCIP_CONSHDLR* conshdlr /**< constraint handler */
337 );
338
339/** gets initial number of active constraints of constraint handler */
342 SCIP_CONSHDLR* conshdlr /**< constraint handler */
343 );
344
345/** gets number of variables fixed in presolving method of constraint handler */
348 SCIP_CONSHDLR* conshdlr /**< constraint handler */
349 );
350
351/** gets number of variables aggregated in presolving method of constraint handler */
354 SCIP_CONSHDLR* conshdlr /**< constraint handler */
355 );
356
357/** gets number of variable types changed in presolving method of constraint handler */
360 SCIP_CONSHDLR* conshdlr /**< constraint handler */
361 );
362
363/** gets number of bounds changed in presolving method of constraint handler */
366 SCIP_CONSHDLR* conshdlr /**< constraint handler */
367 );
368
369/** gets number of holes added to domains of variables in presolving method of constraint handler */
372 SCIP_CONSHDLR* conshdlr /**< constraint handler */
373 );
374
375/** gets number of constraints deleted in presolving method of constraint handler */
378 SCIP_CONSHDLR* conshdlr /**< constraint handler */
379 );
380
381/** gets number of constraints added in presolving method of constraint handler */
384 SCIP_CONSHDLR* conshdlr /**< constraint handler */
385 );
386
387/** gets number of constraints upgraded in presolving method of constraint handler */
390 SCIP_CONSHDLR* conshdlr /**< constraint handler */
391 );
392
393/** gets number of coefficients changed in presolving method of constraint handler */
396 SCIP_CONSHDLR* conshdlr /**< constraint handler */
397 );
398
399/** gets number of constraint sides changed in presolving method of constraint handler */
402 SCIP_CONSHDLR* conshdlr /**< constraint handler */
403 );
404
405/** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
408 SCIP_CONSHDLR* conshdlr /**< constraint handler */
409 );
410
411/** gets separation priority of constraint handler */
414 SCIP_CONSHDLR* conshdlr /**< constraint handler */
415 );
416
417/** gets enforcing priority of constraint handler */
420 SCIP_CONSHDLR* conshdlr /**< constraint handler */
421 );
422
423/** gets checking priority of constraint handler */
426 SCIP_CONSHDLR* conshdlr /**< constraint handler */
427 );
428
429/** gets separation frequency of constraint handler */
432 SCIP_CONSHDLR* conshdlr /**< constraint handler */
433 );
434
435/** gets propagation frequency of constraint handler */
438 SCIP_CONSHDLR* conshdlr /**< constraint handler */
439 );
440
441/** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
444 SCIP_CONSHDLR* conshdlr /**< constraint handler */
445 );
446
447/** needs constraint handler a constraint to be called? */
449SCIP_Bool SCIPconshdlrNeedsCons(
450 SCIP_CONSHDLR* conshdlr /**< constraint handler */
451 );
452
453/** does the constraint handler perform presolving? */
456 SCIP_CONSHDLR* conshdlr /**< constraint handler */
457 );
458
459/** should separation method be delayed, if other separators found cuts? */
462 SCIP_CONSHDLR* conshdlr /**< constraint handler */
463 );
464
465/** should propagation method be delayed, if other propagators found reductions? */
468 SCIP_CONSHDLR* conshdlr /**< constraint handler */
469 );
470
471/** was LP separation method delayed at the last call? */
474 SCIP_CONSHDLR* conshdlr /**< constraint handler */
475 );
476
477/** was primal solution separation method delayed at the last call? */
480 SCIP_CONSHDLR* conshdlr /**< constraint handler */
481 );
482
483/** was propagation method delayed at the last call? */
486 SCIP_CONSHDLR* conshdlr /**< constraint handler */
487 );
488
489/** is constraint handler initialized? */
492 SCIP_CONSHDLR* conshdlr /**< constraint handler */
493 );
494
495/** does the constraint handler have a copy function? */
497SCIP_Bool SCIPconshdlrIsClonable(
498 SCIP_CONSHDLR* conshdlr /**< constraint handler */
499 );
500
501/** returns the timing mask of the propagation method of the constraint handler */
504 SCIP_CONSHDLR* conshdlr /**< constraint handler */
505 );
506
507/*
508 * Methods for constraint change sets
509 */
510/** gets added constraints data for a constraint set change */
513 SCIP_CONSSETCHG* conssetchg, /**< constraint set change to get data from */
514 SCIP_CONS*** conss, /**< reference to constraints array added in the conssetchg, or NULL */
515 int* nconss /**< reference to store the size of the constraints array, or NULL */
516 );
517
518/** sets the timing mask of the propagation method of the constraint handler */
521 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
522 SCIP_PROPTIMING proptiming /**< timing mask to be set */
523 );
524
525
526/** returns the timing mask of the presolving method of the constraint handler */
529 SCIP_CONSHDLR* conshdlr /**< constraint handler */
530 );
531
532/** sets the timing mask of the presolving method of the constraint handler */
535 SCIP_CONSHDLR* conshdlr, /**< constraint handler */
536 SCIP_PRESOLTIMING presoltiming /** timing mask to be set */
537 );
538
539/** @} */
540
541/*
542 * Constraint methods
543 */
544
545/**@addtogroup PublicConstraintMethods
546 *
547 * @{
548 */
549
550
551/** returns the name of the constraint
552 *
553 * @note to change the name of a constraint, use SCIPchgConsName() from scip.h
554 */
556const char* SCIPconsGetName(
557 SCIP_CONS* cons /**< constraint */
558 );
559
560/** returns the position of constraint in the corresponding handler's conss array */
563 SCIP_CONS* cons /**< constraint */
564 );
565
566/** returns the constraint handler of the constraint */
569 SCIP_CONS* cons /**< constraint */
570 );
571
572/** returns the constraint data field of the constraint */
575 SCIP_CONS* cons /**< constraint */
576 );
577
578/** gets number of times, the constraint is currently captured */
581 SCIP_CONS* cons /**< constraint */
582 );
583
584/** for an active constraint, returns the depth in the tree at which the constraint was activated */
587 SCIP_CONS* cons /**< constraint */
588 );
589
590/** returns the depth in the tree at which the constraint is valid; returns INT_MAX, if the constraint is local
591 * and currently not active
592 */
595 SCIP_CONS* cons /**< constraint */
596 );
597
598/** returns TRUE iff constraint is active in the current node */
600SCIP_Bool SCIPconsIsActive(
601 SCIP_CONS* cons /**< constraint */
602 );
603
604/** returns TRUE iff constraint has to be deactivated in update phase */
607 SCIP_CONS* cons /**< constraint */
608 );
609
610/** returns TRUE iff constraint is enabled in the current node */
612SCIP_Bool SCIPconsIsEnabled(
613 SCIP_CONS* cons /**< constraint */
614 );
615
616/** returns TRUE iff constraint's separation is enabled in the current node */
619 SCIP_CONS* cons /**< constraint */
620 );
621
622/** returns TRUE iff constraint's propagation is enabled in the current node */
625 SCIP_CONS* cons /**< constraint */
626 );
627
628/** returns TRUE iff constraint is deleted or marked to be deleted */
630SCIP_Bool SCIPconsIsDeleted(
631 SCIP_CONS* cons /**< constraint */
632 );
633
634/** returns TRUE iff constraint is marked obsolete */
636SCIP_Bool SCIPconsIsObsolete(
637 SCIP_CONS* cons /**< constraint */
638 );
639
640/** returns TRUE iff constraint is marked as a conflict */
642SCIP_Bool SCIPconsIsConflict(
643 SCIP_CONS* cons /**< constraint */
644 );
645
646/** gets age of constraint */
648SCIP_Real SCIPconsGetAge(
649 SCIP_CONS* cons /**< constraint */
650 );
651
652/** returns TRUE iff the LP relaxation of constraint should be in the initial LP */
654SCIP_Bool SCIPconsIsInitial(
655 SCIP_CONS* cons /**< constraint */
656 );
657
658/** returns TRUE iff constraint should be separated during LP processing */
660SCIP_Bool SCIPconsIsSeparated(
661 SCIP_CONS* cons /**< constraint */
662 );
663
664/** returns TRUE iff constraint should be enforced during node processing */
666SCIP_Bool SCIPconsIsEnforced(
667 SCIP_CONS* cons /**< constraint */
668 );
669
670/** returns TRUE iff constraint should be checked for feasibility */
672SCIP_Bool SCIPconsIsChecked(
673 SCIP_CONS* cons /**< constraint */
674 );
675
676/** returns whether the constraint is marked for propagation */
679 SCIP_CONS* cons /**< constraint */
680 );
681
682/** returns TRUE iff constraint should be propagated during node processing */
684SCIP_Bool SCIPconsIsPropagated(
685 SCIP_CONS* cons /**< constraint */
686 );
687
688/** returns TRUE iff constraint is globally valid */
690SCIP_Bool SCIPconsIsGlobal(
691 SCIP_CONS* cons /**< constraint */
692 );
693
694/** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */
696SCIP_Bool SCIPconsIsLocal(
697 SCIP_CONS* cons /**< constraint */
698 );
699
700/** returns TRUE iff constraint is modifiable (subject to column generation) */
702SCIP_Bool SCIPconsIsModifiable(
703 SCIP_CONS* cons /**< constraint */
704 );
705
706/** returns TRUE iff constraint is subject to aging */
708SCIP_Bool SCIPconsIsDynamic(
709 SCIP_CONS* cons /**< constraint */
710 );
711
712/** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
714SCIP_Bool SCIPconsIsRemovable(
715 SCIP_CONS* cons /**< constraint */
716 );
717
718/** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
721 SCIP_CONS* cons /**< constraint */
722 );
723
724/** returns TRUE iff constraint belongs to the global problem */
726SCIP_Bool SCIPconsIsInProb(
727 SCIP_CONS* cons /**< constraint */
728 );
729
730/** returns TRUE iff constraint is belonging to original space */
732SCIP_Bool SCIPconsIsOriginal(
733 SCIP_CONS* cons /**< constraint */
734 );
735
736/** returns TRUE iff constraint is belonging to transformed space */
738SCIP_Bool SCIPconsIsTransformed(
739 SCIP_CONS* cons /**< constraint */
740 );
741
742/** returns TRUE iff roundings for variables in constraint are locked */
744SCIP_Bool SCIPconsIsLockedPos(
745 SCIP_CONS* cons /**< constraint */
746 );
747
748/** returns TRUE iff roundings for variables in constraint's negation are locked */
750SCIP_Bool SCIPconsIsLockedNeg(
751 SCIP_CONS* cons /**< constraint */
752 );
753
754/** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */
756SCIP_Bool SCIPconsIsLocked(
757 SCIP_CONS* cons /**< constraint */
758 );
759
760/** get number of times the roundings for variables in constraint are locked */
763 SCIP_CONS* cons /**< constraint */
764 );
765
766/** get number of times the roundings for variables in constraint's negation are locked */
769 SCIP_CONS* cons /**< constraint */
770 );
771
772/** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
775 SCIP_CONS* cons, /**< constraint */
776 SCIP_LOCKTYPE locktype /**< variable lock type */
777 );
778
779/** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
782 SCIP_CONS* cons, /**< constraint */
783 SCIP_LOCKTYPE locktype /**< variable lock type */
784 );
785
786/** returns TRUE iff roundings of the given locktype for variables in constraint or in constraint's negation are locked */
788SCIP_Bool SCIPconsIsLockedType(
789 SCIP_CONS* cons, /**< constraint */
790 SCIP_LOCKTYPE locktype /**< variable lock type */
791 );
792
793/** get number of times the roundings of given locktype for variables in constraint are locked */
796 SCIP_CONS* cons, /**< constraint */
797 SCIP_LOCKTYPE locktype /**< variable lock type */
798 );
799
800/** get number of times the roundings of given locktype for variables in constraint's negation are locked */
803 SCIP_CONS* cons, /**< constraint */
804 SCIP_LOCKTYPE locktype /**< variable lock type */
805 );
806
807/** returns if the constraint was already added to a SCIP instance */
809SCIP_Bool SCIPconsIsAdded(
810 SCIP_CONS* cons /**< constraint */
811 );
812
813/** adds locks to (dis-)allow upgrading of constraint */
816 SCIP_CONS* cons, /**< constraint to add locks */
817 int nlocks /**< number of locks to add */
818 );
819
820/** gets number of locks against upgrading the constraint, 0 means this constraint can be upgraded */
823 SCIP_CONS* cons /**< constraint */
824 );
825
826#ifdef NDEBUG
827
828/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
829 * speed up the algorithms.
830 */
831
832#define SCIPconsGetName(cons) (cons)->name
833#define SCIPconsGetPos(cons) (cons)->consspos
834#define SCIPconsGetHdlr(cons) (cons)->conshdlr
835#define SCIPconsGetData(cons) (cons)->consdata
836#define SCIPconsGetNUses(cons) (cons)->nuses
837#define SCIPconsGetActiveDepth(cons) (cons)->activedepth
838#define SCIPconsGetValidDepth(cons) (!(cons)->local ? 0 \
839 : !SCIPconsIsActive(cons) ? INT_MAX \
840 : (cons)->validdepth == -1 ? SCIPconsGetActiveDepth(cons) \
841 : (cons)->validdepth)
842#define SCIPconsIsActive(cons) ((cons)->updateactivate || ((cons)->active && !(cons)->updatedeactivate))
843#define SCIPconsIsEnabled(cons) ((cons)->updateenable || ((cons)->enabled && !(cons)->updatedisable))
844#define SCIPconsIsSeparationEnabled(cons) \
845 (SCIPconsIsEnabled(cons) && ((cons)->updatesepaenable || ((cons)->sepaenabled && !(cons)->updatesepadisable)))
846#define SCIPconsIsPropagationEnabled(cons) \
847 (SCIPconsIsEnabled(cons) && ((cons)->updatepropenable || ((cons)->propenabled && !(cons)->updatepropdisable)))
848#define SCIPconsIsDeleted(cons) ((cons)->deleted)
849#define SCIPconsIsObsolete(cons) ((cons)->updateobsolete || (cons)->obsolete)
850#define SCIPconsIsConflict(cons) ((cons)->conflict)
851#define SCIPconsGetAge(cons) (cons)->age
852#define SCIPconsIsInitial(cons) (cons)->initial
853#define SCIPconsIsSeparated(cons) (cons)->separate
854#define SCIPconsIsEnforced(cons) (cons)->enforce
855#define SCIPconsIsChecked(cons) (cons)->check
856#define SCIPconsIsMarkedPropagate(cons) ((cons)->updatemarkpropagate || ((cons)->markpropagate && !(cons)->updateunmarkpropagate))
857#define SCIPconsIsPropagated(cons) (cons)->propagate
858#define SCIPconsIsGlobal(cons) !(cons)->local
859#define SCIPconsIsLocal(cons) (cons)->local
860#define SCIPconsIsModifiable(cons) (cons)->modifiable
861#define SCIPconsIsDynamic(cons) (cons)->dynamic
862#define SCIPconsIsRemovable(cons) (cons)->removable
863#define SCIPconsIsStickingAtNode(cons) (cons)->stickingatnode
864#define SCIPconsIsInProb(cons) ((cons)->addconssetchg == NULL && (cons)->addarraypos >= 0)
865#define SCIPconsIsOriginal(cons) (cons)->original
866#define SCIPconsIsTransformed(cons) !(cons)->original
867#define SCIPconsIsLockedPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0)
868#define SCIPconsIsLockedNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
869#define SCIPconsIsLocked(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || (cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
870#define SCIPconsGetNLocksPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL])
871#define SCIPconsGetNLocksNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL])
872#define SCIPconsIsLockedTypePos(cons, locktype) ((cons)->nlockspos[locktype] > 0)
873#define SCIPconsIsLockedTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype] > 0)
874#define SCIPconsIsLockedType(cons, locktype) ((cons)->nlockspos[locktype] > 0 || (cons)->nlocksneg[locktype] > 0)
875#define SCIPconsGetNLocksTypePos(cons, locktype) ((cons)->nlockspos[locktype])
876#define SCIPconsGetNLocksTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype])
877#define SCIPconsIsAdded(cons) ((cons)->addarraypos >= 0)
878#define SCIPconsGetNUpgradeLocks(cons) ((cons)->nupgradelocks)
879
880#endif
881
882/** @} */
883
884/**@addtogroup PublicProblemMethods
885 *
886 * public methods to query linear constraint classification statistics
887 *
888 * @{
889 */
890
891/** create linear constraint statistics */
894 SCIP* scip, /**< scip data structure */
895 SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
896 );
897
898/** free linear constraint statistics */
901 SCIP* scip, /**< scip data structure */
902 SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */
903 );
904
905/** resets linear constraint statistics */
908 SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
909 );
910
911/** returns the number of occurrences of a specific type of linear constraint */
914 SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
915 SCIP_LINCONSTYPE linconstype /**< linear constraint type */
916 );
917
918/** returns the total number of classified constraints */
921 SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
922 );
923
924/** increases the number of occurrences of a specific type of linear constraint */
927 SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */
928 SCIP_LINCONSTYPE linconstype, /**< linear constraint type */
929 int increment /**< positive increment */
930 );
931
932/** print linear constraint classification statistics */
935 SCIP* scip, /**< scip data structure */
936 FILE* file, /**< file handle or NULL to print to standard out */
937 SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */
938 );
939
940/** @} */
941
942#ifdef __cplusplus
943}
944#endif
945
946#endif
common defines and data types used in all packages of SCIP
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4615
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
Definition cons.c:4210
void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr,)
Definition cons.c:4261
int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4929
SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4759
SCIP_PROPTIMING SCIPconshdlrGetPropTiming(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5209
SCIP_Bool SCIPconshdlrWasSolSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5169
SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4829
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4572
int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5039
SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4689
int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5109
SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5129
void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
Definition cons.c:4242
int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4949
SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5231
SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4709
int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5049
SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4909
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5059
SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4869
int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5029
void SCIPconshdlrSetPresolTiming(SCIP_CONSHDLR *conshdlr, SCIP_PRESOLTIMING presoltiming)
Definition cons.c:5241
int SCIPconshdlrGetNUpdateConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4649
SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4562
void SCIPconshdlrSetSepa(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
Definition cons.c:4221
SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4749
SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4859
SCIP_Bool SCIPconshdlrIsPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5149
SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4739
void SCIPconssetchgGetAddedConsData(SCIP_CONSSETCHG *conssetchg, SCIP_CONS ***conss, int *nconss)
Definition cons.c:5533
SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4719
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5099
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4595
SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4849
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4180
int SCIPconshdlrGetNEnabledConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4639
SCIP_CONS ** SCIPconshdlrGetUpdateConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4585
SCIP_Bool SCIPconshdlrIsSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5139
SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4779
int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4999
SCIP_Bool SCIPconshdlrWasLPSeparationDelayed(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5159
SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4919
SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4729
void SCIPconshdlrSetPropTiming(SCIP_CONSHDLR *conshdlr, SCIP_PROPTIMING proptiming)
Definition cons.c:5219
SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5119
int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4959
SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4799
int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4989
int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4605
SCIP_Bool SCIPconshdlrIsInitialized(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5189
int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5019
int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4939
SCIP_Bool SCIPconshdlrWasPropagationDelayed(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5179
int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5009
int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4979
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4190
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4200
SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4899
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4629
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5079
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5089
SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4819
SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4789
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4552
int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5069
SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4679
SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4839
SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4699
SCIP_Bool SCIPconshdlrIsClonable(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5199
int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4969
SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4769
SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4809
SCIP_Bool SCIPconsIsLockedNeg(SCIP_CONS *cons)
Definition cons.c:8417
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
Definition cons.c:8118
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
Definition cons.c:8527
int SCIPconsGetPos(SCIP_CONS *cons)
Definition cons.c:8098
SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
Definition cons.c:8237
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
Definition cons.c:8347
SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
Definition cons.c:8247
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
Definition cons.c:8108
int SCIPconsGetActiveDepth(SCIP_CONS *cons)
Definition cons.c:8138
SCIP_Bool SCIPconsIsLockedPos(SCIP_CONS *cons)
Definition cons.c:8407
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
Definition cons.c:8206
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
Definition cons.c:8257
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
Definition cons.c:8539
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
Definition cons.c:8297
int SCIPconsGetNLocksTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition cons.c:8505
int SCIPconsGetValidDepth(SCIP_CONS *cons)
Definition cons.c:8171
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
Definition cons.c:8387
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
Definition cons.c:8287
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
Definition cons.c:8217
SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
Definition cons.c:8159
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition cons.c:8397
int SCIPconsGetNLocksPos(SCIP_CONS *cons)
Definition cons.c:8437
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition cons.c:8481
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
Definition cons.c:8277
SCIP_Bool SCIPconsIsInProb(SCIP_CONS *cons)
Definition cons.c:8377
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
Definition cons.c:8317
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
Definition cons.c:8149
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
Definition cons.c:8307
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
Definition cons.c:8327
int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
Definition cons.c:8447
int SCIPconsGetNUses(SCIP_CONS *cons)
Definition cons.c:8128
SCIP_Bool SCIPconsIsLockedTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition cons.c:8457
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition cons.c:8185
const char * SCIPconsGetName(SCIP_CONS *cons)
Definition cons.c:8088
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
Definition cons.c:8427
SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
Definition cons.c:8195
SCIP_Bool SCIPconsIsLockedTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition cons.c:8469
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
Definition cons.c:8337
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
Definition cons.c:8517
SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
Definition cons.c:8227
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
Definition cons.c:8367
int SCIPconsGetNLocksTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
Definition cons.c:8493
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
Definition cons.c:8267
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
Definition cons.c:8357
int SCIPlinConsStatsGetSum(SCIP_LINCONSSTATS *linconsstats)
Definition cons.c:7972
void SCIPlinConsStatsIncTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype, int increment)
Definition cons.c:7982
int SCIPlinConsStatsGetTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype)
Definition cons.c:7959
void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition cons.c:7938
void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
Definition cons.c:7950
void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
Definition cons.c:7998
SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition cons.c:7925
datastructures for constraints and constraint handlers
type definitions for constraints and constraint handlers
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition type_cons.h:64
#define SCIP_DECL_CONSSEPALP(x)
Definition type_cons.h:287
#define SCIP_DECL_CONSENFORELAX(x)
Definition type_cons.h:387
#define SCIP_DECL_CONSPROP(x)
Definition type_cons.h:504
struct SCIP_ConsData SCIP_CONSDATA
Definition type_cons.h:65
#define SCIP_DECL_CONSSEPASOL(x)
Definition type_cons.h:319
enum SCIP_LinConstype SCIP_LINCONSTYPE
Definition type_cons.h:90
type definitions for miscellaneous datastructures
#define SCIP_DECL_SORTPTRCOMP(x)
Definition type_misc.h:188
enum SCIP_Retcode SCIP_RETCODE
unsigned int SCIP_PROPTIMING
Definition type_timing.h:74
unsigned int SCIP_PRESOLTIMING
Definition type_timing.h:61
enum SCIP_LockType SCIP_LOCKTYPE
Definition type_var.h:100