GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

methods for working with Chvatal-Gomory cuts

Author
Chantal Reinartz Groba
Erik Muehmer

Definition in file gcgcgcut.c.

#include "scip/scip.h"
#include "gcg/gcg.h"
#include "gcg/pub_mastersepacut.h"
#include "gcg/struct_mastersepacut.h"
#include "gcg/struct_gcgcol.h"

Go to the source code of this file.

Data Structures

struct  GCG_MastersepacutData

Functions

SCIP_RETCODE GCGcreateChvatalGomoryCut (GCG *gcg, GCG_MASTERSEPACUT **mastersepacut, GCG_SEPA *sepa, GCG_VARHISTORY *varhistory, SCIP_Real *weights, int *indices, int n)
SCIP_RETCODE GCGfreeChvatalGomoryCutData (GCG *gcg, GCG_MASTERSEPACUTDATA **data)
int GCGchvatalGomoryCutGetNWeights (GCG_MASTERSEPACUT *mastersepacut)
SCIP_Real * GCGchvatalGomoryCutGetWeights (GCG_MASTERSEPACUT *mastersepacut)
int * GCGchvatalGomoryCutGetConssIndices (GCG_MASTERSEPACUT *mastersepacut)
SCIP_RETCODE GCGchvatalGomoryCutGetColumnCoefficient (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *mastercutdata, GCG_COL *gcgcol, SCIP_Real *coeff)
SCIP_RETCODE GCGchvatalGomoryCutGetVariableCoefficient (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *mastercutdata, SCIP_VAR **vars, SCIP_Real *vals, int nvars, int probnr, SCIP_Real *coef)

Function Documentation

◆ GCGcreateChvatalGomoryCut()

SCIP_RETCODE GCGcreateChvatalGomoryCut ( GCG * gcg,
GCG_MASTERSEPACUT ** mastersepacut,
GCG_SEPA * sepa,
GCG_VARHISTORY * varhistory,
SCIP_Real * weights,
int * indices,
int n )

creates a Chvatal-Gomory cut

Parameters
gcgGCG data structure
mastersepacutpointer to store separator master cut
sepaseparator creating this cut
varhistoryvariables history of Chvatal-Gomory cut
weightsweights which were used to create the cut
indicesindices of constraints used to create the cut
nnumber of constraints used to create the cut

Definition at line 53 of file gcgcgcut.c.

References assert(), GCG_MastersepacutData::conssindices, GCGcreateChvatalGomoryCut(), GCGcreateMastersepacut(), GCGgetMasterprob(), GCG_MastersepacutData::nconssindices, SCIP_CALL(), and GCG_MastersepacutData::weights.

Referenced by GCGcreateChvatalGomoryCut(), and SCIP_DECL_SEPAEXECLP().

◆ GCGfreeChvatalGomoryCutData()

SCIP_RETCODE GCGfreeChvatalGomoryCutData ( GCG * gcg,
GCG_MASTERSEPACUTDATA ** data )

frees data of Chvatal-Gomory cut returns the number of weights of Chvatal-Gomory cut

frees data of Chvatal-Gomory cut

Parameters
gcgGCG data structure
datapointer to data of subset row cut

Definition at line 88 of file gcgcgcut.c.

References assert(), GCGfreeChvatalGomoryCutData(), and GCGgetMasterprob().

Referenced by GCG_DECL_SEPAMASTERCUTDELETE(), and GCGfreeChvatalGomoryCutData().

◆ GCGchvatalGomoryCutGetNWeights()

int GCGchvatalGomoryCutGetNWeights ( GCG_MASTERSEPACUT * mastersepacut)

returns the weights of Chvatal-Gomory cut

returns the number of weights of Chvatal-Gomory cut

Parameters
mastersepacutseparator master cut

Definition at line 116 of file gcgcgcut.c.

References assert(), GCGchvatalGomoryCutGetNWeights(), GCGmastersepacutGetData(), and GCG_MastersepacutData::nconssindices.

Referenced by GCGchvatalGomoryCutGetColumnCoefficient(), and GCGchvatalGomoryCutGetNWeights().

◆ GCGchvatalGomoryCutGetWeights()

SCIP_Real * GCGchvatalGomoryCutGetWeights ( GCG_MASTERSEPACUT * mastersepacut)

returns the constraint indices of Chvatal-Gomory cut

returns the weights of Chvatal-Gomory cut

Parameters
mastersepacutseparator master cut

Definition at line 131 of file gcgcgcut.c.

References assert(), GCGchvatalGomoryCutGetWeights(), GCGmastersepacutGetData(), and GCG_MastersepacutData::weights.

Referenced by GCGchvatalGomoryCutGetColumnCoefficient(), and GCGchvatalGomoryCutGetWeights().

◆ GCGchvatalGomoryCutGetConssIndices()

int * GCGchvatalGomoryCutGetConssIndices ( GCG_MASTERSEPACUT * mastersepacut)

returns the constraint indices of Chvatal-Gomory cut

Parameters
mastersepacutseparator master cut

Definition at line 146 of file gcgcgcut.c.

References assert(), GCG_MastersepacutData::conssindices, GCGchvatalGomoryCutGetConssIndices(), and GCGmastersepacutGetData().

Referenced by GCGchvatalGomoryCutGetColumnCoefficient(), and GCGchvatalGomoryCutGetConssIndices().

◆ GCGchvatalGomoryCutGetColumnCoefficient()

SCIP_RETCODE GCGchvatalGomoryCutGetColumnCoefficient ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * mastercutdata,
GCG_COL * gcgcol,
SCIP_Real * coeff )

computes the coefficient of a column for a Chvatal-Gomory cut

Parameters
gcgGCG data structure
mastercutdatamaster separator cut
gcgcolgcg column
coeffpointer to store the coefficient

Definition at line 161 of file gcgcgcut.c.

References assert(), GCGchvatalGomoryCutGetColumnCoefficient(), GCGchvatalGomoryCutGetConssIndices(), GCGchvatalGomoryCutGetNWeights(), GCGchvatalGomoryCutGetWeights(), GCGcolGetInitializedCoefs(), GCGcolGetMastercoefs(), GCGextendedmasterconsGetMastersepacut(), GCGgetMasterprob(), i, and SCIPdebugMessage().

Referenced by GCG_DECL_SEPAGETCOLCOEFFICIENT(), and GCGchvatalGomoryCutGetColumnCoefficient().

◆ GCGchvatalGomoryCutGetVariableCoefficient()

SCIP_RETCODE GCGchvatalGomoryCutGetVariableCoefficient ( GCG * gcg,
GCG_EXTENDEDMASTERCONSDATA * mastercutdata,
SCIP_VAR ** vars,
SCIP_Real * vals,
int nvars,
int probnr,
SCIP_Real * coef )

computes the coefficient of a master variable for a Chvatal-Gomory cut

Parameters
gcgGCG data structure
mastercutdatamaster separator cut
varspricing variables which define the master variable
valsvalues of the pricing variables which define the master variables
nvarsnumber of pricing variables which define the master variable
probnrindex of the pricing problem which generated the master variable
coefpointer to store the coefficient

Definition at line 204 of file gcgcgcut.c.

References assert(), GCGchvatalGomoryCutGetVariableCoefficient(), GCGextendedmasterconsGetPricingModification(), GCGgetMasterprob(), GCGgetPricingprob(), GCGpricingmodificationGetAdditionalConss(), GCGvarIsInferredPricing(), i, nvars, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), success, and vars.

Referenced by GCG_DECL_SEPAGETCOLCOEFFICIENT(), and GCGchvatalGomoryCutGetVariableCoefficient().