reader_ccg.c
Go to the documentation of this file.
20 * Write a weighted column/variable graph, i.e., the nodes correspond to the columns (variables) of
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
134 /** check whether there is enough capacity for one additional edge in the given adjacency list */
155 /** transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant */
160 SCIP_Real* scalars, /**< scalars a_1, ..., a_n inrc/scip/reader_graph.c linear sum a_1*x_1 + ... + a_n*x_n + c */
177 SCIP_CALL( SCIPgetProbvarLinearSum(scip, vars, scalars, nvars, *nvars, constant, &requiredsize, TRUE) );
184 SCIP_CALL( SCIPgetProbvarLinearSum(scip, vars, scalars, nvars, requiredsize, constant, &requiredsize, TRUE) );
320 SCIP_CALL( getActiveVariables(scip, activevars, activevals, &nactivevars, &activeconstant, transformed) );
374 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, NULL) );
392 SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
425 /* in case the transformed is written only constraint are posted which are enabled in the current node */
465 SCIP_CALL( handleLinearCons(scip, SCIPgetVarsLogicor(scip, cons), NULL, SCIPgetNVarsLogicor(scip, cons), transformed, &G) );
506 SCIPwarningMessage(scip, "constraint handler <%s> cannot print requested format\n", conshdlrname );
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
Definition: reader_ccg.c:157
Definition: struct_reader.h:36
Definition: struct_scip.h:58
Constraint handler for variable bound constraints .
public methods for memory management
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
Definition: cons_logicor.c:5283
Definition: type_result.h:49
Definition: struct_var.h:198
public methods for problem variables
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
Definition: cons_knapsack.c:13638
static SCIP_RETCODE ensureEdgeCapacity(SCIP *scip, SparseGraph *G, unsigned int node)
Definition: reader_ccg.c:136
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip_mem.h:138
Constraint handler for the set partitioning / packing / covering constraints .
public methods for SCIP variables
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip_message.c:203
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:279
public methods for managing constraints
Constraint handler for knapsack constraints of the form , x binary and .
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
Definition: cons_varbound.c:4931
Definition: struct_cons.h:37
Definition: struct_cons.h:117
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
Definition: cons_varbound.c:4973
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
Definition: cons_logicor.c:5304
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
Definition: cons_varbound.c:4952
Definition: type_retcode.h:33
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
Definition: scip_var.c:1740
public methods for constraint handler plugins and constraints
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
Definition: scip_reader.c:180
Column connectivity graph file reader (actually, only a writer)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
Definition: scip_cons.c:2550
SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite)))
Definition: scip_reader.c:290
Constraint handler for linear constraints in their most general form, .
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)
Definition: reader_ccg.c:387
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: var.c:12260
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip_reader.c:218
static SCIP_RETCODE createEdgesFromRow(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SparseGraph *G)
Definition: reader_ccg.c:202
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
Definition: cons_setppc.c:9273
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linear.c:18227
public methods for message output
static SCIP_RETCODE initGraph(SCIP *scip, SparseGraph *G, unsigned int nNodes, unsigned int initSize)
Definition: reader_ccg.c:80
public methods for input file readers
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
Definition: cons_knapsack.c:13617
public methods for message handling
static SCIP_RETCODE handleLinearCons(SCIP *scip, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool transformed, SparseGraph *G)
Definition: reader_ccg.c:288
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linear.c:18250
Definition: objbenders.h:33
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
Definition: cons_knapsack.c:13659
public methods for reader plugins
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linear.c:18204
memory allocation routines