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
51c3d041
Commit
51c3d041
authored
Jun 07, 2019
by
Julian Zobel
Browse files
Random Generators now call the AP monitors
parent
af3f2cc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/attraction/RandomAttractionGenerator.java
View file @
51c3d041
...
...
@@ -134,7 +134,10 @@ public class RandomAttractionGenerator implements IAttractionGenerator {
}
attractionPoints
.
clear
();
attractionPoints
.
addAll
(
result
);
for
(
AttractionPoint
ap
:
result
)
{
addAttractionPoint
(
ap
);
}
}
private
PositionVector
createPosVec
()
{
...
...
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/attraction/RandomDynamicAttractionGenerator.java
View file @
51c3d041
...
...
@@ -134,7 +134,7 @@ public class RandomDynamicAttractionGenerator implements IAttractionGenerator {
for
(
int
i
=
0
;
i
<
deltaAP
;
i
++)
{
int
random
=
rand
.
nextInt
(
attractionPoints
.
size
());
attractionPoints
.
remove
(
random
);
removeAttractionPoint
(
attractionPoints
.
get
(
random
)
)
;
}
return
;
}
...
...
@@ -146,7 +146,7 @@ public class RandomDynamicAttractionGenerator implements IAttractionGenerator {
for
(
int
i
=
0
;
i
<
deltaAP
;
i
++)
{
AttractionPoint
newAP
=
createAttractionPoint
();
scheduleDynamicEvent
(
newAP
);
attractionPoint
s
.
add
(
newAP
);
a
ddA
ttractionPoint
(
newAP
);
}
}
}
...
...
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