Package jline.lang

Class Chain

All Implemented Interfaces:
Serializable, Copyable

public class Chain extends NetworkElement implements Serializable
A class modelling a set of reachable classes for a given job (a chain)
See Also:
  • Field Details

  • Constructor Details

    • Chain

      public Chain(String neName)
      Creates a new chain with the specified name. Initializes empty collections for stations, classes, and visit matrices.
      Parameters:
      neName - the name for this chain
    • Chain

      public Chain(String neName, List<JobClass> classes, List<Station> stations)
      Creates a new chain with the specified name, job classes, and stations. Initializes visit, completion, and job count matrices based on the provided classes and stations.
      Parameters:
      neName - the name for this chain
      classes - the list of job classes in this chain
      stations - the list of stations visited by this chain
  • Method Details

    • addClass

      public void addClass(JobClass jobclass)
      Adds a job class to this chain. Expands the visit, completion, and job count matrices if the class is new.
      Parameters:
      jobclass - the job class to add to this chain
    • addStation

      public void addStation(Station station)
      Adds a station to this chain. Expands the visit, completion, and job count matrices if the station is new.
      Parameters:
      station - the station to add to this chain
    • setName

      public void setName(String name)
      Sets the name of this chain.
      Overrides:
      setName in class Element
      Parameters:
      name - the new name for this chain
    • setVisits

      public void setVisits(JobClass jobclass, Station station, double val)
      Sets the number of visits that a job in this chain makes to a station in a specific class.
      Parameters:
      jobclass - the job class making the visits
      station - the station being visited
      val - the number of visits
    • getClasses

      public List<JobClass> getClasses()
      Gets the list of job classes in this chain.
      Returns:
      the list of job classes