Scippy

SCIP

Solving Constraint Integer Programs

probdata_rpa.h File Reference

Detailed Description

Problem data for ringpacking problem.

Author
Benjamin Mueller

Definition in file probdata_rpa.h.

#include "scip/scip.h"
#include "pattern.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPprobdataCreate (SCIP *scip, const char *probname, int *demands, SCIP_Real *rints, SCIP_Real *rexts, int nitems, SCIP_Real width, SCIP_Real height)
 
SCIP_RETCODE SCIPprobdataSetupProblem (SCIP *scip)
 
SCIP_RETCODE SCIPprobdataEnumeratePatterns (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_Real nlptilim, SCIP_Real heurtilim, SCIP_Real totaltilim, SCIP_Longint nlpnodelim, int heuriterlim)
 
int SCIPprobdataGetNTypes (SCIP_PROBDATA *probdata)
 
SCIP_RealSCIPprobdataGetRexts (SCIP_PROBDATA *probdata)
 
SCIP_RealSCIPprobdataGetRints (SCIP_PROBDATA *probdata)
 
int * SCIPprobdataGetDemands (SCIP_PROBDATA *probdata)
 
SCIP_Real SCIPprobdataGetWidth (SCIP_PROBDATA *probdata)
 
SCIP_Real SCIPprobdataGetHeight (SCIP_PROBDATA *probdata)
 
void SCIPprobdataGetCInfos (SCIP_PROBDATA *probdata, SCIP_PATTERN ***cpatterns, SCIP_VAR ***cvars, int *ncpatterns)
 
void SCIPprobdataGetRInfos (SCIP_PROBDATA *probdata, SCIP_PATTERN ***rpatterns, SCIP_VAR ***rvars, int *nrpatterns)
 
SCIP_CONS ** SCIPprobdataGetPatternConss (SCIP_PROBDATA *probdata)
 
SCIP_RETCODE SCIPprobdataAddVar (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_VAR *var)
 
void SCIPprobdataUpdateDualbound (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_Real dualbound)
 
void SCIPprobdataInvalidateDualbound (SCIP *scip, SCIP_PROBDATA *probdata)
 
SCIP_Bool SCIPprobdataIsDualboundInvalid (SCIP_PROBDATA *probdata)
 
void SCIPpackCirclesGreedy (SCIP *scip, SCIP_Real *rexts, SCIP_Real *xs, SCIP_Real *ys, SCIP_Real rbounding, SCIP_Real width, SCIP_Real height, SCIP_Bool *ispacked, int *elements, int nelements, SCIP_PATTERNTYPE patterntype, int *npacked, int ncalls)
 
SCIP_RETCODE SCIPverifyCircularPatternHeuristic (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_Real timelim, int iterlim)
 
SCIP_RETCODE SCIPverifyCircularPatternNLP (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_Real timelim, SCIP_Longint nodelim)
 
void SCIPcheckPattern (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern)
 

Function Documentation

◆ SCIPprobdataCreate()

SCIP_RETCODE SCIPprobdataCreate ( SCIP scip,
const char *  probname,
int *  demands,
SCIP_Real rints,
SCIP_Real rexts,
int  ntypes,
SCIP_Real  width,
SCIP_Real  height 
)

sets up the problem data

Parameters
scipSCIP data structure
probnameproblem name
demandsarray containing the demands
rintsinternal radii of each ring
rextsexternal radii of each ring (assumed to be sorted)
ntypesnumber of different types
widthwidth of each rectangle
heightheight of each rectangle

Definition at line 1396 of file probdata_rpa.c.

References NULL, probdataCreate(), SCIP_CALL, SCIP_OKAY, SCIPcreateProbBasic(), SCIPfindTable(), SCIPincludeTable(), SCIPpricerRpaActivate(), SCIPsetProbData(), SCIPsetProbDelorig(), SCIPsetProbDeltrans(), SCIPsetProbTrans(), TABLE_DESC_RPA, TABLE_EARLIEST_STAGE_RPA, TABLE_NAME_RPA, TABLE_POSITION_RPA, and TRUE.

Referenced by SCIP_DECL_READERREAD().

◆ SCIPprobdataSetupProblem()

SCIP_RETCODE SCIPprobdataSetupProblem ( SCIP scip)

enumerates circular patterns and creates restricted master problem

Parameters
scipSCIP data structure

Definition at line 1443 of file probdata_rpa.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetIntParam(), SCIPgetLongintParam(), SCIPgetProbData(), SCIPgetRealParam(), and setupProblem().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPprobdataEnumeratePatterns()

