33#ifndef __SCIP_PUB_CONS_H__
34#define __SCIP_PUB_CONS_H__
848#define SCIPconsGetName(cons) (cons)->name
849#define SCIPconsGetPos(cons) (cons)->consspos
850#define SCIPconsGetHdlr(cons) (cons)->conshdlr
851#define SCIPconsGetData(cons) (cons)->consdata
852#define SCIPconsGetNUses(cons) (cons)->nuses
853#define SCIPconsGetActiveDepth(cons) (cons)->activedepth
854#define SCIPconsGetValidDepth(cons) (!(cons)->local ? 0 \
855 : !SCIPconsIsActive(cons) ? INT_MAX \
856 : (cons)->validdepth == -1 ? SCIPconsGetActiveDepth(cons) \
857 : (cons)->validdepth)
858#define SCIPconsIsActive(cons) ((cons)->updateactivate || ((cons)->active && !(cons)->updatedeactivate))
859#define SCIPconsIsEnabled(cons) ((cons)->updateenable || ((cons)->enabled && !(cons)->updatedisable))
860#define SCIPconsIsSeparationEnabled(cons) \
861 (SCIPconsIsEnabled(cons) && ((cons)->updatesepaenable || ((cons)->sepaenabled && !(cons)->updatesepadisable)))
862#define SCIPconsIsPropagationEnabled(cons) \
863 (SCIPconsIsEnabled(cons) && ((cons)->updatepropenable || ((cons)->propenabled && !(cons)->updatepropdisable)))
864#define SCIPconsIsDeleted(cons) ((cons)->deleted)
865#define SCIPconsIsObsolete(cons) ((cons)->updateobsolete || (cons)->obsolete)
866#define SCIPconsIsConflict(cons) ((cons)->conflict)
867#define SCIPconsGetAge(cons) (cons)->age
868#define SCIPconsIsInitial(cons) (cons)->initial
869#define SCIPconsIsSeparated(cons) (cons)->separate
870#define SCIPconsIsEnforced(cons) (cons)->enforce
871#define SCIPconsIsChecked(cons) (cons)->check
872#define SCIPconsIsMarkedPropagate(cons) ((cons)->updatemarkpropagate || ((cons)->markpropagate && !(cons)->updateunmarkpropagate))
873#define SCIPconsIsPropagated(cons) (cons)->propagate
874#define SCIPconsIsGlobal(cons) !(cons)->local
875#define SCIPconsIsLocal(cons) (cons)->local
876#define SCIPconsIsModifiable(cons) (cons)->modifiable
877#define SCIPconsIsDynamic(cons) (cons)->dynamic
878#define SCIPconsIsRemovable(cons) (cons)->removable
879#define SCIPconsIsStickingAtNode(cons) (cons)->stickingatnode
880#define SCIPconsIsInProb(cons) ((cons)->addconssetchg == NULL && (cons)->addarraypos >= 0)
881#define SCIPconsIsOriginal(cons) (cons)->original
882#define SCIPconsIsTransformed(cons) !(cons)->original
883#define SCIPconsIsLockedPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0)
884#define SCIPconsIsLockedNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
885#define SCIPconsIsLocked(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || (cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
886#define SCIPconsGetNLocksPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL])
887#define SCIPconsGetNLocksNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL])
888#define SCIPconsIsLockedTypePos(cons, locktype) ((cons)->nlockspos[locktype] > 0)
889#define SCIPconsIsLockedTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype] > 0)
890#define SCIPconsIsLockedType(cons, locktype) ((cons)->nlockspos[locktype] > 0 || (cons)->nlocksneg[locktype] > 0)
891#define SCIPconsGetNLocksTypePos(cons, locktype) ((cons)->nlockspos[locktype])
892#define SCIPconsGetNLocksTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype])
893#define SCIPconsIsAdded(cons) ((cons)->addarraypos >= 0)
894#define SCIPconsGetNUpgradeLocks(cons) ((cons)->nupgradelocks)
common defines and data types used in all packages of SCIP
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr,)
int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
SCIP_PROPTIMING SCIPconshdlrGetPropTiming(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrWasSolSeparationDelayed(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetPresolTiming(SCIP_CONSHDLR *conshdlr, SCIP_PRESOLTIMING presoltiming)
int SCIPconshdlrGetNUpdateConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetSepa(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrSupportsSignedPermsymDetection(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrIsPropagationDelayed(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
void SCIPconssetchgGetAddedConsData(SCIP_CONSSETCHG *conssetchg, SCIP_CONS ***conss, int *nconss)
SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNEnabledConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetUpdateConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrIsSeparationDelayed(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrWasLPSeparationDelayed(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetPropTiming(SCIP_CONSHDLR *conshdlr, SCIP_PROPTIMING proptiming)
SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrIsInitialized(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrWasPropagationDelayed(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrSupportsPermsymDetection(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrIsClonable(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconsIsLockedNeg(SCIP_CONS *cons)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
int SCIPconsGetActiveDepth(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
int SCIPconsGetNLocksTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
int SCIPconsGetValidDepth(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsUpdatedeactivate(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
int SCIPconsGetNLocksPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInProb(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
int SCIPconsGetNUses(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedTypeNeg(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
int SCIPconsGetNLocksTypePos(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
int SCIPlinConsStatsGetSum(SCIP_LINCONSSTATS *linconsstats)
void SCIPlinConsStatsIncTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype, int increment)
int SCIPlinConsStatsGetTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype)
void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
datastructures for constraints and constraint handlers
type definitions for constraints and constraint handlers
struct SCIP_Cons SCIP_CONS
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
struct SCIP_ConsSetChg SCIP_CONSSETCHG
#define SCIP_DECL_CONSENFORELAX(x)
struct SCIP_LinConsStats SCIP_LINCONSSTATS
#define SCIP_DECL_CONSPROP(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSSEPASOL(x)
enum SCIP_LinConstype SCIP_LINCONSTYPE
type definitions for miscellaneous datastructures
#define SCIP_DECL_SORTPTRCOMP(x)
enum SCIP_Retcode SCIP_RETCODE
unsigned int SCIP_PROPTIMING
unsigned int SCIP_PRESOLTIMING
enum SCIP_LockType SCIP_LOCKTYPE