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.
computational operations with code -1999 (a code for the checking
phase of the program
this computational code verifies position 0,0 of the three
received matrixes; only if these positions are all not empty
the code empties them and set the status to done
in sequential batch two orders can stay in the same batch
if several criteria match; one of them is that of having the
same state vector, which contains the number of the units
that made the various steps; if we consider more simply the state
as 0 or non 0, we disregard the unit number (also the 'or', case
with -1 values in not used branches, receives the same treatment)
in sequential batch two orders can stay in the same batch
if several criteria match; one of them is that of having the
same state vector, which contains the number of the units
that made the various steps; if we consider more simply the state
as 0 or non 0, we disregard the unit number (also the 'or', case
with -1 values in not used branches, receives the same treatment)
The ComputationalAssemblerBasic class instances make
computational processes; we have a computationa assembler instance for
each unit
THIS CLASS IS NOT USED DIRECTLY, BUT VIA ITS INSTANCES
ComputationalAssembler.java
the method to produce orders once a day, in the first (or unique)
step of the day
here it is only a rename of the method of the orderGenerator
createRandomOrderWithNSteps()
The EndUnit class instances represent virtual or actuale
places or warehouse were temporary finished sub-recipes (produced internally
or obtained as procurements) wait to be used in other recipes via a "p"
(procurement) step
an endUnit has its internal number equal to the concluding code
used to finish/identify a temporary finished sub-recipe
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)
getting the computational specification set related to the nextStep
(the current one, if the order is in a waiting list for next step
to be accomplished)
if no computational specification set exists for the next step,
a null value is returned
getting the 'or' specification set related to the nextStep
(the current one, if the order is in a waiting list for next step
to be accomplished)
if no 'or' SpecificationSet exists for the next step,
a null value is returned
getting the procurement specification set related to the nextStep
(the current one, if the order is in a waiting list for next step
to be accomplished)
if no procurement specification set exists for the next step,
a null value is returned
getting the sequential batch specification set related to the nextStep
(the current one, if the order is in a waiting list for next step
to be accomplished)
if no sequential batch SpecificationSet exists for the next step,
a null value is returned
getting the stand alone batch specification set related to the nextStep
(the current one, if the order is in a waiting list for next step
to be accomplished)
if no stand alone batch SpecificationSet exists for the next step,
a null value is returned
the unit which is calling us uses newses, is idle and it is asking
us if it has to produce or not to increase inventories; we check the
newses not yet cleared and we clear them
we agree to the production of inventories if the warehouse level is
< maxInWarehouses && (we have a news signalling and incoming
production step || the warehouse level is < minInWarehouses)
the number identifying the memory matrix (starting from zero)
this number represents also the posizione of this memory matrix in an
array of memory matrixes created and managed by VEFrameModelSwarm
the number of newses to be cleared after the decision of producing
to increase inventories (a simple solution is to have it equal to
nOfNewsesToProduce)
orCriterion
0 - all 'or' branches in sequence
1 - choosing first branch
2 - choosing second branch
3 - a random branch
4 - the branch whose first step
has the shortest waiting list
5 - the branch whose number is stored in (x,0) pos in
memoryMatrix designated by orMemoryMatrix in
VEFrameModelSwarm.java; the matrix
may be sensitive or insensitive to layers;
range of the branch number: from 1 to
branchNumber
x is 0 if the first node in 'or' sequence is
numbered 1; is kk if the first node is numbered
10kk with kk 00 to 99
the layer to which the order belongs; the layer has to be set by
OrderGenerator (for test purposes) and must of all by the
OrderDistiller; in this case, the information must be retrieved from
the recipeData/orderSequence.xls file
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
The interface to be implemented in classes referred from PTHistogram
class
PTHistogram can deal with up to three list of objects from which to obtain
the data to be plotted; from the objects contained in the first or unique
list (second or third lists are optional) we have also to obtain the
captions for the various bar in the X axis
an example of getValueToPlot() method in an object extending this interface
is
public double getValueToPlot()
{
return (double) XXXX;
// where XXXX is a value or a method getting a value
}
an example of getLabel() method in an object extending this interface,
if the object is included in the fist or unique list sent to
PTHistogram, is
public String getLabel()
{
return "" + YYYY;
// where YYYY is a numerical value or a method getting
// a numerical value (the trick "" + is used
// to convert a numerical field into a string; if we
// have directly a string, the trick is unnecessary)
}
if the object is included in the second or third list, simply use
read (i) the unit numbers, production phases, fixed costs and
variable costs from the unitData/unitBasicData.txt file
(ii) the end unit numbers from the unitData/endUnitList.txt file
copying the orders in the waitingList, if they are not kept into
any parallel unit, such as a myProcurementAssembler or
myComputationalAssembler or mySequentialBatchAssembler
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
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
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
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
The Unit class instances are micro unit in our virtual enterprise;
i.e. the units where the steps required to build a product (to fulfill
an order) are done
at the beginning of each time tick in the 'day', each unit looks for
the order(s) (if any) to be executed; the production
cycle is 'one unit of time'
in a step of the recipe of an order in a tick of a day;