|
|||||||||
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 java.lang.String |
CON_ALG_S
Connection algorithm selection -setting id ("connectionAlg"). |
static int |
DEF_CON_ALG
default value for connection checking algorithm (2) |
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(SimScenario scen)
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 |
setExternalEvents(ExternalEventsQueue extEvents)
Sets (or disables) the External events queue for this world. |
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 CON_ALG_S
ConnectivityGrid.connectToNearNodes(DTNHost)
ConnectivityGrid.connectAllNearNodes()
DEF_CON_ALG
. Selection of the algorithm
should not affect the amount of connections but it may affect the
ordering of them (i.e. the order in which connections during the
same update interval happen may change and also the "initiator" of the
connection may change if the algorithm is changed).
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_ALG
public static final int DEF_CON_CELL_SIZE_MULT
public static final boolean DEF_RANDOMIZE_UPDATES
Constructor Detail |
---|
public World(SimScenario scen)
scen
- The Scenario to base this world on.Method Detail |
---|
public void warmupMovementModel(double time)
-time
before
calling this method.
time
- The total time (seconds) to movepublic void setExternalEvents(ExternalEventsQueue extEvents)
extEvents
- The ee queue or null to disable external eventspublic 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |