scip_misc.c File Reference

Detailed Description

various SCIP helper methods

Author
Martin Bergner

Definition in file scip_misc.c.

#include "scip_misc.h"
#include "scip/scipdefplugins.h"
#include <string.h>
#include "scip/cons_indicator.h"

Go to the source code of this file.

Functions

SCIP_Bool GCGisVarRelevant (SCIP_VAR *var)
 
consType GCGconsGetType (SCIP_CONS *cons)
 
SCIP_Real GCGconsGetRhs (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real GCGconsGetLhs (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real GCGconsGetDualfarkas (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real GCGconsGetDualsol (SCIP *scip, SCIP_CONS *cons)
 
int GCGconsGetNVars (SCIP *scip, SCIP_CONS *cons)
 
SCIP_RETCODE GCGconsGetVars (SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars)
 
SCIP_RETCODE GCGconsGetVals (SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int nvals)
 
SCIP_Bool GCGconsIsRanged (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Bool GCGgetConsIsSetppc (SCIP *scip, SCIP_CONS *cons, SCIP_SETPPCTYPE *setppctype)
 
SCIP_Bool GCGgetConsIsCardinalityCons (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Bool GCGisRootNode (SCIP *scip)
 

Function Documentation

SCIP_Real GCGconsGetDualfarkas ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns the dual farkas sol of an arbitrary SCIP constraint

Parameters
scipSCIP data structure
consconstraint to get left hand side for

Definition at line 302 of file scip_misc.c.

SCIP_Real GCGconsGetDualsol ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns the dual sol of an arbitrary SCIP constraint

Parameters
scipSCIP data structure
consconstraint to get left hand side for

Definition at line 367 of file scip_misc.c.

Referenced by gcg::sort_pred::operator()().

SCIP_Real GCGconsGetLhs ( SCIP *  scip,
SCIP_CONS *  cons 
)
SCIP_Real GCGconsGetRhs ( SCIP *  scip,
SCIP_CONS *  cons 
)
consType GCGconsGetType ( SCIP_CONS *  cons)

returns the type of an arbitrary SCIP constraint

Parameters
consconstraint to get type for

Definition at line 51 of file scip_misc.c.

References knapsack, linear, logicor, setcovering, setpacking, setpartitioning, sos1, sos2, unknown, and varbound.

Referenced by gcg::Seeedpool::createConsClassifierForSCIPConstypes(), DEC_DECL_PROPAGATESEEED(), GCGgetConsIsCardinalityCons(), GCGgetConsIsSetppc(), gcg::Seeed::getScore(), and isConsMaster().

SCIP_RETCODE GCGconsGetVals ( SCIP *  scip,
SCIP_CONS *  cons,
SCIP_Real *  vals,
int  nvals 
)

Returns the value array of an arbitrary SCIP constraint

Todo:
SOS1 & SOS2 not implemented yet

indicator conss : s - My <= 0

slack variable first

Parameters
scipSCIP data structure
consconstraint to get values from
valsarray where values are stored
nvalssize of storage array

Definition at line 620 of file scip_misc.c.

Referenced by buildProblem(), gcg::Seeed::checkConsistency(), computeConssNzeros(), gcg::Seeedpool::createConsClassifierForMiplibConstypes(), createGraph(), createMasterprobConss(), DEC_DECL_PROPAGATESEEED(), DECgetVarLockData(), GCGgetConsIsCardinalityCons(), GCGgetConsIsSetppc(), GCGprintMiplibBaseInformation(), isConsMaster(), gcg::Seeedpool::Seeedpool(), setupArrays(), setuparrays(), and updateBranchingConss().

SCIP_RETCODE GCGconsGetVars ( SCIP *  scip,
SCIP_CONS *  cons,
SCIP_VAR **  vars,
int  nvars 
)
SCIP_Bool GCGconsIsRanged ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns true if the constraint should be a master constraint and false otherwise

Parameters
scipSCIP data structure
consconstraint to check

Definition at line 743 of file scip_misc.c.

References GCGconsGetLhs(), and GCGconsGetRhs().

Referenced by gcg::Seeed::getComponentInformation(), gcg::Seeedpool::getNTotalConss(), and gcg::Seeedpool::getNTotalNonzeros().

SCIP_Bool GCGgetConsIsCardinalityCons ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns true if the constraint should be a master constraint and false otherwise

Parameters
scipSCIP data structure
consconstraint to check

Definition at line 848 of file scip_misc.c.

References GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetType(), GCGconsGetVals(), GCGconsGetVars(), and setpartitioning.

Referenced by gcg::Seeedpool::isConsCardinalityCons().

SCIP_Bool GCGgetConsIsSetppc ( SCIP *  scip,
SCIP_CONS *  cons,
SCIP_SETPPCTYPE *  setppctype 
)

returns true if the constraint should be a master constraint and false otherwise

Parameters
scipSCIP data structure
consconstraint to check
setppctypereturns the type of the constraints

Definition at line 762 of file scip_misc.c.

References GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetType(), GCGconsGetVals(), GCGconsGetVars(), logicor, setcovering, and setpartitioning.

Referenced by checkSetppcStructure(), gcg::Seeedpool::isConsSetpp(), and gcg::Seeedpool::isConsSetppc().

SCIP_Bool GCGisRootNode ( SCIP *  scip)

returns TRUE or FALSE, depending whether we are in the root node or not

Parameters
scipSCIP data structure

Definition at line 920 of file scip_misc.c.

Referenced by GCGmasterGetDegeneracy(), ReducedCostPricing::getMaxcolsprob(), ReducedCostPricing::getMaxcolsround(), ReducedCostPricing::getRelmaxprobs(), and ObjPricerGcg::priceNewVariables().