You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With OCT, the model IBPSA.Fluid.Actuators.Dampers.PressureIndependent triggers during translation the warning
Variable array index in equation can result in slow simulation time
This is during parameter evaluation, and can be avoided with the change
initial equation
(kSupSpl, idx_sorted) = Modelica.Math.Vectors.sort(kSupSpl_raw, ascending=true);
- ySupSpl = ySupSpl_raw[idx_sorted];- invSplDer = IBPSA.Utilities.Math.Functions.splineDerivatives(x=kSupSpl, y=ySupSpl);+ // The sum below is a trick to avoid in OPTIMICA the warning+ // Variable array index in equation can result in slow simulation time if we were to use+ // ySupSpl = ySupSpl_raw[idx_sorted];+ for i in 1:sizeSupSpl loop+ ySupSpl[i] = sum((if k == idx_sorted[i] then ySupSpl_raw[k] else 0) for k in 1:sizeSupSpl);+ end for;+ invSplDer = IBPSA.Utilities.Math.Functions.splineDerivatives(x=kSupSpl_raw, y=ySupSpl_raw);
equation
The text was updated successfully, but these errors were encountered:
With OCT, the model
IBPSA.Fluid.Actuators.Dampers.PressureIndependent
triggers during translation the warningThis is during parameter evaluation, and can be avoided with the change
The text was updated successfully, but these errors were encountered: