Skip to content

Commit

Permalink
always ask for C1 in output
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Dec 8, 2023
1 parent 7aae173 commit 71673da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend-v2/src/features/simulation/Simulations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const getSimulateInput = (
for (const plot of simulation?.plots || []) {
for (const y_axis of plot.y_axes) {
const variable = variables?.find((v) => v.id === y_axis.variable);
if (variable && !outputs.includes(variable.name)) {
if (variable && !outputs.includes(variable.qname)) {
outputs.push(variable.qname);
}
}
Expand All @@ -85,6 +85,15 @@ const getSimulateInput = (
(v) => v.name === "time" || v.name === "t",
);
outputs.push(timeVariable?.qname || "time");

// for some reason we need to ask for concentration or myokit produces a kink in the output
const alwaysAsk = ["PKCompartment.C1"];
for (const v of alwaysAsk) {
const variable = variables?.find((vv) => vv.qname === v);
if (variable && !outputs.includes(variable.qname)) {
outputs.push(variable.qname);
}
}
return {
variables: simulateVariables,
outputs,
Expand Down

0 comments on commit 71673da

Please sign in to comment.