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)