internal miscellaneous methods for linear constraints
Definition in file pub_misc_linear.h.
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_cons.h"
#include "scip/type_lp.h"
#include "scip/type_var.h"
Go to the source code of this file.
Functions | |
SCIP_Real | SCIPconsGetRhs (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success) |
SCIP_Real | SCIPconsGetLhs (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success) |
SCIP_RETCODE | SCIPgetConsVals (SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int varssize, SCIP_Bool *success) |
void | SCIPconsGetDualfarkas (SCIP *scip, SCIP_CONS *cons, SCIP_Real *dualfarkas, SCIP_Bool *success) |
void | SCIPconsGetDualsol (SCIP *scip, SCIP_CONS *cons, SCIP_Real *dualsol, SCIP_Bool *success) |
SCIP_ROW * | SCIPconsGetRow (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPconsAddCoef (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
returns the right-hand side of an arbitrary SCIP constraint that can be represented as a single linear constraint
scip | SCIP data structure |
cons | constraint for which right-hand side is queried |
success | pointer to store whether a valid right-hand side was returned |
Definition at line 48 of file misc_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetCapacityKnapsack(), SCIPgetRhsLinear(), SCIPgetRhsVarbound(), SCIPgetTypeSetppc(), SCIPinfinity(), SCIPwarningMessage(), and TRUE.
Referenced by addSlackVars(), createBlockproblem(), determineTotalNumberLinearConss(), hasUnfixedSCIndicator(), initCurrent(), and SCIP_DECL_DIVESETGETSCORE().
returns the left-hand side of an arbitrary SCIP constraint that can be represented as a single linear constraint
scip | SCIP data structure |
cons | constraint to get left-hand side for |
success | pointer to store whether a valid left-hand side was returned |
Definition at line 112 of file misc_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetLhsLinear(), SCIPgetLhsVarbound(), SCIPgetTypeSetppc(), SCIPinfinity(), SCIPwarningMessage(), and TRUE.
Referenced by addSlackVars(), createBlockproblem(), determineTotalNumberLinearConss(), initCurrent(), and SCIP_DECL_DIVESETGETSCORE().
SCIP_RETCODE SCIPgetConsVals | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real * | vals, | ||
int | varssize, | ||
SCIP_Bool * | success ) |
returns the value array of an arbitrary SCIP constraint that can be represented as a single linear constraint
scip | SCIP data structure |
cons | constraint for which the coefficients are wanted |
vals | array to store the coefficients of the constraint |
varssize | available slots in vals array needed to check if the array is large enough |
success | pointer to store whether the coefficients are successfully copied |
Definition at line 179 of file misc_linear.c.
References assert(), FALSE, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetConsNVars(), SCIPgetValsLinear(), SCIPgetVbdcoefVarbound(), SCIPgetWeightsKnapsack(), SCIPgetWeightsSOS1(), SCIPgetWeightsSOS2(), SCIPwarningMessage(), and TRUE.
Referenced by createBlockproblem(), hasUnfixedSCIndicator(), initCurrent(), roundPartition(), and SCIP_DECL_DIVESETGETSCORE().
void SCIPconsGetDualfarkas | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real * | dualfarkas, | ||
SCIP_Bool * | success ) |
returns the dual farkas solution of an arbitrary SCIP constraint that can be represented as a single linear constraint
returns the dual farkas sol of an arbitrary SCIP constraint that can be represented as a single linear constraint
scip | SCIP data structure |
cons | constraint to get the dual farkas solution for |
dualfarkas | pointer to store the dual farkas solution |
success | pointer to store whether the dual farkas solution is successfully returned |
Definition at line 301 of file misc_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetDualfarkasKnapsack(), SCIPgetDualfarkasLinear(), SCIPgetDualfarkasLogicor(), SCIPgetDualfarkasSetppc(), SCIPgetDualfarkasVarbound(), SCIPwarningMessage(), and TRUE.
returns the dual solution of an arbitrary SCIP constraint that can be represented as a single linear constraint
returns the dual sol of an arbitrary SCIP constraint that can be represented as a single linear constraint
scip | SCIP data structure |
cons | constraint to get the dual solution for |
dualsol | pointer to store the dual solution |
success | pointer to store whether the dual solution is successfully returned |
Definition at line 357 of file misc_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetDualsolKnapsack(), SCIPgetDualsolLinear(), SCIPgetDualsolLogicor(), SCIPgetDualsolSetppc(), SCIPgetDualsolVarbound(), SCIPwarningMessage(), and TRUE.
returns the row of an arbitrary SCIP constraint that can be represented as a single linear constraint or NULL of no row is available
scip | SCIP data structure |
cons | constraint for which row is queried |
Definition at line 412 of file misc_linear.c.
References assert(), NULL, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetRowKnapsack(), SCIPgetRowLinear(), SCIPgetRowLogicor(), SCIPgetRowSetppc(), and SCIPgetRowVarbound().
Referenced by getOriginalRows().
SCIP_RETCODE SCIPconsAddCoef | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val ) |
adds the given variable to the input constraint. If the constraint is setppc or logicor the value is ignored. If the constraint is knapsack, then the value is converted to an int. A warning is passed if the SCIP_Real is not an integer. TODO: Allow val to be a pointer.
scip | SCIP data structure |
cons | constraint for which row is queried |
var | variable of the constraint entry |
val | the coefficient of the constraint entry |
Definition at line 456 of file misc_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPaddCoefKnapsack(), SCIPaddCoefLinear(), SCIPaddCoefLogicor(), SCIPaddCoefSetppc(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPisIntegral(), and var.
Referenced by addSlackVars().