From e0adbebb6c6fb94af6dfd6862a590e4b580a178d Mon Sep 17 00:00:00 2001 From: Pascal Date: Wed, 29 Jan 2020 01:19:11 -0600 Subject: [PATCH] [fix] fixed truth children not receiving parents result - they should not get preconfigured truths, only results of their parent --- src/main/scala/scim/components/Simulation.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/scim/components/Simulation.scala b/src/main/scala/scim/components/Simulation.scala index a216441..f9dab7b 100644 --- a/src/main/scala/scim/components/Simulation.scala +++ b/src/main/scala/scim/components/Simulation.scala @@ -63,8 +63,8 @@ class Simulation(config: Configuration) { val group = input._1 val truthGroup = group.getParentOrGroup // make sure the correct ground truth gets passed val groupList = input._2 - // overwrite truth with value from configuration if set for this time and group - val prevTruth = if(!configTruths.isEmpty && configTruths.get.contains(truthGroup)) configTruths.get(truthGroup) else PrevTruths(truthGroup) + // overwrite truth with value from configuration if set for a non child group at this time (children just get results of their parent) + val prevTruth = if(group.parent.isEmpty && !configTruths.isEmpty && configTruths.get.contains(group)) configTruths.get(group) else PrevTruths(truthGroup) groupList.foreach(element => { val subGroup = element._1 debugf(DebugType.DEBUG, "simGroups: Time: %s | Cell: %s | Group: %s | Groupelement: %s", time.toString, cell.toString, group.toString, element._1.name)