Compute space margin from bounding box (for user-specified bounding box)
This commit is contained in:
parent
06ea3d6e09
commit
7b7e852f67
|
@ -763,10 +763,11 @@ namespace Etesian {
|
||||||
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
|
||||||
++fixedNb;
|
++fixedNb;
|
||||||
totalLength -= length;
|
totalLength -= length;
|
||||||
} else if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) {
|
|
||||||
cerr << "PLACED " << instance << endl;
|
|
||||||
} else {
|
} else {
|
||||||
usedLength += length;
|
usedLength += length;
|
||||||
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) {
|
||||||
|
cerr << "PLACED " << instance << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (instancesNb <= fixedNb) {
|
if (instancesNb <= fixedNb) {
|
||||||
|
@ -842,7 +843,8 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double spaceMargin = getSpaceMargin();
|
// Compute the space margin from the row length computed earlier
|
||||||
|
double spaceMargin = (double) (totalLength - usedLength) / usedLength;
|
||||||
double densityVariation = getDensityVariation();
|
double densityVariation = getDensityVariation();
|
||||||
double bloatFactor = 1.0 + std::max(spaceMargin - densityVariation, 0.0);
|
double bloatFactor = 1.0 + std::max(spaceMargin - densityVariation, 0.0);
|
||||||
if (bloatFactor != 1.0) {
|
if (bloatFactor != 1.0) {
|
||||||
|
|
Loading…
Reference in New Issue