forked from cmarini/NSE-Train-Control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCTCModel.java
55 lines (48 loc) · 1.08 KB
/
CTCModel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package CTC;
public class CTCModel
{
private int throughput;
private int capacity;
private int occupancy;
private String[] trackControllers = {"A1", "A2", "A3"};
private String[] trains = {"1111", "2222", "3333"};
/*public Track getTrack(String TrackID)
* {
*
* }
*/
public String [] getTrackIDs()
{
String s[] = new String [trackControllers.length];
for(int i = 0; i < trackControllers.length; i++)
{
s[i] = trackControllers[i];
}
return s;
}
public String [] getTrainIDs()
{
String s[] = new String [trains.length];
for(int i = 0; i < trains.length; i++)
{
s[i] = trains[i];
}
return s;
}
public int getThroughput()
{
return throughput;
}
public int getCapacity()
{
return capacity;
}
public int getOccupancy()
{
return occupancy;
}
}