public class FreightSimulator extends Simulator
graphPanel
Constructor and Description |
---|
FreightSimulator(TrainList trainList,
SimulationInstance simulationInstance)
constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
getCurrentTrainNo() |
static GraphPanel |
getGraphPanel() |
static TrainList |
getTrainList() |
void |
noGraph()
NoGraph.
|
void |
produceGraph(GraphPanel p)
Produce the graph.
|
void |
setCurrentTrainNo(int currentTrainNo) |
void |
setGraphPanel(GraphPanel graphPanel) |
void |
setTrainList(TrainList trainList) |
void |
simulate(int numberOfSignalAspects)
simulate.
|
int |
simulateNextTrain(int numberOfSignalAspects)
Simulate the next train.
|
void |
startStationToStationScheduling(int trainNo) |
void |
undoStationToStationScheduling(int trainNo) |
public FreightSimulator(TrainList trainList, SimulationInstance simulationInstance)
Trains
- ArrayList
of trainsstations
- ArrayList
of stationspublic int simulateNextTrain(int numberOfSignalAspects)
numberOfSignalAspects
- public void produceGraph(GraphPanel p)
p
- public void noGraph()
public void simulate(int numberOfSignalAspects)
public static TrainList getTrainList()
public void setTrainList(TrainList trainList)
public static int getCurrentTrainNo()
public void setCurrentTrainNo(int currentTrainNo)
public static GraphPanel getGraphPanel()
public void setGraphPanel(GraphPanel graphPanel)
public void startStationToStationScheduling(int trainNo)
public void undoStationToStationScheduling(int trainNo)