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
263438bf
Commit
263438bf
authored
May 18, 2020
by
Julian Zobel
Browse files
ConfigDynamicAttractionGenerator for fixeds and temporal APs
parent
568a9508
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/attraction/ConfigDynamicAttractionGenerator.java
View file @
263438bf
...
...
@@ -20,7 +20,6 @@
package
de.tud.kom.p2psim.impl.topology.movement.modularosm.attraction
;
import
java.util.LinkedList
;
import
de.tudarmstadt.maki.simonstrator.api.Event
;
import
de.tudarmstadt.maki.simonstrator.api.EventHandler
;
...
...
@@ -33,17 +32,26 @@ import de.tudarmstadt.maki.simonstrator.api.EventHandler;
*/
public
class
ConfigDynamicAttractionGenerator
extends
AbstractAttractionProvider
{
private
LinkedList
<
TemporalAttractionPoint
>
allAP
s
=
new
LinkedList
<>();
//
private LinkedList<TemporalAttractionPoint>
temporalAttractionPoint
s = new LinkedList<>();
public
void
setAttractionPoint
(
TemporalAttractionPoint
ap
)
{
allAPs
.
add
(
ap
);
public
void
setAttractionPoint
(
AttractionPoint
ap
)
{
addAttractionPoint
(
ap
);
}
public
void
setTemporalAttractionPoint
(
TemporalAttractionPoint
ap
)
{
//temporalAttractionPoints.add(ap);
if
(
ap
.
getPlacementTime
()
==
0
)
{
placeAP
(
ap
);
}
else
{
Event
.
scheduleWithDelay
(
ap
.
getPlacementTime
(),
new
EventHandler
()
{
@Override
public
void
eventOccurred
(
Object
content
,
int
type
)
{
placeAP
(
ap
);
}
},
null
,
0
);
}
Event
.
scheduleWithDelay
(
ap
.
getPlacementTime
(),
new
EventHandler
()
{
@Override
public
void
eventOccurred
(
Object
content
,
int
type
)
{
placeAP
(
ap
);
}
},
null
,
0
);
}
void
placeAP
(
TemporalAttractionPoint
ap
)
{
...
...
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