Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Constraint handler for linear constraints in their most general form, \(lhs <= a^T x <= rhs\).

Author
Tobias Achterberg
Timo Berthold
Marc Pfetsch
Kati Wolter

Definition in file cons_linear.h.

#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_lp.h"
#include "scip/type_misc.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sol.h"
#include "scip/type_var.h"

Go to the source code of this file.

Functions

SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrLinear (SCIP *scip)
 

Linear Constraints

This constraint handler handles linear constraints in their most general form. That is,

\[ lhs \leq \sum_{i=1}^n a_i x_i \leq rhs \]

with \(a_i \in Q, i = 1,\dots,n\), \(lhs\in Q \cup \{-\infty\}\), \(rhs\in Q \cup \{\infty\}\), and decision variables \(x_i, i = 1,\dots,n\) which can be binary, integer, or continuous.

Furthermore, this header offers the upgrade functionality of a general linear constraint into a more specific constraint, such as a knapsack constraint, via SCIP_DECL_LINCONSUPGD() and SCIPincludeLinconsUpgrade()

#define SCIP_DECL_LINCONSUPGD(x)
 
typedef struct SCIP_LinConsUpgrade SCIP_LINCONSUPGRADE
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeLinconsUpgrade (SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPcopyConsLinear (SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPdelCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgLhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgRhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
 
SCIP_EXPORT int SCIPgetNVarsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetValsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetActivityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPgetFeasibilityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPupgradeConsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons)
 
SCIP_EXPORT SCIP_RETCODE SCIPclassifyConstraintTypesLinear (SCIP *scip, SCIP_LINCONSSTATS *linconsstats)