Variable data containing the ids of constraints in which the variable appears.
This file implements the handling of the variable data which is attached to each file. See SCIP_VarData and Pricing new variables.
Definition in file vardata_binpacking.c.
Go to the source code of this file.
Functions | |
Local methods | |
static SCIP_RETCODE | vardataCreate (SCIP *scip, SCIP_VARDATA **vardata, int *consids, int nconsids) |
static SCIP_RETCODE | vardataDelete (SCIP *scip, SCIP_VARDATA **vardata) |
Callback methods | |
static | SCIP_DECL_VARDELTRANS (vardataDelTrans) |
Interface methods | |
SCIP_RETCODE | SCIPvardataCreateBinpacking (SCIP *scip, SCIP_VARDATA **vardata, int *consids, int nconsids) |
int | SCIPvardataGetNConsids (SCIP_VARDATA *vardata) |
int * | SCIPvardataGetConsids (SCIP_VARDATA *vardata) |
SCIP_RETCODE | SCIPcreateVarBinpacking (SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real obj, SCIP_Bool initial, SCIP_Bool removable, SCIP_VARDATA *vardata) |
void | SCIPvardataPrint (SCIP *scip, SCIP_VARDATA *vardata, FILE *file) |
|
static |
create a vardata
scip | SCIP data structure |
vardata | pointer to vardata |
consids | array of constraints ids |
nconsids | number of constraints |
Definition at line 47 of file vardata_binpacking.c.
References SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPduplicateBlockMemoryArray, and SCIPsortInt().
Referenced by SCIPvardataCreateBinpacking().
|
static |
frees user data of variable
scip | SCIP data structure |
vardata | vardata to delete |
Definition at line 66 of file vardata_binpacking.c.
References SCIP_OKAY, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArray.
Referenced by SCIP_DECL_VARDELTRANS().
|
static |
frees user data of transformed variable (called when the transformed variable is freed)
Definition at line 87 of file vardata_binpacking.c.
References SCIP_CALL, SCIP_OKAY, and vardataDelete().
SCIP_RETCODE SCIPvardataCreateBinpacking | ( | SCIP * | scip, |
SCIP_VARDATA ** | vardata, | ||
int * | consids, | ||
int | nconsids | ||
) |
create variable data
scip | SCIP data structure |
vardata | pointer to vardata |
consids | array of constraints ids |
nconsids | number of constraints |
Definition at line 103 of file vardata_binpacking.c.
References SCIP_CALL, SCIP_OKAY, and vardataCreate().
Referenced by createInitialColumns(), and SCIP_DECL_PRICERREDCOST().
int SCIPvardataGetNConsids | ( | SCIP_VARDATA * | vardata | ) |
get number of constraints
vardata | variable data |
Definition at line 116 of file vardata_binpacking.c.
Referenced by addFixedVarsConss(), checkVariable(), consdataCheck(), and SCIP_DECL_BRANCHEXECLP().
int* SCIPvardataGetConsids | ( | SCIP_VARDATA * | vardata | ) |
returns sorted constraint id array
vardata | variable data |
Definition at line 124 of file vardata_binpacking.c.
Referenced by addFixedVarsConss(), checkVariable(), consdataCheck(), and SCIP_DECL_BRANCHEXECLP().
SCIP_RETCODE SCIPcreateVarBinpacking | ( | SCIP * | scip, |
SCIP_VAR ** | var, | ||
const char * | name, | ||
SCIP_Real | obj, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
SCIP_VARDATA * | vardata | ||
) |
creates variable
scip | SCIP data structure |
var | pointer to variable object |
name | name of variable, or NULL for automatic name creation |
obj | objective function value |
initial | should var's column be present in the initial root LP? |
removable | is var's column removable from the LP (due to aging or cleanup)? |
vardata | user data for this specific variable |
Definition at line 142 of file vardata_binpacking.c.
References SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPcreateVarBasic(), SCIPdebug, SCIPprintVar(), SCIPvarMarkDeletable(), SCIPvarSetData(), SCIPvarSetDeltransData(), SCIPvarSetInitial(), and SCIPvarSetRemovable().
Referenced by createInitialColumns(), and SCIP_DECL_PRICERREDCOST().
void SCIPvardataPrint | ( | SCIP * | scip, |
SCIP_VARDATA * | vardata, | ||
FILE * | file | ||
) |
prints vardata to file stream
scip | SCIP data structure |
vardata | variable data |
file | the text file to store the information into |
Definition at line 175 of file vardata_binpacking.c.
References SCIPgetProbData(), SCIPinfoMessage(), and SCIPprobdataGetIds().
Referenced by consdataCheck().