// Path: cepsim-integration/src/main/java/ca/uwo/eng/sel/cepsim/network/CepNetworkEvent.java
// public class CepNetworkEvent implements Comparable<CepNetworkEvent> {
// 
//     private double origTimestamp;
//     private double destTimestamp;
//     private OutputVertex orig;
//     private InputVertex dest;
//     private EventSet eventSet;
// 
//     public CepNetworkEvent(double origTimestamp, OutputVertex orig, double destTimestamp, InputVertex dest,
//                            EventSet eventSet) {
//         this.origTimestamp = origTimestamp;
//         this.destTimestamp = destTimestamp;
//         this.orig = orig;
//         this.dest = dest;
//         this.eventSet = eventSet;
//     }
// 
//     public double getOrigTimestamp() {
//         return origTimestamp;
//     }
// 
//     public OutputVertex getOrig() {
//         return orig;
//     }
// 
//     public double getDestTimestamp() {
//         return destTimestamp;
//     }
// 
//     public InputVertex getDest() {
//         return dest;
//     }
// 
//     public EventSet getEventSet() {
//         return eventSet;
//     }
// 
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         CepNetworkEvent that = (CepNetworkEvent) o;
// 
//         if (Double.compare(that.destTimestamp, destTimestamp) != 0) return false;
//         if (Double.compare(that.origTimestamp, origTimestamp) != 0) return false;
//         if (!dest.equals(that.dest)) return false;
//         if (!orig.equals(that.orig)) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result;
//         long temp;
//         temp = Double.doubleToLongBits(origTimestamp);
//         result = (int) (temp ^ (temp >>> 32));
//         temp = Double.doubleToLongBits(destTimestamp);
//         result = 31 * result + (int) (temp ^ (temp >>> 32));
//         result = 31 * result + orig.hashCode();
//         result = 31 * result + dest.hashCode();
//         return result;
//     }
// 
//     @Override
//     public int compareTo(CepNetworkEvent o) {
//         int ret = Double.compare(this.destTimestamp, o.destTimestamp);
//         if (ret != 0) return ret;
// 
//         ret =  Double.compare(this.origTimestamp, o.origTimestamp);
//         if (ret != 0) return ret;
// 
//         ret = this.orig.compare(o.orig);
//         if (ret != 0) return ret;
// 
//         return this.dest.compare(o.dest);
//     }
// }


import ca.uwo.eng.sel.cepsim.PlacementExecutor;
import ca.uwo.eng.sel.cepsim.history.History;
import ca.uwo.eng.sel.cepsim.history.SimEvent;
import ca.uwo.eng.sel.cepsim.metric.LatencyMetric;
import ca.uwo.eng.sel.cepsim.metric.LatencyThroughputCalculator;
import ca.uwo.eng.sel.cepsim.metric.MetricCalculator;
import ca.uwo.eng.sel.cepsim.metric.ThroughputMetric;
import ca.uwo.eng.sel.cepsim.network.CepNetworkEvent;
import ca.uwo.eng.sel.cepsim.query.Query;
import ca.uwo.eng.sel.cepsim.query.Vertex;
import org.cloudbus.cloudsim.Cloudlet;
import org.cloudbus.cloudsim.UtilizationModelFull;
import scala.Option;
import scala.collection.JavaConversions;
import java.util.*;
package ca.uwo.eng.sel.cepsim.integr;





public class CepQueryCloudlet extends Cloudlet {

    private static final UtilizationModelFull UTIL_MODEL_FULL = new UtilizationModelFull();


    private PlacementExecutor executor;
    private History<SimEvent> history;
// Path: cepsim-integration/src/main/java/ca/uwo/eng/sel/cepsim/network/CepNetworkEvent.java
// public class CepNetworkEvent implements Comparable<CepNetworkEvent> {
// 
//     private double origTimestamp;
//     private double destTimestamp;
//     private OutputVertex orig;
//     private InputVertex dest;
//     private EventSet eventSet;
// 
//     public CepNetworkEvent(double origTimestamp, OutputVertex orig, double destTimestamp, InputVertex dest,
//                            EventSet eventSet) {
//         this.origTimestamp = origTimestamp;
//         this.destTimestamp = destTimestamp;
//         this.orig = orig;
//         this.dest = dest;
//         this.eventSet = eventSet;
//     }
// 
//     public double getOrigTimestamp() {
//         return origTimestamp;
//     }
// 
//     public OutputVertex getOrig() {
//         return orig;
//     }
// 
//     public double getDestTimestamp() {
//         return destTimestamp;
//     }
// 
//     public InputVertex getDest() {
//         return dest;
//     }
// 
//     public EventSet getEventSet() {
//         return eventSet;
//     }
// 
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         CepNetworkEvent that = (CepNetworkEvent) o;
// 
//         if (Double.compare(that.destTimestamp, destTimestamp) != 0) return false;
//         if (Double.compare(that.origTimestamp, origTimestamp) != 0) return false;
//         if (!dest.equals(that.dest)) return false;
//         if (!orig.equals(that.orig)) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result;
//         long temp;
//         temp = Double.doubleToLongBits(origTimestamp);
//         result = (int) (temp ^ (temp >>> 32));
//         temp = Double.doubleToLongBits(destTimestamp);
//         result = 31 * result + (int) (temp ^ (temp >>> 32));
//         result = 31 * result + orig.hashCode();
//         result = 31 * result + dest.hashCode();
//         return result;
//     }
// 
//     @Override
//     public int compareTo(CepNetworkEvent o) {
//         int ret = Double.compare(this.destTimestamp, o.destTimestamp);
//         if (ret != 0) return ret;
// 
//         ret =  Double.compare(this.origTimestamp, o.origTimestamp);
//         if (ret != 0) return ret;
// 
//         ret = this.orig.compare(o.orig);
//         if (ret != 0) return ret;
// 
//         return this.dest.compare(o.dest);
//     }
// }


// Path: cepsim-integration/src/main/java/ca/uwo/eng/sel/cepsim/integr/CepQueryCloudlet.java
import ca.uwo.eng.sel.cepsim.PlacementExecutor;
import ca.uwo.eng.sel.cepsim.history.History;
import ca.uwo.eng.sel.cepsim.history.SimEvent;
import ca.uwo.eng.sel.cepsim.metric.LatencyMetric;
import ca.uwo.eng.sel.cepsim.metric.LatencyThroughputCalculator;
import ca.uwo.eng.sel.cepsim.metric.MetricCalculator;
import ca.uwo.eng.sel.cepsim.metric.ThroughputMetric;
import ca.uwo.eng.sel.cepsim.network.CepNetworkEvent;
import ca.uwo.eng.sel.cepsim.query.Query;
import ca.uwo.eng.sel.cepsim.query.Vertex;
import org.cloudbus.cloudsim.Cloudlet;
import org.cloudbus.cloudsim.UtilizationModelFull;
import scala.Option;
import scala.collection.JavaConversions;
import java.util.*;

package ca.uwo.eng.sel.cepsim.integr;





public class CepQueryCloudlet extends Cloudlet {

    private static final UtilizationModelFull UTIL_MODEL_FULL = new UtilizationModelFull();


    private PlacementExecutor executor;
    private History<SimEvent> history;
    private Queue<CepNetworkEvent> networkEvents;