Scippy

SCIP

Solving Constraint Integer Programs

vardata_binpacking.c File Reference

Detailed Description

Variable data containing the ids of constraints in which the variable appears.

Author
Timo Berthold
Stefan Heinz

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)
 

Function Documentation

static SCIP_DECL_VARDELTRANS ( vardataDelTrans  )
static

frees user data of transformed variable (called when the transformed variable is freed)

Definition at line 87 of file vardata_binpacking.c.

References vardataDelete().

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

Parameters
scipSCIP data structure
varpointer to variable object
namename of variable, or NULL for automatic name creation
objobjective function value
initialshould var's column be present in the initial root LP?
removableis var's column removable from the LP (due to aging or cleanup)?
vardatauser data for this specific variable

Definition at line 142 of file vardata_binpacking.c.

Referenced by createInitialColumns(), and SCIP_DECL_PRICERREDCOST().

SCIP_RETCODE SCIPvardataCreateBinpacking ( SCIP *  scip,
SCIP_VARDATA **  vardata,
int *  consids,
int  nconsids 
)

create variable data

Parameters
scipSCIP data structure
vardatapointer to vardata
considsarray of constraints ids
nconsidsnumber of constraints

Definition at line 103 of file vardata_binpacking.c.

References vardataCreate().

Referenced by createInitialColumns(), and SCIP_DECL_PRICERREDCOST().

int* SCIPvardataGetConsids ( SCIP_VARDATA *  vardata)

returns sorted constraint id array

Parameters
vardatavariable data

Definition at line 124 of file vardata_binpacking.c.

Referenced by addFixedVarsConss(), checkVariable(), consdataCheck(), and SCIP_DECL_BRANCHEXECLP().

int SCIPvardataGetNConsids ( SCIP_VARDATA *  vardata)

get number of constraints

Parameters
vardatavariable data

Definition at line 116 of file vardata_binpacking.c.

Referenced by addFixedVarsConss(), checkVariable(), consdataCheck(), and SCIP_DECL_BRANCHEXECLP().

void SCIPvardataPrint ( SCIP *  scip,
SCIP_VARDATA *  vardata,
FILE *  file 
)

prints vardata to file stream

Parameters
scipSCIP data structure
vardatavariable data
filethe text file to store the information into

Definition at line 175 of file vardata_binpacking.c.

References SCIP_VarData::nconsids, and SCIPprobdataGetIds().

Referenced by consdataCheck().

static SCIP_RETCODE vardataCreate ( SCIP *  scip,
SCIP_VARDATA **  vardata,
int *  consids,
int  nconsids 
)
static

create a vardata

Parameters
scipSCIP data structure
vardatapointer to vardata
considsarray of constraints ids
nconsidsnumber of constraints

Definition at line 47 of file vardata_binpacking.c.

References SCIP_VarData::nconsids.

Referenced by SCIPvardataCreateBinpacking().

static SCIP_RETCODE vardataDelete ( SCIP *  scip,
SCIP_VARDATA **  vardata 
)
static

frees user data of variable

Parameters
scipSCIP data structure
vardatavardata to delete

Definition at line 66 of file vardata_binpacking.c.

Referenced by SCIP_DECL_VARDELTRANS().