Detailed Description
constraint handler for conjunction constraints
Definition in file cons_conjunction.c.
#include "blockmemshell/memory.h"
#include "scip/cons_conjunction.h"
#include "scip/pub_cons.h"
#include "scip/pub_message.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | CONSHDLR_NAME "conjunction" |
#define | CONSHDLR_DESC "conjunction of constraints" |
#define | CONSHDLR_ENFOPRIORITY +900000 |
#define | CONSHDLR_CHECKPRIORITY -900000 |
#define | CONSHDLR_EAGERFREQ 100 |
#define | CONSHDLR_MAXPREROUNDS -1 |
#define | CONSHDLR_NEEDSCONS TRUE |
#define | CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
Functions | |
static SCIP_RETCODE | consdataCreate (SCIP *scip, SCIP_CONSDATA **consdata, SCIP_CONS **conss, int nconss) |
static SCIP_RETCODE | consdataFree (SCIP *scip, SCIP_CONSDATA **consdata) |
static SCIP_RETCODE | consdataAddCons (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_CONS *cons) |
static SCIP_RETCODE | addAllConss (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_RESULT *result) |
static SCIP_RETCODE | checkAllConss (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT *result) |
static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopyConjunction) |
static | SCIP_DECL_CONSDELETE (consDeleteConjunction) |
static | SCIP_DECL_CONSTRANS (consTransConjunction) |
static | SCIP_DECL_CONSENFOLP (consEnfolpConjunction) |
static | SCIP_DECL_CONSENFORELAX (consEnforelaxConjunction) |
static | SCIP_DECL_CONSENFOPS (consEnfopsConjunction) |
static | SCIP_DECL_CONSCHECK (consCheckConjunction) |
static | SCIP_DECL_CONSPRESOL (consPresolConjunction) |
static | SCIP_DECL_CONSLOCK (consLockConjunction) |
static | SCIP_DECL_CONSPRINT (consPrintConjunction) |
static | SCIP_DECL_CONSPARSE (consParseConjunction) |
static | SCIP_DECL_CONSCOPY (consCopyConjunction) |
SCIP_RETCODE | SCIPincludeConshdlrConjunction (SCIP *scip) |
SCIP_RETCODE | SCIPcreateConsConjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic) |
SCIP_RETCODE | SCIPcreateConsBasicConjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss) |
SCIP_RETCODE | SCIPaddConsElemConjunction (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons) |
Macro Definition Documentation
◆ CONSHDLR_NAME
#define CONSHDLR_NAME "conjunction" |
Definition at line 40 of file cons_conjunction.c.
Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIPaddConsElemConjunction(), SCIPcreateConsConjunction(), and SCIPincludeConshdlrConjunction().
◆ CONSHDLR_DESC
#define CONSHDLR_DESC "conjunction of constraints" |
Definition at line 41 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_ENFOPRIORITY
#define CONSHDLR_ENFOPRIORITY +900000 |
priority of the constraint handler for constraint enforcing
Definition at line 42 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_CHECKPRIORITY
#define CONSHDLR_CHECKPRIORITY -900000 |
priority of the constraint handler for checking feasibility
Definition at line 43 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_EAGERFREQ
#define CONSHDLR_EAGERFREQ 100 |
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only
Definition at line 44 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_MAXPREROUNDS
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 47 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_NEEDSCONS
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 48 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
◆ CONSHDLR_PRESOLTIMING
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
Definition at line 50 of file cons_conjunction.c.
Referenced by SCIPincludeConshdlrConjunction().
Function Documentation
◆ consdataCreate()
|
static |
creates conjunction constraint data, captures initial constraints of conjunction
- Parameters
-
scip SCIP data structure consdata pointer to constraint data conss initial constraint in conjunction nconss number of initial constraints in conjunction
Definition at line 71 of file cons_conjunction.c.
References consdataFree(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcaptureCons(), SCIPduplicateBlockMemoryArray, SCIPisTransformed(), and SCIPtransformConss().
Referenced by SCIPcreateConsConjunction().
◆ consdataFree()
|
static |
frees constraint data and releases all constraints in conjunction
- Parameters
-
scip SCIP data structure consdata pointer to constraint data
Definition at line 113 of file cons_conjunction.c.
References consdataAddCons(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, and SCIPreleaseCons().
Referenced by consdataCreate(), and SCIP_DECL_CONSDELETE().
◆ consdataAddCons()
|
static |
adds constraint to conjunction
- Parameters
-
scip SCIP data structure consdata constraint data cons constraint to add to the conjunction
Definition at line 138 of file cons_conjunction.c.
References addAllConss(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureCons(), SCIPensureBlockMemoryArray, SCIPisTransformed(), and SCIPtransformCons().
Referenced by consdataFree(), and SCIPaddConsElemConjunction().
◆ addAllConss()
|
static |
adds all constraints in conjunction constraints to the problem; disables unmodifiable conjunction constraints
- Parameters
-
scip SCIP data structure conss active conjunction constraints nconss number of active conjunction constraints result pointer to store the result
Definition at line 170 of file cons_conjunction.c.
References checkAllConss(), NULL, SCIP_CALL, SCIP_CONSADDED, SCIP_OKAY, SCIPaddConsLocal(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPsetConsChecked(), and TRUE.
Referenced by consdataAddCons(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSENFORELAX().
◆ checkAllConss()
|
static |
checks all constraints in conjunction constraints for feasibility
- Parameters
-
scip SCIP data structure conss active conjunction constraints nconss number of active conjunction constraints sol solution to check checkintegrality Has integrality to be checked? checklprows Do constraints represented by rows in the current LP have to be checked? printreason Should the reason for the violation be printed? completely Should all violations be checked? result pointer to store the result
Definition at line 219 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPcheckCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPinfoMessage(), SCIPprintCons(), and SCIPupdateSolConsViolation().
Referenced by addAllConss(), and SCIP_DECL_CONSCHECK().
◆ SCIP_DECL_CONSHDLRCOPY()
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 281 of file cons_conjunction.c.
References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrConjunction(), and TRUE.
Referenced by checkAllConss().
◆ SCIP_DECL_CONSDELETE()
|
static |
frees specific constraint data
Definition at line 298 of file cons_conjunction.c.
References consdataFree(), SCIP_CALL, SCIP_DECL_CONSTRANS(), and SCIP_OKAY.
Referenced by SCIP_DECL_CONSHDLRCOPY().
◆ SCIP_DECL_CONSTRANS()
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 307 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSENFOLP(), SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), and SCIPtransformCons().
Referenced by SCIP_DECL_CONSDELETE().
◆ SCIP_DECL_CONSENFOLP()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 349 of file cons_conjunction.c.
References addAllConss(), SCIP_CALL, SCIP_DECL_CONSENFORELAX(), SCIP_FEASIBLE, and SCIP_OKAY.
Referenced by SCIP_DECL_CONSTRANS().
◆ SCIP_DECL_CONSENFORELAX()
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 362 of file cons_conjunction.c.
References addAllConss(), SCIP_CALL, SCIP_DECL_CONSENFOPS(), SCIP_FEASIBLE, and SCIP_OKAY.
Referenced by SCIP_DECL_CONSENFOLP().
◆ SCIP_DECL_CONSENFOPS()
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 375 of file cons_conjunction.c.
References addAllConss(), SCIP_CALL, SCIP_DECL_CONSCHECK(), SCIP_FEASIBLE, and SCIP_OKAY.
Referenced by SCIP_DECL_CONSENFORELAX().
◆ SCIP_DECL_CONSCHECK()
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 388 of file cons_conjunction.c.
References checkAllConss(), SCIP_CALL, SCIP_DECL_CONSPRESOL(), SCIP_FEASIBLE, and SCIP_OKAY.
Referenced by SCIP_DECL_CONSENFOPS().
◆ SCIP_DECL_CONSPRESOL()
|
static |
presolving method of constraint handler
Definition at line 401 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelCons(), SCIPreleaseCons(), SCIPsetConsChecked(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIP_DECL_CONSLOCK()
|
static |
variable rounding lock method of constraint handler
Definition at line 457 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddConsLocksType(), and SCIPconsGetData().
Referenced by SCIP_DECL_CONSPRESOL().
◆ SCIP_DECL_CONSPRINT()
|
static |
constraint display method of constraint handler
Definition at line 479 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIPconsGetData(), SCIPinfoMessage(), and SCIPprintCons().
Referenced by SCIP_DECL_CONSLOCK().
◆ SCIP_DECL_CONSPARSE()
|
static |
constraint parsing method of constraint handler
Definition at line 506 of file cons_conjunction.c.
References FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_OKAY, SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPcreateConsConjunction(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPparseCons(), SCIPreallocBufferArray, SCIPreleaseCons(), and TRUE.
Referenced by SCIP_DECL_CONSPRINT().
◆ SCIP_DECL_CONSCOPY()
|
static |
constraint copying method of constraint handler
Definition at line 701 of file cons_conjunction.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsConjunction(), SCIPfreeBufferArray, SCIPgetConsCopy(), SCIPincludeConshdlrConjunction(), SCIPreleaseCons(), and TRUE.
Referenced by SCIP_DECL_CONSPARSE().