public Event getNextEvent(){
        Event a,b;
        a=this.listCustAr.peek();
        b=this.listOrderArrival.peek();
        if (a!=null && b!=null) {
            if (b.getTime()>a.getTime()) return this.listCustAr.remove();
            else return this.listOrderArrival.remove();
        }
        else if (b!=null) return this.listOrderArrival.remove();
        else if (a!=null) return this.listCustAr.remove();
        else return null;
    }