Class AssigningTool

java.lang.Object
  extended byswarm.BaseImpl
      extended byswarm.objectbase.SwarmObjectImpl
          extended byAssigningTool
All Implemented Interfaces:
swarm.defobj.Create, swarm.defobj.CreateS, swarm.defobj.Customize, swarm.defobj.CustomizeS, swarm.defobj.DefinedObject, swarm.defobj.DefinedObjectS, swarm.defobj.Drop, swarm.defobj.DropS, swarm.defobj.GetName, swarm.defobj.GetNameS, swarm.objectbase.SwarmObject, swarm.objectbase.SwarmObjectS

public class AssigningTool
extends swarm.objectbase.SwarmObjectImpl

A tool to choose the unit to which we have to send an order

Author:
Pietro Terna

Field Summary
 EndUnit anEndUnit
          the temporary address of an existing endUnit
 boolean assignEqualStepsToSameUnit
          assigning an order to the unit it come from if if the step to be done is the same as the previous one
 Unit aUnit
          the temporary address of an existing unit
 swarm.collections.ListImpl endUnitList
          the list of end units existing in our environment
 swarm.collections.ListIndex endUnitListIndex
          the iterator of endUnitList
 swarm.collections.ListImpl heldOrderList
          the list of the orders kept in hold
 int unitCriterion
          the criterion used to choose the subsequent unit when more the one unit is able to perform the required task
 swarm.collections.ListImpl unitList
          the list of the normal units existing in our environment
 swarm.collections.ListIndex unitListIndex
          the iterator of unitList
 swarm.collections.ListImpl unitSubList
          temporary unit sub list
 swarm.collections.ListIndex unitSubListIndex
          the iterator of unitSubList
 
Constructor Summary
AssigningTool(swarm.defobj.Zone aZone, int uc, swarm.collections.ListImpl ul, swarm.collections.ListImpl eul, boolean aes)
           
 
Method Summary
 void assign(Order firstOrder)
           
 void assignHeldOrders()
          assigning, if possible, order kept in hold while lacking data for orCriterion 5
 int getHeldOrderNumber()
          returning held order number
 
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

unitCriterion

public int unitCriterion
the criterion used to choose the subsequent unit when more the one unit is able to perform the required task


unitList

public swarm.collections.ListImpl unitList
the list of the normal units existing in our environment


unitListIndex

public swarm.collections.ListIndex unitListIndex
the iterator of unitList


unitSubList

public swarm.collections.ListImpl unitSubList
temporary unit sub list


unitSubListIndex

public swarm.collections.ListIndex unitSubListIndex
the iterator of unitSubList


endUnitList

public swarm.collections.ListImpl endUnitList
the list of end units existing in our environment


endUnitListIndex

public swarm.collections.ListIndex endUnitListIndex
the iterator of endUnitList


aUnit

public Unit aUnit
the temporary address of an existing unit


anEndUnit

public EndUnit anEndUnit
the temporary address of an existing endUnit


heldOrderList

public swarm.collections.ListImpl heldOrderList
the list of the orders kept in hold


assignEqualStepsToSameUnit

public boolean assignEqualStepsToSameUnit
assigning an order to the unit it come from if if the step to be done is the same as the previous one

Constructor Detail

AssigningTool

public AssigningTool(swarm.defobj.Zone aZone,
                     int uc,
                     swarm.collections.ListImpl ul,
                     swarm.collections.ListImpl eul,
                     boolean aes)
Method Detail

assignHeldOrders

public void assignHeldOrders()
assigning, if possible, order kept in hold while lacking data for orCriterion 5


getHeldOrderNumber

public int getHeldOrderNumber()
returning held order number


assign

public void assign(Order firstOrder)