SCIP_RETCODE SCIPprobdataEnumeratePatterns ( SCIP scip,
SCIP_PROBDATA probdata,
SCIP_Real  nlptilim,
SCIP_Real  heurtilim,
SCIP_Real  totaltilim,
SCIP_Longint  nlpnodelim,
int  heuriterlim 
)

enumerate all non-dominated circular patterns

Parameters
scipSCIP data structure
probdataproblem data
nlptilimtime limit for each NLP verification
heurtilimtime limit for each call of the heuristics
totaltilimtotal time limit for enumeration
nlpnodelimnode limit for each NLP verification
heuriterlimiteration limit for each call of the heuristics

Definition at line 1463 of file probdata_rpa.c.

References BMSclearMemoryArray, enumeratePatterns(), filterPatterns(), MAX, maxCircles(), MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetRealParam(), SCIPgetTotalTime(), SCIPpatternCreateCircular(), SCIPpatternRelease(), SCIPpatternSetType(), and SCIPprobdataGetNTypes().

Referenced by setupProblem().

◆ SCIPprobdataGetNTypes()

◆ SCIPprobdataGetRexts()

SCIP_Real* SCIPprobdataGetRexts ( SCIP_PROBDATA probdata)

◆ SCIPprobdataGetRints()

SCIP_Real* SCIPprobdataGetRints ( SCIP_PROBDATA probdata)

returns all internal radii

Parameters
probdataproblem data

Definition at line 1540 of file probdata_rpa.c.

References NULL.

