| package org.metaabm.gen.test; |
| |
| /** |
| * Spatial Model Java Implementation. |
| * |
| * Generated by metaabm system: May 12, 2009 7:32:31 PM PDT in project: org.metaabm.gen.test (testing) */ |
| |
| import static org.junit.Assert.*; |
| |
| public class SpatialModel { |
| |
| /** |
| * The number of complex movement agents to create. |
| */ |
| |
| private int complexMovementAgentCount = 1; |
| /** |
| * The number of complex locations to create. |
| */ |
| |
| private int complexLocationCount = 0; |
| /** |
| * The number of spatial model agents to create. |
| */ |
| |
| private int spatialModelAgentCount = 0; |
| /** |
| * |
| */ |
| |
| private double[] goodBoundary = {1, 1, 4, 4}; |
| /** |
| * The size of each dimension. |
| */ |
| |
| private int[] grid2DDimensions = new int[2]; |
| /** |
| * |
| */ |
| |
| private Object grid2D = null; |
| /** |
| * |
| */ |
| |
| private Object complexNet = null; |
| /** |
| * Constructs a new Spatial Model. |
| */ |
| |
| public SpatialModel() { |
| createUniqueID(); |
| setGrid2DWidth(20); |
| setGrid2DHeight(20); |
| } |
| //todo, make this a useful value for evaluating compatibility of different versions of generated classes |
| private static final long serialVersionUID = 89989998L; |
| |
| private String uniqueID; |
| |
| public String getUID() { |
| return uniqueID; |
| } |
| |
| public void createUniqueID() { |
| uniqueID = org.apache.commons.lang.RandomStringUtils |
| .randomAlphanumeric(5); |
| } |
| |
| /** |
| * Clones the agent, ensuring that a unique id is assigned. |
| */ |
| public Object clone() { |
| try { |
| SpatialModel clone = (SpatialModel) super.clone(); |
| clone.createUniqueID(); |
| return clone; |
| } catch (Exception e) { |
| throw new RuntimeException("Unexpected cloning exception: " + e); |
| } |
| } |
| |
| @org.junit.Test |
| public void dummy() { |
| assertTrue(true); |
| } |
| |
| /** |
| * Gets the Complex Movement Agent Count property for Spatial Model. |
| * @return The number of complex movement agents to create. |
| */ |
| |
| public int getComplexMovementAgentCount() { |
| return complexMovementAgentCount; |
| } |
| |
| /** |
| * Sets the Complex Movement Agent Count property for Spatial Model. |
| * The number of complex movement agents to create. |
| * @param _complexMovementAgentCount the new Complex Movement Agent Count value |
| */ |
| |
| public void setComplexMovementAgentCount(int _complexMovementAgentCount) { |
| complexMovementAgentCount = _complexMovementAgentCount; |
| } |
| /** |
| * Gets the Complex Location Count property for Spatial Model. |
| * @return The number of complex locations to create. |
| */ |
| |
| public int getComplexLocationCount() { |
| return complexLocationCount; |
| } |
| |
| /** |
| * Sets the Complex Location Count property for Spatial Model. |
| * The number of complex locations to create. |
| * @param _complexLocationCount the new Complex Location Count value |
| */ |
| |
| public void setComplexLocationCount(int _complexLocationCount) { |
| complexLocationCount = _complexLocationCount; |
| } |
| /** |
| * Gets the Spatial Model Agent Count property for Spatial Model. |
| * @return The number of spatial model agents to create. |
| */ |
| |
| public int getSpatialModelAgentCount() { |
| return spatialModelAgentCount; |
| } |
| |
| /** |
| * Sets the Spatial Model Agent Count property for Spatial Model. |
| * The number of spatial model agents to create. |
| * @param _spatialModelAgentCount the new Spatial Model Agent Count value |
| */ |
| |
| public void setSpatialModelAgentCount(int _spatialModelAgentCount) { |
| spatialModelAgentCount = _spatialModelAgentCount; |
| } |
| /** |
| * Gets the Good Boundary property for Spatial Model. |
| * @return |
| */ |
| |
| public double[] getGoodBoundary() { |
| return goodBoundary; |
| } |
| |
| /** |
| * Sets the Good Boundary property for Spatial Model. |
| * |
| * @param _goodBoundary the new Good Boundary value |
| */ |
| |
| public void setGoodBoundary(double[] _goodBoundary) { |
| goodBoundary = _goodBoundary; |
| } |
| /** |
| * Gets the Dimensions property for Grid 2D. |
| * @return The size of each dimension. |
| */ |
| |
| public int[] getGrid2DDimensions() { |
| return grid2DDimensions; |
| } |
| |
| /** |
| * Sets the Dimensions property for Grid 2D. |
| * The size of each dimension. |
| * @param _grid2DDimensions the new Dimensions value |
| */ |
| |
| public void setGrid2DDimensions(int[] _grid2DDimensions) { |
| grid2DDimensions = _grid2DDimensions; |
| } |
| /** |
| * Gets the Width property for Grid 2D. |
| * @return The horizontal extent of the space. |
| */ |
| |
| public int getGrid2DWidth() { |
| return grid2DDimensions[0]; |
| } |
| |
| /** |
| * Sets the Width property for Grid 2D. |
| * The horizontal extent of the space. |
| * @param _grid2DWidth the new Width value |
| */ |
| |
| public void setGrid2DWidth(int _grid2DWidth) { |
| grid2DDimensions[0] = _grid2DWidth; |
| } |
| /** |
| * Gets the Height property for Grid 2D. |
| * @return The vertical extent of the space. |
| */ |
| |
| public int getGrid2DHeight() { |
| return grid2DDimensions[1]; |
| } |
| |
| /** |
| * Sets the Height property for Grid 2D. |
| * The vertical extent of the space. |
| * @param _grid2DHeight the new Height value |
| */ |
| |
| public void setGrid2DHeight(int _grid2DHeight) { |
| grid2DDimensions[1] = _grid2DHeight; |
| } |
| /** |
| * Gets the Grid 2D property for Spatial Model. |
| * @return |
| */ |
| |
| public Object getGrid2D() { |
| return grid2D; |
| } |
| |
| /** |
| * Sets the Grid 2D property for Spatial Model. |
| * |
| * @param _grid2D the new Grid 2D value |
| */ |
| |
| public void setGrid2D(Object _grid2D) { |
| grid2D = _grid2D; |
| } |
| /** |
| * Gets the Complex Net property for Spatial Model. |
| * @return |
| */ |
| |
| public Object getComplexNet() { |
| return complexNet; |
| } |
| |
| /** |
| * Sets the Complex Net property for Spatial Model. |
| * |
| * @param _complexNet the new Complex Net value |
| */ |
| |
| public void setComplexNet(Object _complexNet) { |
| complexNet = _complexNet; |
| } |
| } |