|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.World
public class World
World contains all the nodes and is responsible for updating their location and connections.
Field Summary | |
---|---|
static java.lang.String |
CELL_SIZE_MULT_S
Cell based optimization cell size multiplier -setting id ("cellSizeMult"). |
static int |
DEF_CON_CELL_SIZE_MULT
default value for cell size multiplier (5) |
static boolean |
DEF_RANDOMIZE_UPDATES
should the update order of nodes be randomized -setting's default value (true) |
static java.lang.String |
RANDOMIZE_UPDATES_S
Should the order of node updates be different (random) within every update step -setting id ("randomizeUpdateOrder"). |
static java.lang.String |
SETTINGS_NS
namespace of optimization settings ("Optimization") |
Constructor Summary | |
---|---|
World(java.util.List<DTNHost> hosts,
int sizeX,
int sizeY,
double updateInterval,
java.util.List<UpdateListener> updateListeners,
boolean simulateConnections,
java.util.List<EventQueue> eventQueues)
Constructor. |
Method Summary | |
---|---|
void |
cancelSim()
Asynchronously cancels the currently running simulation |
java.util.List<DTNHost> |
getHosts()
Returns the hosts in a list |
DTNHost |
getNodeByAddress(int address)
Returns a node from the world by its address |
int |
getSizeX()
Returns the x-size (width) of the world |
int |
getSizeY()
Returns the y-size (height) of the world |
void |
scheduleUpdate(double simTime)
Schedules an update request to all nodes to happen at the specified simulation time. |
void |
setNextEventQueue()
Goes through all event Queues and sets the event queue that has the next event. |
void |
update()
Update (move, connect, disconnect etc.) all hosts in the world. |
void |
warmupMovementModel(double time)
Moves hosts in the world for the time given time initialize host positions properly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SETTINGS_NS
public static final java.lang.String CELL_SIZE_MULT_S
DEF_CON_CELL_SIZE_MULT
.
Smallest accepted value is 2.
ConnectivityGrid
,
Constant Field Valuespublic static final java.lang.String RANDOMIZE_UPDATES_S
DEF_RANDOMIZE_UPDATES
.
public static final int DEF_CON_CELL_SIZE_MULT
public static final boolean DEF_RANDOMIZE_UPDATES
Constructor Detail |
---|
public World(java.util.List<DTNHost> hosts, int sizeX, int sizeY, double updateInterval, java.util.List<UpdateListener> updateListeners, boolean simulateConnections, java.util.List<EventQueue> eventQueues)
Method Detail |
---|
public void warmupMovementModel(double time)
-time
before
calling this method.
time
- The total time (seconds) to movepublic void setNextEventQueue()
public void update()
public void cancelSim()
public java.util.List<DTNHost> getHosts()
public int getSizeX()
public int getSizeY()
public DTNHost getNodeByAddress(int address)
address
- The address of the node
public void scheduleUpdate(double simTime)
simTime
- The time of the update
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |