Skip to content

Commit 94c8c6d

Browse files
committed
make compatible with PeriodicDose, fix #8
1 parent b735cc8 commit 94c8c6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Pharmacolibrary/Sources/PeriodicDose_Enteral.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ parameter Modelica.Units.SI.Time Tlag(displayUnit = "min") = 600 "time delay bet
2020
Placement(transformation(origin = {-70, -5}, extent = {{-10, -10}, {10, 10}})));
2121
Modelica.Blocks.Nonlinear.FixedDelay delay(delayTime = Tlag) annotation(
2222
Placement(transformation(origin = {-34, -4}, extent = {{-10, -10}, {10, 10}})));
23-
VariableInfusion delayedAbsorption(F = F) annotation(
23+
VariableInfusion variableDose(F = F) annotation(
2424
Placement(transformation(origin = {0, -12}, extent = {{-14, -14}, {14, 14}})));
2525
protected
2626
public
2727
initial equation
2828
assert(firstAdminTime >= 0, "tStart must be greater or equal zero!", AssertionLevel.error);
2929
equation
30-
connect(delay.y, delayedAbsorption.massFlow) annotation(
30+
connect(delay.y, variableDose.massFlow) annotation(
3131
Line(points = {{-23, -4}, {-14.5, -4}, {-14.5, -5}, {-13, -5}}, color = {0, 0, 127}));
32-
connect(delayedAbsorption.cport, transferFirstOrderNonSym.cport_a) annotation(
32+
connect(variableDose.cport, transferFirstOrderNonSym.cport_a) annotation(
3333
Line(points = {{0, -26}, {0, -31}, {9, -31}, {9, -40}}, color = {114, 159, 207}));
3434
connect(transferFirstOrderNonSym.cport_b, cport) annotation(
3535
Line(points = {{9, -74}, {9, -100}, {0, -100}}, color = {114, 159, 207}));
3636
connect(pulse.y, delay.u) annotation(
3737
Line(points = {{-59, -5}, {-59, -4}, {-46, -4}}, color = {0, 0, 127}));
38-
connect(absorptionLumen.cport, delayedAbsorption.cport) annotation(
38+
connect(absorptionLumen.cport, variableDose.cport) annotation(
3939
Line(points = {{-46, -32}, {0, -32}, {0, -26}}, color = {114, 159, 207}));
4040
annotation(
4141
Icon(graphics = {Text(origin = {259, 88}, extent = {{-159, 14}, {159, -14}}, textString = "m=%adminMass", horizontalAlignment = TextAlignment.Left), Text(origin = {263, 9}, extent = {{-161, 13}, {161, -13}}, textString = "period=%adminPeriod", horizontalAlignment = TextAlignment.Left), Text(origin = {259, 46}, extent = {{-159, 14}, {159, -14}}, textString = "duration=%adminDuration", horizontalAlignment = TextAlignment.Left), Text(origin = {262, -32}, extent = {{-162, 14}, {162, -14}}, textString = "count=%doseCount", horizontalAlignment = TextAlignment.Left), Text(origin = {225, -71}, extent = {{-123, 15}, {123, -15}}, textString = "F=%F", horizontalAlignment = TextAlignment.Left), Text(origin = {225, -97}, extent = {{-123, 15}, {123, -15}}, textString = "ka=%ka", horizontalAlignment = TextAlignment.Left), Text(origin = {225, -131}, extent = {{-123, 15}, {123, -15}}, textString = "Tlag=%Tlag", horizontalAlignment = TextAlignment.Left), Line(origin = {-67, 13.7929}, points = {{-31, -13.7929}, {-17, -13.7929}, {-17, 14.2071}, {-11, 14.2071}, {-11, -13.7929}, {3, -13.7929}, {3, 14.2071}, {9, 14.2071}, {9, -13.7929}, {15, -13.7929}, {15, 14.2071}, {21, 14.2071}, {21, -13.7929}, {27, -13.7929}, {27, 14.2071}, {31, 14.2071}, {31, -11.7929}, {29, -13.7929}})}),

0 commit comments

Comments
 (0)