Referenced by enumeratePatterns(), maxCircles(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_TABLEOUTPUT(), SCIPcheckPattern(), SCIPverifyCircularPatternHeuristic(), SCIPverifyCircularPatternNLP(), and setupProblem().

◆ SCIPprobdataGetDemands()

int* SCIPprobdataGetDemands ( SCIP_PROBDATA probdata)

returns all demands

Parameters
probdataproblem data

Definition at line 1550 of file probdata_rpa.c.

References NULL.

Referenced by createPatternVars(), maxCircles(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_TABLEOUTPUT(), setupProblem(), solvePricingHeuristic(), and solvePricingMINLP().

◆ SCIPprobdataGetWidth()

SCIP_Real SCIPprobdataGetWidth ( SCIP_PROBDATA probdata)

returns the width of each rectangle

Parameters
probdataproblem data

Definition at line 1560 of file probdata_rpa.c.

References NULL.

Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_TABLEOUTPUT(), SCIPcheckPattern(), SCIPverifyCircularPatternHeuristic(), setupProblem(), solvePricingHeuristic(), and solvePricingMINLP().

◆ SCIPprobdataGetHeight()

SCIP_Real SCIPprobdataGetHeight ( SCIP_PROBDATA probdata)

returns the height of each rectangle

Parameters
probdataproblem data

Definition at line 1571 of file probdata_rpa.c.

References NULL.

Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_TABLEOUTPUT(), SCIPcheckPattern(), SCIPverifyCircularPatternHeuristic(), setupProblem(), solvePricingHeuristic(), and solvePricingMINLP().

◆ SCIPprobdataGetCInfos()

void SCIPprobdataGetCInfos ( SCIP_PROBDATA probdata,
SCIP_PATTERN ***  cpatterns,
SCIP_VAR ***  cvars,
int *  ncpatterns 
)

returns all information about circular patterns

Parameters
probdataproblem data
cpatternspointer to store the circular patterns (might be NULL)
cvarspointer to store the variables corresponding circular patterns (might be NULL)
ncpatternspointer to store the number of circular patterns (might be NULL)

Definition at line 1581 of file probdata_rpa.c.

References NULL.

Referenced by enforceSol(), isSolFeasible(), SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSLOCK(), and SCIP_DECL_EVENTEXEC().

◆ SCIPprobdataGetRInfos()

void SCIPprobdataGetRInfos ( SCIP_PROBDATA probdata,
SCIP_PATTERN ***  rpatterns,
SCIP_VAR ***  rvars,
int *  nrpatterns 
)

returns all information about rectangular patterns

Parameters
probdataproblem data
rpatternspointer to store the rectangular patterns (might be NULL)
rvarspointer to store the variables corresponding rectangular patterns (might be NULL)
nrpatternspointer to store the number of rectangular patterns (might be NULL)

Definition at line 1599 of file probdata_rpa.c.

References NULL.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPprobdataGetPatternConss()

SCIP_CONS** SCIPprobdataGetPatternConss ( SCIP_PROBDATA probdata)

returns array of set pattern constraints

Parameters
probdataproblem data

Definition at line 1617 of file probdata_rpa.c.

References NULL.

Referenced by addVariable(), and SCIP_DECL_PRICERREDCOST().

◆ SCIPprobdataAddVar()

SCIP_RETCODE SCIPprobdataAddVar ( SCIP scip,
SCIP_PROBDATA probdata,
SCIP_PATTERN pattern,
SCIP_VAR var 
)

adds given variable to the problem data

Parameters
scipSCIP data structure
probdataproblem data
patternpattern
varvariables to add

Definition at line 1627 of file probdata_rpa.c.

References ensureSize(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PACKABLE_NO, SCIP_PATTERNTYPE_CIRCULAR, SCIP_PATTERNTYPE_RECTANGULAR, SCIPcaptureVar(), SCIPcheckPattern(), SCIPpatternCopy(), SCIPpatternGetPackableStatus(), and SCIPpatternGetPatternType().

Referenced by addVariable(), enumeratePatterns(), and setupProblem().

◆ SCIPprobdataUpdateDualbound()

void SCIPprobdataUpdateDualbound ( SCIP scip,
SCIP_PROBDATA probdata,
SCIP_Real  dualbound 
)

updates the dual bound

Parameters
scipSCIP data structure
probdataproblem data
dualboundnew dual bound

Definition at line 1669 of file probdata_rpa.c.

References NULL, SCIPinfoMessage(), and SCIPisFeasLT().

Referenced by SCIP_DECL_PRICERREDCOST(), and setupProblem().

◆ SCIPprobdataInvalidateDualbound()

void SCIPprobdataInvalidateDualbound ( SCIP scip,
SCIP_PROBDATA probdata 
)

marks that further reported dual bounds are not valid

Parameters
scipSCIP data structure
probdataproblem data

Definition at line 1685 of file probdata_rpa.c.

References NULL, SCIPinfoMessage(), and TRUE.

Referenced by enforceSol(), and SCIP_DECL_PRICERREDCOST().

◆ SCIPprobdataIsDualboundInvalid()

SCIP_Bool SCIPprobdataIsDualboundInvalid ( SCIP_PROBDATA probdata)

returns whether dual bound is marked to be invalid

Parameters
probdataproblem data

Definition at line 1700 of file probdata_rpa.c.

References NULL.

Referenced by SCIP_DECL_PRICERREDCOST().

◆ SCIPpackCirclesGreedy()

void SCIPpackCirclesGreedy ( SCIP scip,
SCIP_Real rexts,
SCIP_Real xs,
SCIP_Real ys,
SCIP_Real  rbounding,
SCIP_Real  width,
SCIP_Real  height,
SCIP_Bool ispacked,
int *  elements,
int  nelements,
SCIP_PATTERNTYPE  patterntype,
int *  npacked,
int  ncalls 
)

Tries to pack a list of elements into a specified boundary circle by using a simple left-first bottom-second heuristic. Returns the number of elements that could be stored and indicated which ones these are in the buffer parameter ispacked. This auxiliary method can be used both to find such a packing or to verify a certain pattern.

Parameters
scipSCIP data structure
rextsouter radii of elements (in original order of probdata)
xsbuffer to store the resulting x-coordinates
ysbuffer to store the resulting y-coordinates
rboundinginner radius of bounding circle (ignored for rectangular patterns)
widthwidth of the rectangle
heightheight of the rectangle
ispackedbuffer to store which elements could be packed
elementsthe order of the elements in the pattern
nelementsnumber of elements in the pattern
patterntypethe pattern type (rectangular or circular)
npackedpointer to store the number of packed elements
ncallstotal number of calls of the packing heuristic

Definition at line 1713 of file probdata_rpa.c.

References BMSclearMemoryArray, computePosCircleCircle(), computePosRectangleCircle(), computePosRingCircle(), computePosTrivial(), FALSE, NULL, SCIP_Bool, SCIP_INVALID, SCIP_PATTERNTYPE_CIRCULAR, SCIP_Real, and TRUE.

Referenced by SCIPverifyCircularPatternHeuristic(), and solvePricingHeuristic().

◆ SCIPverifyCircularPatternHeuristic()

◆ SCIPverifyCircularPatternNLP()

SCIP_RETCODE SCIPverifyCircularPatternNLP ( SCIP scip,
SCIP_PROBDATA probdata,
SCIP_PATTERN pattern,
SCIP_Real  timelim,
SCIP_Longint  nodelim 
)

◆ SCIPcheckPattern()