Detailed Description
miscellaneous methods
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 |
computes the generator of mastervar for the entry in origvar
- Returns
- entry of the generator corresponding to origvar
- Parameters
-
mastervar current mastervariable origvar corresponding origvar
Definition at line 50 of file misc.c.
References GCGmasterVarGetOrigvalmap().
Referenced by GCG_DECL_SORTPTRCOMP().
◆ GCG_DECL_SORTPTRCOMP()
|
static |
comparefunction for lexicographical sort
Definition at line 69 of file misc.c.
References GCGvarGetBlock(), and getGeneratorEntry().
◆ GCGtransformMastersolToOrigsol()
SCIP_RETCODE GCGtransformMastersolToOrigsol | ( | SCIP * | scip, |
SCIP_SOL * | mastersol, | ||
SCIP_SOL ** | origsol | ||
) |
transforms given solution of the master problem into solution of the original problem
- Returns
- SCIP return code
Definition at line 120 of file misc.c.
References DEC_DECMODE_BENDERS, DEC_DECMODE_ORIGINAL, GCGgetBendersRelaxationSol(), GCGgetDecompositionMode(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGmasterIsSolValid(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), GCGmasterVarGetOrigvars(), GCGmasterVarIsRay(), GCGoriginalVarGetPricingVar(), GCGoriginalVarIsLinking(), GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), GCGrelaxGetProbingheur(), GCGsortPtrPtr(), GCGvarGetBlock(), GCGvarIsMaster(), and GCGvarIsPricing().
Referenced by GCGrelaxEndProbing(), GCGrelaxUpdateCurrentSol(), getRootRelaxSol(), relaxExecGcgDantzigWolfe(), SCIP_DECL_CONSCHECK(), SCIP_DECL_EVENTEXEC(), solveDiagonalBlocks(), and solveMasterProblemAndEvaluate().
◆ 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
-
scip SCIP data structure origvars array with (subset of the) original variables origvals array with values (coefs) for the given original variables norigvars number of given original variables mastervars array of (all present) master variables mastervals array to store the values of the master variables nmastervars number 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()
SCIP_Bool GCGisMaster | ( | SCIP * | scip | ) |
checks whether the scip is the master problem scip
- Returns
- whether the scip is the master problem scip
Definition at line 675 of file misc.c.
Referenced by applyGlobalBndchgsToPricedMastervars(), applyGlobalBndchgsToPricingprobs(), applyLocalBndchgsToPricedMastervars(), applyLocalBndchgsToPricingprobs(), GCG_DECL_BRANCHACTIVEMASTER(), GCG_DECL_BRANCHDEACTIVEMASTER(), GCGconsMasterbranchAddCopiedVarBndchg(), GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchReleaseOrigbranchConss(), GCGcurrentNodeIsGeneric(), GCGsepaBasisAddPricingCut(), GCGupdateVarStatistics(), initializeConsdata(), SCIPactivateEventHdlrDisplay(), SCIPincludeEventHdlrDisplay(), SCIPsepaBasisAddPPObjConss(), and undoLocalBndchgsToPricingprobs().
◆ GCGprintStatistics()
SCIP_RETCODE GCGprintStatistics | ( | SCIP * | scip, |
FILE * | file | ||
) |
print out GCG statistics
- Returns
- SCIP return code
Definition at line 685 of file misc.c.
References DEC_DECMODE_BENDERS, DEC_DECMODE_DANTZIGWOLFE, DEC_DECMODE_ORIGINAL, GCGconshdlrDecompPrintDetectorStatistics(), GCGgetDecompositionMode(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGgetStructDecomp(), GCGmasterPrintSimplexIters(), GCGpricerPrintPricingStatistics(), GCGprintDecompStatistics(), and GCGwriteSolvingDetails().
Referenced by fromCommandLine(), and SCIP_DECL_DIALOGEXEC().
◆ 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().