added smaller version of directo for something in between tiny and full tests of...
[IRC.git] / Robust / src / Benchmarks / mlp / directto / mlp-small-for-testing / Conflict.java
1 // This class memorizes a conflict
2
3 public class Conflict {
4   public Point4d coordinates; // its position
5   public Flight flight1, flight2; // the two flights involved in the conflict
6
7   public Conflict(Point4d coord, Flight f1, Flight f2) {
8     coordinates=coord;
9     flight1=f1;
10     flight2=f2;
11   }
12
13   public boolean hasFlights(Flight f1, Flight f2) {
14     if ( ((flight1.flightID==f1.flightID)&&(flight2.flightID==f2.flightID))||
15          ((flight1.flightID==f2.flightID)&&(flight2.flightID==f1.flightID)) )
16       return true;    
17     return false;
18   }
19
20   public String toString() {
21     return ("Conflict at time "+coordinates.time+" position "+coordinates+" between "+
22             flight1.flightID+" and "+flight2.flightID+".");
23   }    
24 }