model RIBASIM import SI = Modelica.SIunits; // Boundary conditions Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow VARINF_1322; Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow VARINF_1361; Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow VARINF_1381; Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow VARINF_139; Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow VARINF_545; Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Terminal TERM_855; // Nodes Deltares.ChannelFlow.SimpleRouting.Nodes.Node ADVIR_575(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_126(n_QForcing=0, nin=2, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1323(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1362(n_QForcing=0, nin=2, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1363(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1382(n_QForcing=0, nin=2, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1383(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_1384(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_141(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_142(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_550(n_QForcing=0, nin=2, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_555(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_560(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_614(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_616(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node CONFL_617(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node DUMMY_850(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node DUMMY_871(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node DUMMY_878(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node FIXIRR_4(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node FIXIRR_5(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node LOWFL_1(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node PWS_1398(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node PWS_6(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Nodes.Node PWS_830(n_QForcing=0, nin=1, nout=1); Deltares.ChannelFlow.SimpleRouting.Storage.Storage RSV_3(V(min= 0, max=999999999999, nominal=555555555555)); Deltares.ChannelFlow.SimpleRouting.Storage.Storage RSV_47(V(min= 0, max=999999999999, nominal=555555555555)); Deltares.ChannelFlow.SimpleRouting.Storage.Storage RSV_565(V(min= 0, max=999999999999, nominal=555555555555)); // Branches Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_136(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1366(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1367(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1404(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1406(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1407(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1422(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1423(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1424(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1426(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1449(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_1451(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_152(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_153(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_154(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_3(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_4(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_5(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_52(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_520(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_525(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_530(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_535(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_540(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_555(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_6(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_647(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_648(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_649(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_875(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_932(n_QForcing=0, n_QLateral=0); Deltares.ChannelFlow.SimpleRouting.Branches.Steady QSW_933(n_QForcing=0, n_QLateral=0); // Input. These come either as time series (fixed = true) or from the optimizer (fixed = false), which is the default. input SI.VolumeFlowRate VARINF_1322_Q(fixed=true); input SI.VolumeFlowRate VARINF_1361_Q(fixed=true); input SI.VolumeFlowRate VARINF_1381_Q(fixed=true); input SI.VolumeFlowRate VARINF_139_Q(fixed=true); input SI.VolumeFlowRate VARINF_545_Q(fixed=true); // Output output SI.Volume RSV_3_V; output SI.Volume RSV_47_V; output SI.Volume RSV_565_V; output SI.VolumeFlowRate QSW_1366_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1366_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1367_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1367_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_136_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_136_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1404_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1404_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1406_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1406_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1407_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1407_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1422_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1422_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1423_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1423_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1424_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1424_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1426_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1426_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1449_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1449_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1451_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1451_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_152_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_152_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_153_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_153_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_154_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_154_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_1_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_3_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_3_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_4_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_4_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_520_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_520_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_525_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_525_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_52_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_52_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_530_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_530_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_535_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_535_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_540_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_540_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_555_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_555_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_5_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_5_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_647_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_647_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_648_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_648_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_649_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_649_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_6_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_6_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_875_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_875_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_932_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_932_QOut(min=-100000, max=100000); output SI.VolumeFlowRate QSW_933_QIn(min=-100000, max=100000); output SI.VolumeFlowRate QSW_933_QOut(min=-100000, max=100000); output SI.VolumeFlowRate TERM_855_Q; equation // Connectors connect(ADVIR_575.QOut[1], QSW_555.QIn) annotation(Line); connect(CONFL_126.QOut[1], QSW_136.QIn) annotation(Line); connect(CONFL_1323.QOut[1], QSW_1367.QIn) annotation(Line); connect(CONFL_1362.QOut[1], QSW_1404.QIn) annotation(Line); connect(CONFL_1363.QOut[1], QSW_1407.QIn) annotation(Line); connect(CONFL_1382.QOut[1], QSW_1422.QIn) annotation(Line); connect(CONFL_1383.QOut[1], QSW_1424.QIn) annotation(Line); connect(CONFL_1384.QOut[1], QSW_1426.QIn) annotation(Line); connect(CONFL_141.QOut[1], QSW_153.QIn) annotation(Line); connect(CONFL_142.QOut[1], QSW_154.QIn) annotation(Line); connect(CONFL_550.QOut[1], QSW_525.QIn) annotation(Line); connect(CONFL_555.QOut[1], QSW_530.QIn) annotation(Line); connect(CONFL_560.QOut[1], QSW_535.QIn) annotation(Line); connect(CONFL_614.QOut[1], QSW_647.QIn) annotation(Line); connect(CONFL_616.QOut[1], QSW_648.QIn) annotation(Line); connect(CONFL_617.QOut[1], QSW_649.QIn) annotation(Line); connect(DUMMY_850.QOut[1], QSW_875.QIn) annotation(Line); connect(DUMMY_871.QOut[1], QSW_932.QIn) annotation(Line); connect(DUMMY_878.QOut[1], QSW_933.QIn) annotation(Line); connect(FIXIRR_4.QOut[1], QSW_4.QIn) annotation(Line); connect(FIXIRR_5.QOut[1], QSW_5.QIn) annotation(Line); connect(LOWFL_1.QOut[1], QSW_1.QIn) annotation(Line); connect(PWS_1398.QOut[1], QSW_1451.QIn) annotation(Line); connect(PWS_6.QOut[1], QSW_6.QIn) annotation(Line); connect(PWS_830.QOut[1], QSW_1449.QIn) annotation(Line); connect(QSW_1.QOut, TERM_855.QIn) annotation(Line); connect(QSW_136.QOut, PWS_830.QIn[1]) annotation(Line); connect(QSW_1366.QOut, CONFL_1323.QIn[1]) annotation(Line); connect(QSW_1367.QOut, CONFL_550.QIn[2]) annotation(Line); connect(QSW_1404.QOut, PWS_6.QIn[1]) annotation(Line); connect(QSW_1406.QOut, CONFL_1363.QIn[1]) annotation(Line); connect(QSW_1407.QOut, CONFL_1362.QIn[2]) annotation(Line); connect(QSW_1422.QOut, RSV_47.QIn) annotation(Line); connect(QSW_1423.QOut, CONFL_1384.QIn[1]) annotation(Line); connect(QSW_1424.QOut, CONFL_1382.QIn[2]) annotation(Line); connect(QSW_1426.QOut, CONFL_1383.QIn[1]) annotation(Line); connect(QSW_1449.QOut, PWS_1398.QIn[1]) annotation(Line); connect(QSW_1451.QOut, CONFL_560.QIn[1]) annotation(Line); connect(QSW_152.QOut, CONFL_142.QIn[1]) annotation(Line); connect(QSW_153.QOut, RSV_3.QIn) annotation(Line); connect(QSW_154.QOut, CONFL_141.QIn[1]) annotation(Line); connect(QSW_3.QOut, FIXIRR_4.QIn[1]) annotation(Line); connect(QSW_4.QOut, CONFL_126.QIn[1]) annotation(Line); connect(QSW_5.QOut, CONFL_1362.QIn[1]) annotation(Line); connect(QSW_52.QOut, CONFL_550.QIn[1]) annotation(Line); connect(QSW_520.QOut, CONFL_614.QIn[1]) annotation(Line); connect(QSW_525.QOut, DUMMY_878.QIn[1]) annotation(Line); connect(QSW_530.QOut, CONFL_126.QIn[2]) annotation(Line); connect(QSW_535.QOut, RSV_565.QIn) annotation(Line); connect(QSW_540.QOut, ADVIR_575.QIn[1]) annotation(Line); connect(QSW_555.QOut, FIXIRR_5.QIn[1]) annotation(Line); connect(QSW_6.QOut, DUMMY_850.QIn[1]) annotation(Line); connect(QSW_647.QOut, CONFL_616.QIn[1]) annotation(Line); connect(QSW_648.QOut, CONFL_617.QIn[1]) annotation(Line); connect(QSW_649.QOut, DUMMY_871.QIn[1]) annotation(Line); connect(QSW_875.QOut, LOWFL_1.QIn[1]) annotation(Line); connect(QSW_932.QOut, CONFL_1382.QIn[1]) annotation(Line); connect(QSW_933.QOut, CONFL_555.QIn[1]) annotation(Line); connect(RSV_3.QOut, QSW_3.QIn) annotation(Line); connect(RSV_47.QOut, QSW_52.QIn) annotation(Line); connect(RSV_565.QOut, QSW_540.QIn) annotation(Line); connect(VARINF_1322.QOut, QSW_1366.QIn) annotation(Line); connect(VARINF_1361.QOut, QSW_1406.QIn) annotation(Line); connect(VARINF_1381.QOut, QSW_1423.QIn) annotation(Line); connect(VARINF_139.QOut, QSW_152.QIn) annotation(Line); connect(VARINF_545.QOut, QSW_520.QIn) annotation(Line); // Assign inputs TERM_855.Q = TERM_855_Q; VARINF_1322.Q = VARINF_1322_Q; VARINF_1361.Q = VARINF_1361_Q; VARINF_1381.Q = VARINF_1381_Q; VARINF_139.Q = VARINF_139_Q; VARINF_545.Q = VARINF_545_Q; // Alias outputs for volume RSV_3.V = RSV_3_V; RSV_47.V = RSV_47_V; RSV_565.V = RSV_565_V; // Alias outputs for discharge QSW_1.QIn.Q = QSW_1_QIn; QSW_1.QOut.Q = QSW_1_QOut; QSW_136.QIn.Q = QSW_136_QIn; QSW_136.QOut.Q = QSW_136_QOut; QSW_1366.QIn.Q = QSW_1366_QIn; QSW_1366.QOut.Q = QSW_1366_QOut; QSW_1367.QIn.Q = QSW_1367_QIn; QSW_1367.QOut.Q = QSW_1367_QOut; QSW_1404.QIn.Q = QSW_1404_QIn; QSW_1404.QOut.Q = QSW_1404_QOut; QSW_1406.QIn.Q = QSW_1406_QIn; QSW_1406.QOut.Q = QSW_1406_QOut; QSW_1407.QIn.Q = QSW_1407_QIn; QSW_1407.QOut.Q = QSW_1407_QOut; QSW_1422.QIn.Q = QSW_1422_QIn; QSW_1422.QOut.Q = QSW_1422_QOut; QSW_1423.QIn.Q = QSW_1423_QIn; QSW_1423.QOut.Q = QSW_1423_QOut; QSW_1424.QIn.Q = QSW_1424_QIn; QSW_1424.QOut.Q = QSW_1424_QOut; QSW_1426.QIn.Q = QSW_1426_QIn; QSW_1426.QOut.Q = QSW_1426_QOut; QSW_1449.QIn.Q = QSW_1449_QIn; QSW_1449.QOut.Q = QSW_1449_QOut; QSW_1451.QIn.Q = QSW_1451_QIn; QSW_1451.QOut.Q = QSW_1451_QOut; QSW_152.QIn.Q = QSW_152_QIn; QSW_152.QOut.Q = QSW_152_QOut; QSW_153.QIn.Q = QSW_153_QIn; QSW_153.QOut.Q = QSW_153_QOut; QSW_154.QIn.Q = QSW_154_QIn; QSW_154.QOut.Q = QSW_154_QOut; QSW_3.QIn.Q = QSW_3_QIn; QSW_3.QOut.Q = QSW_3_QOut; QSW_4.QIn.Q = QSW_4_QIn; QSW_4.QOut.Q = QSW_4_QOut; QSW_5.QIn.Q = QSW_5_QIn; QSW_5.QOut.Q = QSW_5_QOut; QSW_52.QIn.Q = QSW_52_QIn; QSW_52.QOut.Q = QSW_52_QOut; QSW_520.QIn.Q = QSW_520_QIn; QSW_520.QOut.Q = QSW_520_QOut; QSW_525.QIn.Q = QSW_525_QIn; QSW_525.QOut.Q = QSW_525_QOut; QSW_530.QIn.Q = QSW_530_QIn; QSW_530.QOut.Q = QSW_530_QOut; QSW_535.QIn.Q = QSW_535_QIn; QSW_535.QOut.Q = QSW_535_QOut; QSW_540.QIn.Q = QSW_540_QIn; QSW_540.QOut.Q = QSW_540_QOut; QSW_555.QIn.Q = QSW_555_QIn; QSW_555.QOut.Q = QSW_555_QOut; QSW_6.QIn.Q = QSW_6_QIn; QSW_6.QOut.Q = QSW_6_QOut; QSW_647.QIn.Q = QSW_647_QIn; QSW_647.QOut.Q = QSW_647_QOut; QSW_648.QIn.Q = QSW_648_QIn; QSW_648.QOut.Q = QSW_648_QOut; QSW_649.QIn.Q = QSW_649_QIn; QSW_649.QOut.Q = QSW_649_QOut; QSW_875.QIn.Q = QSW_875_QIn; QSW_875.QOut.Q = QSW_875_QOut; QSW_932.QIn.Q = QSW_932_QIn; QSW_932.QOut.Q = QSW_932_QOut; QSW_933.QIn.Q = QSW_933_QIn; QSW_933.QOut.Q = QSW_933_QOut; end RIBASIM;