org.primordion.xholon.tutorials.StupidModel
Class HabitatCellStupidModel16nl

java.lang.Object
  extended byorg.primordion.xholon.base.Xholon
      extended byorg.primordion.xholon.base.XholonWithPorts
          extended byorg.primordion.xholon.base.AbstractGrid
              extended byorg.primordion.xholon.base.GridEntity
                  extended byorg.primordion.xholon.base.Patch
                      extended byorg.primordion.xholon.tutorials.StupidModel.HabitatCellStupidModel16nl
All Implemented Interfaces:
CeStupidModel16nl, IGrid, IPatch, IXholon

public class HabitatCellStupidModel16nl
extends Patch
implements CeStupidModel16nl

StupidModel16nl application - Xholon Java

Xholon 0.5 http://www.primordion.com/Xholon


Field Summary
 double foodProductionRate
           
 
Fields inherited from class org.primordion.xholon.base.Patch
pcolor, pxcor, pycor
 
Fields inherited from class org.primordion.xholon.base.AbstractGrid
P_BEHAVIOR, P_NEXT, P_PREVIOUS
 
Fields inherited from class org.primordion.xholon.base.XholonWithPorts
port
 
Fields inherited from class org.primordion.xholon.base.Xholon
DEFAULT_LEVEL, interaction, interactionsEnabled
 
Fields inherited from interface org.primordion.xholon.tutorials.StupidModel.CeStupidModel16nl
AggregatorCE, BugCE, BugsCE, GridCE, GridCellCE, HabitatCellCE, PredatorCE, PredatorsCE, RowCE, StatisticsCE, StupidModelCE, XholonClassCE
 
Fields inherited from interface org.primordion.xholon.base.IPatch
COMMANDID_NONE, FILTERID_NONE
 
Fields inherited from interface org.primordion.xholon.base.IXholon
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx
 
Fields inherited from interface org.primordion.xholon.base.IGrid
BOUNDARY_GRID, BOUNDARY_TORUS, NEIGHBORHOOD_1DCA, NEIGHBORHOOD_HEXAGONAL, NEIGHBORHOOD_MOORE, NEIGHBORHOOD_SIBLING, NEIGHBORHOOD_VON_NEUMANN, P_CAFUTURESELF, P_CALEFTNEIGHBOR, P_CARIGHTNEIGHBOR, P_EAST, P_HEX0, P_HEX1, P_HEX2, P_HEX3, P_HEX4, P_HEX5, P_NORTH, P_NORTHEAST, P_NORTHWEST, P_SOUTH, P_SOUTHEAST, P_SOUTHWEST, P_STAYHERE, P_WEST, REGULAR_COMPLETE, REGULAR_COMPLETE_SELF, REGULAR_CYCLE, REGULAR_WHEEL
 
Constructor Summary
HabitatCellStupidModel16nl()
           
 
Method Summary
 void act()
          Do some action during this time step.
 double getVal()
          Get the value of a "double" maintained by this xholon instance.
 boolean performBooleanActivity(int filterId)
          Do the UML2 Activity identified by the activityId.
 void postConfigure()
          Perform some action, typically once at start up; MAY be overridden.
 void setVal(double val)
          Set the value of a "double" maintained by this xholon instance.
 java.lang.String toString()
          Read a file that defines the food production rates for each habitat cell.
 
Methods inherited from class org.primordion.xholon.base.Patch
aggregate, beep, distance, distancexy, getPcolor, getPlabel, getPxcor, getPycor, inRadius, inRadius, neighbors, neighbors4, patch, patchAt, patchAtHeadingAndDistance, setPcolor, setPlabel, setPxcor, setPycor, sprout, towards, towardsxy, turtlesAt, turtlesHere, turtlesOn, with
 
Methods inherited from class org.primordion.xholon.base.GridEntity
getMaxPorts, setPorts
 
Methods inherited from class org.primordion.xholon.base.AbstractGrid
configure, getNeighType, getNumNeighbors, initialize, moveXholonsToGrid, postReconfigure, preReconfigure, reconfigure, setCaFuture, setCaLeft, setCaRight, setEast, setHex0, setHex1, setHex2, setHex3, setHex4, setHex5, setNorth, setNorthEast, setNorthWest, setSiblingsComplete, setSiblingsCompleteSelf, setSiblingsCycle, setSiblingsWheel, setSouth, setSouthEast, setSouthWest, setWest
 
Methods inherited from class org.primordion.xholon.base.XholonWithPorts
configure, getPort, isActiveObject, isBound, isContainer, isPassiveObject, setMaxPorts, terminate
 
Methods inherited from class org.primordion.xholon.base.Xholon
appendChild, appendChild, appendChild, cleanup, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextId, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPreviousSibling, getRoleName, getRootNode, getSiblings, getSizeMessageQ, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isExternal, isInternal, isLeaf, isRootNode, performActivity, performActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postOrderPrint, preAct, preConfigure, preOrderPrint, print, println, processMessageQ, processReceivedMessage, remove, removeChild, resetNextId, sendMessage, sendMessage, sendMessage, setAttributeVal, setFactory, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setRoleName, setSizeMessageQ, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, treeSize, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.primordion.xholon.base.IXholon
appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, sendMessage, sendMessage, sendMessage, setAttributeVal, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, treeSize, writeXml
 
Methods inherited from interface org.primordion.xholon.base.IGrid
getNeighType, getNumNeighbors, moveXholonsToGrid, setCaFuture, setCaLeft, setCaRight, setEast, setHex0, setHex1, setHex2, setHex3, setHex4, setHex5, setNorth, setNorthEast, setNorthWest, setSiblingsComplete, setSiblingsCompleteSelf, setSiblingsCycle, setSiblingsWheel, setSouth, setSouthEast, setSouthWest, setWest
 

Field Detail

foodProductionRate

public double foodProductionRate
Constructor Detail

HabitatCellStupidModel16nl

public HabitatCellStupidModel16nl()
Method Detail

performBooleanActivity

public boolean performBooleanActivity(int filterId)
Description copied from interface: IXholon
Do the UML2 Activity identified by the activityId. This is code called during an Activity.

Specified by:
performBooleanActivity in interface IXholon
Overrides:
performBooleanActivity in class Xholon

postConfigure

public void postConfigure()
Description copied from interface: IXholon
Perform some action, typically once at start up; MAY be overridden. Recursive; application should call this only for root.

Specified by:
postConfigure in interface IXholon
Overrides:
postConfigure in class AbstractGrid

act

public void act()
Description copied from interface: IXholon
Do some action during this time step. Typically all nodes in the tree will do their pre-actions (optional), then all will do their actions, and then all will do their post-actions (optional).

Specified by:
act in interface IXholon
Overrides:
act in class Xholon

getVal

public double getVal()
Description copied from interface: IXholon
Get the value of a "double" maintained by this xholon instance. If a class that implements this interface does not maintain such a value, it should return 0.0 This method can be used in place of getVal_double()

Specified by:
getVal in interface IXholon
Overrides:
getVal in class Xholon

setVal

public void setVal(double val)
Description copied from interface: IXholon
Set the value of a "double" maintained by this xholon instance.

Specified by:
setVal in interface IXholon
Overrides:
setVal in class Xholon

toString

public java.lang.String toString()
Read a file that defines the food production rates for each habitat cell. This action is performed by the Grid xholon.

Overrides:
toString in class Patch