stable mlp version
[IRC.git] / Robust / src / Benchmarks / mlp / directto / mlp-java / D2.java
index 2992022f76bd645a60a20ce7bdc5f2653a472653..531cbe32e578f399c4268236fcf9af5e2a988084 100755 (executable)
@@ -4,23 +4,23 @@
 
 //import java.io.*;
 
-class D2 {
+public class D2 {
   public ReadWrite rw;
 
   private Static                singletonStatic               ; public Static                getStatic               () { return singletonStatic               ; }
-  private AircraftList         singletonAircraftList         ; public AircraftList          getAircraftList         () { return singletonAircraftList   ; }   
-  private Algorithm            singletonAlgorithm            ; public Algorithm             getAlgorithm            () { return singletonAlgorithm              ; }
-  private FixList              singletonFixList              ; public FixList               getFixList              () { return singletonFixList                ; }
-  private Flight               singletonFlight               ; public Flight                getFlight               () { return singletonFlight                 ; }
-  private FlightList           singletonFlightList           ; public FlightList            getFlightList           () { return singletonFlightList             ; }
-  private MessageList          singletonMessageList          ; public MessageList           getMessageList          () { return singletonMessageList            ; }
+  private AircraftList         singletonAircraftList         ; public AircraftList          getAircraftList         () { return singletonAircraftList         ; }   
+  private Algorithm            singletonAlgorithm            ; public Algorithm             getAlgorithm            () { return singletonAlgorithm            ; }
+  private FixList              singletonFixList              ; public FixList               getFixList              () { return singletonFixList              ; }
+  private Flight               singletonFlight               ; public Flight                getFlight               () { return singletonFlight               ; }
+  private FlightList           singletonFlightList           ; public FlightList            getFlightList           () { return singletonFlightList           ; }
+  private MessageList          singletonMessageList          ; public MessageList           getMessageList          () { return singletonMessageList          ; }
   private TrajectorySynthesizer singletonTrajectorySynthesizer; public TrajectorySynthesizer getTrajectorySynthesizer() { return singletonTrajectorySynthesizer; }
 
   public D2() {
     singletonStatic                = new Static               ();
     singletonAircraftList         = new AircraftList         ();
     singletonFixList              = new FixList              ();
-    singletonAlgorithm            = new Algorithm            ( this ); 
+    singletonAlgorithm            = new Algorithm            ( this );
     singletonFlight                = new Flight               ( this, "" );
     singletonFlightList                   = new FlightList           ( this ); 
     singletonMessageList          = new MessageList          ( this );
@@ -28,8 +28,6 @@ class D2 {
   }
 
   public static void main(String arg[]) {
-    System.out.println("D2 - Application started");
-
     D2 d2 = new D2();
 
     d2.rw=new ReadWrite( d2 );
@@ -37,8 +35,18 @@ class D2 {
 
     d2.getMessageList().executeAll();
        
+    int count = 0;
     while( d2.getFlightList().anyPlanesAlive() ) {
       d2.getAlgorithm().doIteration();
+      
+      count++;
+      if( count % 10000 == 0 ) {
+       System.out.println( "iteration "+count );
+      }
+
+      if( count == 40000 ) {
+       break;
+      }
     }
 
     d2.rw.write();