Detailed Description
methods for working with Chvatal-Gomory cuts
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
-
gcg GCG data structure mastersepacut pointer to store separator master cut sepa separator creating this cut varhistory variables history of Chvatal-Gomory cut weights weights which were used to create the cut indices indices of constraints used to create the cut n number 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
-
gcg GCG data structure data pointer 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
-
mastersepacut separator 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
-
mastersepacut separator 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
-
mastersepacut separator 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
-
gcg GCG data structure mastercutdata master separator cut gcgcol gcg column coeff pointer 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
-
gcg GCG data structure mastercutdata master separator cut vars pricing variables which define the master variable vals values of the pricing variables which define the master variables nvars number of pricing variables which define the master variable probnr index of the pricing problem which generated the master variable coef pointer 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().