Scippy

GCG

Branch-and-Price & Column Generation for Everyone

misc.c File Reference

Detailed Description

miscellaneous methods

Author
Gerald Gamrath
Martin Bergner

Definition in file misc.c.

#include "gcg.h"
#include "relax_gcg.h"
#include "pricer_gcg.h"
#include "benders_gcg.h"
#include "pub_gcgvar.h"
#include "cons_decomp.h"
#include "gcgsort.h"
#include "stat.h"
#include <string.h>
#include <unistd.h>

Go to the source code of this file.

Functions

static SCIP_Real getGeneratorEntry (SCIP_VAR *mastervar, SCIP_VAR *origvar)
 
static GCG_DECL_SORTPTRCOMP (mastervarcomp)
 
SCIP_RETCODE GCGtransformMastersolToOrigsol (SCIP *scip, SCIP_SOL *mastersol, SCIP_SOL **origsol)
 
SCIP_Real GCGtransformOrigvalsToMastervals (SCIP *scip, SCIP_VAR **origvars, SCIP_Real *origvals, int norigvars, SCIP_VAR **mastervars, SCIP_Real *mastervals, int nmastervars)
 
SCIP_Bool GCGisOriginal (SCIP *scip)
 
SCIP_Bool GCGisMaster (SCIP *scip)
 
SCIP_RETCODE GCGprintStatistics (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintInstanceName (SCIP *scip, FILE *file)
 
SCIP_RETCODE GCGprintCompleteDetectionStatistics (SCIP *scip, FILE *file)
 
SCIP_Bool GCGisConsGCGCons (SCIP_CONS *cons)
 

Function Documentation

◆ getGeneratorEntry()

static SCIP_Real getGeneratorEntry ( SCIP_VAR *  mastervar,
SCIP_VAR *  origvar 
)
static

computes the generator of mastervar for the entry in origvar

Returns
entry of the generator corresponding to origvar
Parameters
mastervarcurrent mastervariable
origvarcorresponding origvar

Definition at line 50 of file misc.c.

References GCGmasterVarGetOrigvalmap().

Referenced by GCG_DECL_SORTPTRCOMP().

◆ GCG_DECL_SORTPTRCOMP()

static GCG_DECL_SORTPTRCOMP ( mastervarcomp  )
static

comparefunction for lexicographical sort

Definition at line 69 of file misc.c.

References GCGvarGetBlock(), and getGeneratorEntry().

◆ GCGtransformMastersolToOrigsol()

◆ GCGtransformOrigvalsToMastervals()

SCIP_Real GCGtransformOrigvalsToMastervals ( SCIP *  scip,
SCIP_VAR **  origvars,
SCIP_Real *  origvals,
int  norigvars,
SCIP_VAR **  mastervars,
SCIP_Real *  mastervals,
int  nmastervars 
)

transforms given values of the given original variables into values of the given master variables

Returns
the sum of the values of the corresponding master variables that are fixed
Parameters
scipSCIP data structure
origvarsarray with (subset of the) original variables
origvalsarray with values (coefs) for the given original variables
norigvarsnumber of given original variables
mastervarsarray of (all present) master variables
mastervalsarray to store the values of the master variables
nmastervarsnumber of master variables

Definition at line 545 of file misc.c.

References GCGgetMasterprob(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGoriginalVarGetPricingVar(), GCGpricingVarGetOriginalVar(), GCGvarGetBlock(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by SCIP_DECL_SEPAEXECLP().

◆ GCGisOriginal()

SCIP_Bool GCGisOriginal ( SCIP *  scip)

checks whether the scip is the original scip instance

Returns
whether the scip is the original scip instance

Definition at line 665 of file misc.c.

Referenced by GCG_DECL_BRANCHMASTERSOLVED(), GCGbranchOrigUpdateExternBranchcands(), GCGconsMasterbranchReleaseOrigbranchConss(), GCGoriginalVarAddMasterVar(), and GCGupdateVarStatistics().

◆ GCGisMaster()

◆ GCGprintStatistics()

◆ GCGprintInstanceName()

SCIP_RETCODE GCGprintInstanceName ( SCIP *  scip,
FILE *  file 
)

print name of current instance to given output

Returns
SCIP return code

Definition at line 738 of file misc.c.

Referenced by GCGprintCompleteDetectionStatistics().

◆ GCGprintCompleteDetectionStatistics()

SCIP_RETCODE GCGprintCompleteDetectionStatistics ( SCIP *  scip,
FILE *  file 
)

print out complete detection statistics

Returns
SCIP return code

Definition at line 755 of file misc.c.

References GCGdetectionTookPlace(), GCGprintBlockcandidateInformation(), GCGprintCompleteDetectionTime(), GCGprintDecompInformation(), GCGprintInstanceName(), and GCGprintPartitionInformation().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ GCGisConsGCGCons()

SCIP_Bool GCGisConsGCGCons ( SCIP_CONS *  cons)

Checks whether the constraint belongs to GCG or not

Returns
whether the constraint belongs to GCG or not

Definition at line 787 of file misc.c.

Referenced by assignConstraintsToRepresentatives(), createDecompFromPartialdec(), DECcreateBasicDecomp(), DECcreateDecompFromMasterconss(), DECdecompAddRemainingConss(), DECdecompCheckConsistency(), and fillConstoblock().