Open-Systems-Pharmacology / OSPSuite.Core

Core functionalities of the Open Systems Pharmacology Suite
Other
5 stars 8 forks source link

Fixes #2359 #2360

Closed msevestre closed 5 days ago

msevestre commented 1 week ago

Fixes #2359

Description

Implement In Children criteria

Type of change

Please mark relevant options with an x in the brackets.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

Screenshots (if appropriate):

Questions (if appropriate):

Yuri05 commented 6 days ago

After looking at the implementation, I'm not sure if it's correct or if I just misunderstand the requirement. @PavelBal Is this new "in children" container criteria meant as "in all DIRECT children of a container"?

So with your example from the issue: should it sum up only the volume of the organs (Bone|Volume+Brain|Volume+...) but not the volume of organ compartments (like Bone|Plasma|Volume etc.)?

Use case - a parameter Volume of the container Organism should sum up all Volume parameters of the childer of Organism. Right now, we require an additional tag assigned to all children containers of "Organism".

@Yuri05 The requirement says same as IN container but excluding the parent container. So it should be in ALL sub containers of the parent recursively no?

msevestre commented 6 days ago

well in fact good question @Yuri05 if the idea is to get only the DIRECT container, then this is wrong.

PavelBal commented 6 days ago

Hmm, I actually meant in ALL CHILDREN.

But I didn't think about

So with your example from the issue: should it sum up only the volume of the organs (Bone|Volume+Brain|Volume+...) but not the volume of organ compartments (like Bone|Plasma|Volume etc.)?

I guess we can keep it as "in all children".

Yuri05 commented 5 days ago

ok, I think the implementation is correct :) If there are no side effects with adding a new tag during the simulation creation - we can merge.

msevestre commented 5 days ago

If… lol

do you see any other way to exclude dynamically? All tests are passing. When we merge in PKSim, we should see

Yuri05 commented 5 days ago

do you see any other way to exclude dynamically?

not at the moment :)