61#define READER_NAME "ccgreader"
62#define READER_DESC "file writer for column connectivity graph file format"
63#define READER_EXTENSION "ccg"
107 for(
i = 0;
i < nNodes; ++
i )
110 G->size[
i] = initSize;
131 for(
i = 0;
i < G->n; ++
i )
152 if( G->deg[node] + 2 > G->size[node] )
154 unsigned int newSize;
155 newSize = G->size[node] * 2;
158 G->size[node] = newSize;
173 SCIP_Bool transformed
189 if( requiredsize > *
nvars )
200 for( v = 0; v < *
nvars; ++v )
238 for( j =
i+1; j <
nvars; ++j )
258 assert( k <= G->size[s] );
267 assert( G->A[s][k] == -1 );
278 assert( G->A[t][k] == -1 );
303 SCIP_Bool transformed,
309 SCIP_Real* activevals;
311 SCIP_Real activeconstant = 0.0;
325 for( v = 0; v < nactivevars; ++v )
401 SCIP_Bool transformed,
414 const char* conshdlrname;
431 for(
c = 0;
c < nconss; ++
c)
445 if( strcmp(conshdlrname,
"linear") == 0 )
457 else if( strcmp(conshdlrname,
"setppc") == 0 )
468 else if( strcmp(conshdlrname,
"logicor") == 0 )
479 else if( strcmp(conshdlrname,
"knapsack") == 0 )
490 for( v = 0; v < nconsvars; ++v )
491 consvals[v] = (SCIP_Real)
w[v];
499 else if( strcmp(conshdlrname,
"varbound") == 0 )
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for linear constraints in their most general form, .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
Constraint handler for the set partitioning / packing / covering constraints .
Constraint handler for variable bound constraints .
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPwriteCcg(SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
SCIP_RETCODE SCIPincludeReaderCcg(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
int SCIPvarGetProbindex(SCIP_VAR *var)
assert(minobj< SCIPgetCutoffbound(scip))
static const SCIP_Real scalars[]
memory allocation routines
public methods for managing constraints
public methods for message output
public methods for input file readers
public methods for problem variables
static SCIP_RETCODE createEdgesFromRow(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SparseGraph *G)
static SCIP_RETCODE initGraph(SCIP *scip, SparseGraph *G, unsigned int nNodes, unsigned int initSize)
struct sparseGraph SparseGraph
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
static SCIP_RETCODE ensureEdgeCapacity(SCIP *scip, SparseGraph *G, unsigned int node)
static SCIP_RETCODE handleLinearCons(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool transformed, SparseGraph *G)
static void freeGraph(SCIP *scip, SparseGraph *G)
Column connectivity graph file reader (actually, only a writer)
public methods for constraint handler plugins and constraints
public methods for memory management
public methods for message handling
public methods for reader plugins
public methods for SCIP variables
#define SCIP_DECL_READERWRITE(x)
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE