Class Shop

    • Field Detail

      • routes

        public Route[] routes
      • jobsFinished

        public int jobsFinished
      • jobsStarted

        public int jobsStarted
      • lastJobReleased

        public Job lastJobReleased
      • lastJobFinished

        public Job lastJobFinished
    • Constructor Detail

      • Shop

        public Shop()
    • Method Detail

      • init

        public void init()
      • jobFinished

        public void jobFinished​(Job j)
      • startJob

        public void startJob​(Job nextJob)
      • produceResults

        public void produceResults​(Map<String,​Object> res)
      • isEnableLookAhead

        public boolean isEnableLookAhead()
        Returns the status of lookahead mechanism.
        Returns:
        Whether lookahead is used.
      • setEnableLookAhead

        public void setEnableLookAhead​(boolean enableLookAhead)
        Enable the lookahead mechanism of this shop. If enabled dispatching rules can select jobs arriving from in the near future.
        Parameters:
        enableLookAhead - Whether to enable or disable lookahead.
      • setMaxJobsInSystem

        public void setMaxJobsInSystem​(int maxJobsInSystem)
        End simulation if WIP (work in process) reaches this value (0: no limit)
        Parameters:
        maxJobsInSystem - The maximum number of jobs in the system.
      • getMaxJobsInSystem

        public int getMaxJobsInSystem()
        Returns the maximum number of jobs in the system, before the simulation is terminated.
        Returns:
        The maximum number of jobs in the system.
      • setStopAfterNumJobs

        public void setStopAfterNumJobs​(int stopAfterNumJobs)
        End simulation if a certain number of jobs was completed (%lt;=0 (default): no limit).
        Parameters:
        stopAfterNumJobs - The number of jobs to finish.
      • getStopAfterNumJobs

        public int getStopAfterNumJobs()
        Returns the number of jobs to complete before the simulation is ended.
        Returns:
        The number of jobs to complete before terminating the simulation.
      • getSources

        public JobSource[] getSources()
        Gets the job sources in this shop as an array.
        Returns:
        An array of job sources.
        See Also:
        sources
      • setSources

        public void setSources​(JobSource[] sources)
        Sets all job sources in this shop.
        Parameters:
        sources - An array with all job sources.
      • addJobSource

        public void addJobSource​(JobSource js)
      • removeJobSource

        public void removeJobSource​(JobSource js)
      • getMachines

        public WorkStation[] getMachines()
        Gets an array of the workstations contained in this shop.
        Returns:
        An array of all workstations of this shop.
        See Also:
        machines()
      • setMachines

        public void setMachines​(WorkStation[] machines)
        Sets the workstations of this shop.
        Parameters:
        machines - An array containing all workstations for this shop.
      • addMachine

        public void addMachine​(WorkStation machine)
        Adds a single machine to this shop.
        Parameters:
        machine - The workstation to add.
        See Also:
        getMachines()
      • removeMachine

        public void removeMachine​(WorkStation machine)
        Removes a machine from this shop.
        Parameters:
        machine - The workstation to remove.
      • getWorkstationByName

        public WorkStation getWorkstationByName​(String name)
        Returns a workstation with the given name, or null if no such workstation exists.
        Parameters:
        name - The workstation's name.
        Returns:
        The workstation with the given name, if it exists. null otherwise.
      • getRoutes

        public Route[] getRoutes()
        Returns the routes added to this job shop. Do not modify externally.
        Returns:
        An array of all routes in this shop.
      • setRoutes

        public void setRoutes​(Route[] routes)
        Sets the routes available for this job shop.
        Parameters:
        routes - The route list.
      • addRoute

        public void addRoute​(Route r)
      • removeRoute

        public void removeRoute​(Route r)