ncppatternsunknownbeg;
145assert(probdata !=
NULL);
146assert(demands !=
NULL);
147assert(rints !=
NULL);
148assert(rexts !=
NULL);
150assert(height > 0.0);
151assert(width >= height);
157 if( ncpatterns > 0 )
161(*probdata)->ncpatterns = ncpatterns;
162(*probdata)->cpatternsize = ncpatterns;
165 for( i = 0; i < ncpatterns; ++i )
169 if( nrpatterns > 0 )
173(*probdata)->nrpatterns = nrpatterns;
174(*probdata)->rpatternsize = nrpatterns;
177 for( i = 0; i < nrpatterns; ++i )
186 if( patternconss !=
NULL)
199(*probdata)->ntypes = ntypes;
200(*probdata)->width = width;
201(*probdata)->height = height;
216assert(probdata !=
NULL);
217assert(*probdata !=
NULL);
220 if( (*probdata)->randnumgen !=
NULL)
226 if( (*probdata)->patternconss !=
NULL)
230 if( (*probdata)->patternconss[i] !=
NULL)
239 for( i = 0; i < (*probdata)->ncpatterns; ++i )
241assert((*probdata)->cpatterns[i] !=
NULL);
243 if( (*probdata)->cvars[i] !=
NULL)
255 for( i = 0; i < (*probdata)->nrpatterns; ++i )
257assert((*probdata)->rpatterns[i] !=
NULL);
258assert((*probdata)->rvars[i] !=
NULL);
260 if( (*probdata)->rvars[i] !=
NULL)
292assert(probdata !=
NULL);
294 for( p = 0; p < probdata->ncpatterns; ++p )
314assert(probdata !=
NULL);
319newsize =
MAX(size, 2 * probdata->cpatternsize);
323probdata->cpatternsize = newsize;
327newsize =
MAX(size, 2 * probdata->rpatternsize);
331probdata->rpatternsize = newsize;
349assert(probdata !=
NULL);
350assert(probdata->ncpatterns > 0);
351assert(probdata->nrpatterns > 0);
354 for( k = 0; k < probdata->ncpatterns; ++k )
360pattern = probdata->cpatterns[k];
361assert(pattern !=
NULL);
373(void) strcat(name, strtmp);
381probdata->cvars[k] = var;
385 for( k = 0; k < probdata->nrpatterns; ++k )
389pattern = probdata->rpatterns[k];
390assert(pattern !=
NULL);
400(void) strcat(name, strtmp);
408probdata->rvars[k] = var;
443rintscaled = _rint / rext;
444assert(rintscaled >= 1.0);
448 else if(
SCIPisLT(
scip, rintscaled, 2.1547005383792515) )
450 else if(
SCIPisLT(
scip, rintscaled, 2.414213562373095) )
452 else if(
SCIPisLT(
scip, rintscaled, 2.7013016167040798) )
456 else if(
SCIPisLT(
scip, rintscaled, 3.3047648709624866) )
458 else if(
SCIPisLT(
scip, rintscaled, 3.613125929752753) )
506 for( i = 0; i < ntypes && (pdomq || qdomp); ++i )
510 else if( count[i] > 0 )
539 for( i = 0; i < probdata->ncpatterns - 1; ++i )
547 for( j = i + 1; j < probdata->ncpatterns; ++j )
567 for( i = 0; i < probdata->ncpatterns; ++i )
575cpatterns[ncpatterns] = probdata->cpatterns[i];
579assert(ncpatterns > 0);
582probdata->ncpatterns = ncpatterns;
616assert(pattern !=
NULL);
617assert(timeleft !=
NULL);
626lasttype = ntypes -1;
658timelim =
MIN(heurtilim, *timeleft);
671timelim =
MIN(*timeleft, nlptilim);
683volume -=
SQR(rexts[t]) *
M_PI* nselected[t];
695 while( t > type && (nselected[t] == ms[t] ||
SCIPisGT(
scip, volume, maxvolume)) )
698volume -=
SQR(rexts[t]) *
M_PI* nselected[t];
708assert(nselected[t] < ms[t]);
710volume +=
SQR(rexts[t]) *
M_PI;
738assert(probdata !=
NULL);
754probdata->totaltilimsoft, probdata->nlpnodelimsoft, probdata->heuriterlimsoft) );
761 for( t = 0; t < ntypes; ++t )
779 for( t = 0; t < ntypes; ++t )
786 for( p = 0; p < probdata->ncpatterns; ++p )
791pattern = probdata->cpatterns[p];
792assert(pattern !=
NULL);
795var = probdata->cvars[p];
796assert(var !=
NULL);
811 for( t = 0; t < ntypes; ++t )
823 for( p = 0; p < probdata->ncpatterns; ++p )
826 SCIP_VAR* var = probdata->cvars[p];
829assert(pattern !=
NULL);
831assert(var !=
NULL);
834assert(type >= 0 && type < ntypes);
839 for( t = 0; t < ntypes; ++t )
852 for( p = 0; p < probdata->nrpatterns; ++p )
855 SCIP_VAR* var = probdata->rvars[p];
857assert(pattern !=
NULL);
859assert(var !=
NULL);
861 for( t = 0; t < ntypes; ++t )
874minrext = rexts[ntypes-1];
876 for( t = 0; t < ntypes; ++t )
884vol =
M_PI* (
SQR(rexts[t]) -
SQR(rints[t]));
886volume += vol * demands[t];
915assert(probdata !=
NULL);
926 if( !probdata->isdualinvalid )
932dualbound = probdata->dualbound;
935 for( t = 0; t < ntypes; ++t )
937nrings += demands[t];
938maxrint =
MAX(maxrint, rints[t]);
939minrext =
MIN(minrext, rexts[t]);
942 SCIPinfoMessage(
scip, file,
"Ringpacking : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s\n",
943 "dual",
"ntypes",
"nrings",
"width",
"height",
"CP",
"CP_unk",
"CP_unk_end",
"CP_infeas",
"RP",
"enumtime",
"radiiratio");
1008 for( i = 0; i < nelements; ++i )
1016dist =
SQR(
x- xs[i]) +
SQR(
y- ys[i]);
1057 for( i = 0; i < nelements; ++i )
1065c = sqrt(xs[i]*xs[i] + ys[i]*ys[i]);
1068 if( !
SCIPisGE(
scip, c + rexts[elements[i]] + 2.0*rexts[elements[pos]], rbound)
1069||
SCIPisGT(
scip, rexts[elements[pos]] + rexts[elements[i]], rbound) )
1072 a= rexts[elements[pos]] + rexts[elements[i]];
1073 b= rbound - rexts[elements[pos]];
1078 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, -1.0, -1.0, rmax,
SCIP_PATTERNTYPE_CIRCULAR,
1079ispacked, elements, nelements, bestx, besty, -rbound + rexts[elements[pos]], 0.0, ncalls);
1080 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, -1.0, -1.0, rmax,
SCIP_PATTERNTYPE_CIRCULAR,
1081ispacked, elements, nelements, bestx, besty, +rbound - rexts[elements[pos]], 0.0, ncalls);
1086alpha = (c*c -
b*
b+
a*
a) / (2*c);
1088 if(
a*
a>= alpha*alpha )
1090 h= sqrt(
MAX(
a*
a- alpha*alpha, 0.0));
1091u = (c - alpha) * xs[i] / c;
1092v = (c - alpha) * ys[i] / c;
1097 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, -1.0, -1.0, rmax,
SCIP_PATTERNTYPE_CIRCULAR,
1098ispacked, elements, nelements, bestx, besty, u + n1, v + n2, ncalls);
1099 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, -1.0, -1.0, rmax,
SCIP_PATTERNTYPE_CIRCULAR,
1100ispacked, elements, nelements, bestx, besty, u - n1, v - n2, ncalls);
1132 SCIP_Realxcands[4] = {-rbound + rext, +rbound - rext, 0.0, 0.0};
1133 SCIP_Realycands[4] = {0.0, 0.0, -rbound + rext, +rbound - rext};
1135 for( i = 0; i < 4; ++i )
1136 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, width, height, rmax, patterntype,
1137ispacked, elements, nelements, bestx, besty, xcands[i], ycands[i], ncalls);
1141 SCIP_Realxcands[4] = {rext, width - rext, rext, width - rext};
1142 SCIP_Realycands[4] = {rext, rext, height - rext, height - rext};
1144 for( i = 0; i < 4; ++i )
1145 updateBestCandidate(
scip, xs, ys, rexts, rexts[elements[pos]], rbound, width, height, rmax, patterntype,
1146ispacked, elements, nelements, bestx, besty, xcands[i], ycands[i], ncalls);
1172rext = rexts[elements[pos]];
1174 for( i = 0; i < nelements; ++i )
1176 SCIP_Realxfix[2] = {rext, width - rext};
1177 SCIP_Realyfix[2] = {rext, height - rext};
1184Ri = rexts[elements[i]];
1187 for( k = 0; k < 2; ++k )
1202 for( k = 0; k < 2; ++k )
1242rext = rexts[elements[pos]];
1245 for( i = 0; i < nelements - 1; ++i )
1254Ri = rexts[elements[i]];
1256 for( j = i + 1; j < nelements; ++j )
1264Rj = rexts[elements[j]];
1265dist = sqrt(
SQR(xs[i] - xs[j]) +
SQR(ys[i] - ys[j]));
1273assert(dist != 0.0);
1274alpha = (dist*dist -
b*
b+
a*
a) / (2.0*dist);
1275assert(
a*
a>= alpha*alpha);
1276 h= sqrt(
MAX(
a*
a- alpha*alpha, 0.0));
1277u = xs[i] + (alpha / dist) * (xs[j] - xs[i]);
1278v = ys[i] + (alpha / dist) * (ys[j] - ys[i]);
1279n1 =
h* ((ys[j] - ys[i]) / dist);
1280n2 =
h* ((xs[i] - xs[j]) / dist);
1281assert(n1*n1 + n2*n2 > 0.0);
1283 updateBestCandidate(
scip, xs, ys, rexts, rext, rbound, width, height, rmax, patterntype, ispacked, elements,
1284nelements, bestx, besty, u + n1, v + n2, ncalls);
1285 updateBestCandidate(
scip, xs, ys, rexts, rext, rbound, width, height, rmax, patterntype, ispacked, elements,
1286nelements, bestx, besty, u - n1, v - n2, ncalls);
1306assert(rexts !=
NULL);
1308 for( i = 0; i < nelements; ++i )
1316 else if( iter == 1 )
1320 else if( iter <= 10 )
1324 else if( iter <= 20 )
1367sourcedata->ncpatterns, sourcedata->rpatterns, sourcedata->rvars, sourcedata->nrpatterns,
1368sourcedata->demands, sourcedata->rints, sourcedata->rexts, sourcedata->ntypes,
1369sourcedata->width, sourcedata->height) );
1373(*targetdata)->patternconss) );
1380(*targetdata)->ncppatternsunknownbeg = sourcedata->ncppatternsunknownbeg;
1381(*targetdata)->enumtime = sourcedata->enumtime;
1382(*targetdata)->dualbound = sourcedata->dualbound;
1383(*targetdata)->isdualinvalid = sourcedata->isdualinvalid;
1398 const char* probname,
1413 for( t = 0; t < ntypes -1; ++t )
1414assert(rexts[t] >= rexts[t+1]);
1422 SCIP_CALL(
probdataCreate(
scip, &probdata,
NULL,
NULL,
NULL, 0,
NULL,
NULL, 0, demands, rints, rexts, ntypes, width,
1448assert(probdata !=
NULL);
1480assert(probdata !=
NULL);
1496 for( t = 0; t < ntypes; ++t )
1500 for( k = t+1; k < ntypes; ++k )
1505heuriterlim, &timeleft) );
1524assert(probdata !=
NULL);
1526 returnprobdata->ntypes;
1534assert(probdata !=
NULL);
1536 returnprobdata->rexts;
1544assert(probdata !=
NULL);
1546 returnprobdata->rints;
1554assert(probdata !=
NULL);
1556 returnprobdata->demands;
1564assert(probdata !=
NULL);
1566 returnprobdata->width;
1575assert(probdata !=
NULL);
1577 returnprobdata->height;
1588assert(probdata !=
NULL);
1590 if( cpatterns !=
NULL)
1591*cpatterns = probdata->cpatterns;
1592 if( cvars !=
NULL)
1593*cvars= probdata->cvars;
1594 if( ncpatterns !=
NULL)
1595*ncpatterns = probdata->ncpatterns;
1606assert(probdata !=
NULL);
1608 if( rpatterns !=
NULL)
1609*rpatterns = probdata->rpatterns;
1610 if( rvars !=
NULL)
1611*rvars= probdata->rvars;
1612 if( nrpatterns !=
NULL)
1613*nrpatterns = probdata->nrpatterns;
1621assert(probdata !=
NULL);
1623 returnprobdata->patternconss;
1636assert(probdata !=
NULL);
1637assert(pattern !=
NULL);
1647probdata->cpatterns[probdata->ncpatterns] = copy;
1648probdata->cvars[probdata->ncpatterns] = var;
1649++(probdata->ncpatterns);
1654probdata->rpatterns[probdata->nrpatterns] = copy;
1655probdata->rvars[probdata->nrpatterns] = var;
1656++(probdata->nrpatterns);
1675assert(probdata !=
NULL);
1677 if( !probdata->isdualinvalid &&
SCIPisFeasLT(
scip, probdata->dualbound, dualbound) )
1680probdata->dualbound = dualbound;
1690assert(probdata !=
NULL);
1692 if( !probdata->isdualinvalid )
1695probdata->isdualinvalid =
TRUE;
1704assert(probdata !=
NULL);
1706 returnprobdata->isdualinvalid;
1733assert(rexts !=
NULL);
1734assert(xs !=
NULL);
1735assert(ys !=
NULL);
1736assert(ispacked !=
NULL);
1737assert(elements !=
NULL);
1738assert(nelements > 0);
1739assert(npacked !=
NULL);
1747assert(rexts[elements[0]] <= rbounding);
1748xs[0] = rexts[elements[0]] - rbounding;
1753assert(2.0 * rexts[elements[0]] <= width);
1754assert(2.0 * rexts[elements[0]] <= height);
1755xs[0] = rexts[elements[0]];
1756ys[0] = rexts[elements[0]];
1761ispacked[0] =
TRUE;
1765rmax = rexts[elements[0]];
1766 for( i = 1; i < nelements; ++i )
1768 if( rexts[elements[i]] > rmax )
1769rmax = rexts[elements[i]];
1777 for( i = 1; i < nelements; ++i )
1787 computePosTrivial(
scip, elements, nelements, rexts, xs, ys, i, ispacked, rmax, rbounding, width, height,
1788patterntype, &bestx, &besty, ncalls);
1792 computePosRingCircle(
scip, elements, nelements, rexts, xs, ys, i, ispacked, rmax, rbounding, &bestx,
1795 computePosRectangleCircle(
scip, elements, nelements, rexts, xs, ys, i, ispacked, rmax, width, height, &bestx,
1799 computePosCircleCircle(
scip, elements, nelements, rexts, xs, ys, i, ispacked, rmax, rbounding, width, height,
1800patterntype, &bestx, &besty, ncalls);
1805assert(!ispacked[i]);
1806ispacked[i] =
TRUE;
1841assert(probdata !=
NULL);
1842assert(pattern !=
NULL);
1843assert(iterlim > 0);
1849 if( timelim <= 0.0 )
1897 for( i = 0; i < nelements; ++i )
1900ispacked[i] =
FALSE;
1922 if( npacked == nelements )
1924 for( i = 0; i < nelements; ++i )
1931 SCIPdebugMsg(
scip,
"heuristic verified pattern after %d iterations\n", niters + 1);
1973assert(probdata !=
NULL);
1974assert(pattern !=
NULL);
1979 if( timelim <= 0.0 )
2009 for( k = 0; k < nelems; ++k )
2028 for( k = 0; k < nelems; ++k )
2036 for( l = k + 1; l < nelems; ++l )
2043quadvars1[0] = xvars[k]; quadvars2[0] = xvars[k]; quadcoefs[0] = 1.0;
2044quadvars1[1] = xvars[k]; quadvars2[1] = xvars[l]; quadcoefs[1] = -2.0;
2045quadvars1[2] = xvars[l]; quadvars2[2] = xvars[l]; quadcoefs[2] = 1.0;
2046quadvars1[3] = yvars[k]; quadvars2[3] = yvars[k]; quadcoefs[3] = 1.0;
2047quadvars1[4] = yvars[k]; quadvars2[4] = yvars[l]; quadcoefs[4] = -2.0;
2048quadvars1[5] = yvars[l]; quadvars2[5] = yvars[l]; quadcoefs[5] = 1.0;
2052quadcoefs,
SQR(rexts[elemtype1] + rexts[elemtype2]),
SCIPinfinity(subscip),
2061 for( k = 0; k < nelems; ++k )
2068quadvars1[0] = xvars[k]; quadvars2[0] = xvars[k]; quadcoefs[0] = 1.0;
2069quadvars1[1] = yvars[k]; quadvars2[1] = yvars[k]; quadcoefs[1] = 1.0;
2072 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(subscip, &cons, name, 0,
NULL,
NULL, 2, quadvars1, quadvars2, quadcoefs,
20730.0,
SQR(rints[type] - rexts[elemtype]),
2081 for( k = 0; k < nelems - 1; ++k )
2089 for( l = k + 1; l < nelems; ++l )
2096 if( elemtype1 != elemtype2 )
2110 SCIPdebugMsg(
scip,
"--------------------- SOLVE VERIFICATION NLP -------------------\n");
2112 SCIPdebugMsg(
scip,
"----------------------------------------------------------------\n");
2114 SCIPdebugMsg(
scip,
"result of verification NLP: nsols=%d solstat=%d\n",
2122 for( k = 0; k < nelems; ++k )
2136 for( k = 0; k < nelems; ++k )
2164assert(probdata !=
NULL);
2165assert(pattern !=
NULL);
2208assert(patterntype >= 0);
2210assert(
SCIPisFeasLE(
scip, distance, rints[patterntype] - rexts[typei]));
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsQuadraticNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPsetObjIntegral(SCIP *scip)
SCIP_RETCODE SCIPsetProbDeltrans(SCIP *scip, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
SCIP_RETCODE SCIPsetProbTrans(SCIP *scip, SCIP_DECL_PROBTRANS((*probtrans)))
SCIP_RETCODE SCIPsetProbDelorig(SCIP *scip, SCIP_DECL_PROBDELORIG((*probdelorig)))
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_PROBDATA * SCIPgetProbData(SCIP *scip)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetProbData(SCIP *scip, SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPupdateLocalDualbound(SCIP *scip, SCIP_Real newbound)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetLongintParam(SCIP *scip, const char *name, SCIP_Longint *value)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
int SCIPgetNSols(SCIP *scip)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_TABLE * SCIPfindTable(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_Real SCIPgetTotalTime(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPtransformVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
void SCIPsortDownRealIntInt(SCIP_Real *realarray, int *intarray1, int *intarray2, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
#define BMSclearMemory(ptr)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPpatternGetElementPosY(SCIP_PATTERN *pattern, int elem)
SCIP_RETCODE SCIPpatternAddElement(SCIP_PATTERN *pattern, int type, SCIP_Real x, SCIP_Real y)
void SCIPpatternSetPackableStatus(SCIP_PATTERN *pattern, SCIP_PACKABLE packable)
SCIP_Real SCIPpatternGetElementPosX(SCIP_PATTERN *pattern, int elem)
SCIP_RETCODE SCIPpatternCreateRectangular(SCIP *scip, SCIP_PATTERN **pattern)
SCIP_PATTERNTYPE SCIPpatternGetPatternType(SCIP_PATTERN *pattern)
int SCIPpatternCountElements(SCIP_PATTERN *pattern, int type)
void SCIPpatternSetElementPos(SCIP_PATTERN *pattern, int elem, SCIP_Real x, SCIP_Real y)
void SCIPpatternRemoveLastElements(SCIP_PATTERN *pattern, int k)
SCIP_RETCODE SCIPpatternCreateCircular(SCIP *scip, SCIP_PATTERN **pattern, int type)
SCIP_PACKABLE SCIPpatternGetPackableStatus(SCIP_PATTERN *pattern)
void SCIPpatternSetType(SCIP_PATTERN *pattern, int type)
int SCIPpatternGetElementType(SCIP_PATTERN *pattern, int i)
void SCIPpatternRelease(SCIP *scip, SCIP_PATTERN **pattern)
int SCIPpatternGetNElemens(SCIP_PATTERN *pattern)
void SCIPpatternCapture(SCIP_PATTERN *pattern)
SCIP_RETCODE SCIPpatternCopy(SCIP *scip, SCIP_PATTERN *pattern, SCIP_PATTERN **copy)
int SCIPpatternGetCircleType(SCIP_PATTERN *pattern)
enum SCIP_Patterntype SCIP_PATTERNTYPE
enum SCIP_Packable SCIP_PACKABLE
@ SCIP_PATTERNTYPE_RECTANGULAR
@ SCIP_PATTERNTYPE_CIRCULAR
SCIP_RETCODE SCIPpricerRpaActivate(SCIP *scip)
Ringpacking variable pricer.
static SCIP_RETCODE enumeratePatterns(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, int *ms, int *nselected, SCIP_Real nlptilim, SCIP_Real heurtilim, SCIP_Longint nlpnodelim, int heuriterlim, SCIP_Real *timeleft)
#define TABLE_POSITION_RPA
SCIP_Real SCIPprobdataGetHeight(SCIP_PROBDATA *probdata)
SCIP_Bool SCIPprobdataIsDualboundInvalid(SCIP_PROBDATA *probdata)
static SCIP_RETCODE createPatternVars(SCIP *scip, SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPverifyCircularPatternNLP(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_Real timelim, SCIP_Longint nodelim)
static SCIP_DECL_PROBDELORIG(probdelorigRingpacking)
static SCIP_DECL_PROBTRANS(probtransRingpacking)
static void updateBestCandidate(SCIP *scip, SCIP_Real *xs, SCIP_Real *ys, SCIP_Real *rexts, SCIP_Real rext, SCIP_Real rbounding, SCIP_Real wbounding, SCIP_Real hbounding, SCIP_Real rmax, SCIP_PATTERNTYPE patterntype, SCIP_Bool *ispacked, int *elements, int nelements, SCIP_Real *bestx, SCIP_Real *besty, SCIP_Real x, SCIP_Real y, int ncalls)
static SCIP_RETCODE probdataCreate(SCIP *scip, SCIP_PROBDATA **probdata, SCIP_CONS **patternconss, SCIP_PATTERN **cpatterns, SCIP_VAR **cvars, int ncpatterns, SCIP_PATTERN **rpatterns, SCIP_VAR **rvars, int nrpatterns, int *demands, SCIP_Real *rints, SCIP_Real *rexts, int ntypes, SCIP_Real width, SCIP_Real height)
#define TABLE_EARLIEST_STAGE_RPA
static SCIP_RETCODE setupProblem(SCIP *scip, SCIP_PROBDATA *probdata)
int * SCIPprobdataGetDemands(SCIP_PROBDATA *probdata)
void SCIPprobdataGetRInfos(SCIP_PROBDATA *probdata, SCIP_PATTERN ***rpatterns, SCIP_VAR ***rvars, int *nrpatterns)
static int maxCircles(SCIP *scip, SCIP_PROBDATA *probdata, int type, int elemtype)
static SCIP_RETCODE ensureSize(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERNTYPE type, int size)
int SCIPprobdataGetNTypes(SCIP_PROBDATA *probdata)
static SCIP_RETCODE filterPatterns(SCIP *scip, SCIP_PROBDATA *probdata)
static void computeScores(SCIP *scip, SCIP_PROBDATA *probdata, int *elements, int nelements, SCIP_Real *scores, int iter)
SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *demands, SCIP_Real *rints, SCIP_Real *rexts, int ntypes, SCIP_Real width, SCIP_Real height)
static void computePosCircleCircle(SCIP *scip, int *elements, int nelements, SCIP_Real *rexts, SCIP_Real *xs, SCIP_Real *ys, int pos, SCIP_Bool *ispacked, SCIP_Real rmax, SCIP_Real rbound, SCIP_Real width, SCIP_Real height, SCIP_PATTERNTYPE patterntype, SCIP_Real *bestx, SCIP_Real *besty, int ncalls)
SCIP_RETCODE SCIPprobdataAddVar(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_VAR *var)
void SCIPprobdataGetCInfos(SCIP_PROBDATA *probdata, SCIP_PATTERN ***cpatterns, SCIP_VAR ***cvars, int *ncpatterns)
static int isPatternDominating(SCIP_PATTERN *p, SCIP_PATTERN *q, int *count, int ntypes)
static SCIP_DECL_TABLEOUTPUT(tableOutputRpa)
static void computePosRingCircle(SCIP *scip, int *elements, int nelements, SCIP_Real *rexts, SCIP_Real *xs, SCIP_Real *ys, int pos, SCIP_Bool *ispacked, SCIP_Real rmax, SCIP_Real rbound, SCIP_Real *bestx, SCIP_Real *besty, int ncalls)
SCIP_Real * SCIPprobdataGetRexts(SCIP_PROBDATA *probdata)
SCIP_CONS ** SCIPprobdataGetPatternConss(SCIP_PROBDATA *probdata)
static int getNCPatterns(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PACKABLE status)
SCIP_RETCODE SCIPverifyCircularPatternHeuristic(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern, SCIP_Real timelim, int iterlim)
static void computePosTrivial(SCIP *scip, int *elements, int nelements, SCIP_Real *rexts, SCIP_Real *xs, SCIP_Real *ys, int pos, SCIP_Bool *ispacked, SCIP_Real rmax, SCIP_Real rbound, SCIP_Real width, SCIP_Real height, SCIP_PATTERNTYPE patterntype, SCIP_Real *bestx, SCIP_Real *besty, int ncalls)
SCIP_RETCODE SCIPprobdataEnumeratePatterns(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_Real nlptilim, SCIP_Real heurtilim, SCIP_Real totaltilim, SCIP_Longint nlpnodelim, int heuriterlim)
static SCIP_RETCODE probdataFree(SCIP *scip, SCIP_PROBDATA **probdata)
static void computePosRectangleCircle(SCIP *scip, int *elements, int nelements, SCIP_Real *rexts, SCIP_Real *xs, SCIP_Real *ys, int pos, SCIP_Bool *ispacked, SCIP_Real rmax, SCIP_Real width, SCIP_Real height, SCIP_Real *bestx, SCIP_Real *besty, int ncalls)
SCIP_Real * SCIPprobdataGetRints(SCIP_PROBDATA *probdata)
void SCIPprobdataUpdateDualbound(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_Real dualbound)
void SCIPprobdataInvalidateDualbound(SCIP *scip, SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPprobdataSetupProblem(SCIP *scip)
static SCIP_DECL_PROBDELTRANS(probdeltransRingpacking)
void SCIPcheckPattern(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_PATTERN *pattern)
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_Real SCIPprobdataGetWidth(SCIP_PROBDATA *probdata)
Problem data for ringpacking problem.
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
@ SCIP_PARAMEMPHASIS_FEASIBILITY
struct SCIP_ProbData SCIP_PROBDATA
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4