|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.swans.field.Mobility.RandomWalk
public static class Mobility.RandomWalk
Random Walk mobility model: pick a direction, walk a certain distance in that direction, with some fixed and random component, reflecting off walls as necessary, then pause for some time and repeat.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jist.swans.field.Mobility |
---|
Mobility.MobilityInfo, Mobility.RandomWalk, Mobility.RandomWaypoint, Mobility.RandomWaypointInfo, Mobility.Static, Mobility.Teleport |
Constructor Summary | |
---|---|
Mobility.RandomWalk(Location.Location2D bounds,
double fixedRadius,
double randomRadius,
long pauseTime)
Create and initialize new random walk object. |
|
Mobility.RandomWalk(Location.Location2D bounds,
java.lang.String config)
Create an initialize a new random walk object. |
Method Summary | |
---|---|
Mobility.MobilityInfo |
init(FieldInterface f,
java.lang.Integer id,
Location loc)
Initiate mobility; initialize mobility data structures. |
void |
next(FieldInterface f,
java.lang.Integer id,
Location loc,
Mobility.MobilityInfo info)
Schedule next movement. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Mobility.RandomWalk(Location.Location2D bounds, double fixedRadius, double randomRadius, long pauseTime)
bounds
- field boundariesfixedRadius
- fixed component of step sizerandomRadius
- random component of step sizepauseTime
- time wait between stepspublic Mobility.RandomWalk(Location.Location2D bounds, java.lang.String config)
bounds
- field boundariesconfig
- configuration string: "fixed,random,time(in seconds)"Method Detail |
---|
public Mobility.MobilityInfo init(FieldInterface f, java.lang.Integer id, Location loc)
init
in interface Mobility
f
- field entityid
- node identifierloc
- node location
public void next(FieldInterface f, java.lang.Integer id, Location loc, Mobility.MobilityInfo info)
next
in interface Mobility
f
- field entityid
- radio identifierloc
- destination of moveinfo
- mobility information objectpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |