String[] param = { "", "", "" };
Iterator<AbstractPetriNetElementModel> transes = (mec.getElementsByType(AbstractPetriNetElementModel.TRANS_OPERATOR_TYPE)).values()
.iterator();
IQualanalysisService qualanService = QualAnalysisServiceFactory.createNewQualAnalysisService(editor);
Iterator<AbstractPetriNetElementModel> places = qualanService.getPlaces().iterator();
AbstractPetriNetElementModel end = (AbstractPetriNetElementModel) qualanService.getSinkPlaces().iterator().next();
while (transes.hasNext()) {
AbstractPetriNetElementModel trans = (AbstractPetriNetElementModel) transes.next();
Map<String, Object> outArcs = mec.getOutgoingArcs(trans.getId());
int sum = 0;
for (Object v : outArcs.values()) {
double p = ((ArcModel) v).getProbability();
sum += (Double.valueOf(p * 100)).intValue();
}
int type = ((OperatorTransitionModel) trans).getOperatorType();
if ((type == OperatorTransitionModel.XOR_SPLIT_TYPE || type == OperatorTransitionModel.XOR_SPLITJOIN_TYPE || type == OperatorTransitionModel.ANDJOIN_XORSPLIT_TYPE)
& sum != 100) {
branchingOk = false;
param[0] = Messages.getString("QuantAna.Transition");
param[1] = trans.getNameValue();
param[2] = sum + "";
}
}
while (places.hasNext()) {
AbstractPetriNetElementModel place = (AbstractPetriNetElementModel) places.next();
if (!place.equals(end)) {
Map<String, Object> outArcs = mec.getOutgoingArcs(place.getId());
int sum = 0;
for (Object v : outArcs.values()) {
double p = ((ArcModel) v).getProbability();
sum += (Double.valueOf(p * 100)).intValue();
}
if (outArcs.size() > 1 && sum != 100) {
branchingOk = false;
param[0] = Messages.getString("QuantAna.Place");
param[1] = place.getNameValue();
param[2] = sum + "";
}
}
}
if (branchingOk) {