public StochasticProcessEvent(
     long time,
     Distribution<Long> interArrivalTimeDistribution,
     StochasticProcessTerminatedEvent terminatedEvent,
     List<OperationGenerator> operations,
     String name) {
   super(time);
   this.interArrivalTimeDistribution = interArrivalTimeDistribution;
   this.terminatedEvent = terminatedEvent;
   this.count = new int[operations.size()];
   this.operation = new OperationGenerator[operations.size()];
   currentCount = 0;
   int i = 0;
   for (OperationGenerator operationGenerator : operations) {
     operation[i] = operationGenerator;
     count[i] = operationGenerator.getCount();
     currentCount += count[i];
     i++;
   }
   this.processName = name;
 }
 public KompicsEvent generateOperation(Random random) {
   OperationGenerator generator = chooseOperation(random);
   return generator.generate();
 }