Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
1d84fab6
Commit
1d84fab6
authored
Dec 11, 2015
by
Björn Richerzhagen
Browse files
Fixed cloudlet-BW bug in the 5G view
parent
cdfeb324
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/placement/GridPositionDistribution.java
View file @
1d84fab6
...
...
@@ -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
++)
{
...
...
src/de/tud/kom/p2psim/impl/topology/views/FiveGTopologyView.java
View file @
1d84fab6
...
...
@@ -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
;
...
...
src/de/tud/kom/p2psim/impl/topology/views/fiveg/StaticSegmentDatabase.java
View file @
1d84fab6
...
...
@@ -56,6 +56,7 @@ public class StaticSegmentDatabase extends AbstractGridBasedTopologyDatabase {
public
StaticSegmentDatabase
()
{
super
(
100
,
true
);
super
.
setSupportCloudlets
(
true
);
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment