Class OrderGenerator

java.lang.Object
  |
  +--swarm.BaseImpl
        |
        +--swarm.objectbase.SwarmObjectImpl
              |
              +--OrderGenerator
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
Direct Known Subclasses:
OrderDistiller

public class OrderGenerator
extends swarm.objectbase.SwarmObjectImpl

The OrderGenerator is used at present to simulate the market behavior.

Author:
Pietro Terna

Field Summary
 Order anOrder
          a specific order
 int[] dictionary
          the dictionary to be used to choose the steps to be included in a recipe
 int dictionaryLength
          length of the dictionary
 swarm.collections.ListImpl endUnitList
          the list containig the end units
 int layerNumber
          a layer number
 int maxStepLength
          the max length of a step in a recipe
 int maxStepNumber
          the max length of a recipe
 int orderCount
          used to record the number of generated orders
 swarm.collections.ListImpl orderList
          the list containig all the orders
 int[] orderRecipe1
          the integer vector containing a specific production recipe
 int[] orderRecipe2
          the integer vector containing a specific production recipe, developed following the length of each step
 int[] orderRecipeTmp
          a temporary vector to redefine the dimension of orderRecipe2 if necessary (using "p" or "c" steps)
 int[] stepLengthInOrder
          the integer vector containing the unit of time spent for each step in the recipe; il will determine the tranformation of the orderRecipe1 vector into the orderRecipe2 vector containing the repetitions of the steps, to reproduce the length of each step in time NB this formalism is internal to internal (in external formalism we have 'step s/h/d time' as an examples orderRecipe1 contains 1 12 7 3 stepLengthInOrder contains 1 3 2 2 orderRecipe2 contains 1 12 12 12 7 7 3 3
 int totalLayerNumber
          the total number of layers; a layer is a period of time or a set of qualitative conditions that introduce differentiations into the orders; e.g two collections in fashion production, with the same technical description (recipe) and different qualitative results
 swarm.collections.ListImpl unitList
          the list containig the operating units
 int use0or1
          a switch used in 'or' order generation
 
Constructor Summary
OrderGenerator(swarm.defobj.Zone aZone, int msn, int msl, swarm.collections.ListImpl ul, swarm.collections.ListImpl eul, swarm.collections.ListImpl ol, int tln, ESFrameModelSwarm mo, AssigningTool at)
          the constructor for OrderGenerator
 
Method Summary
 void createRandomOrderWithNSteps()
          creating an order form, choosing its recipe length and content
 void setDictionary()
          building the dictionary containing the steps to be included in the recipes
 
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

maxStepNumber

public int maxStepNumber
the max length of a recipe


maxStepLength

public int maxStepLength
the max length of a step in a recipe


orderCount

public int orderCount
used to record the number of generated orders


use0or1

public int use0or1
a switch used in 'or' order generation


totalLayerNumber

public int totalLayerNumber
the total number of layers; a layer is a period of time or a set of qualitative conditions that introduce differentiations into the orders; e.g two collections in fashion production, with the same technical description (recipe) and different qualitative results


layerNumber

public int layerNumber
a layer number


anOrder

public Order anOrder
a specific order


unitList

public swarm.collections.ListImpl unitList
the list containig the operating units


endUnitList

public swarm.collections.ListImpl endUnitList
the list containig the end units


orderList

public swarm.collections.ListImpl orderList
the list containig all the orders


orderRecipe1

public int[] orderRecipe1
the integer vector containing a specific production recipe


stepLengthInOrder

public int[] stepLengthInOrder
the integer vector containing the unit of time spent for each step in the recipe; il will determine the tranformation of the orderRecipe1 vector into the orderRecipe2 vector containing the repetitions of the steps, to reproduce the length of each step in time NB this formalism is internal to internal (in external formalism we have 'step s/h/d time' as an examples orderRecipe1 contains 1 12 7 3 stepLengthInOrder contains 1 3 2 2 orderRecipe2 contains 1 12 12 12 7 7 3 3


orderRecipe2

public int[] orderRecipe2
the integer vector containing a specific production recipe, developed following the length of each step


orderRecipeTmp

public int[] orderRecipeTmp
a temporary vector to redefine the dimension of orderRecipe2 if necessary (using "p" or "c" steps)


dictionary

public int[] dictionary
the dictionary to be used to choose the steps to be included in a recipe


dictionaryLength

public int dictionaryLength
length of the dictionary

Constructor Detail

OrderGenerator

public OrderGenerator(swarm.defobj.Zone aZone,
                      int msn,
                      int msl,
                      swarm.collections.ListImpl ul,
                      swarm.collections.ListImpl eul,
                      swarm.collections.ListImpl ol,
                      int tln,
                      ESFrameModelSwarm mo,
                      AssigningTool at)
the constructor for OrderGenerator

Method Detail

setDictionary

public void setDictionary()
building the dictionary containing the steps to be included in the recipes


createRandomOrderWithNSteps

public void createRandomOrderWithNSteps()
creating an order form, choosing its recipe length and content