Package jline.lang
Class Chain
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Chain extends NetworkElement implements Serializable
A class modelling a set of reachable classes for a given job (a chain)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Station>stationsprotected List<JobClass>classesprotected List<String>classnamesprotected Matrixvisitsprotected Map<JobClass, Integer>classIndexMapprotected Map<Station, Integer>stationIndexMapprotected Matrixcompletesprotected Matrixnjobsprotected Stringname
-
Method Summary
Modifier and Type Method Description voidaddClass(JobClass jobclass)Adds a job class to this chain. voidaddStation(Station station)Adds a station to this chain. voidsetName(String name)Sets the name of this chain. voidsetVisits(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. List<JobClass>getClasses()Gets the list of job classes in this chain. -
-
Constructor Detail
-
Chain
Chain(String neName)
Creates a new chain with the specified name.- Parameters:
neName- the name for this chain
-
-
Method Detail
-
addClass
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
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
void setName(String name)
Sets the name of this chain.
- Parameters:
name- the new name for this chain
-
setVisits
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 visitsstation- the station being visitedval- the number of visits
-
getClasses
List<JobClass> getClasses()
Gets the list of job classes in this chain.
- Returns:
the list of job classes
-
-
-
-