Class Order

java.lang.Object
  |
  +--swarm.BaseImpl
        |
        +--swarm.objectbase.SwarmObjectImpl
              |
              +--Order
All Implemented Interfaces:
java.lang.Cloneable, 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 Order
extends swarm.objectbase.SwarmObjectImpl
implements java.lang.Cloneable

The form containing our Order metaphoric object

Author:
Pietro Terna (with Paolo Pelligra and Dario Landini contibutions)

Field Summary
 int i
          indexes used in a common way in the full version of jES
 int j
          indexes used in a common way in the full version of jES
 int jj
          indexes used in a common way in the full version of jES
 int k
          indexes used in a common way in the full version of jES
 int orderNumber
          the number of this order
 int[] orderRecipe
          integer vector, containing the recipe steps
 int[] orderState
          integer vector, recording the performed phases
 int[] r
          incoming recipe structure; we make a local copy of it, from r0 which is in the constructor paramenter list, to r
 java.lang.String recipeName
          the 'name' of the recipe (may be used by OrderDistiller, as a way to identify recipes
 int startingTimeUnit
          the day in which the order as been generated
 int stepNumber
          the number of steps in the product recipe
 
Constructor Summary
Order(swarm.defobj.Zone aZone, int n, int sd, int sn, int[] r0, ESFrameModelSwarm model)
          the first constructor for Order, for original object creation
 
Method Summary
 int getDoneStep()
          production done step in Order (it is in the orderRecipe vector, at the index value in which we find the first 0 in orderState vector minus 1; if no step has been done, the method returns -999999)
 int getNextStep()
          production next step in Order (it is in the orderRecipe vector, at the same index value in which we find the first 0 in orderState vector)
 float getNumberOfDirectStepsDone()
          evaluate the number of direct steps done
 int getOrderNumber()
          returning the orderNumber of this order
 int getOrderRecipe(int i)
          getting the content of orderRecipe[i]
 int getOrderState(int i)
          getting the content of orderState[i]
 java.lang.String getRecipeName()
          retrieving the name of the recipe
 int getStartingTimeUnit()
          returning the startingTimeUnit
 int getStepNumber()
          returning the stepNumber
 void setDoneStep(int u)
          Done step in Order
 void setRecipeName(java.lang.String s)
          settinging the name of the recipe
 
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

stepNumber

public int stepNumber
the number of steps in the product recipe


recipeName

public java.lang.String recipeName
the 'name' of the recipe (may be used by OrderDistiller, as a way to identify recipes


orderNumber

public int orderNumber
the number of this order


startingTimeUnit

public int startingTimeUnit
the day in which the order as been generated


orderRecipe

public int[] orderRecipe
integer vector, containing the recipe steps


orderState

public int[] orderState
integer vector, recording the performed phases


i

public int i
indexes used in a common way in the full version of jES


j

public int j
indexes used in a common way in the full version of jES


jj

public int jj
indexes used in a common way in the full version of jES


k

public int k
indexes used in a common way in the full version of jES


r

public int[] r
incoming recipe structure; we make a local copy of it, from r0 which is in the constructor paramenter list, to r

Constructor Detail

Order

public Order(swarm.defobj.Zone aZone,
             int n,
             int sd,
             int sn,
             int[] r0,
             ESFrameModelSwarm model)
the first constructor for Order, for original object creation

Method Detail

getNextStep

public int getNextStep()
production next step in Order (it is in the orderRecipe vector, at the same index value in which we find the first 0 in orderState vector)


getDoneStep

public int getDoneStep()
production done step in Order (it is in the orderRecipe vector, at the index value in which we find the first 0 in orderState vector minus 1; if no step has been done, the method returns -999999)


setDoneStep

public void setDoneStep(int u)
Done step in Order


getOrderNumber

public int getOrderNumber()
returning the orderNumber of this order


getStepNumber

public int getStepNumber()
returning the stepNumber


getStartingTimeUnit

public int getStartingTimeUnit()
returning the startingTimeUnit


getNumberOfDirectStepsDone

public float getNumberOfDirectStepsDone()
evaluate the number of direct steps done


getOrderRecipe

public int getOrderRecipe(int i)
getting the content of orderRecipe[i]


getOrderState

public int getOrderState(int i)
getting the content of orderState[i]


setRecipeName

public void setRecipeName(java.lang.String s)
settinging the name of the recipe


getRecipeName

public java.lang.String getRecipeName()
retrieving the name of the recipe