I tried to run a propagate before running the learning algorithm. Still there is an error. The essential part of the Java code is found below. In addition I attach the oobn file that contains the time slice model. The run stops at domain.learnClassTables(). Hope you can help!
Bjørnar
ClassCollection cc = new ClassCollection();
TestParseListener parseListener = new TestParseListener();
cc.parseClasses(className + ".oobn", parseListener);
// Unfold the Class to a Domain that can be compiled and
// used for inference, etc.
COM.hugin.HAPI.Class timeSlice = cc.getClassByName(className);
Node hitNode = timeSlice.getNodeByName("hit");
DiscreteChanceNode confiNode = (DiscreteChanceNode)timeSlice.getNodeByName("confidence");
confiNode.getExperienceTable();
Node initConfiNode = timeSlice.getNodeByName("initial_confidence");
COM.hugin.HAPI.Class confiClass = new COM.hugin.HAPI.Class(cc,"ConfiMany");
InstanceNode inst1 = new InstanceNode(confiClass,timeSlice);
InstanceNode inst2 = new InstanceNode(confiClass,timeSlice);
InstanceNode inst3 = new InstanceNode(confiClass,timeSlice);
Node out1 = inst1.getOutput(confiNode);
inst2.setInput(initConfiNode,out1);
Node out2 = inst2.getOutput(confiNode);
inst3.setInput(initConfiNode,out2);
Domain domain = confiClass.createDomain();
domain.openLogFile (className + ".log");
domain.triangulate (Domain.H_TM_BEST_GREEDY);
DiscreteChanceNode initConf1 = (DiscreteChanceNode)domain.getNodeByName(inst1.getName()+"."+ "initial_confidence");
DiscreteChanceNode hit1 = (DiscreteChanceNode)domain.getNodeByName(inst1.getName()+"."+ "hit");
DiscreteChanceNode conf1 = (DiscreteChanceNode)domain.getNodeByName(inst1.getName()+"."+ "confidence");
DiscreteChanceNode hit2 = (DiscreteChanceNode)domain.getNodeByName(inst2.getName()+"."+ "hit");
DiscreteChanceNode conf2 = (DiscreteChanceNode)domain.getNodeByName(inst2.getName()+"."+ "confidence");
DiscreteChanceNode hit3 = (DiscreteChanceNode)domain.getNodeByName(inst3.getName()+"."+ "hit");
DiscreteChanceNode conf3 = (DiscreteChanceNode)domain.getNodeByName(inst3.getName()+"."+ "confidence");
domain.setNumberOfCases(2);
initConf1.setCaseState(0, 0);
hit1.setCaseState(0, 0);
conf1.setCaseState(0, 2);
hit2.setCaseState(0, 1);
conf2.setCaseState(0, 1);
hit3.setCaseState(0, 1);
conf3.setCaseState(0, 0);
initConf1.setCaseState(1, 2);
hit1.setCaseState(1, 1);
conf1.setCaseState(1, 2);
hit2.setCaseState(1, 0);
conf2.setCaseState(1, 2);
hit3.setCaseState(1, 1);
conf3.setCaseState(1, 1);
domain.compile();
domain.propagate(Domain.H_EQUILIBRIUM_SUM, Domain.H_EVIDENCE_MODE_NORMAL);
domain.learnClassTables();
printBeliefs(domain);