Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Bodylight_Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo): time 0.001819/0.001819, allocations: 77.22 kB / 20.67 MB, free: 3.832 MB / 18.57 MB " [Timeout remaining time 180] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo): time 0.002025/0.002025, allocations: 169 kB / 24.07 MB, free: 444 kB / 18.57 MB " [Timeout remaining time 180] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo): time 1.786/1.786, allocations: 177.1 MB / 204.5 MB, free: 5.477 MB / 186.7 MB " [Timeout remaining time 178] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/package.mo): time 0.09106/0.09106, allocations: 12.77 MB / 273.8 MB, free: 96 kB / 250.7 MB " [Timeout remaining time 180] Using package Bodylight with version 1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/package.mo) Using package Modelica with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo) Using package Complex with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo) Using package ModelicaServices with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo) Running command: translateModel(Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC,tolerance=1e-14,outputFormat="empty",numberOfIntervals=2500,variableFilter="",fileNamePrefix="Bodylight_Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC") translateModel(Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC,tolerance=1e-14,outputFormat="empty",numberOfIntervals=2500,variableFilter="",fileNamePrefix="Bodylight_Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC") [Timeout 660] "Notification: Performance of FrontEnd - Absyn->SCode: time 1.804e-05/1.804e-05, allocations: 5.125 kB / 347.9 MB, free: 0.9375 MB / 266.7 MB Notification: Performance of NFInst.instantiate(Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC): time 0.00752/0.007538, allocations: 5.758 MB / 353.7 MB, free: 11.16 MB / 282.7 MB Notification: Performance of NFInst.instExpressions: time 0.01006/0.0176, allocations: 5.667 MB / 359.4 MB, free: 5.465 MB / 282.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0004807/0.01808, allocations: 43.56 kB / 359.4 MB, free: 5.422 MB / 282.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0004481/0.01853, allocations: 186.2 kB / 359.6 MB, free: 5.238 MB / 282.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:6207:6-6223:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyRHm.Utilities.UnitConversions.findUnit' contains a call to impure function 'Modelica.Utilities.Streams.print'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5637:15-5729:17:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyRHm.Utilities.readReal' contains a call to impure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyRHm.Utilities.UnitConversions.findUnit'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:6207:6-6223:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyRHm.Utilities.UnitConversions.findUnit' contains a call to impure function 'Modelica.Utilities.Streams.print'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5637:15-5729:17:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyRHm.Utilities.readReal' contains a call to impure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyRHm.Utilities.UnitConversions.findUnit'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:6207:6-6223:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyTHm.Utilities.UnitConversions.findUnit' contains a call to impure function 'Modelica.Utilities.Streams.print'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5637:15-5729:17:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyTHm.Utilities.readReal' contains a call to impure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyTHm.Utilities.UnitConversions.findUnit'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:6207:6-6223:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyTHm.Utilities.UnitConversions.findUnit' contains a call to impure function 'Modelica.Utilities.Streams.print'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5637:15-5729:17:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyTHm.Utilities.readReal' contains a call to impure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyTHm.Utilities.UnitConversions.findUnit'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:6207:6-6223:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.oxygen_unbound.Utilities.UnitConversions.findUnit' contains a call to impure function 'Modelica.Utilities.Streams.print'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5637:15-5729:17:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.oxygen_unbound.Utilities.readReal' contains a call to impure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.oxygen_unbound.Utilities.UnitConversions.findUnit'. Notification: Performance of NFTyping.typeBindings: time 0.002609/0.02114, allocations: 1.029 MB / 360.6 MB, free: 4.203 MB / 282.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5783:15-5804:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyRHm.Utilities.writeReal' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5845:15-5881:24:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyRHm.Utilities.writeComparison' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5783:15-5804:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyRHm.Utilities.writeReal' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5845:15-5881:24:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyRHm.Utilities.writeComparison' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5783:15-5804:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyTHm.Utilities.writeReal' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5845:15-5881:24:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.OxyTHm.Utilities.writeComparison' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5783:15-5804:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyTHm.Utilities.writeReal' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5845:15-5881:24:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.DeoxyTHm.Utilities.writeComparison' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5783:15-5804:18:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.oxygen_unbound.Utilities.writeReal' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Bodylight 1.1.0/Types.mo:5845:15-5881:24:writable] Warning: Pure function 'Bodylight.Chemical.Examples.Hemoglobin.Allosteric_Hemoglobin2_MWC.oxygen_unbound.Utilities.writeComparison' contains a call to impure function 'Modelica.Utilities.Files.createDirectory'. Notification: Performance of NFTyping.typeClassSections: time 0.002493/0.02363, allocations: 1.005 MB / 361.6 MB, free: 3.195 MB / 282.7 MB Notification: Performance of NFFlatten.flatten: time 0.003519/0.02715, allocations: 2.879 MB / 364.5 MB, free: 316 kB / 282.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006184/0.02776, allocations: 329.3 kB / 364.8 MB, free: 15.96 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.007514/0.03528, allocations: 5.035 MB / 369.9 MB, free: 10.92 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001768/0.03705, allocations: 0.9474 MB / 370.8 MB, free: 9.973 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001948/0.03724, allocations: 84 kB / 370.9 MB, free: 9.891 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002914/0.03753, allocations: 99.92 kB / 371 MB, free: 9.793 MB / 298.7 MB Notification: Performance of combineBinaries: time 0.002572/0.04011, allocations: 2.212 MB / 373.2 MB, free: 7.57 MB / 298.7 MB Notification: Performance of replaceArrayConstructors: time 0.001459/0.04156, allocations: 1.375 MB / 374.6 MB, free: 6.188 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001949/0.04176, allocations: 92 kB / 374.7 MB, free: 6.098 MB / 298.7 MB Notification: Performance of FrontEnd: time 0.0003003/0.04206, allocations: 151.4 kB / 374.8 MB, free: 5.949 MB / 298.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 390 (175) * Number of variables: 387 (132) Notification: Performance of [SIM] Bindings: time 0.008507/0.05057, allocations: 6.715 MB / 381.5 MB, free: 15.01 MB / 314.7 MB Notification: Performance of [SIM] FunctionAlias: time 0.001637/0.0522, allocations: 1.127 MB / 382.7 MB, free: 13.86 MB / 314.7 MB Notification: Performance of [SIM] Early Inline: time 0.005162/0.05737, allocations: 4.159 MB / 386.8 MB, free: 9.656 MB / 314.7 MB Notification: Performance of [SIM] Simplify 1: time 0.000695/0.05806, allocations: 443.8 kB / 387.3 MB, free: 9.184 MB / 314.7 MB Notification: Performance of [SIM] Alias: time 0.005603/0.06366, allocations: 3.58 MB / 390.8 MB, free: 5.23 MB / 314.7 MB Notification: Performance of [SIM] Simplify 2: time 0.0005818/0.06425, allocations: 379.9 kB / 391.2 MB, free: 4.82 MB / 314.7 MB Notification: Performance of [SIM] Remove Stream: time 0.0003891/0.06464, allocations: 284 kB / 391.5 MB, free: 4.504 MB / 314.7 MB Notification: Performance of [SIM] Detect States: time 0.00121/0.06585, allocations: 0.9246 MB / 392.4 MB, free: 3.512 MB / 314.7 MB Notification: Performance of [SIM] Events: time 0.0004212/0.06627, allocations: 319.8 kB / 392.7 MB, free: 3.199 MB / 314.7 MB Notification: Performance of [SIM] Partitioning: time 0.001796/0.06806, allocations: 1.224 MB / 393.9 MB, free: 1.895 MB / 314.7 MB Error: Internal error NBResolveSingularities.indexReduction failed because there was not enough state candidates to balance out the constraint equations. Constraint Equations (110/232) ******************************** (1) [SCAL] (1) OxyTHm[3].state = add1[3].u2; ($RES_SIM_224) (2) [FOR-] (3) ($RES_SIM_140) (2) [----] for $i1 in 2:4 loop (2) [----] [SCAL] (1) T0_in_T.normalizedState[(-1) + $i1] * T0_in_T.amount = add1[$i1].y; ($RES_SIM_141) (2) [----] end for; (3) [SCAL] (1) OxyTHm[2].state = add1[2].u2; ($RES_SIM_226) (4) [SCAL] (1) T0_in_T.specificForm.conc = (1000.0 * T0_in_T.amount) * $FUN_6; ($RES_SIM_142) (5) [SCAL] (1) OxyTHm[1].state = add1[1].u2; ($RES_SIM_228) (6) [ARRY] (4) T0_in_T.fractions = if $SEV_1 then fill(0.0, 4) else T0_in_T.specificSubunitForm.conc / (1000.0 .* add1.y); ($RES_SIM_143) (7) [SCAL] (1) T0_in_T.amount = add1[1].y; ($RES_SIM_144) (8) [ARRY] (4) R0_in_R.specificSubunitForm.q = -R0_in_R.specificForm.q * fill(1.0, 4); ($RES_SIM_149) (9) [SCAL] (1) oxygen_unbound.q_out.conc = 1000.0 * oxygen_unbound.state; ($RES_SIM_51) (10) [FOR-] (4) ($RES_SIM_52) (10) [----] for $i1 in 1:4 loop (10) [----] [SCAL] (1) DeoxyTHm[$i1].volume = 0.001; ($RES_SIM_53) (10) [----] end for; (11) [FOR-] (4) ($RES_SIM_54) (11) [----] for $i1 in 1:4 loop (11) [----] [SCAL] (1) DeoxyTHm[$i1].change = 0.0; ($RES_SIM_55) (11) [----] end for; (12) [SCAL] (1) T0_in_T.specificSubunitForm[4].conc = oxygenation_T[4].products[1].conc; ($RES_SIM_230) (13) [SCAL] (1) T0_in_T.specificSubunitForm[4].conc = DeoxyTHm[4].q_out.conc; ($RES_SIM_231) (14) [SCAL] (1) T0_in_T.specificSubunitForm[3].conc = oxygenation_T[3].products[1].conc; ($RES_SIM_232) (15) [SCAL] (1) T0_in_T.specificSubunitForm[3].conc = DeoxyTHm[3].q_out.conc; ($RES_SIM_233) (16) [SCAL] (1) T0_in_T.specificSubunitForm[2].conc = oxygenation_T[2].products[1].conc; ($RES_SIM_234) (17) [FOR-] (3) ($RES_SIM_150) (17) [----] for $i1 in 2:4 loop (17) [----] [SCAL] (1) R0_in_R.normalizedState[(-1) + $i1] * R0_in_R.amount = add[$i1].y; ($RES_SIM_151) (17) [----] end for; (18) [SCAL] (1) T0_in_T.specificSubunitForm[2].conc = DeoxyTHm[2].q_out.conc; ($RES_SIM_235) (19) [SCAL] (1) T0_in_T.specificSubunitForm[1].conc = oxygenation_T[1].products[1].conc; ($RES_SIM_236) (20) [SCAL] (1) T0_in_T.specificSubunitForm[1].conc = DeoxyTHm[1].q_out.conc; ($RES_SIM_237) (21) [SCAL] (1) R0_in_R.specificForm.conc = (1000.0 * R0_in_R.amount) * $FUN_4; ($RES_SIM_152) (22) [FOR-] (4) ($RES_SIM_238) (22) [----] for $i1 in 1:4 loop (22) [----] [SCAL] (1) oxygenation_T[$i1].substrates[1].q + OxyTHm[$i1].change = 0.0; ($RES_SIM_239) (22) [----] end for; (23) [ARRY] (4) R0_in_R.fractions = if $SEV_0 then fill(0.0, 4) else R0_in_R.specificSubunitForm.conc / (1000.0 .* add.y); ($RES_SIM_153) (24) [SCAL] (1) R0_in_R.amount = add[1].y; ($RES_SIM_154) (25) [ARRY] (1) quaternaryForm.rr * quaternaryForm.p = -quaternaryForm.products.q; ($RES_SIM_157) (26) [ARRY] (1) quaternaryForm.rr * quaternaryForm.s = quaternaryForm.substrates.q; ($RES_SIM_158) (27) [SCAL] (1) $FUN_16 = sum($FUN_15[$i0] for $i0 in 1:2); ($RES_AUX_251) (28) [FOR-] (2) ($RES_AUX_252) (28) [----] for $i0 in 1:2 loop (28) [----] [SCAL] (1) $FUN_15[$i0] = abs(totalHb.fragment[$i0]); ($RES_AUX_253) (28) [----] end for; (29) [SCAL] (1) $FUN_14 = exp((1/partialPressure1.T - 1/partialPressure1.T0) * partialPressure1.C); ($RES_AUX_254) (30) [FOR-] (4) ($RES_AUX_255) (30) [----] for $i1 in 1:4 loop (30) [----] [SCAL] (1) $FUN_13[$i1] = product((oxygenation_T[$i1].ap .* oxygenation_T[$i1].products.conc) ^ oxygenation_T[$i1].p); ($RES_AUX_256) (30) [----] end for; (31) [FOR-] (4) ($RES_SIM_62) (31) [----] for $i1 in 1:4 loop (31) [----] [SCAL] (1) DeoxyTHm[$i1].q_out.conc = DeoxyTHm[$i1].state / DeoxyTHm[$i1].volume; ($RES_SIM_63) (31) [----] end for; (32) [FOR-] (4) ($RES_AUX_257) (32) [----] for $i1 in 1:4 loop (32) [----] [SCAL] (1) $FUN_12[$i1] = product((oxygenation_T[$i1].as .* oxygenation_T[$i1].substrates.conc) ^ oxygenation_T[$i1].s); ($RES_AUX_258) (32) [----] end for; (33) [FOR-] (4) ($RES_SIM_64) (33) [----] for $i1 in 1:4 loop (33) [----] [SCAL] (1) oxygenation_T[$i1].volume = 0.001; ($RES_SIM_65) (33) [----] end for; (34) [FOR-] (4) ($RES_AUX_259) (34) [----] for $i1 in 1:4 loop (34) [----] [SCAL] (1) $FUN_11[$i1] = exp(-0.12027235504272604 * (1/oxygenation_T[$i1].T - 1/oxygenation_T[$i1].TK) * oxygenation_T[$i1].dH); ($RES_AUX_260) (34) [----] end for; (35) [FOR-] (8) ($RES_SIM_68) (35) [----] for $i1 in 1:4 loop (35) [----] [ARRY] (2) oxygenation_T[$i1].rr * oxygenation_T[$i1].p = -oxygenation_T[$i1].products.q; ($RES_SIM_69) (35) [----] end for; (36) [ARRY] (4) OxyTHm.q_out.conc = oxygenation_T.substrates[1].conc; ($RES_SIM_240) (37) [SCAL] (1) quaternaryForm.products[1].conc = T0_in_T.specificForm.conc; ($RES_SIM_241) (38) [SCAL] (1) R0_in_R.specificForm.conc = quaternaryForm.substrates[1].conc; ($RES_SIM_242) (39) [SCAL] (1) quaternaryForm.rr * quaternaryForm.fsp = 0.001 * quaternaryForm.kf * ($FUN_2 * quaternaryForm.fp - $FUN_3 * (1/quaternaryForm.KaT) * quaternaryForm.fs); ($RES_SIM_160) (40) [FOR-] (3) ($RES_SIM_246) (40) [----] for $f1 in 1:3 loop (40) [----] [SCAL] (1) R0_in_R.normalizedState[$f1] = 1.0; ($RES_SIM_247) (40) [----] end for; (41) [SCAL] (1) quaternaryForm.KaT = quaternaryForm.K * $FUN_1; ($RES_SIM_161) (42) [FOR-] (3) ($RES_SIM_248) (42) [----] for $f3 in 1:3 loop (42) [----] [SCAL] (1) T0_in_T.normalizedState[$f3] = 1.0; ($RES_SIM_249) (42) [----] end for; (43) [SCAL] (1) oxygenation_R[1].products[2].q + oxygenation_R[2].products[2].q + oxygenation_R[3].products[2].q + oxygenation_R[4].products[2].q + oxygenation_T[1].products[2].q + oxygenation_T[2].products[2].q + oxygenation_T[3].products[2].q + oxygenation_T[4].products[2].q + partialPressure1.q_in.q = 0.0; ($RES_SIM_164) (44) [SCAL] (1) T0_in_T.specificSubunitForm[4].q + oxygenation_T[4].products[1].q + DeoxyTHm[4].change = 0.0; ($RES_SIM_166) (45) [SCAL] (1) T0_in_T.specificSubunitForm[3].q + oxygenation_T[3].products[1].q + DeoxyTHm[3].change = 0.0; ($RES_SIM_167) (46) [SCAL] (1) T0_in_T.specificSubunitForm[2].q + oxygenation_T[2].products[1].q + DeoxyTHm[2].change = 0.0; ($RES_SIM_168) (47) [SCAL] (1) T0_in_T.specificSubunitForm[1].q + oxygenation_T[1].products[1].q + DeoxyTHm[1].change = 0.0; ($RES_SIM_169) (48) [FOR-] (4) ($RES_AUX_261) (48) [----] for $i1 in 1:4 loop (48) [----] [SCAL] (1) $FUN_10[$i1] = product((oxygenation_R[$i1].ap .* oxygenation_R[$i1].products.conc) ^ oxygenation_R[$i1].p); ($RES_AUX_262) (48) [----] end for; (49) [FOR-] (4) ($RES_AUX_263) (49) [----] for $i1 in 1:4 loop (49) [----] [SCAL] (1) $FUN_9[$i1] = product((oxygenation_R[$i1].as .* oxygenation_R[$i1].substrates.conc) ^ oxygenation_R[$i1].s); ($RES_AUX_264) (49) [----] end for; (50) [FOR-] (4) ($RES_SIM_70) (50) [----] for $i1 in 1:4 loop (50) [----] [ARRY] (1) oxygenation_T[$i1].rr * oxygenation_T[$i1].s = oxygenation_T[$i1].substrates.q; ($RES_SIM_71) (50) [----] end for; (51) [FOR-] (4) ($RES_AUX_265) (51) [----] for $i1 in 1:4 loop (51) [----] [SCAL] (1) $FUN_8[$i1] = exp(-0.12027235504272604 * (1/oxygenation_R[$i1].T - 1/oxygenation_R[$i1].TK) * oxygenation_R[$i1].dH); ($RES_AUX_266) (51) [----] end for; (52) [SCAL] (1) $FUN_6 = product(T0_in_T.fractions); ($RES_AUX_268) (53) [FOR-] (4) ($RES_SIM_74) (53) [----] for $i1 in 1:4 loop (53) [----] [SCAL] (1) oxygenation_T[$i1].rr * oxygenation_T[$i1].fsp = oxygenation_T[$i1].volume * oxygenation_T[$i1].kf * ($FUN_12[$i1] * oxygenation_T[$i1].fp - $FUN_13[$i1] * (1/oxygenation_T[$i1].KaT) * oxygenation_T[$i1].fs); ($RES_SIM_75) (53) [----] end for; (54) [FOR-] (4) ($RES_SIM_76) (54) [----] for $i1 in 1:4 loop (54) [----] [SCAL] (1) oxygenation_T[$i1].KaT = oxygenation_T[$i1].K * $FUN_11[$i1]; ($RES_SIM_77) (54) [----] end for; (55) [SCAL] (1) totalHb.normalizedState[1] = 1.0; ($RES_SIM_250) (56) [SCAL] (1) quaternaryForm.substrates[1].q + R0_in_R.specificForm.q = 0.0; ($RES_SIM_170) (57) [SCAL] (1) quaternaryForm.products[1].q + T0_in_T.specificForm.q = 0.0; ($RES_SIM_171) (58) [SCAL] (1) $FUN_4 = product(R0_in_R.fractions); ($RES_AUX_270) (59) [SCAL] (1) $FUN_3 = product((quaternaryForm.ap .* quaternaryForm.products.conc) ^ quaternaryForm.p); ($RES_AUX_271) (60) [SCAL] (1) $FUN_2 = product((quaternaryForm.as .* quaternaryForm.substrates.conc) ^ quaternaryForm.s); ($RES_AUX_272) (61) [SCAL] (1) $FUN_1 = exp(-0.12027235504272604 * (1/quaternaryForm.T - 1/quaternaryForm.TK) * quaternaryForm.dH); ($RES_AUX_273) (62) [FOR-] (4) ($RES_SIM_82) (62) [----] for $i1 in 1:4 loop (62) [----] [SCAL] (1) OxyTHm[$i1].volume = 0.001; ($RES_SIM_83) (62) [----] end for; (63) [FOR-] (4) ($RES_SIM_84) (63) [----] for $i1 in 1:4 loop (63) [----] [-IF-] (1) ($RES_SIM_85) (63) [----] [----] if not ({false, true, true, true})[$i1] then (63) [----] [----] [SCAL] (1) OxyTHm[$i1].change = 0.0; ($RES_SIM_86) (63) [----] [----] end if; (63) [----] end for; (64) [FOR-] (4) ($RES_SIM_105) (64) [----] for $i1 in 1:4 loop (64) [----] [SCAL] (1) DeoxyRHm[$i1].q_out.conc = DeoxyRHm[$i1].state / DeoxyRHm[$i1].volume; ($RES_SIM_106) (64) [----] end for; (65) [FOR-] (4) ($RES_SIM_107) (65) [----] for $i1 in 1:4 loop (65) [----] [SCAL] (1) oxygenation_R[$i1].volume = 0.001; ($RES_SIM_108) (65) [----] end for; (66) [SCAL] (1) T0_in_T.amount = totalHb.fragment[2]; ($RES_SIM_182) (67) [SCAL] (1) R0_in_R.amount = totalHb.fragment[1]; ($RES_SIM_183) (68) [SCAL] (1) R0_in_R.specificSubunitForm[4].q + oxygenation_R[4].products[1].q + DeoxyRHm[4].change = 0.0; ($RES_SIM_185) (69) [SCAL] (1) R0_in_R.specificSubunitForm[3].q + oxygenation_R[3].products[1].q + DeoxyRHm[3].change = 0.0; ($RES_SIM_186) (70) [SCAL] (1) R0_in_R.specificSubunitForm[2].q + oxygenation_R[2].products[1].q + DeoxyRHm[2].change = 0.0; ($RES_SIM_187) (71) [SCAL] (1) R0_in_R.specificSubunitForm[1].q + oxygenation_R[1].products[1].q + DeoxyRHm[1].change = 0.0; ($RES_SIM_188) (72) [SCAL] (1) oxygenation_R[4].products[1].conc = R0_in_R.specificSubunitForm[4].conc; ($RES_SIM_189) (73) [FOR-] (4) ($RES_SIM_93) (73) [----] for $i1 in 1:4 loop (73) [----] [SCAL] (1) OxyTHm[$i1].q_out.conc = OxyTHm[$i1].state / OxyTHm[$i1].volume; ($RES_SIM_94) (73) [----] end for; (74) [FOR-] (4) ($RES_SIM_95) (74) [----] for $i1 in 1:4 loop (74) [----] [SCAL] (1) DeoxyRHm[$i1].volume = 0.001; ($RES_SIM_96) (74) [----] end for; (75) [FOR-] (4) ($RES_SIM_97) (75) [----] for $i1 in 1:4 loop (75) [----] [SCAL] (1) DeoxyRHm[$i1].change = 0.0; ($RES_SIM_98) (75) [----] end for; (76) [FOR-] (8) ($RES_SIM_111) (76) [----] for $i1 in 1:4 loop (76) [----] [ARRY] (2) oxygenation_R[$i1].rr * oxygenation_R[$i1].p = -oxygenation_R[$i1].products.q; ($RES_SIM_112) (76) [----] end for; (77) [SCAL] (1) oxygenation_R[4].products[1].conc = DeoxyRHm[4].q_out.conc; ($RES_SIM_190) (78) [FOR-] (4) ($RES_SIM_117) (78) [----] for $i1 in 1:4 loop (78) [----] [SCAL] (1) oxygenation_R[$i1].rr * oxygenation_R[$i1].fsp = oxygenation_R[$i1].volume * oxygenation_R[$i1].kf * ($FUN_9[$i1] * oxygenation_R[$i1].fp - $FUN_10[$i1] * (1/oxygenation_R[$i1].KaT) * oxygenation_R[$i1].fs); ($RES_SIM_118) (78) [----] end for; (79) [SCAL] (1) oxygenation_R[3].products[1].conc = R0_in_R.specificSubunitForm[3].conc; ($RES_SIM_191) (80) [SCAL] (1) oxygenation_R[3].products[1].conc = DeoxyRHm[3].q_out.conc; ($RES_SIM_192) (81) [FOR-] (4) ($RES_SIM_119) (81) [----] for $i1 in 1:4 loop (81) [----] [SCAL] (1) oxygenation_R[$i1].KaT = oxygenation_R[$i1].K * $FUN_8[$i1]; ($RES_SIM_120) (81) [----] end for; (82) [SCAL] (1) oxygenation_R[2].products[1].conc = R0_in_R.specificSubunitForm[2].conc; ($RES_SIM_193) (83) [SCAL] (1) oxygenation_R[2].products[1].conc = DeoxyRHm[2].q_out.conc; ($RES_SIM_194) (84) [SCAL] (1) oxygenation_R[1].products[1].conc = R0_in_R.specificSubunitForm[1].conc; ($RES_SIM_195) (85) [SCAL] (1) oxygenation_R[1].products[1].conc = DeoxyRHm[1].q_out.conc; ($RES_SIM_196) (86) [ARRY] (4) OxyRHm.q_out.conc = oxygenation_R.substrates[1].conc; ($RES_SIM_199) (87) [SCAL] (1) OxyRHm[4].state = add[4].u2; ($RES_SIM_201) (88) [SCAL] (1) OxyRHm[3].state = add[3].u2; ($RES_SIM_203) (89) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_R[3].products[2].conc; ($RES_SIM_214) (90) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_R[4].products[2].conc; ($RES_SIM_215) (91) [SCAL] (1) OxyRHm[2].state = add[2].u2; ($RES_SIM_205) (92) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_T[1].products[2].conc; ($RES_SIM_216) (93) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_T[2].products[2].conc; ($RES_SIM_217) (94) [SCAL] (1) OxyRHm[1].state = add[1].u2; ($RES_SIM_207) (95) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_T[3].products[2].conc; ($RES_SIM_218) (96) [FOR-] (4) ($RES_SIM_133) (96) [----] for $i1 in 1:4 loop (96) [----] [SCAL] (1) OxyRHm[$i1].q_out.conc = OxyRHm[$i1].state / OxyRHm[$i1].volume; ($RES_SIM_134) (96) [----] end for; (97) [FOR-] (4) ($RES_SIM_125) (97) [----] for $i1 in 1:4 loop (97) [----] [SCAL] (1) OxyRHm[$i1].volume = 0.001; ($RES_SIM_126) (97) [----] end for; (98) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygen_unbound.q_out.conc; ($RES_SIM_219) (99) [ARRY] (4) T0_in_T.specificSubunitForm.q = -T0_in_T.specificForm.q * fill(1.0, 4); ($RES_SIM_139) (100) [SCAL] (1) totalHb.Total * totalHb.normalizedState[1] = $FUN_16; ($RES_SIM_31) (101) [SCAL] (1) partialPressure1.q_out.conc = (0.12027235504272604 * oxygen_in_air.p) / oxygen_in_air.T; ($RES_SIM_40) (102) [FOR-] (4) ($RES_SIM_41) (102) [----] for $i1 in 1:4 loop (102) [----] [SCAL] (1) add1[$i1].y = add1[$i1].k1 * DeoxyTHm[$i1].state + add1[$i1].k2 * add1[$i1].u2; ($RES_SIM_42) (102) [----] end for; (103) [SCAL] (1) -partialPressure1.q_in.q = partialPressure1.solubilityRateCoef * (partialPressure1.kH * partialPressure1.q_out.conc - partialPressure1.q_in.conc / partialPressure1.solventFraction); ($RES_SIM_35) (104) [FOR-] (4) ($RES_SIM_43) (104) [----] for $i1 in 1:4 loop (104) [----] [SCAL] (1) add[$i1].y = add[$i1].k1 * DeoxyRHm[$i1].state + add[$i1].k2 * add[$i1].u2; ($RES_SIM_44) (104) [----] end for; (105) [SCAL] (1) partialPressure1.kH = partialPressure1.kH_T0 * $FUN_14; ($RES_SIM_36) (106) [SCAL] (1) oxygen_in_air.p = clock.offset + smooth(0, if $SEV_2 then 0.0 else time - clock.startTime); ($RES_SIM_45) (107) [SCAL] (1) oxygenation_T[4].products[2].conc = partialPressure1.q_in.conc; ($RES_SIM_211) (108) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_R[1].products[2].conc; ($RES_SIM_212) (109) [SCAL] (1) OxyTHm[4].state = add1[4].u2; ($RES_SIM_222) (110) [SCAL] (1) oxygenation_T[4].products[2].conc = oxygenation_R[2].products[2].conc; ($RES_SIM_213) State Candidate Variables (75/229) ************************************ (1) [ALGB] (8) Real[4, 2] oxygenation_T.products.conc (min = {0.0 for $f1 in 1:2, $f2 in 1:4}) (2) [ALGB] (8) Real[4, 2] oxygenation_R.products.conc (min = {0.0 for $f1 in 1:2, $f2 in 1:4}) (3) [ALGB] (4) protected Real[4] R0_in_R.fractions (4) [ALGB] (1) Real partialPressure1.q_in.conc (min = 0.0) (5) [ALGB] (1) protected Real oxygen_in_air.p (start = oxygen_in_air.PartialPressure, nominal = 133.322387415) (6) [ALGB] (2) Real[2] totalHb.fragment (min = {0.0 for $f1 in 1:2}) (7) [ALGB] (4) Real[4] oxygenation_T.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (8) [ALGB] (1) flow Real[1] quaternaryForm.products.q (9) [ALGB] (4) Real[4] oxygenation_R.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (10) [ALGB] (4) Real[4] $FUN_9 (11) [ALGB] (4) Real[4] $FUN_8 (start = {Modelica.Math.exp(-(0.12027235504272604 * oxygenation_R[1].dH) * (1/oxygenation_R[1].T_heatPort - 1/oxygenation_R[1].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_R[2].dH) * (1/oxygenation_R[2].T_heatPort - 1/oxygenation_R[2].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_R[3].dH) * (1/oxygenation_R[3].T_heatPort - 1/oxygenation_R[3].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_R[4].dH) * (1/oxygenation_R[4].T_heatPort - 1/oxygenation_R[4].TK))}) (12) [ALGB] (3) Real[3] T0_in_T.normalizedState (13) [ALGB] (4) Real[4] R0_in_R.specificSubunitForm.conc (min = {0.0 for $f1 in 1:4}) (14) [ALGB] (4) Real[4] DeoxyTHm.change (nominal = {DeoxyTHm[$DeoxyTHm1].NominalSolute / 60.0 for $DeoxyTHm1 in 1:4}) (15) [ALGB] (1) Real $FUN_6 (16) [ALGB] (4) Real[4, 1] oxygenation_T.substrates.conc (min = {0.0 for $f1 in 1:1, $f2 in 1:4}) (17) [ALGB] (1) Real $FUN_4 (18) [ALGB] (4) Real[4, 1] oxygenation_R.substrates.conc (min = {0.0 for $f1 in 1:1, $f2 in 1:4}) (19) [ALGB] (1) Real $FUN_3 (20) [ALGB] (4) Real[4] add1.y (min = {0.0 for $f1 in 1:4}) (21) [ALGB] (1) Real $FUN_2 (22) [ALGB] (1) Real $FUN_1 (start = Modelica.Math.exp((quaternaryForm.dH / (-8.31446261815324)) * (1.0 / quaternaryForm.T_heatPort - 1.0 / quaternaryForm.TK))) (23) [ALGB] (4) Real[4] add1.u2 (24) [ALGB] (4) Real[4] add.y (min = {0.0 for $f1 in 1:4}) (25) [ALGB] (4) Real[4] oxygenation_T.KaT (26) [ALGB] (8) flow Real[4, 2] oxygenation_T.products.q (27) [ALGB] (1) Real[1] quaternaryForm.substrates.conc (min = {0.0 for $f1 in 1:1}) (28) [ALGB] (4) flow Real[4] T0_in_T.specificSubunitForm.q (29) [ALGB] (8) flow Real[4, 2] oxygenation_R.products.q (30) [ALGB] (4) Real[4] oxygenation_R.KaT (31) [ALGB] (4) Real[4] DeoxyRHm.change (nominal = {DeoxyRHm[$DeoxyRHm1].NominalSolute / 60.0 for $DeoxyRHm1 in 1:4}) (32) [ALGB] (4) Real[4] OxyTHm.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (33) [ALGB] (4) Real[4] OxyTHm.change (nominal = {OxyTHm[$OxyTHm1].NominalSolute / 60.0 for $OxyTHm1 in 1:4}) (34) [ALGB] (1) Real quaternaryForm.rr (35) [ALGB] (3) Real[3] R0_in_R.normalizedState (36) [ALGB] (1) Real oxygen_unbound.q_out.conc (start = oxygen_unbound.solute_start / 0.001, min = 0.0) (37) [ALGB] (1) Real $FUN_16 (38) [ALGB] (2) Real[2] $FUN_15 (39) [ALGB] (1) Real $FUN_14 (start = Modelica.Math.exp(partialPressure1.C * (1.0 / partialPressure1.T_heatPort - 1.0 / partialPressure1.T0))) (40) [ALGB] (4) Real[4] $FUN_13 (41) [ALGB] (4) Real[4] $FUN_12 (42) [ALGB] (4) Real[4] $FUN_11 (start = {Modelica.Math.exp(-(0.12027235504272604 * oxygenation_T[1].dH) * (1/oxygenation_T[1].T_heatPort - 1/oxygenation_T[1].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_T[2].dH) * (1/oxygenation_T[2].T_heatPort - 1/oxygenation_T[2].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_T[3].dH) * (1/oxygenation_T[3].T_heatPort - 1/oxygenation_T[3].TK)), Modelica.Math.exp(-(0.12027235504272604 * oxygenation_T[4].dH) * (1/oxygenation_T[4].T_heatPort - 1/oxygenation_T[4].TK))}) (43) [ALGB] (4) Real[4] $FUN_10 (44) [STAT] (4) Real[4] OxyTHm.state (start = {OxyTHm[$OxyTHm1].state_start for $OxyTHm1 in 1:4}, min = {0.0 for $f1 in 1:4}, nominal = {OxyTHm[$OxyTHm1].NominalSolute for $OxyTHm1 in 1:4}, StateSelect = prefer) (45) [ALGB] (4) Real[4] OxyRHm.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (46) [ALGB] (4) flow Real[4] R0_in_R.specificSubunitForm.q (47) [STAT] (1) Real oxygen_unbound.state (start = oxygen_unbound.state_start, min = 0.0, nominal = oxygen_unbound.NominalSolute, StateSelect = prefer) (48) [ALGB] (1) Real T0_in_T.amount (min = 0.0) (49) [ALGB] (4) Real[4] OxyTHm.q_out.conc (start = {OxyTHm[$OxyTHm1].solute_start / 0.001 for $OxyTHm1 in 1:4}, min = {0.0 for $f1 in 1:4}) (50) [ALGB] (1) Real T0_in_T.specificForm.conc (min = 0.0) (51) [STAT] (4) Real[4] DeoxyTHm.state (start = {DeoxyTHm[$DeoxyTHm1].state_start for $DeoxyTHm1 in 1:4}, min = {0.0 for $f1 in 1:4}, nominal = {DeoxyTHm[$DeoxyTHm1].NominalSolute for $DeoxyTHm1 in 1:4}, StateSelect = prefer) (52) [STAT] (4) Real[4] OxyRHm.state (start = {OxyRHm[$OxyRHm1].state_start for $OxyRHm1 in 1:4}, min = {0.0 for $f1 in 1:4}, nominal = {OxyRHm[$OxyRHm1].NominalSolute for $OxyRHm1 in 1:4}, StateSelect = prefer) (53) [ALGB] (1) Real partialPressure1.kH (min = 0.0, nominal = 0.01) (54) [ALGB] (1) Real partialPressure1.q_out.conc (min = 0.0) (55) [ALGB] (4) Real[4] DeoxyTHm.q_out.conc (start = {DeoxyTHm[$DeoxyTHm1].solute_start / 0.001 for $DeoxyTHm1 in 1:4}, min = {0.0 for $f1 in 1:4}) (56) [ALGB] (1) Real[1] quaternaryForm.products.conc (min = {0.0 for $f1 in 1:1}) (57) [ALGB] (4) Real[4] OxyRHm.q_out.conc (start = {OxyRHm[$OxyRHm1].solute_start / 0.001 for $OxyRHm1 in 1:4}, min = {0.0 for $f1 in 1:4}) (58) [ALGB] (4) Real[4] DeoxyTHm.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (59) [ALGB] (1) Real R0_in_R.amount (min = 0.0) (60) [STAT] (4) Real[4] DeoxyRHm.state (start = {DeoxyRHm[$DeoxyRHm1].state_start for $DeoxyRHm1 in 1:4}, min = {0.0 for $f1 in 1:4}, nominal = {DeoxyRHm[$DeoxyRHm1].NominalSolute for $DeoxyRHm1 in 1:4}, StateSelect = prefer) (61) [ALGB] (1) Real R0_in_R.specificForm.conc (min = 0.0) (62) [ALGB] (1) flow Real T0_in_T.specificForm.q (63) [ALGB] (4) Real[4] DeoxyRHm.q_out.conc (start = {DeoxyRHm[$DeoxyRHm1].solute_start / 0.001 for $DeoxyRHm1 in 1:4}, min = {0.0 for $f1 in 1:4}) (64) [ALGB] (4) protected Real[4] T0_in_T.fractions (65) [ALGB] (4) Real[4] DeoxyRHm.volume (min = {0.0 for $f2 in 1:4}, nominal = {1e-6 for $f1 in 1:4}) (66) [ALGB] (1) flow Real[1] quaternaryForm.substrates.q (67) [ALGB] (4) Real[4] add.u2 (68) [ALGB] (1) Real[1] totalHb.normalizedState (69) [ALGB] (4) Real[4] oxygenation_T.rr (70) [ALGB] (1) flow Real partialPressure1.q_in.q (71) [ALGB] (1) Real quaternaryForm.KaT (72) [ALGB] (4) Real[4] T0_in_T.specificSubunitForm.conc (min = {0.0 for $f1 in 1:4}) (73) [ALGB] (4) Real[4] oxygenation_R.rr (74) [ALGB] (4) flow Real[4, 1] oxygenation_T.substrates.q (75) [ALGB] (1) flow Real R0_in_R.specificForm.q " [Timeout remaining time 660] [Calling sys.exit(0), Time elapsed: 2.7884384328499436]