serveTime = Double.parseDouble(serveTimeTextField.getText());
} catch (Exception ex) {
return;
}
TelephoneCenter telephoneCenter = new TelephoneCenter(deviceCount, serveTime, arriveTime);
double[] deviceLoad = telephoneCenter.start(requestCount);
for (int i = 0; i < deviceLoad.length; i++) {
DeviceInfo deviceInfo = new DeviceInfo(i, deviceLoad[i]);
devicesTable.getItems().add(deviceInfo);
}
Double[] arrives = new Double[telephoneCenter.getRequests().size()];
Double[] serves = new Double[telephoneCenter.getRequests().size()];
int i = 0;
for (Request request : telephoneCenter.getRequests()) {
telephoneTable.getItems().add(new RequestInfo(request));
arrives[i] = request.getArrive();
serves[i] = request.getServe();
i++;
}