* @throws IOMebnException the iO mebn exception
* @throws IOException Signals that an I/O exception has occurred.
*/
private void loadMebn() throws IOMebnException, IOException {
File mebnFile = null;
UbfIO ubf = null;
if (this.isContinuousCase()) {
// continuous MEBN case
// the old file is uc3-v7-with-ContinuousNode.ubf. Revert to it in case you need.
try {
mebnFile = new File(getClass()
.getResource("/mebn/uc3-v10-withContinuousNode_MEBN_1.ubf").getFile());
} catch (NullPointerException e) {
// try other places
}
if (mebnFile == null || !mebnFile.exists()) {
mebnFile = new File("/mebn/uc3-v10-withContinuousNode_MEBN_1.ubf");
}
if (mebnFile == null || !mebnFile.exists()) {
mebnFile = new File("mebn/uc3-v10-withContinuousNode_MEBN_1.ubf");
}
ubf = ContinuousUBFIO.getInstance();
} else {
// discrete MEBN case
// the old file is uc3-v7.ubf. Revert to it in case you need.
try {
mebnFile = new File(getClass()
.getResource("/mebn/uc3-v10-MEBN_1.ubf").getFile());
} catch (Exception e) {
// try other places
}
if (mebnFile == null || !mebnFile.exists()) {
mebnFile = new File("/mebn/uc3-v10-MEBN_1.ubf");
}
if (mebnFile == null || !mebnFile.exists()) {
mebnFile = new File("mebn/uc3-v10-MEBN_1.ubf");
}
ubf = UbfIO.getInstance();
}
System.out.println("[" + new Date() + "] loading file " + mebnFile.getPath());
mebn = ubf.loadMebn(mebnFile);
try {
// this method forces hasTerroristCrew to be a chain of nodes instead of a node with too many parents.
((ResidentNode) mebn.getNode("hasTerroristCrew")).setToLimitQuantityOfParentsInstances(true);
} catch (Exception e) {