Print

Print


Hello everyone,

is there a way to evaluate an ADF-Tree? 

Background:
I have a main GPTree and an ADF0-Tree which is a function 
of GPTree declared at params-file. The Terminal-Nodes setting
up a specific String and all other Non-Terminal-Nodes taking 
the string of their childs and clip something. 

The Constraints are these:

### Main Tree 
pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
pop.subpop.0.species.ind.tree.0.tc = tc0

### ADF0 Subtree
pop.subpop.0.species.ind.tree.1 = ec.gp.GPTree
pop.subpop.0.species.ind.tree.1.tc = tc1

### Tree Constraints 

gp.tc.0 = ec.gp.GPTreeConstraints
gp.tc.0.name = tc0
gp.tc.0.fset = f0
gp.tc.0.returns = rule
gp.tc.0.init = ec.gp.koza.HalfBuilder
gp.tc.0.init.growp = 0.5
gp.tc.0.init.min = 2
gp.tc.0.init.max = 6

gp.tc.1 = ec.gp.GPTreeConstraints
gp.tc.1.name = tc1
gp.tc.1.fset = f1
gp.tc.1.returns = when
gp.tc.1.init = ec.gp.koza.HalfBuilder
gp.tc.1.init.growp = 0.5
gp.tc.1.init.min = 2
gp.tc.1.init.max = 6

### Function set for a rule exclusive then
gp.fs.0 = ec.gp.GPFunctionSet
gp.fs.0.name = f0
gp.fs.0.size = 5
gp.fs.0.func.0 = rulevolution.nodes.When
gp.fs.0.func.0.nc = nc0
gp.fs.0.func.1 = rulevolution.nodes.Eval
gp.fs.0.func.1.nc = nc2
gp.fs.0.func.2 = rulevolution.nodes.Faktum
gp.fs.0.func.2.nc = nc6
gp.fs.0.func.3 = rulevolution.nodes.Contains
gp.fs.0.func.3.nc = nc4

# The ADF0 Tree (Alias Condition)
gp.fs.0.func.4 = ec.gp.ADF
gp.fs.0.func.4.nc = nc1
gp.fs.0.func.4.tree = 1
gp.fs.0.func.4.name = ADF0

### Function set for ADF0 (Alias Condition)
gp.fs.1 = ec.gp.GPFunctionSet
gp.fs.1.name = f1
gp.fs.1.size = 4
gp.fs.1.func.0 = rulevolution.nodes.Eval
gp.fs.1.func.0.nc = nc2
gp.fs.1.func.1 = rulevolution.nodes.Exists
gp.fs.1.func.1.nc = nc3
gp.fs.1.func.2 = rulevolution.nodes.Faktum
gp.fs.1.func.2.nc = nc6
gp.fs.1.func.3 = rulevolution.nodes.Contains
gp.fs.1.func.3.nc = nc4

### Node Constraints

gp.nc.0 = ec.gp.GPNodeConstraints
gp.nc.0.name = nc0
gp.nc.0.returns = rule
gp.nc.0.size = 1
gp.nc.0.child.0 = when

gp.nc.1 = ec.gp.GPNodeConstraints
gp.nc.1.name = nc1
gp.nc.1.returns = when
gp.nc.1.size = 2
gp.nc.1.child.0 = eval-or-nil
gp.nc.1.child.1 = eval-or-nil

gp.nc.2 = ec.gp.GPNodeConstraints
gp.nc.2.name = nc2
gp.nc.2.returns = eval
gp.nc.2.size = 1
gp.nc.2.child.0 = boolean

gp.nc.3 = ec.gp.GPNodeConstraints
gp.nc.3.name = nc3
gp.nc.3.returns = when
gp.nc.3.size = 1
gp.nc.3.child.0 = nil

gp.nc.4 = ec.gp.GPNodeConstraints
gp.nc.4.name = nc4
gp.nc.4.returns = nil
gp.nc.4.size = 0

gp.nc.6 = ec.gp.GPNodeConstraints
gp.nc.6.name = nc6
gp.nc.6.returns = boolean
gp.nc.6.size = 0

The printable version of the Tree looks then like this:

Tree 0:
 (when (ADF0 contains contains))

But my result is only:

when
$0: NormalizedNamedEntity(contains (de.cloud4health.odm.eprd.anatomy))
then 

"Note that the ADF0 is Exists this time, but Exists has another node 
constraint which only has one child."

So the problem is that ADF0 isn't really evaluating all it's children,
because it's the only "node" which has the nc1 constraint. How can I
evaluate both string that comes from the children of the ADF0 and not
only one?

Greetings from Germany

Bojan