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
e50cb014
Commit
e50cb014
authored
Jun 13, 2022
by
Julian Zobel
Browse files
Changed distance between random AP calculation
parent
9ace5c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/attraction/RandomAttractionGenerator.java
View file @
e50cb014
...
...
@@ -21,7 +21,6 @@
package
de.tud.kom.p2psim.impl.topology.movement.modularosm.attraction
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Random
;
import
de.tud.kom.p2psim.api.scenario.ConfigurationException
;
import
de.tud.kom.p2psim.impl.topology.util.PositionVector
;
...
...
@@ -114,7 +113,7 @@ public class RandomAttractionGenerator extends AbstractAttractionProvider {
// if this point is closer than the given minimum distance to another point, or the radii of the points would overlap,
// or if the radius would exceed the simulation area
// then discard this attraction point and create a new one
if
(
posVec
.
distanceTo
(
ap
)
<
minimumDistance
||
(
posVec
.
distanceTo
(
ap
)
-
radius
-
ap
.
getRadius
())
<
0
)
{
if
((
posVec
.
distanceTo
(
ap
)
-
radius
-
ap
.
getRadius
())
<
minimumDistance
)
{
i
--;
c
++;
continue
create
;
...
...
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