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.
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()
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
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
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 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;