|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.net.Module
drcl.inet.mac.MobilityModel
This class simulates the movement of the mobile nodes. The position of
the node is periodically updated and reported to the NodePositionTracker
component. The coordinates can be either (longitude, lagitude, height) or (X, Y, Z).
There are two different modes. If a trajectory array is installed, the mobility
model assume the mobile node move from one point in the trajectory to the
next point at a constant speed. Otherwise starting from the original
position, the node randomly chooses a position in the simulated area as the destination,
and moves in a straight line to that destiona point at a constant speed which is
uniformly distributed between 0 and Max_Speed. Whenever the node arrives at the destination,
it chooses the next position and repeats the procedure again.
WirelessPhy,
NodePositionTracker,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
double |
destX
The x coordinate of the destination position |
double |
destY
The y coordinate of the destination position |
double |
destZ
The z coordinate of the destination position |
double |
dX
The grid size along X-axle |
double |
dY
The grid size along Y-axle |
double |
dZ
The grid size along Z-axle |
double |
Max_Speed
The maximal speed for generating a random speed heading to the next random direction |
double |
maxX
The largest x coordinate value of the simulated area |
double |
maxY
The largest y coordinate value of the simulated area |
double |
maxZ
The largest z coordinate value of the simulated area |
double |
minX
The smallest x coordinate value of the simulated area |
double |
minY
The smallest y coordinate value of the simulated area |
double |
minZ
The smallest z coordinate value of the simulated area |
long |
nid
This field is defined to keep the node Id instead of requesting such kind of information from other components which may incur extra simulation overhead. |
double |
speed
The moving speed |
double |
sx
The moving speed along the x-axle |
double |
sy
The moving speed along the y-axle |
double |
sz
The moving speed along the z-axle |
double |
X
The x coordinator of the node's current position |
double |
X0
The x coordinate of the node's previous position |
double |
Y
The y coordinator of the node's current position |
double |
Y0
The y coordinate of the node's previous position |
double |
Z
The z coordinator of the node's current position |
double |
Z0
the z coordinate of the node's previous position |
| Fields inherited from class drcl.net.Module |
downPort, PortGroup_DOWN, PortGroup_UP, upPort |
| Constructor Summary | |
MobilityModel()
Constructor. |
|
MobilityModel(long nid_)
Constructor. |
|
| Method Summary | |
long |
getNid()
Gets the nid. |
void |
installTrajectory(double[][] trajectory_)
Installs a trajectory array. |
void |
reportPosition(boolean forcedReport)
Sends position report to the NodePositionTracker component.
|
void |
setNid(long nid_)
Sets the nid. |
void |
setPosition(double Max_Speed_,
double X_,
double Y_,
double Z_)
Sets the initial position of the node. |
void |
setRandomDestination()
Sets a random generated destination to move to |
void |
setRandomPosition()
Sets this mobile node to a random generated position. |
void |
setSeed(long seed)
Sets the seed of the random number generator. |
void |
setTopologyParameters(double maxX_,
double maxY_,
double minX_,
double minY_,
double dX_,
double dY_,
double dZ_)
Set topology parameters |
void |
setTopologyParameters(double maxX_,
double maxY_,
double maxZ_,
double minX_,
double minY_,
double minZ_,
double dX_,
double dY_,
double dZ_)
Set topology parameters |
void |
setTrajectoryDestination()
Sets the next destination according to the installed trajectory. |
void |
updatePosition()
Calculates the current position upon timeout or query |
| Methods inherited from class drcl.net.Module |
cancelTimeout, duplicate, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public long nid
public double maxX
public double maxY
public double maxZ
public double minX
public double minY
public double minZ
public double dX
public double dY
public double dZ
public double X
public double Y
public double Z
public double X0
public double Y0
public double Z0
public double destX
public double destY
public double destZ
public double sx
public double sy
public double sz
public double speed
public double Max_Speed
| Constructor Detail |
public MobilityModel(long nid_)
nid_ - the id of the mobile node.public MobilityModel()
| Method Detail |
public void setNid(long nid_)
nid_ - the id of the mobile node.public long getNid()
public void installTrajectory(double[][] trajectory_)
public void setTopologyParameters(double maxX_,
double maxY_,
double minX_,
double minY_,
double dX_,
double dY_,
double dZ_)
maxX_ - largest x coordinate value of the simulated areaminX_ - smallest x coordinate value of the simulated areamaxY_ - largest y coordinate value of the simulated areaminY_ - smallest y coordinate value of the simulated areadX_ - grid size along X-axledY_ - grid size along Y-axledZ_ - grid size along Z-axle
public void setTopologyParameters(double maxX_,
double maxY_,
double maxZ_,
double minX_,
double minY_,
double minZ_,
double dX_,
double dY_,
double dZ_)
maxX_ - largest x coordinate value of the simulated areaminX_ - smallest x coordinate value of the simulated areamaxY_ - largest y coordinate value of the simulated areaminY_ - smallest y coordinate value of the simulated areamaxZ_ - largest y coordinate value of the simulated areaminZ_ - smallest y coordinate value of the simulated areadX_ - grid size along X-axledY_ - grid size along Y-axledZ_ - grid size along Z-axle
public void setPosition(double Max_Speed_,
double X_,
double Y_,
double Z_)
Max_Speed_ - - maximum moving speedX_ - - initial X coordinateY_ - - initial Y coordinateZ_ - - initial Z coordinatepublic void setRandomPosition()
public void setRandomDestination()
public void setTrajectoryDestination()
public void updatePosition()
public void reportPosition(boolean forcedReport)
NodePositionTracker component.
If falseReport is set to true, the report is generated immediately.
public void setSeed(long seed)
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||