Class Factory


  • public class Factory
    extends Coupled
    Factory with dynamic number of machines. The factory has a generator, a transducer and a variable number of machines. When a job arrives, the factory sends it to the first idle machine. If there are no idle machines, a new machine is created and incorporated to the factory.
    • Field Detail

      • processingTime

        protected double processingTime
      • maxMachines

        protected int maxMachines
    • Constructor Detail

      • Factory

        public Factory​(String name,
                       double period,
                       double processingTime,
                       double observationTime,
                       int maxMachines)
        Constructor
        Parameters:
        name - Factory name
        period - Generator period
        processingTime - Machine processing time
        observationTime - Transducer observation time
        maxMachines - Maximum number of machines
    • Method Detail

      • structuralTransition

        public boolean structuralTransition()
        Description copied from class: Coupled
        This method is called by the simulator to check possible structural changes.
        Overrides:
        structuralTransition in class Coupled
        Returns:
        true if the model has changed its structure, false otherwise
      • main

        public static void main​(String[] args)