|
|||||||||
| 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 |
| Field Summary | |
|---|---|
private Location.Location2D |
bounds
field boundaries. |
private double |
fixedRadius
fixed component of step size. |
private long |
pauseTime
time wait between steps. |
private double |
randomRadius
random component of step size. |
| 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. |
private void |
init(Location.Location2D bounds,
double fixedRadius,
double randomRadius,
long pauseTime)
Initialize random walk object. |
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 |
| Field Detail |
|---|
private double fixedRadius
private double randomRadius
private long pauseTime
private Location.Location2D bounds
| 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 steps
public Mobility.RandomWalk(Location.Location2D bounds,
java.lang.String config)
bounds - field boundariesconfig - configuration string: "fixed,random,time(in seconds)"| Method Detail |
|---|
private void init(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 steps
public Mobility.MobilityInfo init(FieldInterface f,
java.lang.Integer id,
Location loc)
init in interface Mobilityf - field entityid - node identifierloc - node location
public void next(FieldInterface f,
java.lang.Integer id,
Location loc,
Mobility.MobilityInfo info)
next in interface Mobilityf - 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 | ||||||||