UserProperties bug

The engine.
Post Reply
apopescu
Posts: 8
Joined: Fri Feb 29, 2008 9:02 am

UserProperties bug

Post by apopescu »

Hi,

I have created a network with a single node in Genie and
set one user property to the node.
Smile API is returning an empty array for UserProperties of that node.
Have anyone faced this problem before?

Adrian
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: UserProperties bug

Post by shooltz[BayesFusion] »

I can't reproduce the problem. Make sure you're accessing the user properties of correct node. If problem persists, post the network and code here.
apopescu
Posts: 8
Joined: Fri Feb 29, 2008 9:02 am

Post by apopescu »

Here is the model I'm using.

The Smile code is listed below:
...
String id="TESTCHANCE";
UserProperty[] properties1 = network.getNodeUserProperties(id);
if (properties1 != null && properties1.length > 0) {
for (UserProperty property : properties1) {
System.out.println(id + "," + property.name + "," + property.value);
}
System.out.println("-------------------");
}
...
The property wasn't listed.
Attachments
Network2.xdsl
Genie model
(721 Bytes) Downloaded 474 times
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

The snippet outputs the following line after loading the model you've attached in the previous post:

TESTCHANCE,TEST,test
apopescu
Posts: 8
Joined: Fri Feb 29, 2008 9:02 am

Post by apopescu »

We are building the model manually by reading the nodes out of the XDSL file and using addArc and different setters from Network.
Maybe the way we are constructing the model has flaws.

Is there a way in Smile API to pass the xdsl file to a method or constructor and get a Network or DiagNetwork as a result?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

apopescu wrote:Is there a way in Smile API to pass the xdsl file to a method or constructor and get a Network or DiagNetwork as a result?
I believe you're using jSMILE - in this case, you should call Network.readFile and pass filename as the single argument in function call.
apopescu
Posts: 8
Joined: Fri Feb 29, 2008 9:02 am

Post by apopescu »

I've tried to use Network.readFile method and it worked fine.
The problem was in our code.
Thanks for your reply.
Post Reply