|
||||||||||
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 |
boolean |
droppable
if droppable is true the unit will be dropped, regardless all its values (this come from a computational step) |
Order |
firstOrder
the first order to be executed |
int |
inactivity
the number of tick of inactivity |
double |
increasingVisibilityStep
increasing visibility in each step 1 |
int |
maxTicksAsUnsent
max number of ticks that an order can stay in the unit |
MemoryMatrix |
myMemoryMatrix
out memory matrix |
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 |
swarm.collections.ListImpl |
usableWaitingList
the list of the orders in the waitingList, not kept into a parallel unit, such as a myComputationalAssembler |
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,
ComputationalAssembler ca,
MemoryMatrix mm,
int mt)
the constructor for Unit |
Method Summary | |
void |
checkDailyProductionListForOldUnsentOrders()
eliminating old order |
java.lang.Object |
drawSelfOn(swarm.gui.Raster r)
designing itself on the raster |
void |
drop()
virtual dropping function, to re-use the unit |
ComputationalAssembler |
getComputationalAssembler()
get the computational assembler of the unit |
swarm.collections.ListImpl |
getDailyProductionList()
get daily production list |
boolean |
getDroppable()
get the droppability of the unit |
int |
getInactivity()
the inactivity |
MemoryMatrix |
getMemoryMatrix()
get the memory matrix of the unit |
int |
getProductionPhase()
return the production phases of the unit |
java.lang.Object |
getUnitModel()
getting the model the unit belongs to |
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 |
init(swarm.defobj.Zone aZone,
ESFrameModelSwarm mo,
UnitActivitySpace uas,
AssigningTool at,
int x,
int y,
byte col,
double vis,
double visStep,
ComputationalAssembler ca,
MemoryMatrix mm,
int mt)
managing the constructor content |
void |
printDirectlyMemoryMatrix()
print the memory matrix of the unit (to be used via the probe of the unit) |
void |
setDroppable()
set the droppability of the unit |
void |
setProductionPhase(int ph)
set unit production phases |
void |
setUnitNumber(int un)
set unit number |
void |
setUsableWaitingList()
copying the orders in the waitingList, if they are not kept into any parallel unit, such as (in jESOF) myComputationalAssembler |
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, 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 usableWaitingList
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
public boolean droppable
public MemoryMatrix myMemoryMatrix
public int maxTicksAsUnsent
Constructor Detail |
public Unit(swarm.defobj.Zone aZone, ESFrameModelSwarm mo, UnitActivitySpace uas, AssigningTool at, int x, int y, byte col, double vis, double visStep, ComputationalAssembler ca, MemoryMatrix mm, int mt)
Method Detail |
public void init(swarm.defobj.Zone aZone, ESFrameModelSwarm mo, UnitActivitySpace uas, AssigningTool at, int x, int y, byte col, double vis, double visStep, ComputationalAssembler ca, MemoryMatrix mm, int mt)
public void setUnitNumber(int un)
public int getUnitNumber()
public void setUsableWaitingList()
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)
public java.lang.Object getUnitModel()
public void setDroppable()
public boolean getDroppable()
public MemoryMatrix getMemoryMatrix()
public ComputationalAssembler getComputationalAssembler()
public void checkDailyProductionListForOldUnsentOrders()
public void printDirectlyMemoryMatrix()
public void drop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |