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 |
| #define CONSHDLR_NAME "conjunction" |
Definition at line 49 of file cons_conjunction.c.
| #define CONSHDLR_DESC "conjunction of constraints" |
Definition at line 50 of file cons_conjunction.c.
| #define CONSHDLR_ENFOPRIORITY +900000 |
priority of the constraint handler for constraint enforcing
Definition at line 51 of file cons_conjunction.c.
| #define CONSHDLR_CHECKPRIORITY -900000 |
priority of the constraint handler for checking feasibility
Definition at line 52 of file cons_conjunction.c.
| #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 53 of file cons_conjunction.c.
| #define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 55 of file cons_conjunction.c.
| #define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 56 of file cons_conjunction.c.
| #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
Definition at line 58 of file cons_conjunction.c.
|
static |
creates conjunction constraint data, captures initial constraints of conjunction
| scip | SCIP data structure |
| consdata | pointer to constraint data |
| conss | initial constraint in conjunction |
| nconss | number of initial constraints in conjunction |
Definition at line 79 of file cons_conjunction.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcaptureCons(), SCIPduplicateBlockMemoryArray, SCIPisTransformed(), and SCIPtransformConss().
Referenced by SCIPcreateConsConjunction().
|
static |
frees constraint data and releases all constraints in conjunction
| scip | SCIP data structure |
| consdata | pointer to constraint data |
Definition at line 121 of file cons_conjunction.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, and SCIPreleaseCons().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
adds constraint to conjunction
| scip | SCIP data structure |
| consdata | constraint data |
| cons | constraint to add to the conjunction |
Definition at line 146 of file cons_conjunction.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureCons(), SCIPensureBlockMemoryArray, SCIPisTransformed(), and SCIPtransformCons().
Referenced by SCIPaddConsElemConjunction().
|
static |
adds all constraints in conjunction constraints to the problem; disables unmodifiable conjunction constraints
| scip | SCIP data structure |
| conss | active conjunction constraints |
| nconss | number of active conjunction constraints |
| result | pointer to store the result |
Definition at line 178 of file cons_conjunction.c.
References assert(), c, i, NULL, result, SCIP_CALL, SCIP_CONSADDED, SCIP_OKAY, SCIPaddConsLocal(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPsetConsChecked(), and TRUE.
Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSENFORELAX().
|
static |
checks all constraints in conjunction constraints for feasibility
| 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 227 of file cons_conjunction.c.
References assert(), c, i, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPcheckCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPinfoMessage(), SCIPprintCons(), SCIPupdateSolConsViolation(), and sol.
Referenced by SCIP_DECL_CONSCHECK().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 289 of file cons_conjunction.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrConjunction(), TRUE, and valid.
|
static |
frees specific constraint data
Definition at line 306 of file cons_conjunction.c.
References consdataFree(), SCIP_CALL, and SCIP_OKAY.
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 315 of file cons_conjunction.c.
References c, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), and SCIPtransformCons().
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 357 of file cons_conjunction.c.
References addAllConss(), result, SCIP_CALL, SCIP_FEASIBLE, and SCIP_OKAY.
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 370 of file cons_conjunction.c.
References addAllConss(), result, SCIP_CALL, SCIP_FEASIBLE, and SCIP_OKAY.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 383 of file cons_conjunction.c.
References addAllConss(), result, SCIP_CALL, SCIP_FEASIBLE, and SCIP_OKAY.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 396 of file cons_conjunction.c.
References checkAllConss(), result, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, and sol.
|
static |
presolving method of constraint handler
Definition at line 409 of file cons_conjunction.c.
References assert(), c, i, NULL, result, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelCons(), SCIPreleaseCons(), SCIPsetConsChecked(), and TRUE.
|
static |
variable rounding lock method of constraint handler
Definition at line 465 of file cons_conjunction.c.
References assert(), c, NULL, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddConsLocksType(), and SCIPconsGetData().
|
static |
constraint display method of constraint handler
Definition at line 487 of file cons_conjunction.c.
References assert(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPinfoMessage(), and SCIPprintCons().
|
static |
constraint parsing method of constraint handler
Definition at line 514 of file cons_conjunction.c.
References assert(), FALSE, NULL, propagate, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPcreateConsConjunction(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPparseCons(), SCIPreallocBufferArray, SCIPreleaseCons(), separate(), and TRUE.
|
static |
constraint copying method of constraint handler
Definition at line 709 of file cons_conjunction.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsConjunction(), SCIPfreeBufferArray, SCIPgetConsCopy(), SCIPreleaseCons(), TRUE, and valid.