if (getMediator() != null) {
// Instantiate a new BN module
bnModule = new NetworkWindow(ssbn.getNetwork());
// extract controller from BN module
NetworkController controller = bnModule.getController();
dmp.setMediator(controller);
controller.setInferenceAlgorithm(dmp);
// Make sure the tree (JTree in the left side of compilation panel) is updated with the network changes, if there is any.
controller.getScreen().getEvidenceTree().resetTree();
}
if (this.isToCompileFinalSSBN() ) {
// this is the actual BN (i.e. SSBN) to compile