solver.initialize(network, new StrongJoinTreeCompiler());
// find the optimum actions
solver.Solve();
JTInferencePN inference = solver.getPolicyNetworkInference();
inference.run();
// output inference results
Set<BNNode> nodes = network.vertexSet();
for (BNNode node : nodes) {
System.out.println(
node.getName() + ":\n"
+ inference.getMarginal(node).toString() + "\n");
}
} catch (Exception e) {
System.out.println("Can't load network");
e.printStackTrace();