Commit 1d84fab6 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Fixed cloudlet-BW bug in the 5G view

parent cdfeb324
......@@ -69,12 +69,16 @@ public class GridPositionDistribution implements PlacementModel {
placedComponents = (placedComponents + 1) % numberOfComponents;
return pos;
}
public void setRandomOffset(boolean randInCell) {
this.randInCell = randInCell;
}
private void calcPositions2D() {
float ratio = (float) (worldDimensions.getX() / worldDimensions.getY());
float ratio_1 = 1 / ratio;
int anz_x = ((int) Math.sqrt(ratio * numberOfComponents)) + 1;
int anz_y = ((int) Math.sqrt(ratio_1 * numberOfComponents)) + 1;
int anz_x = (int) Math.ceil(Math.sqrt(ratio * numberOfComponents));
int anz_y = (int) Math.ceil( Math.sqrt(ratio_1 * numberOfComponents));
int dist_x = (int) worldDimensions.getX() / anz_x;
int dist_y = (int) worldDimensions.getY() / anz_y;
for (int x = 0; x < anz_x; x++) {
......
......@@ -243,7 +243,7 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
MacAddress mobileClient = sourceIsClient ? source : destination;
CellLink link = new CellLink(source, destination, true,
getPhyType().getDefaultMTU(), mobileClient,
cloudlets.contains(mobileClient),
cloudlets.contains(sourceIsClient ? destination : source),
mobileClientsUsingAccessPoints.contains(mobileClient));
updateOutdatedLink(link);
return link;
......
......@@ -56,6 +56,7 @@ public class StaticSegmentDatabase extends AbstractGridBasedTopologyDatabase {
public StaticSegmentDatabase() {
super(100, true);
super.setSupportCloudlets(true);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment