|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswarm.BaseImpl
swarm.objectbase.SwarmObjectImpl
Unit
The Unit class instances are micro unit in our virtual enterprise; i.e. the units where the steps required to build a product (to fulfill an order) are done
Field Summary | |
Unit |
aUnit
the temporary address of an existing unit |
swarm.collections.ListImpl |
dailyProductionList
the list containing the orders (if any) performed in a day |
Order |
firstOrder
the first order to be executed |
int |
inactivity
the number of tick of inactivity |
double |
increasingVisibilityStep
increasing visibility in each step 1 |
UnitActivitySpace |
unitActivitySpace
the unitActivitySpace |
byte |
unitColor
position of the unit into the display |
int |
unitNumber
the number identifying the unit |
int |
unitProductionPhase
the unit production phase |
int |
unsentProducts
unsent product at the end of step2 |
double |
visibility
our visibility |
swarm.collections.ListImpl |
waitingList
the list of the orders to be executed |
int |
xPos
position of the unit into the display |
int |
yPos
position of the unit into the display |
Constructor Summary | |
Unit(swarm.defobj.Zone aZone,
ESFrameModelSwarm mo,
UnitActivitySpace uas,
AssigningTool at,
int x,
int y,
byte col,
double vis,
double visStep)
the constructor for Unit |
Method Summary | |
java.lang.Object |
drawSelfOn(swarm.gui.Raster r)
designing itself on the raster |
swarm.collections.ListImpl |
getDailyProductionList()
get daily production list |
int |
getInactivity()
the inactivity |
int |
getProductionPhase()
return the production phases of the unit |
int |
getUnitNumber()
get unit number |
int |
getUnsentProducts()
unsent products at the end of step 2 |
int |
getVisibility()
the visibility |
swarm.collections.ListImpl |
getWaitingList()
get waiting list |
int |
getWaitingListLength()
the length of the wainting list |
int |
getXPos()
the X position |
int |
getYPos()
the Y position |
void |
setProductionPhase(int ph)
set unit production phases |
void |
setUnitNumber(int un)
set unit number |
void |
setWaitingList(Order anOrder)
Putting an order in the production waitingList of the unit (using a related object if any) |
void |
unitStep1()
production: at the beginning of each time tick in the 'day', each unit looks for the order(s) (if any) to be executed; the production cycle is 'one unit of time' in a step of the recipe of an order in a tick of a day; |
void |
unitStep2()
diffusion and accounting: sending the orders to the subsequent production units; making accounting operations |
Methods inherited from class swarm.objectbase.SwarmObjectImpl |
compare, describe, describeID, drop, getCompleteProbeMap, getDisplayName, getName, getProbeForMessage, getProbeForVariable, getProbeMap, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int unitNumber
public int unitProductionPhase
public swarm.collections.ListImpl waitingList
public swarm.collections.ListImpl dailyProductionList
public Unit aUnit
public Order firstOrder
public int xPos
public int yPos
public byte unitColor
public UnitActivitySpace unitActivitySpace
public double visibility
public double increasingVisibilityStep
public int inactivity
public int unsentProducts
Constructor Detail |
public Unit(swarm.defobj.Zone aZone, ESFrameModelSwarm mo, UnitActivitySpace uas, AssigningTool at, int x, int y, byte col, double vis, double visStep)
Method Detail |
public void setUnitNumber(int un)
public int getUnitNumber()
public void unitStep1()
public void unitStep2()
public void setProductionPhase(int ph)
public int getProductionPhase()
public void setWaitingList(Order anOrder)
public int getVisibility()
public int getInactivity()
public int getXPos()
public int getYPos()
public int getWaitingListLength()
public int getUnsentProducts()
public swarm.collections.ListImpl getDailyProductionList()
public swarm.collections.ListImpl getWaitingList()
public java.lang.Object drawSelfOn(swarm.gui.Raster r)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |