crowdmodel
Class CObject

java.lang.Object
  extended by crowdmodel.CObject
Direct Known Subclasses:
BehaveTest, CellObject, Cluster, CrowdAgent, PerceiveTest, Test

public abstract class CObject
extends java.lang.Object

The abstract class of all objects and classes in the CrowdModel An object is an environment object or an agent (individual)

Author:
Nanda Wijermans

Field Summary
 int d_id
           
 repast.simphony.context.Context<CObject> d_world_context
           
 
Constructor Summary
CObject()
           
 
Method Summary
 void CObject(int id, repast.simphony.context.Context worldContext)
           
 void delete()
          Delete the CObject In repast terms this means removing the Object from the context
 int getID()
          Returns the id of the CObject.
 void step()
          Step method describes what this object will do in the given time step This is to be defined in every class that is implementing this abstract class The @scheduleMethod indicates to the Scheduler (Repast) that the step method needs is to be scheduled starting at tick 1 with an interval of 1 tick.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d_id

public int d_id

d_world_context

public repast.simphony.context.Context<CObject> d_world_context
Constructor Detail

CObject

public CObject()
Method Detail

CObject

public void CObject(int id,
                    repast.simphony.context.Context worldContext)

step

public void step()
Step method describes what this object will do in the given time step This is to be defined in every class that is implementing this abstract class The @scheduleMethod indicates to the Scheduler (Repast) that the step method needs is to be scheduled starting at tick 1 with an interval of 1 tick. Thus: the step starts at 1, and recurs at 2,3,4,...etc


delete

public void delete()
Delete the CObject In repast terms this means removing the Object from the context


getID

public int getID()
Returns the id of the CObject. This is an unique number (integer) that identifies this object

Returns:
the unique ID of this CObject