Scippy

SCIP

Solving Constraint Integer Programs

Sparse solution

Detailed Description

Functions

SCIP_RETCODE SCIPsparseSolCreate (SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared)
 
void SCIPsparseSolFree (SCIP_SPARSESOL **sparsesol)
 
SCIP_VAR ** SCIPsparseSolGetVars (SCIP_SPARSESOL *sparsesol)
 
int SCIPsparseSolGetNVars (SCIP_SPARSESOL *sparsesol)
 
SCIP_LongintSCIPsparseSolGetLbs (SCIP_SPARSESOL *sparsesol)
 
SCIP_LongintSCIPsparseSolGetUbs (SCIP_SPARSESOL *sparsesol)
 
void SCIPsparseSolGetFirstSol (SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
 
SCIP_Bool SCIPsparseSolGetNextSol (SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
 

Function Documentation

SCIP_RETCODE SCIPsparseSolCreate ( SCIP_SPARSESOL **  sparsesol,
SCIP_VAR **  vars,
int  nvars,
SCIP_Bool  cleared 
)

creates a sparse solution

Parameters
sparsesolpointer to store the created sparse solution
varsvariables in the sparse solution, must not contain continuous variables
nvarsnumber of variables to store, size of the lower and upper bound arrays
clearedshould the lower and upper bound arrays be cleared (entries set to 0)

Definition at line 319 of file misc.c.

References BMSallocClearMemoryArray, BMSallocMemory, BMSallocMemoryArray, BMSduplicateMemoryArray, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by collectSolution().

void SCIPsparseSolFree ( SCIP_SPARSESOL **  sparsesol)

frees priority queue, but not the data elements themselves

Parameters
sparsesolpointer to a sparse solution

Definition at line 371 of file misc.c.

References BMSfreeMemory, BMSfreeMemoryArray, and NULL.

Referenced by SCIP_DECL_CONSEXIT().

SCIP_VAR** SCIPsparseSolGetVars ( SCIP_SPARSESOL sparsesol)

returns the variables in the given sparse solution

returns the variables stored in the given sparse solution

Parameters
sparsesola sparse solution

Definition at line 385 of file misc.c.

References NULL, and SCIP_SparseSol::vars.

int SCIPsparseSolGetNVars ( SCIP_SPARSESOL sparsesol)

returns the number of variables in the given sparse solution

returns the number of variables stored in the given sparse solution

Parameters
sparsesola sparse solution

Definition at line 395 of file misc.c.

References NULL, and SCIP_SparseSol::nvars.

Referenced by SCIPsparseSolGetFirstSol(), SCIPsparseSolGetNextSol(), and writeExpandedSolutions().

SCIP_Longint* SCIPsparseSolGetLbs ( SCIP_SPARSESOL sparsesol)

returns the the lower bound array for all variables for a given sparse solution

returns the lower bound array for all variables for a given sparse solution

Parameters
sparsesola sparse solution

Definition at line 405 of file misc.c.

References SCIP_SparseSol::lbvalues, and NULL.

Referenced by collectSolution(), SCIPsparseSolGetFirstSol(), and SCIPsparseSolGetNextSol().

SCIP_Longint* SCIPsparseSolGetUbs ( SCIP_SPARSESOL sparsesol)

returns the the upper bound array for all variables for a given sparse solution

returns the upper bound array for all variables for a given sparse solution

Parameters
sparsesola sparse solution

Definition at line 415 of file misc.c.

References NULL, and SCIP_SparseSol::ubvalues.

Referenced by collectSolution(), and SCIPsparseSolGetNextSol().

void SCIPsparseSolGetFirstSol ( SCIP_SPARSESOL sparsesol,
SCIP_Longint sol,
int  nvars 
)

constructs the first solution of sparse solution (all variables are set to their lower bound value

Parameters
sparsesolsparse solutions
solarray to store the first solution
nvarsnumber of variables

Definition at line 425 of file misc.c.

References NULL, SCIP_Longint, SCIPsparseSolGetLbs(), and SCIPsparseSolGetNVars().

Referenced by writeExpandedSolutions().

SCIP_Bool SCIPsparseSolGetNextSol ( SCIP_SPARSESOL sparsesol,
SCIP_Longint sol,
int  nvars 
)

constructs the next solution of the sparse solution and return whether there was one more or not

Parameters
sparsesolsparse solutions
solcurrent solution array which get changed to the next solution
nvarsnumber of variables

Definition at line 448 of file misc.c.

References FALSE, NULL, SCIP_Bool, SCIP_Longint, SCIPsparseSolGetLbs(), SCIPsparseSolGetNVars(), SCIPsparseSolGetUbs(), and TRUE.

Referenced by writeExpandedSolutions().