Class OrderGenerator

java.lang.Object
  extended byswarm.BaseImpl
      extended byswarm.objectbase.SwarmObjectImpl
          extended byOrderGenerator
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 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
 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
 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[] 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
 swarm.collections.ListImpl unitList
          the list containig the operating units
 
Constructor Summary
OrderGenerator(swarm.defobj.Zone aZone, int msn, int msl, swarm.collections.ListImpl ul, 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


anOrder

public Order anOrder
a specific order


unitList

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


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


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,
                      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