|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.bonn.cs.iv.bonnmotion.App
edu.bonn.cs.iv.bonnmotion.Scenario
edu.bonn.cs.iv.bonnmotion.models.ManhattanGrid
public class ManhattanGrid
Manhattan Grid mobility scenario.
Field Summary | |
---|---|
protected double |
maxPause
Maximum pause time [s]. |
protected double |
meanSpeed
Mobile's mean speed [m/s]. |
protected double |
minSpeed
Mobile's minimum speed [m/s]. |
protected double |
pauseProb
Probability for the mobile to pause (every updateDist m), given it does not change it's speed. |
protected double |
speedChangeProb
Probability for the mobile to change its speed (every updateDist m). |
protected double |
speedStdDev
Standard deviation of normally distributed random speed [m/s]. |
protected double |
turnProb
Probability for the mobile to turn at a crossing. |
protected double |
updateDist
Distance interval in which to possibly update the mobile's speed [m]. |
protected int |
xblocks
Number of blocks on x-axis. |
protected double |
xdim
Size of a block on x-axis, calculated from xblocks. |
protected int |
yblocks
Number of blocks on y-axis. |
protected double |
ydim
Size of a block on y-axis, calculated from yblocks. |
Fields inherited from class edu.bonn.cs.iv.bonnmotion.Scenario |
---|
aField, aFieldParams, buildings, circular, duration, ignore, isTransition, modelName, node, predecessorScenario, rand, randomSeed, transitionMode, x, y |
Fields inherited from interface edu.bonn.cs.iv.bonnmotion.ScenarioLink |
---|
LINKMODE_FAST, LINKMODE_MOVE |
Constructor Summary | |
---|---|
ManhattanGrid(int nodes,
double x,
double y,
double duration,
double ignore,
long randomSeed,
int xblocks,
int yblocks,
double updateDist,
double turnProb,
double speedChangeProb,
double meanSpeed,
double minSpeed,
double speedStdDev,
double pauseProb,
double maxPause)
|
|
ManhattanGrid(java.lang.String[] args)
|
|
ManhattanGrid(java.lang.String[] args,
Scenario _pre,
java.lang.Integer _transitionMode)
|
Method Summary | |
---|---|
Position |
alignPos(Position pos)
|
void |
generate()
|
Position |
getNewPos(Position src,
double dist,
int dir)
|
void |
go(java.lang.String[] args)
Main method from where all the magic starts ... |
protected boolean |
mustTurn(Position pos,
int dir)
|
boolean |
nodeAddErrorHandler(int i,
double t,
Position dst)
|
boolean |
outOfBounds(Position pos)
|
protected boolean |
parseArg(char key,
java.lang.String val)
|
protected boolean |
parseArg(java.lang.String key,
java.lang.String value)
|
static void |
printHelp()
|
Waypoint |
transitionWaypointFast(Waypoint _w)
|
void |
write(java.lang.String _name)
|
Methods inherited from class edu.bonn.cs.iv.bonnmotion.Scenario |
---|
cut, getBuilding, getDuration, getIgnore, getModelName, getNode, getNode, getRandomSeed, getX, getY, nodeCount, paramFromFile, paramFromFile, postGeneration, preGeneration, randomNextDouble, randomNextGaussian, randomNextPosition, randomNextPosition, read, setDuration, setModelName, setNode, transition, transitionWaypointMove, write |
Methods inherited from class edu.bonn.cs.iv.bonnmotion.App |
---|
exceptionHandler, openPrintWriter, parse, parseArg, parseDoubleArray, parseIntArray, parseStringArray, stringArrayConcat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int xblocks
protected int yblocks
protected double updateDist
protected double turnProb
protected double speedChangeProb
protected double meanSpeed
protected double minSpeed
protected double speedStdDev
protected double pauseProb
protected double maxPause
protected double xdim
protected double ydim
Constructor Detail |
---|
public ManhattanGrid(int nodes, double x, double y, double duration, double ignore, long randomSeed, int xblocks, int yblocks, double updateDist, double turnProb, double speedChangeProb, double meanSpeed, double minSpeed, double speedStdDev, double pauseProb, double maxPause)
public ManhattanGrid(java.lang.String[] args)
public ManhattanGrid(java.lang.String[] args, Scenario _pre, java.lang.Integer _transitionMode)
Method Detail |
---|
public void go(java.lang.String[] args)
App
go
in class Scenario
App.go(String[])
public void generate()
protected boolean parseArg(java.lang.String key, java.lang.String value)
parseArg
in class Scenario
public boolean outOfBounds(Position pos)
protected boolean mustTurn(Position pos, int dir)
public Position alignPos(Position pos)
public Position getNewPos(Position src, double dist, int dir)
public boolean nodeAddErrorHandler(int i, double t, Position dst)
public void write(java.lang.String _name) throws java.io.FileNotFoundException, java.io.IOException
write
in interface Model
write
in class Scenario
java.io.FileNotFoundException
java.io.IOException
protected boolean parseArg(char key, java.lang.String val)
parseArg
in class Scenario
public static void printHelp()
public Waypoint transitionWaypointFast(Waypoint _w)
transitionWaypointFast
in interface ScenarioLink
transitionWaypointFast
in class Scenario
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |