Class VEFrameModelSwarm

java.lang.Object
  |
  +--swarm.BaseImpl
        |
        +--swarm.objectbase.SwarmImpl
              |
              +--VEFrameModelSwarm
All Implemented Interfaces:
swarm.activity.ActionType, swarm.activity.ActionTypeS, 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.Swarm, swarm.activity.SwarmProcess, swarm.activity.SwarmProcessS, swarm.objectbase.SwarmS, swarm.activity.SynchronizationType, swarm.activity.SynchronizationTypeS, swarm.defobj.Zone, swarm.defobj.ZoneS

public class VEFrameModelSwarm
extends swarm.objectbase.SwarmImpl

The Model contains the Units and all the related tools, like the warehouses which are necessary to deal with the inventories or the newses

Author:
Pietro Terna, with contributions of Marco Remondino, Dario Landini, Nicola Ormezzano and Paolo Pelligra

Field Summary
 MyWriter concludedOrderLog
          the log of the concluded orders
 swarm.collections.ListImpl endUnitList
          the list of the end units
 int infDeepness
          how deep information are propagated (how many steps we examine after the current production phase)
 InformationRuleMaster informationRuleMaster
          the informationRuleMaster managing newses
 int inventoryEvaluationCriterion
          the inventory evaluation criterion
 float inventoryFinancialRate
          the yearly rate used to evaluate the financial costs of inventories
 InventoryRuleMaster inventoryRuleMaster
          the inventoryRuleMaster managing inventories
 int maxInWarehouses
          the max inventory quantity in a warehouse
 int maxStepLength
          the max length of a step in a recipe (in units of time or ticks)
 int maxStepNumber
          the max number of steps to be done to complete an order
 int minInWarehouses
          the min inventory quantity in a warehouse
 swarm.activity.ActionGroup modelActions1
          ActionGroup for holding an ordered sequence of action
 swarm.activity.ActionGroup modelActions2
          ActionGroup for holding an ordered sequence of action
 swarm.activity.ActionGroup modelActions2b
          ActionGroup for holding an ordered sequence of action
 swarm.activity.ActionGroup modelActions2distiller
          ActionGroup for holding an ordered sequence of action
 swarm.activity.ActionGroup modelActions2generator
          ActionGroup for holding an ordered sequence of action
 swarm.activity.ActionGroup modelActions3
          ActionGroup for holding an ordered sequence of action
 swarm.activity.Schedule modelSchedule
          the Schedule operating in the Model
 int nOfNewsesToBeCleared
          the number of newses to be cleared after the decision of producing to increase inventories (a simple choice is to have it equal to nOfNewsesToProduce)
 int nOfNewsesToProduce
          the number of newses necessary to decide the production of inventories
 int nOfOrdersInNewses
          the number of orders for which newses are propagated by a unit
 int orCriterion
          the criterion used dealing with 'or' sequences
 OrderDistiller orderDistiller
          the order distiller, using archives of recipes and of order sequences to generate the simulated events
 OrderGenerator orderGenerator
          the order generator, to be replaced by the order distiller or in the future by more sophisticated structures (swarms of enterprises etc.)
 swarm.collections.ListImpl orderList
          the whole list of the orders (not yet finished)
 swarm.collections.ListImpl procurementAssemblerList
          the list of procurementAssembler units linked to normal unit; proc. ass. units have in charge the task of making the procurement
 float revenuePerEachRecipeStep
          the estimate of the revenue of the enterprise per each recipe step done in a semi manufactured order
 swarm.collections.ListImpl sequentialBatchAssemblerList
          the list of sequentialBatchAssembler units linked to normal unit
 swarm.collections.ListImpl standAloneBatchAssemblerList
          the list of standAloneBatchAssembler units linked to normal unit
 int ticksInATimeUnit
          the number of ticks of the clock in a day; at each tick a unit of each step in recipes is done
 int totalEndUnitNumber
          the total number of end units we are using; and endUnit represents an actual or virtual warehouse were we can "find" components internallly produced using sub-recipes or external procurements; each endUnit has a code which is the same used to conclude (as an 'end') the recipe describing this internal or external production
 int totalProductionTime
          the total production time used by done orders
 int totalRecipeLength
          the total length of the recipes of the done orders
 int totalUnitNumber
          the total number of operating Units we are using
 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 operating units
 UnitParameters unitParameters
          the input class for unit parameters
 boolean useNewses
          choosing if we use or not newses
 boolean useOrderDistiller
          use the order distiller instead of the order generator
 boolean useWarehouses
          choosing if we use or not warehouses (and inventories)
 swarm.collections.ListImpl warehouseList
          the list of the warehouses
 
Constructor Summary
VEFrameModelSwarm(swarm.defobj.Zone aZone)
           
 
Method Summary
 swarm.activity.Activity activateIn(swarm.objectbase.Swarm swarmContext)
          Now set up the model's activation. swarmContext indicates where we're being started in - typically, this model is run as a subswarm of an observer swarm.
 java.lang.Object buildActions()
          Here is where the model schedule is built, the data structures that define the simulation of time in the model.
 java.lang.Object buildObjects()
          Build the model objects.
 float getBenefit()
          the benefit of the enterprise
 float getInventoryEvaluationCriterion()
          the evaluation criterion for inventories
 float getInventoryFinancialRate()
          the financial rate
 java.lang.Object getOrderList()
          the method returns the list of the orders
 float getRevenuePerEachRecipeStep()
          the revenue for each recipe step
 int getTicksInATimeUnit()
          the number of ticks in a day
 float getTimeLengthRatio()
          report the ratio totalProductionTime/totalRecipeLength
 java.lang.Object getUnitList()
          the method returns the list of the units
 boolean getUseWarehouses()
          this get method returns true if warehouses are used, false otherwise
 java.lang.Object getWarehouseList()
          the method returns the list of the warehouses
 void setProductionTimeAndRecipeLength(int pt, int rl)
          record total production time and total recipe length
 
Methods inherited from class swarm.objectbase.SwarmImpl
allocIVars, allocIVarsComponent, compare, copyIVars, copyIVarsComponent, describe, describeForEach, describeForEachID, describeID, drop, freeIVars, freeIVarsComponent, getActivity, getCompleteProbeMap, getComponentZone, getDisplayName, getInternalZone, getName, getPageSize, getPopulation, getProbeForVariable, getProbeMap, getSynchronizationType, 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

ticksInATimeUnit

public int ticksInATimeUnit
the number of ticks of the clock in a day; at each tick a unit of each step in recipes is done

totalUnitNumber

public int totalUnitNumber
the total number of operating Units we are using

totalEndUnitNumber

public int totalEndUnitNumber
the total number of end units we are using; and endUnit represents an actual or virtual warehouse were we can "find" components internallly produced using sub-recipes or external procurements; each endUnit has a code which is the same used to conclude (as an 'end') the recipe describing this internal or external production

maxStepNumber

public int maxStepNumber
the max number of steps to be done to complete an order

maxStepLength

public int maxStepLength
the max length of a step in a recipe (in units of time or ticks)

maxInWarehouses

public int maxInWarehouses
the max inventory quantity in a warehouse

minInWarehouses

public int minInWarehouses
the min inventory quantity in a warehouse

useWarehouses

public boolean useWarehouses
choosing if we use or not warehouses (and inventories)

useNewses

public boolean useNewses
choosing if we use or not newses

infDeepness

public int infDeepness
how deep information are propagated (how many steps we examine after the current production phase)

revenuePerEachRecipeStep

public float revenuePerEachRecipeStep
the estimate of the revenue of the enterprise per each recipe step done in a semi manufactured order

inventoryFinancialRate

public float inventoryFinancialRate
the yearly rate used to evaluate the financial costs of inventories

nOfNewsesToProduce

public int nOfNewsesToProduce
the number of newses necessary to decide the production of inventories

nOfNewsesToBeCleared

public int nOfNewsesToBeCleared
the number of newses to be cleared after the decision of producing to increase inventories (a simple choice is to have it equal to nOfNewsesToProduce)

nOfOrdersInNewses

public int nOfOrdersInNewses
the number of orders for which newses are propagated by a unit

inventoryEvaluationCriterion

public int inventoryEvaluationCriterion
the inventory evaluation criterion

totalProductionTime

public int totalProductionTime
the total production time used by done orders

totalRecipeLength

public int totalRecipeLength
the total length of the recipes of the done orders

orderGenerator

public OrderGenerator orderGenerator
the order generator, to be replaced by the order distiller or in the future by more sophisticated structures (swarms of enterprises etc.)

useOrderDistiller

public boolean useOrderDistiller
use the order distiller instead of the order generator

orderDistiller

public OrderDistiller orderDistiller
the order distiller, using archives of recipes and of order sequences to generate the simulated events

modelActions1

public swarm.activity.ActionGroup modelActions1
ActionGroup for holding an ordered sequence of action

modelActions2

public swarm.activity.ActionGroup modelActions2
ActionGroup for holding an ordered sequence of action

modelActions2b

public swarm.activity.ActionGroup modelActions2b
ActionGroup for holding an ordered sequence of action

modelActions2generator

public swarm.activity.ActionGroup modelActions2generator
ActionGroup for holding an ordered sequence of action

modelActions2distiller

public swarm.activity.ActionGroup modelActions2distiller
ActionGroup for holding an ordered sequence of action

modelActions3

public swarm.activity.ActionGroup modelActions3
ActionGroup for holding an ordered sequence of action

modelSchedule

public swarm.activity.Schedule modelSchedule
the Schedule operating in the Model

inventoryRuleMaster

public InventoryRuleMaster inventoryRuleMaster
the inventoryRuleMaster managing inventories

informationRuleMaster

public InformationRuleMaster informationRuleMaster
the informationRuleMaster managing newses

unitParameters

public UnitParameters unitParameters
the input class for unit parameters

unitList

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

warehouseList

public swarm.collections.ListImpl warehouseList
the list of the warehouses

orderList

public swarm.collections.ListImpl orderList
the whole list of the orders (not yet finished)

endUnitList

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

procurementAssemblerList

public swarm.collections.ListImpl procurementAssemblerList
the list of procurementAssembler units linked to normal unit; proc. ass. units have in charge the task of making the procurement

standAloneBatchAssemblerList

public swarm.collections.ListImpl standAloneBatchAssemblerList
the list of standAloneBatchAssembler units linked to normal unit

sequentialBatchAssemblerList

public swarm.collections.ListImpl sequentialBatchAssemblerList
the list of sequentialBatchAssembler units linked to normal unit

concludedOrderLog

public MyWriter concludedOrderLog
the log of the concluded orders

orCriterion

public int orCriterion
the criterion used dealing with 'or' sequences

unitCriterion

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

VEFrameModelSwarm

public VEFrameModelSwarm(swarm.defobj.Zone aZone)
Method Detail

buildObjects

public java.lang.Object buildObjects()
Build the model objects.
Overrides:
buildObjects in class swarm.objectbase.SwarmImpl

buildActions

public java.lang.Object buildActions()
Here is where the model schedule is built, the data structures that define the simulation of time in the model. The core is an actionGroup that has a list of actions. That's then put in a Schedule.
Overrides:
buildActions in class swarm.objectbase.SwarmImpl

activateIn

public swarm.activity.Activity activateIn(swarm.objectbase.Swarm swarmContext)
Now set up the model's activation. swarmContext indicates where we're being started in - typically, this model is run as a subswarm of an observer swarm.
Overrides:
activateIn in class swarm.objectbase.SwarmImpl

getUnitList

public java.lang.Object getUnitList()
the method returns the list of the units

getWarehouseList

public java.lang.Object getWarehouseList()
the method returns the list of the warehouses

getOrderList

public java.lang.Object getOrderList()
the method returns the list of the orders

getUseWarehouses

public boolean getUseWarehouses()
this get method returns true if warehouses are used, false otherwise

setProductionTimeAndRecipeLength

public void setProductionTimeAndRecipeLength(int pt,
                                             int rl)
record total production time and total recipe length

getTimeLengthRatio

public float getTimeLengthRatio()
report the ratio totalProductionTime/totalRecipeLength

getInventoryFinancialRate

public float getInventoryFinancialRate()
the financial rate

getInventoryEvaluationCriterion

public float getInventoryEvaluationCriterion()
the evaluation criterion for inventories

getRevenuePerEachRecipeStep

public float getRevenuePerEachRecipeStep()
the revenue for each recipe step

getTicksInATimeUnit

public int getTicksInATimeUnit()
the number of ticks in a day

getBenefit

public float getBenefit()
the benefit of the enterprise