Class OrderDistiller

java.lang.Object
  extended by swarm.BaseImpl
      extended by swarm.objectbase.SwarmObjectImpl
          extended by OrderGenerator
              extended by OrderDistiller
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 OrderDistiller
extends OrderGenerator

This class is used to read data from two worksheets.
The first one contains the list of recipes of our virtual enterprise.
The second one contains a sequence of orders to be launched, shift by shift, in order to make the daily production activities.

Author:
Cristian Barreca, Elena Bonessa, Antonella Borra. Modified by: Marco Lamieri, Francesco Merlo. Refactored by Francesco Merlo. Carlo Desotgiu added the capability of dealing with recipes launched by computational steps; Alessandro Balla and Roberto Crosetto eliminated a severe bug in the launching capabilities for the recipes coming from computational steps

Field Summary
 
Fields inherited from class OrderGenerator
dictionary, dictionaryLength, fixedLength, maxStepLength, maxStepNumber, orderRecipe1, orderRecipe2, stepLengthInOrder
 
Constructor Summary
OrderDistiller(swarm.defobj.Zone aZone, int msn, int msl, swarm.collections.ListImpl ul, ESFrameModelSwarm mo, AssigningTool at, int stratum)
           
 
Method Summary
 void distill()
          This is the method containing the iterator needed to launch the daily production of recipes.
It take a look at the orderSequence arrays to determine which recipes must be done and how many times.
 void setComputationalRecipe(int aRecipeToBeAdded)
          setting in real time the recipes coming from computational steps
 void setDictionary()
          This method is used to collect the names of the units and of the end units, so that it can operate the check of corrispondency between the production phases required by recipes and the phases of production the units can do.
 
Methods inherited from class OrderGenerator
createRandomOrderWithNSteps
 
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
 

Constructor Detail

OrderDistiller

public OrderDistiller(swarm.defobj.Zone aZone,
                      int msn,
                      int msl,
                      swarm.collections.ListImpl ul,
                      ESFrameModelSwarm mo,
                      AssigningTool at,
                      int stratum)
Method Detail

distill

public void distill()
This is the method containing the iterator needed to launch the daily production of recipes.
It take a look at the orderSequence arrays to determine which recipes must be done and how many times.
A request for which unit can do the first production phase of each recipe will be done to units or endUnits.


setDictionary

public void setDictionary()
This method is used to collect the names of the units and of the end units, so that it can operate the check of corrispondency between the production phases required by recipes and the phases of production the units can do.

Overrides:
setDictionary in class OrderGenerator

setComputationalRecipe

public void setComputationalRecipe(int aRecipeToBeAdded)
setting in real time the recipes coming from computational steps