GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
colpool.c File Reference

Detailed Description

methods for storing cols in a col pool (based on SCIP's cut pool)

Author
Jonas Witt
Erik Muehmer

Definition in file colpool.c.

#include <assert.h>
#include "scip/clock.h"
#include "gcg/gcg.h"
#include "gcg/pub_gcgcol.h"
#include "gcg/colpool.h"
#include "gcg/struct_colpool.h"
#include "gcg/pricestore_gcg.h"
#include "gcg/struct_pricestore_gcg.h"
#include "gcg/pricer_gcg.h"
#include "gcg/struct_gcgcol.h"

Go to the source code of this file.

Macros

#define GCG_USESMALLTABLES   FALSE
#define GCG_HASHSIZE_COLPOOLS_SMALL   100
#define GCG_HASHSIZE_COLPOOLS   500

Functions

static SCIP_RETCODE colpoolEnsureColsMem (GCG_COLPOOL *colpool, int num)
SCIP_RETCODE GCGcolpoolCreate (GCG *gcg, GCG_COLPOOL **colpool, int agelimit)
SCIP_RETCODE GCGcolpoolFree (GCG_COLPOOL **colpool)
static SCIP_RETCODE colpoolDelCol (GCG_COLPOOL *colpool, GCG_COL *col, SCIP_Bool freecol)
SCIP_RETCODE GCGcolpoolClear (GCG_COLPOOL *colpool)
SCIP_RETCODE GCGcolpoolAddCol (GCG_COLPOOL *colpool, GCG_COL *col, SCIP_Bool freeduplicate)
SCIP_RETCODE GCGcolpoolAddNewCol (GCG_COLPOOL *colpool, GCG_COL *col)
SCIP_RETCODE GCGcolpoolDelCol (GCG_COLPOOL *colpool, GCG_COL *col, SCIP_Bool freecol)
SCIP_RETCODE GCGcolpoolPrice (GCG_COLPOOL *colpool, SCIP_SOL *sol, int *nfoundvars)
SCIP_RETCODE GCGcolpoolUpdateNode (GCG_COLPOOL *colpool)
SCIP_RETCODE GCGcolpoolUpdateRedcost (GCG_COLPOOL *colpool)
void GCGcolpoolStartFarkas (GCG_COLPOOL *colpool)
void GCGcolpoolEndFarkas (GCG_COLPOOL *colpool)
GCG_COL ** GCGcolpoolGetCols (GCG_COLPOOL *colpool)
int GCGcolpoolGetNCols (GCG_COLPOOL *colpool)
int GCGcolpoolGetMaxNCols (GCG_COLPOOL *colpool)
SCIP_Real GCGcolpoolGetTime (GCG_COLPOOL *colpool)
SCIP_Longint GCGcolpoolGetNCalls (GCG_COLPOOL *colpool)
SCIP_Longint GCGcolpoolGetNColsFound (GCG_COLPOOL *colpool)
SCIP_RETCODE GCGcolpoolPropagateGlobalBounds (GCG_COLPOOL *colpool)

Macro Definition Documentation

◆ GCG_USESMALLTABLES

#define GCG_USESMALLTABLES   FALSE

Definition at line 50 of file colpool.c.

Referenced by GCGcolpoolCreate().

◆ GCG_HASHSIZE_COLPOOLS_SMALL

#define GCG_HASHSIZE_COLPOOLS_SMALL   100

size of hash table in col pools for small problems

Definition at line 51 of file colpool.c.

Referenced by GCGcolpoolCreate().

◆ GCG_HASHSIZE_COLPOOLS

#define GCG_HASHSIZE_COLPOOLS   500

size of hash table in col pools

Definition at line 52 of file colpool.c.

Referenced by GCGcolpoolCreate().

Function Documentation

◆ colpoolEnsureColsMem()

SCIP_RETCODE colpoolEnsureColsMem ( GCG_COLPOOL * colpool,
int num )
static

resizes cols array to be able to store at least num entries

Parameters
colpoolcol pool
numminimal number of slots in array

Definition at line 60 of file colpool.c.

References assert(), colpoolEnsureColsMem(), GCG_Colpool::cols, GCG_Colpool::colssize, GCG_Colpool::scip, and SCIP_CALL().

Referenced by colpoolEnsureColsMem(), and GCGcolpoolAddNewCol().

◆ colpoolDelCol()

SCIP_RETCODE colpoolDelCol ( GCG_COLPOOL * colpool,
GCG_COL * col,
SCIP_Bool freecol )
static

removes the col from the col pool

Parameters
colpoolcol pool
colcol to remove
freecolshould the col be freed?

Definition at line 156 of file colpool.c.

References assert(), colpoolDelCol(), GCG_Colpool::cols, GCG_Colpool::firstunprocessed, GCG_Colpool::firstunprocessedsol, GCGfreeGcgCol(), GCG_Colpool::hashtable, GCG_Colpool::ncols, GCG_Col::pos, and SCIP_CALL().

Referenced by colpoolDelCol(), GCGcolpoolClear(), GCGcolpoolDelCol(), GCGcolpoolPrice(), and GCGcolpoolPropagateGlobalBounds().