/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package mv3302; import simkit.random.RandomVariate; /** *PartArrivalProcess class extends ArrivalProcess instantiating an inter-arrival time * for each part entered into the system. Arrives the part to the Arrival method of the * super. * @author dansl */ public class PartArrivalProcess extends ArrivalProcess{ public int numberPartsArrived; /** * Zero-argument constructor */ public PartArrivalProcess() { super(); } /** * Instantiate with the given parameters * * @param interarrivalTimes Given inter arrival times */ public PartArrivalProcess(RandomVariate interarrivalTimes) { super(interarrivalTimes); } /** * Schedule next Arrival<br> * Schedule Arrival(index) */ @Override public void doArrival() { super.doArrival(); Part part = new Part(); numberPartsArrived +=1; waitDelay("Arrival", 0.0, part, 0); } /** * @return the numberPartsArrived */ public int getNumberPartsArrived() { return numberPartsArrived; } }