org.ascape.gis.model
Class Globe
java.lang.Object
org.ascape.model.space.CollectionSpace
org.ascape.model.space.Continuous2D
org.ascape.gis.model.Globe
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, Continuous, Mutable, Space, RandomFunctions
public class Globe
- extends Continuous2D
A scape containing a population of agents that exist within a map of space on
the earth.
This is designed to work with OpenMap and all its Location and OMRaster stuff. if you don't
want to use it, use ScapeContinuous2D.
- Since:
- 2.0
- Version:
- 2.0
- Author:
- Miles Parker
- See Also:
- Serialized Form
Constructor Summary |
Globe()
|
Methods inherited from class org.ascape.model.space.CollectionSpace |
add, add, addAll, calculateDistance, clear, clone, conditionalIterator, conditionalIterator, construct, contains, containsAll, countWithin, createOrder, createSpatialConditional, deleteSweep, filter, find, findMaximum, findMaximum, findMaximumWithin, findMinimum, findMinimum, findMinimumWithin, findNearest, findNearest, findRandom, findRandom, findRandom, findRandom, findRandomWithin, findWithin, get, getContext, getExtent, getGeometry, getRandom, hasWithin, initialize, isDeleteSweepNeeded, isEmpty, isMutable, isPeriodic, iterator, iteratorCount, iteratorToList, newLocation, newLocation, randomInRange, randomInRange, randomIs, randomizeOrder, randomToLimit, remove, removeAll, retainAll, safeIterator, safeIterator, safeIterators, safeRandomIterator, set, setContext, setExtent, setExtent, setGeometry, setPeriodic, setRandom, size, toArray, toArray, toList, withinIterator |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
AVERAGE_EARTH_RADIUS
public static final double AVERAGE_EARTH_RADIUS
- The average radius of the earth
- See Also:
- Constant Field Values
Globe
public Globe()
distancePerIteration
public double distancePerIteration(double velocity)
- Returns the distance an agent can move in one iteration, given its velocity.
This assumes 60 seconds per iteration.
- Specified by:
distancePerIteration
in interface Continuous
- Overrides:
distancePerIteration
in class Continuous2D
- Parameters:
velocity
- the agent's velocity
- Returns:
- the distance
moveToward
public void moveToward(Location origin,
Coordinate target,
double distance)
- Moves an agent from its original coordinate towards its target coordinate. This
method uses the GreatCircle eqation.
- Specified by:
moveToward
in interface Continuous
- Specified by:
moveToward
in interface Space
- Overrides:
moveToward
in class Continuous2D
- Parameters:
origin
- the origin coordinatetarget
- the target coordinatedistance
- the maximum distance that can be traveled
calculateDistance
public double calculateDistance(Coordinate origin,
Coordinate target)
- Returns the shortest distance between one LocatedAgent and another.
- Specified by:
calculateDistance
in interface Space
- Overrides:
calculateDistance
in class Continuous2D
- Parameters:
origin
- one LocatedAgenttarget
- another LocatedAgent
- Returns:
- the shortest distance
getSecondsPerIteration
public int getSecondsPerIteration()
setSecondsPerIteration
public void setSecondsPerIteration(int secondsPerIteration)
Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.