93 #define PRESOL_NAME "qpkktref" 94 #define PRESOL_DESC "adds KKT conditions to (mixed-binary) quadratic programs" 95 #define PRESOL_PRIORITY -1 97 #define PRESOL_MAXROUNDS -1 99 #define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM 107 struct SCIP_PresolData
128 const char* namepart,
146 assert( scip !=
NULL );
147 assert( namepart !=
NULL );
148 assert( vars !=
NULL );
149 assert( vals !=
NULL );
150 assert( dualvar !=
NULL );
153 assert( naddconss !=
NULL );
194 *naddconss = *naddconss + 2;
225 assert( scip !=
NULL );
226 assert( var !=
NULL );
227 assert( dualvar !=
NULL );
230 assert( naddconss !=
NULL );
290 *naddconss = *naddconss + 2;
320 assert( scip !=
NULL );
321 assert( var !=
NULL );
322 assert( dualbin1 !=
NULL );
323 assert( dualbin2 !=
NULL );
324 assert( naddconss !=
NULL );
331 assert( slackbin1 !=
NULL );
364 assert( slackbin2 !=
NULL );
423 assert( scip !=
NULL );
424 assert( objcons !=
NULL );
425 assert( var !=
NULL );
426 assert( varhash !=
NULL );
427 assert( dualconss !=
NULL );
428 assert( ndualconss !=
NULL );
429 assert( naddconss !=
NULL );
436 *dualcons = dualconss[ind];
457 assert( dualbin1 !=
NULL );
466 assert( dualbin2 !=
NULL );
476 assert( duallb !=
NULL );
486 assert( dualub !=
NULL );
500 dualconss[(*ndualconss)++] = *dualcons;
543 assert( *dualcons !=
NULL );
564 const char* namepart,
578 assert( scip !=
NULL );
579 assert( objcons !=
NULL );
580 assert( namepart !=
NULL );
581 assert( varhash !=
NULL );
582 assert( dualconss !=
NULL );
583 assert( ndualconss !=
NULL );
584 assert( vars !=
NULL );
585 assert( vals !=
NULL );
586 assert( namepart !=
NULL );
587 assert( naddconss !=
NULL );
590 for( i = 0; i < 2; ++i )
641 assert( duallin !=
NULL );
645 for( j = 0; j < nvars; ++j )
655 assert( dualcons !=
NULL );
693 assert( scip !=
NULL );
694 assert( objcons !=
NULL );
695 assert( varhash !=
NULL );
696 assert( dualconss !=
NULL );
697 assert( ndualconss !=
NULL );
698 assert( naddconss !=
NULL );
699 assert( ndelconss !=
NULL );
702 for( c = 0; c < nlinconss; ++c )
712 lincons = savelinconss[c];
713 assert( lincons !=
NULL );
722 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
727 for( c = nlinconss-1; c >= 0; --c )
731 lincons = savelinconss[c];
732 assert( savelinconss[c] !=
NULL );
763 assert( scip !=
NULL );
764 assert( objcons !=
NULL );
765 assert( varhash !=
NULL );
766 assert( dualconss !=
NULL );
767 assert( ndualconss !=
NULL );
768 assert( naddconss !=
NULL );
769 assert( ndelconss !=
NULL );
772 if( conshdlr ==
NULL )
779 for( c = 0; c < nconss; ++c )
792 assert( cons !=
NULL );
801 for( v = 0; v < nvars; ++v )
806 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
814 for( c = nconss-1; c >= 0; --c )
816 assert( conss[c] !=
NULL );
843 assert( scip !=
NULL );
844 assert( objcons !=
NULL );
845 assert( varhash !=
NULL );
846 assert( dualconss !=
NULL );
847 assert( ndualconss !=
NULL );
848 assert( naddconss !=
NULL );
849 assert( ndelconss !=
NULL );
852 if( conshdlr ==
NULL )
859 for( c = 0; c < nconss; ++c )
872 assert( cons !=
NULL );
900 for( v = 0; v < nvars; ++v )
905 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
913 for( c = nconss-1; c >= 0; --c )
915 assert( conss[c] !=
NULL );
949 assert( scip !=
NULL );
950 assert( objcons !=
NULL );
951 assert( varhash !=
NULL );
952 assert( dualconss !=
NULL );
953 assert( ndualconss !=
NULL );
954 assert( naddconss !=
NULL );
955 assert( ndelconss !=
NULL );
958 if( conshdlr ==
NULL )
965 for( c = 0; c < nconss; ++c )
980 assert( cons !=
NULL );
992 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
1001 for( c = nconss-1; c >= 0; --c )
1006 assert( cons !=
NULL );
1037 assert( scip !=
NULL );
1038 assert( objcons !=
NULL );
1039 assert( varhash !=
NULL );
1040 assert( dualconss !=
NULL );
1041 assert( ndualconss !=
NULL );
1042 assert( naddconss !=
NULL );
1043 assert( ndelconss !=
NULL );
1046 if( conshdlr ==
NULL )
1053 for( c = 0; c < nconss; ++c )
1065 assert( cons !=
NULL );
1076 for( v = 0; v < nvars; ++v )
1081 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
1089 for( c = nconss-1; c >= 0; --c )
1091 assert( conss[c] !=
NULL );
1118 assert( scip !=
NULL );
1119 assert( objcons !=
NULL );
1120 assert( agrvars !=
NULL );
1121 assert( varhash !=
NULL );
1122 assert( dualconss !=
NULL );
1123 assert( ndualconss !=
NULL );
1124 assert( naddconss !=
NULL );
1127 for( v = 0; v < nagrvars; ++v )
1165 nbuffer = nmultvars+1;
1176 for( j = 0; j < nmultvars; ++j )
1178 vars[j] = multvars[j];
1179 vals[j] = scalars[j];
1183 vars[nmultvars] = var;
1184 vals[nmultvars] = -1.0;
1187 nvars = nmultvars + 1;
1242 vars, vals, lhs, rhs, nvars, varhash, dualconss, ndualconss, naddconss) );
1278 assert( scip !=
NULL );
1279 assert( objcons !=
NULL );
1280 assert( varhash !=
NULL );
1281 assert( dualconss !=
NULL );
1282 assert( ndualconss !=
NULL );
1283 assert( naddconss !=
NULL );
1286 if( bilinterms ==
NULL )
1290 for( j = 0; j < nbilinterms; ++j )
1295 for( i = 0; i < 2; ++i )
1303 bilvar1 = bilinterms[j].
var1;
1304 bilvar2 = bilinterms[j].
var2;
1308 bilvar1 = bilinterms[j].
var2;
1309 bilvar2 = bilinterms[j].
var1;
1315 assert( dualcons !=
NULL );
1352 assert( scip !=
NULL );
1353 assert( objcons !=
NULL );
1354 assert( varhash !=
NULL );
1355 assert( dualconss !=
NULL );
1356 assert( ndualconss !=
NULL );
1357 assert( naddconss !=
NULL );
1360 if( quadterms ==
NULL )
1364 for( j = 0; j < nquadterms; ++j )
1369 quadvar = quadterms[j].
var;
1374 assert( dualcons !=
NULL );
1415 assert( scip !=
NULL );
1416 assert( objcons !=
NULL );
1417 assert( lintermcoefs !=
NULL );
1418 assert( varhash !=
NULL );
1419 assert( objvar !=
NULL );
1420 assert( dualconss !=
NULL );
1421 assert( ndualconss !=
NULL );
1422 assert( naddconss !=
NULL );
1425 if( lintermvars !=
NULL )
1427 assert( lintermcoefs !=
NULL );
1428 for( j = 0; j < nlintermvars; ++j )
1432 var = lintermvars[j];
1442 assert( dualcons !=
NULL );
1445 coef = lintermcoefs[j];
1459 if( quadterms !=
NULL )
1461 for( j = 0; j < nquadterms; ++j )
1468 var = quadterms[j].
var;
1470 assert( var != objvar );
1476 dualcons = dualconss[ind];
1477 assert( dualcons !=
NULL );
1574 if( conshdlr !=
NULL )
1578 if( conshdlr !=
NULL )
1582 if( conshdlr !=
NULL )
1586 if( conshdlr !=
NULL )
1590 if( conshdlr !=
NULL )
1622 if( maydecrease < 0 && mayincrease < 0 )
1624 else if( maydecrease >= 0 )
1626 objind = maydecrease;
1630 objind = mayincrease;
1633 objind = mayincrease;
1636 *objvar = lintermvars[objind];
1637 coef = lintermcoefs[objind];
1661 *objrhs = (*objrhs)/(*scale);
1693 assert(presol !=
NULL);
1711 assert(presoldata !=
NULL);
1754 assert( scip !=
NULL );
1755 assert( naddconss !=
NULL );
1756 assert( ndelconss !=
NULL );
1766 assert( cons !=
NULL );
1772 assert(presoldata !=
NULL);
1779 SCIPdebugMsg(scip,
"quadratic constraint update failed, since matrix associated to quadratic constraint <%s> is not \ 1794 assert( objvar !=
NULL );
1800 if( linconshdlr !=
NULL )
1822 if( presoldata->updatequadbounded )
1825 for( j = 0; j < nlintermvars; ++j )
1829 var = lintermvars[j];
1830 if( var != objvar &&
1834 SCIPdebugMsg(scip,
"failed adding the KKT conditions, since not all variables to quadratic constraint <%s> are \ 1841 for( j = 0; j < nbilinterms; ++j )
1846 bilvar1 = bilinterms[j].
var1;
1847 bilvar2 = bilinterms[j].
var2;
1851 SCIPdebugMsg(scip,
"failed adding the KKT conditions, since not all variables to quadratic constraint <%s> \ 1858 for( j = 0; j < nquadterms; ++j )
1862 var = quadterms[j].
var;
1867 SCIPdebugMsg(scip,
"failed adding the KKT conditions, since not all variables to quadratic constraint <%s> \ 1884 if( linconss !=
NULL )
1901 if( savelinconss !=
NULL )
1904 naddconss, ndelconss) );
1923 varhash, dualconss, &ndualconss, naddconss) );
1928 &ndualconss, naddconss) );
1932 &ndualconss, naddconss) );
1936 varhash, objvar, scale, dualconss, &ndualconss, naddconss) );
1945 for( j = 0; j < ndualconss; ++j )
1950 *naddconss = *naddconss + ndualconss;
1960 SCIPdebugMsg(scip,
"added the KKT conditions to the mixed-binary quadratic program\n");
1962 SCIPdebugMsg(scip,
"added the KKT conditions to the quadratic program\n");
1988 assert(presol !=
NULL);
1996 "if TRUE then allow binary variables for KKT update",
2000 "if TRUE then only apply the update to QPs with bounded variables; if the variables are not bounded then a \ 2001 finite optimal solution might not exist and the KKT conditions would then be invalid",
2005 "if TRUE then apply quadratic constraint update even if the quadratic constraint matrix is known to be indefinite",
SCIP_VAR ** SCIPgetLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE createKKTComplementarityLinear(SCIP *scip, const char *namepart, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars, SCIP_VAR *dualvar, SCIP_Bool takelhs, int *naddconss)
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
int SCIPgetNIntVars(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
struct SCIP_PresolData SCIP_PRESOLDATA
static SCIP_RETCODE presolveAddKKTQuadBilinearTerms(SCIP *scip, SCIP_CONS *objcons, SCIP_BILINTERM *bilinterms, int nbilinterms, SCIP_HASHMAP *varhash, SCIP_Real scale, SCIP_CONS **dualconss, int *ndualconss, int *naddconss)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLFREE((*presolfree)))
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_PRESOLCOPY(presolCopyQPKKTref)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
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)
Constraint handler for variable bound constraints .
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
static SCIP_RETCODE presolveAddKKTLogicorConss(SCIP *scip, SCIP_CONS *objcons, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss, int *ndelconss)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE presolveAddKKTKnapsackConss(SCIP *scip, SCIP_CONS *objcons, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss, int *ndelconss)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
static SCIP_RETCODE createKKTComplementarityBounds(SCIP *scip, SCIP_VAR *var, SCIP_VAR *dualvar, SCIP_Bool takelb, int *naddconss)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPincludePresolQPKKTref(SCIP *scip)
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
static SCIP_RETCODE presolveAddKKTLinearCons(SCIP *scip, SCIP_CONS *objcons, const char *namepart, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
static SCIP_RETCODE createKKTDualCons(SCIP *scip, SCIP_CONS *objcons, SCIP_VAR *var, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, SCIP_CONS **dualcons, int *naddconss)
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNFixedVars(SCIP *scip)
SCIP_VAR ** SCIPgetFixedVars(SCIP *scip)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
static SCIP_DECL_PRESOLEXEC(presolExecQPKKTref)
SCIP_Bool SCIPisConcaveQuadratic(SCIP *scip, SCIP_CONS *cons)
Constraint handler for knapsack constraints of the form , x binary and .
static SCIP_RETCODE presolveAddKKTQuadLinearTerms(SCIP *scip, SCIP_CONS *objcons, SCIP_VAR **lintermvars, SCIP_Real *lintermcoefs, int nlintermvars, SCIP_QUADVARTERM *quadterms, int nquadterms, SCIP_HASHMAP *varhash, SCIP_VAR *objvar, SCIP_Real scale, SCIP_CONS **dualconss, int *ndualconss, int *naddconss)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE presolveAddKKTAggregatedVars(SCIP *scip, SCIP_CONS *objcons, SCIP_VAR **agrvars, int nagrvars, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
static SCIP_RETCODE presolveAddKKTQuadQuadraticTerms(SCIP *scip, SCIP_CONS *objcons, SCIP_QUADVARTERM *quadterms, int nquadterms, SCIP_HASHMAP *varhash, SCIP_Real scale, SCIP_CONS **dualconss, int *ndualconss, int *naddconss)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_Real * SCIPgetCoefsLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
#define SCIPfreeBufferArrayNull(scip, ptr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
int SCIPgetLinvarMayDecreaseQuadratic(SCIP *scip, SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
const char * SCIPvarGetName(SCIP_VAR *var)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
constraint handler for quadratic constraints
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
static SCIP_RETCODE presolveAddKKTLinearConss(SCIP *scip, SCIP_CONS *objcons, SCIP_CONS **savelinconss, int nlinconss, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss, int *ndelconss)
SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIPallocBufferArray(scip, ptr, num)
static SCIP_RETCODE checkConsQuadraticProblem(SCIP *scip, SCIP_CONSHDLR *quadconshdlr, SCIP_CONS *cons, SCIP_Bool allowbinary, SCIP_VAR **objvar, SCIP_Real *scale, SCIP_Real *objrhs, SCIP_Bool *isqp)
static SCIP_RETCODE createKKTComplementarityBinary(SCIP *scip, SCIP_VAR *var, SCIP_VAR *dualbin1, SCIP_VAR *dualbin2, int *naddconss)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
static SCIP_DECL_PRESOLFREE(presolFreeQPKKTref)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
static SCIP_RETCODE presolveAddKKTSetppcConss(SCIP *scip, SCIP_CONS *objcons, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss, int *ndelconss)
Constraint handler for linear constraints in their most general form, .
int SCIPgetNObjVars(SCIP *scip)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
int SCIPgetNBinVars(SCIP *scip)
SCIP_RETCODE SCIPcreateConsBasicSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPcheckCurvatureQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPgetLinvarMayIncreaseQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
enum SCIP_SetppcType SCIP_SETPPCTYPE
static const SCIP_Real scalars[]
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
constraint handler for SOS type 1 constraints
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE presolveAddKKTVarboundConss(SCIP *scip, SCIP_CONS *objcons, SCIP_HASHMAP *varhash, SCIP_CONS **dualconss, int *ndualconss, int *naddconss, int *ndelconss)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisConvexQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)