uchicago.src.repastdemos.hypercycles
Class HyperCell
java.lang.Object
uchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultDrawableNode
uchicago.src.repastdemos.hypercycles.HyperCell
- All Implemented Interfaces:
- CustomProbeable, Drawable2DGridNode, DrawableNonGridNode, Moveable, NonGridDrawable, Node
public class HyperCell
- extends DefaultDrawableNode
- implements CustomProbeable
A pseudo-agent class for the hypercycles simulation. A Hypercell
is essentially a cell on a 2D grid that contains the skills. Has methods
for adding and deleting skills. Extends AbstractNode in order to track
the link between this HyperCell when it activates or is activated by
another HyperCell.
An implementation of the simulation described in John Padgett's
"The Emergence of Simple Ecologies of Skill: A Hypercycle Approach to
Economic Organization" in _The Economy as an Evolving
Complex System II_, Eds. Arthur, Durlauf, and Lane. SFI
Studies in the Sciences of Complexity, Vol. XXVII, Addison-Wesley, 1997,
pp. 199-221. Thanks to John Padgett for allowing us to include it here.
jpadgett@midway.uchicago.edu
- Version:
- $Revision: 1.1 $ $Date: 2005/08/12 20:04:57 $
- Author:
- Nick Collier and John Padgett
| Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode |
allowResizing, calcSize, contains, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY |
| Methods inherited from class uchicago.src.sim.network.DefaultNode |
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HyperCell
public HyperCell(int x,
int y)
getSkills
public java.lang.String getSkills()
getSkillSet
public java.lang.Object[] getSkillSet()
addSkill
public void addSkill(Skill skill)
removeSkill
public boolean removeSkill(int skill)
activate
public int activate(int targetSkill)
- Returns the the int value of the activated skill - i.e. 1 activates 2,
so return 2 etc. or returns -1 if no activation
getLocation
public java.lang.String getLocation()
setLocation
public void setLocation(float x,
float y)
isEmpty
public boolean isEmpty()
contains
public boolean contains(java.lang.Integer skill)
draw
public void draw(SimGraphics g)
- Description copied from interface:
Drawable2DGridNode
- Draws this Drawable2DGridNode.
- Specified by:
draw in interface Drawable2DGridNode- Specified by:
draw in interface NonGridDrawable- Overrides:
draw in class DefaultDrawableNode
- Parameters:
g - the SimGraphics object used for drawing
getProbedProperties
public java.lang.String[] getProbedProperties()
- Description copied from interface:
CustomProbeable
- Gets the names of the properties that are allowed to be probed. The
property names returned by this method should be reflect the accessor
and mutator method names. For example, given getAge and setAge, an
appropriate property name would be Age.
- Specified by:
getProbedProperties in interface CustomProbeable
- Returns:
- an array of the property names.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object