1 // This class contains the the main method of this project.
2 // All it does is to initialize the input and output threads
3 // and kick off the algorithm
10 private Static singletonStatic ; public Static getStatic () { return singletonStatic ; }
11 private AircraftList singletonAircraftList ; public AircraftList getAircraftList () { return singletonAircraftList ; }
12 private Algorithm singletonAlgorithm ; public Algorithm getAlgorithm () { return singletonAlgorithm ; }
13 private FixList singletonFixList ; public FixList getFixList () { return singletonFixList ; }
14 private Flight singletonFlight ; public Flight getFlight () { return singletonFlight ; }
15 private FlightList singletonFlightList ; public FlightList getFlightList () { return singletonFlightList ; }
16 private MessageList singletonMessageList ; public MessageList getMessageList () { return singletonMessageList ; }
17 private TrajectorySynthesizer singletonTrajectorySynthesizer; public TrajectorySynthesizer getTrajectorySynthesizer() { return singletonTrajectorySynthesizer; }
20 singletonStatic = new Static ();
21 singletonAircraftList = new AircraftList ();
22 singletonFixList = new FixList ();
23 singletonAlgorithm = new Algorithm ();
24 singletonFlight = new Flight ( "" );
25 singletonFlightList = new FlightList ();
26 singletonMessageList = new MessageList ();
27 singletonTrajectorySynthesizer = new TrajectorySynthesizer();
30 public static void main(String arg[]) {
31 System.out.println("D2 - Application started");
36 d2.rw=new ReadWrite();
40 d2.getMessageList().executeAll(d2);
43 while( d2.getFlightList().anyPlanesAlive() ) {
44 d2.getAlgorithm().doIteration(d2);
47 if( count % 10000 == 0 ) {
48 //System.out.println( "iteration "+count );