Open-Systems-Pharmacology / MoBi

MoBi® is a software tool for multiscale physiological modeling and simulation
Other
31 stars 10 forks source link

Cannot create a simulation from BBs after opening a V11 project #1354

Open PavelBal opened 5 months ago

PavelBal commented 5 months ago

Trying to re-configure a simulation or create a new from existing modules, I get the error:

image

Yuri05 commented 5 months ago

It seems that formulasAreTheSameForParameter() called here (s. the screenshot) does not work correctly

Calling formulasAreTheSameForParameter() ![grafik](https://github.com/Open-Systems-Pharmacology/MoBi/assets/25061876/bbaa759f-99ba-4233-b054-5a121f21a533)

The neighborhood keywords are not replaced here:

grafik

Those specific keywords are expanded not in KeywordReplacer but in the FormulaTask.

I tried to fix it by calling the proper method from the FormulaTask:

grafik

But this failed: grafik

Not sure how to proceed. Maybe @msevestre can comment on this?

msevestre commented 4 months ago

I am getting this error now:

@PavelBal Does this makes sense to you image

msevestre commented 4 months ago

indeed Albumin is not in the neighbhorhoods image

msevestre commented 4 months ago

indeed Albumin is not in the neighbhorhoods image

PavelBal commented 4 months ago

Albumin is not present in the Intracellular compartments:

image

So it should not be present in this neighborhood. The weird thing is that Organism|xxx|Interstitial|Albumin|Partition coefficient (water/container) for albumin is calculated by the formula, though it is defined in the PV BB

image

So the PV BB is not properly applied.

PavelBal commented 4 months ago

Okay, this is happening because every BB has been put into a separate module. So when creating a simulation, the parameter is first calculated by the equation and only later is overwritten by the fixed value stored in the PV.

I have updated the MoBi project in the repo and put all the required BBs (except for the Reactions because of https://github.com/Open-Systems-Pharmacology/MoBi/issues/1376) in the "Spatial Stucture" module. Trying to create a simulation from the modules "Spatial Structure" and "Reaction" will give the initial error about "another formula for parameter"

image

msevestre commented 4 months ago

Okay, this is happening because every BB has been put into a separate module. So when creating a simulation, the parameter is first calculated by the equation and only later is overwritten by the fixed value stored in the PV.

I don't understand this. BB in one module works but BB in different module does not?

msevestre commented 4 months ago

I am getting another error image

I think I have fixed the issue but this simplify project just does not work at all

PavelBal commented 4 months ago

Yes this is something else. I simplified the project too much.. I think your fix will work, once it is merged I will try it with this project and update it accordingly.