uk.ac.leeds.ccg.andyt.projects.genesis.transport
Class Movement

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.transport.Movement
All Implemented Interfaces:
java.io.Serializable

public class Movement
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Destination_Point2D
           
 GENESIS_Environment _Environment
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _networkRoute_VectorNetwork2D
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Origin_Point2D
           
 
Constructor Summary
Movement()
           
Movement(GENESIS_Environment _Environment)
           
Movement(GENESIS_Environment _Environment, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Origin_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Destination_Point2D)
           
Movement(Movement _Movement)
           
 
Method Summary
 boolean equals(java.lang.Object _Object)
           
 java.lang.Object[] getConstrainedMovement_0(int _MovementConstraint, java.util.HashMap _Movement_Counts_HashMap, GENESIS_Environment _Environment, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Eventual_Destination_Point2D)
           
 java.lang.Object[] getConstrainedMovement_1(int _MovementConstraint, java.util.HashMap _Movement_Counts_HashMap, GENESIS_Environment _Environment, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Eventual_Destination_Point2D)
           
 java.lang.Object[] getConstrainedMovement(int _MovementConstraint, java.util.HashMap _Movement_Counts_HashMap, GENESIS_Environment _Environment, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Desired_Point2D)
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D_0(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D, GENESIS_Environment _Environment)
          This movement is first diagonal then vertical or horizontal.
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D_1(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D, GENESIS_Environment _Environment)
          This movement is first horizontal or vertical until destination is on a diagonal.
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D, int _Movement)
          0 1 2 3 4 5 6 7 8
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D, int _Movement, GENESIS_Environment _Environment)
          Deprecated. 
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D b_Point2D, java.math.BigDecimal distance_BigDecimal, int a_DecimalPlacePrecision)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D b_Point2D, double distance, int a_DecimalPlacePrecision)
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D getShortStraightNetworkPath()
           
 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D getTravellingSalesmanRoute(double[] origin, double[] destination, TSMisc a_TSMisc)
          Precision needs looking at!
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Environment

public transient GENESIS_Environment _Environment

_Origin_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Origin_Point2D

_Destination_Point2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Destination_Point2D

_networkRoute_VectorNetwork2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D _networkRoute_VectorNetwork2D
Constructor Detail

Movement

public Movement()

Movement

public Movement(GENESIS_Environment _Environment)

Movement

public Movement(Movement _Movement)

Movement

public Movement(GENESIS_Environment _Environment,
                uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Origin_Point2D,
                uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Destination_Point2D)
Method Detail

equals

public boolean equals(java.lang.Object _Object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getPoint2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                              uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D b_Point2D,
                                                                              double distance,
                                                                              int a_DecimalPlacePrecision)
Parameters:
a_Point2D -
b_Point2D -
distance -
a_DecimalPlacePrecision -
Returns:
Vector_Point2D which lies in a straight line in the direction from a_Point2D to b_Point2D and which is distance units from a_Point2D

getPoint2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                              uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D b_Point2D,
                                                                              java.math.BigDecimal distance_BigDecimal,
                                                                              int a_DecimalPlacePrecision)
Parameters:
a_Point2D -
b_Point2D -
distance -
a_DecimalPlacePrecision -
Returns:
Vector_Point2D which lies in a straight line in the direction from a_Point2D to b_Point2D and which is distance units from a_Point2D

getTravellingSalesmanRoute

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D getTravellingSalesmanRoute(double[] origin,
                                                                                         double[] destination,
                                                                                         TSMisc a_TSMisc)
Precision needs looking at!

Parameters:
origin -
destination -
a_TSMisc -
a_DecimalPlacePrecision -
Returns:

getShortStraightNetworkPath

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D getShortStraightNetworkPath()
Returns:
The path between _Origin_Point2D and _Destination_Point2D using the grid network in _Environment._network_Grid2DSquareCellDouble

getNewPoint2D_0

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D_0(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D,
                                                                            uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D,
                                                                            GENESIS_Environment _Environment)
This movement is first diagonal then vertical or horizontal.

Parameters:
_Point2D -
_Destination -
_Environment -
Returns:

getNewPoint2D_1

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D_1(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D,
                                                                            uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D,
                                                                            GENESIS_Environment _Environment)
This movement is first horizontal or vertical until destination is on a diagonal.

Parameters:
_Point2D -
_Destination -
_Environment -
Returns:

getNewPoint2D

public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D,
                                                                          int _Movement)
0 1 2 3 4 5 6 7 8

Parameters:
_Point2D -
_Movement - A value of 4 means no change
Returns:
A new Vector_Point2D giving a row and column location relative to _Movement

getConstrainedMovement_0

public java.lang.Object[] getConstrainedMovement_0(int _MovementConstraint,
                                                   java.util.HashMap _Movement_Counts_HashMap,
                                                   GENESIS_Environment _Environment,
                                                   uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D,
                                                   uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Eventual_Destination_Point2D)
Parameters:
_MovementConstraint -
_Movement_Counts_HashMap -
_Environment -
_Current_Point2D -
_Eventual_Destination_Point2D -
Returns:
Vector_Point2D as constrained in the direction getNewPoint2D_0

getConstrainedMovement_1

public java.lang.Object[] getConstrainedMovement_1(int _MovementConstraint,
                                                   java.util.HashMap _Movement_Counts_HashMap,
                                                   GENESIS_Environment _Environment,
                                                   uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D,
                                                   uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Eventual_Destination_Point2D)
Parameters:
_MovementConstraint -
_Movement_Counts_HashMap -
_Environment -
_Current_Point2D -
_Eventual_Destination_Point2D -
Returns:
Vector_Point2D as constrained in the direction getNewPoint2D_1

getConstrainedMovement

public java.lang.Object[] getConstrainedMovement(int _MovementConstraint,
                                                 java.util.HashMap _Movement_Counts_HashMap,
                                                 GENESIS_Environment _Environment,
                                                 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Current_Point2D,
                                                 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Desired_Point2D)

getNewPoint2D

@Deprecated
public uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNewPoint2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D _Point2D,
                                                                                     int _Movement,
                                                                                     GENESIS_Environment _Environment)
Deprecated. 

This exhibits wrapping in that an agent moving off the top of a grid appears at the bottom. An agent moving off the right of a grid appears on the left and vicea versa. (The world can be thought of a bit like the surface of a taurus). 0 1 2 3 4 5 6 7 8

Parameters:
_Point2D -
_Movement - A value of 4 means no change
Returns:
A new long[] giving a row and column location relative to _Movement