classTypes[i] = ExactConstants.CLASS_CLOSED;
classData[i] = input.getClassPopulation(key).doubleValue();
} else {
// Open class parameters
classTypes[i] = ExactConstants.CLASS_OPEN;
Distribution d = (Distribution) input.getClassDistribution(key);
if (d.hasMean()) {
classData[i] = 1.0 / d.getMean();
} else {
classData[i] = 1;
res.add(input.getClassName(key) + " arrival distribution does not have a valid mean value."
+ " Arrival rate for that class was set to default value 1");
}
}
}
// Sets extracted values to output
output.setClassNames(classNames);
output.setClassTypes(classTypes);
output.setClassData(classData);
classNames = null;
classTypes = null;
classData = null;
// Exports station data
double[][][] serviceTimes = new double[stationNum][classNum][];
int[] stationTypes = new int[stationNum];
String[] stationNames = new String[stationNum];
int[] stationServers = new int[stationNum];
for (int st = 0; st < stationNum; st++) {
Object key = stationKeys.get(st);
stationNames[st] = input.getStationName(key);
Integer serverNum = input.getStationNumberOfServers(key);
if (serverNum != null && serverNum.intValue() > 0) {
stationServers[st] = serverNum.intValue();
} else {
stationServers[st] = 1;
}
if (input.getStationType(key).equals(CommonConstants.STATION_TYPE_DELAY)) {
stationTypes[st] = ExactConstants.STATION_DELAY;
} else {
stationTypes[st] = ExactConstants.STATION_LI;
}
// Sets service time for each class
for (int cl = 0; cl < classNum; cl++) {
Object serv = input.getServiceTimeDistribution(key, classKeys.get(cl));
if (serv instanceof Distribution) {
Distribution d = (Distribution) serv;
serviceTimes[st][cl] = new double[1]; // This is not load dependent
if (d.hasMean()) {
serviceTimes[st][cl][0] = d.getMean();
} else {
serviceTimes[st][cl][0] = 1;
res.add(output.getStationNames()[st] + " service time distribution for " + output.getClassNames()[cl]
+ " does not have a valid mean value." + " Service time is set to default value 1");
}