Hi AN_IA,
quick side note: everyone here in the forum provides CADET support as volunteers. This is why we ask for precise descriptions and runnable minimal examples. It helps us to quickly assist CADET users while we juggle our own projects.
That said, I think what you are trying to achieve is definitely possible in CADET Process, and since CADET Match is not actively maintained anymore, we would recommend you implement your problem in Process. However, it might be necessary to have some processing steps in between.
From what I understood now, you have two separate tasks:
1) Combine three species into one total and compare to your experimental total
Setting use_total_concentration=True
lets the Comparator sum over your species as described in Combining Component Concentrations into a Single Total Concentration.
from CADETProcess.comparison import Comparator, ReferenceIO
refA = ReferenceIO("expA_total", tA, yA_total[:, None])
refB = ReferenceIO("expB_total", tB, yB_total[:, None])
cmp = Comparator()
cmp.add_reference(refA)
cmp.add_difference_metric("RMSE", refA, "column.outlet",
use_total_concentration=True, components=[3, 4, 5])
cmp.add_reference(refB)
cmp.add_difference_metric("RMSE", refB, "column.outlet",
use_total_concentration=True, components=[3, 4, 5])
2) Fit the same film diffusion across two processes, using the Comparator as the objective
Regarding combining several experimental results and references into one difference metric, the optimization and difference metric tools can be used independently of the Process object. You can put one or several experiments into the Comparator as metrics, or provide your own objective. The optimizer only sees what you hand over. For reference, this post discusses a similar setup:
and the documentation shows an example that sets up an optimization with multiple processes:
Fit Binding Model Parameters — CADET-Process 0.11.1 documentation.
There are other valid routes too. For example, keep two objectives and collapse them with a multi criteria decision function inside the optimizer, or use a small custom objective that returns a weighted sum of the two metrics.
Hope that already helps!
Don’t hesitate to ask further questions and also keep in mind our Office Hours.
All the best,
Hannah