// this is the actual BN (i.e. SSBN) to compile
Network bn = ssbn.getNetwork();
// If it is a SingleEntityNetwork, make sure all variables are properly initialized
if (bn instanceof SingleEntityNetwork) {
SingleEntityNetwork singleEntityNetwork = (SingleEntityNetwork) bn;
singleEntityNetwork.resetNodesCopy();
singleEntityNetwork.resetEvidences();
}
// actually compile network using dmp
dmp.setNetwork(bn);
dmp.run();