|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mates.sim.models.mobility.GridMobilityModel
Mobility model for a grid. Hosts randomly move to an adjacent grid
entry. This mobility model is meant to be used with a link model
such as QuadraticLinkModel
and
GridLinkModel
.
Hosts using this link model must have a position of
type Position2D
.
This model is akin to the City Section Mobility Model, described in:
Camp, T.; Boleng, J.; and Davies, V. 2002. A survey of mobility models for ad hoc network research. Wireless Communication & Mobile Computing (WCMC): Special Issue on Mobile Ad Hoc Networking: Research, Trends and Applications 2(5):483--502.
Note that, with the current implementation, externally modifying anything within the grid object passed to this class with have unknown results.
Constructor Summary | |
GridMobilityModel(Grid grid,
double x,
double y,
double width,
double height,
int move_iterations,
java.util.Random random)
Constructs a grid mobility model. |
Method Summary | |
void |
moveHost(Host host)
Moves a host to an adjacent grid point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GridMobilityModel(Grid grid, double x, double y, double width, double height, int move_iterations, java.util.Random random)
grid
- should be shared with every host using this
mobility model. This object is used to store the hosts'
positions.x
- the x coordinate of the upper-left corner of the grid
within the domainy
- the y coordinate of the upper-left corner of the grid
within the domainwidth
- the width of the gridheight
- the height of the gridmove_iterations
- the number of iterations required for a
host to move from one grid point to an adjacent grid pointrandom
- the random number generator to use. This should
almost always be the random number generator from the simulator
(Simulator.getRandom()
).Method Detail |
public void moveHost(Host host)
moveHost
in interface MobilityModel
|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |