to be solved

博客探讨了图像分割领域中FCN网络的设计,重点介绍了Dilated Convolution(空洞卷积)如何在不使用pooling的情况下增大感受野,保持图像尺寸,从而减少信息损失。此外,提到了Deformable Convolutional Networks在视频超分辨率中的应用,强调特征级对齐优于图像级对齐。
  1. Depth-wise Conv
    nn.Conv2d的group参数
  2. Skip-connection 和 residual的区别
  3. 空洞卷积

在图像分割领域,图像输入到CNN(典型的网络比如FCN)中,FCN先像传统的CNN那样对图像做卷积再pooling,降低图像尺寸的同时增大感受野,但是由于图像分割预测是pixel-wise的输出,所以要将pooling后较小的图像尺寸upsampling到原始的图像尺寸进行预测,之前的pooling操作使得每个pixel预测都能看到较大感受野信息。因此图像分割FCN中有两个关键,一个是pooling减小图像尺寸增大感受野,另一个是upsampling扩大图像尺寸。在先减小再增大尺寸的过程中,肯定有一些信息损失掉了,那么能不能设计一种新的操作,不通过pooling也能有较大的感受野看到更多的信息呢?答案就是dilated conv。

  1. 有价值的工作记录
nametech
Deformable Convolutional NetworksDeformable Convolutional
Understanding deformable alignment in video super-resolution.Performing alignment at the feature level is better than at the image level
model HeatingSystemWithBranches // ===== 系统参数 ===== parameter Integer nBranches = 4; // 主干数量 parameter Integer nStations = 10; // 换热站数量 parameter Integer nNodes = 23; // 热源进出口 + 各站进出口 + 汇合点 parameter Integer nPipes = 29; // 供水主干 + 供水支线 + 回水支线 + 回水主干 // ===== 管道参数 ===== parameter Real mainPipeLengths[nBranches] = {2000, 1500, 1800, 1700}; parameter Real mainPipeDiameters[nBranches] = {0.4, 0.35, 0.3, 0.35}; parameter Real branchPipeLengths[nStations] = {800, 1000, 600, 900, 700, 500, 400, 600, 800, 500}; parameter Real branchPipeDiameters[nStations] = {0.15, 0.2, 0.15, 0.15, 0.15, 0.125, 0.125, 0.15, 0.15, 0.15}; parameter Real returnMainLength = 500; // 新增回水主干长度 parameter Real returnMainDiameter = 0.45; // 新增回水主干直径 parameter Real pipe_roughness = 4.5e-5; parameter Real local_loss_coeff = 0.5; // ===== 流体属性 ===== parameter Real fluid_density = 983.2; parameter Real fluid_viscosity = 0.00046; // ===== 节点参数 ===== parameter Real node_elevations[nNodes] = { 45.2, 44.8, // 热源进出口 // 各站进口高程 42.0, 41.5, 41.0, 40.5, 42.5, 42.0, 41.5, 41.0, 42.0, 41.5, // 各站出口高程 41.5, 41.0, 40.5, 40.0, 42.0, 41.5, 41.0, 40.5, 41.5, 41.0, 40.0 // 汇合点 }; // ===== 管网拓扑信息 ===== parameter Integer connectionMatrix[nPipes,2] = [ // === 供水主干 (4根) === 1, 3; // 热源出口→东主干起点 3, 4; // 东主干→分支点1 4, 5; // 分支点1→分支点2 5, 6; // 分支点2→分支点3 // === 支线供水 (10根) === 4, 7; // 分支点1→站1进口 5, 8; // 分支点2→站2进口 5, 9; // 分支点2→站3进口 6, 10; // 分支点3→站4进口 6, 11; // 分支点3→站5进口 4, 12; // 分支点1→站6进口 5, 13; // 分支点2→站7进口 6, 14; // 分支点3→站8进口 5, 15; // 分支点2→站9进口 6, 16; // 分支点3→站10进口 // === 回水支线 (10根) === 17, 3; // 站1出口→回水点1 18, 4; // 站2出口→回水点2 19, 5; // 站3出口→回水点3 20, 6; // 站4出口→回水点4 21, 3; // 站5出口→回水点1 22, 4; // 站6出口→回水点2 23, 5; // 站7出口→回水点3 24, 6; // 站8出口→回水点4 25, 3; // 站9出口→回水点1 26, 4; // 站10出口→回水点2 // === 回水主干 (5根) === 3, 23; // 回水点1→汇合点 4, 23; // 回水点2→汇合点 5, 23; // 回水点3→汇合点 6, 23; // 回水点4→汇合点 23, 2 // 汇合点→热源入口 ]; // ===== 泵参数 ===== parameter Real pump_head_input = 32; // 泵扬程 (m) // ===== 验证参数 ===== parameter Real pressureTolerance = 100; // 压力容差 (Pa) parameter Real energyTolerance = 0.05; // 能量容差 (5%) parameter Boolean debugMode = true; // 调试开关 // ===== 监测时间点参数 ===== parameter Real monitoringTimes[:] = {0, 0.1, 0.5, 1}; // 监测时间点 (s) // ===== 监控变量 ===== Integer nextIndex(start = 1, fixed = true); // ===== 主要变量 ===== Real flow_rates[nPipes]( each fixed = false, // 允许求解器调整 each min = 1e-6, each nominal = 0.02 ); Real pressure_losses[nPipes]( each min = 0, each max = 1e6, each start = 1000 // 初始压力损失 ); Real node_pressures[nNodes]( each min = 0, each max = 2e6, each start = 101325 // 初始值为大气压 ); // ===== 参数化管道属性 ===== parameter Real pipe_lengths[nPipes] = { // 供水主干 (1-4) mainPipeLengths[1], mainPipeLengths[2], mainPipeLengths[3], mainPipeLengths[4], // 供水支线 (5-14) branchPipeLengths[1], branchPipeLengths[2], branchPipeLengths[3], branchPipeLengths[4], branchPipeLengths[5], branchPipeLengths[6], branchPipeLengths[7], branchPipeLengths[8], branchPipeLengths[9], branchPipeLengths[10], // 回水支线 (15-24) branchPipeLengths[1], branchPipeLengths[2], branchPipeLengths[3], branchPipeLengths[4], branchPipeLengths[5], branchPipeLengths[6], branchPipeLengths[7], branchPipeLengths[8], branchPipeLengths[9], branchPipeLengths[10], // 回水主干 (25-29) mainPipeLengths[1], mainPipeLengths[2], mainPipeLengths[3], mainPipeLengths[4], returnMainLength }; parameter Real pipe_diameters[nPipes] = { // 供水主干 (1-4) mainPipeDiameters[1], mainPipeDiameters[2], mainPipeDiameters[3], mainPipeDiameters[4], // 供水支线 (5-14) branchPipeDiameters[1], branchPipeDiameters[2], branchPipeDiameters[3], branchPipeDiameters[4], branchPipeDiameters[5], branchPipeDiameters[6], branchPipeDiameters[7], branchPipeDiameters[8], branchPipeDiameters[9], branchPipeDiameters[10], // 回水支线 (15-24) branchPipeDiameters[1], branchPipeDiameters[2], branchPipeDiameters[3], branchPipeDiameters[4], branchPipeDiameters[5], branchPipeDiameters[6], branchPipeDiameters[7], branchPipeDiameters[8], branchPipeDiameters[9], branchPipeDiameters[10], // 回水主干 (25-29) mainPipeDiameters[1], mainPipeDiameters[2], mainPipeDiameters[3], mainPipeDiameters[4], returnMainDiameter }; // ===== 参数化节点索引 ===== parameter Integer startNode[nPipes] = connectionMatrix[:, 1]; parameter Integer endNode[nPipes] = connectionMatrix[:, 2]; // ===== 中间变量声明 ===== Real area[nPipes]; // 管道截面积 Real v[nPipes]; // 流速 Real Re_val[nPipes]; // 雷诺数 Real f_val[nPipes]; // 摩擦系数 Real friction_loss[nPipes]; // 摩擦损失 Real elevation_change[nPipes]; // 高程压差 // ===== 能量相关变量 ===== Real pumpPower; Real lossPower; Real elevationPower; Real balance; Real pumpPowerThreshold; // ===== 常量 ===== constant Real g = Modelica.Constants.g_n; constant Real pi = Modelica.Constants.pi; constant Real p_atm = 101325; // 标准大气压 // ===== 摩擦系数计算函数 ===== function calculateFrictionFactor input Real Re_val; input Real eps; // 相对粗糙度 output Real f_val; protected Real Re_safe; algorithm Re_safe := max(Re_val, 1e-3); // 避免除以零 if Re_safe <= 2300 then f_val := 64 / Re_safe; // 层流公式 else // 使用Haaland显式近似公式 f_val := 0.3086 / (log10(6.9/Re_safe + (eps/3.7)^1.11))^2; // 紊流公式 end if; // 确保摩擦系数在合理范围内 f_val := min(max(f_val, 0.001), 0.1); end calculateFrictionFactor; initial equation // ===== 参数验证 ===== assert(size(connectionMatrix, 1) == nPipes, “连接矩阵行数错误”); assert(size(node_elevations, 1) == nNodes, “节点高程数量错误”); assert(local_loss_coeff >= 0, “局部损失系数必须非负”); assert(pipe_roughness > 0, “管道粗糙度必须大于0”); // ===== 流量初始估计 ===== // 供水主干流量设为总流量的1/nBranches for i in 1:nBranches loop flow_rates[i] = 0.018 * nStations / nBranches; end for; // 供水支线流量设为较小值 for i in (nBranches + 1):(nBranches + nStations) loop flow_rates[i] = 0.018 / nStations; end for; // 回水支线流量与供水支线匹配 for i in (nBranches + nStations + 1):(nBranches + 2*nStations) loop flow_rates[i] = flow_rates[i - nStations]; end for; // 回水主干流量设为分支总和 for i in (nBranches + 2*nStations + 1):(nPipes - 1) loop flow_rates[i] = 0.018 * nStations / nBranches; end for; // 最后一段回水主干流量设为总流量 flow_rates[nPipes] = sum(flow_rates[1:nBranches]); equation // ===== 管道水力计算 ===== for i in 1:nPipes loop // 管道截面积 area[i] = pi * (pipe_diameters[i]/2)^2; // 流速计算(避免除以零) v[i] = if area[i] > 1e-10 then flow_rates[i] / area[i] else 0; // 雷诺数计算 Re_val[i] = fluid_density * abs(flow_rates[i]) * pipe_diameters[i] / max(fluid_viscosity, 1e-10); // 摩擦系数计算 f_val[i] = calculateFrictionFactor(Re_val[i], pipe_roughness/pipe_diameters[i]); // 摩擦损失计算 friction_loss[i] = (f_val[i] * pipe_lengths[i] / pipe_diameters[i] + local_loss_coeff) * 0.5 * fluid_density * v[i]^2; // 高程压差计算 elevation_change[i] = fluid_density * g * (node_elevations[startNode[i]] - node_elevations[endNode[i]]); // 总压力损失 pressure_losses[i] = friction_loss[i] + elevation_change[i]; // 管道压降方程 node_pressures[startNode[i]] - node_pressures[endNode[i]] = pressure_losses[i]; end for; // ===== 节点流量守恒 ===== for j in 1:nNodes loop // 流入节点的流量总和 = 流出节点的流量总和 sum(if startNode[k] == j then flow_rates[k] else 0.0 for k in 1:nPipes) = sum(if endNode[k] == j then flow_rates[k] else 0.0 for k in 1:nPipes); end for; // 热源出口压力(泵出口) node_pressures[1] = pump_head_input * fluid_density * g + p_atm; // 热源入口压力(泵入口) node_pressures[2] = p_atm; // 泵功率计算 pumpPower = abs(flow_rates[1]) * pump_head_input * fluid_density * g; // 摩擦损失功率 lossPower = sum(friction_loss[i] * abs(flow_rates[i]) for i in 1:nPipes); // 高程功率 elevationPower = sum(elevation_change[i] * flow_rates[i] for i in 1:nPipes); // 能量平衡误差 balance = pumpPower - (lossPower + elevationPower); pumpPowerThreshold = max(100, abs(pumpPower) * energyTolerance); // ===== 验证与监测 ===== algorithm when initial() then Modelica.Utilities.Streams.print(“=== 系统初始化 ===”); Modelica.Utilities.Streams.print("节点数: " + String(nNodes)); Modelica.Utilities.Streams.print("管道数: " + String(nPipes)); Modelica.Utilities.Streams.print(“总流量: " + String(flow_rates[1]*3600) + " m³/h”); // 节点连接检查 for i in 1:nPipes loop assert(connectionMatrix[i,1] >= 1 and connectionMatrix[i,1] <= nNodes, "管道" + String(i) + "起点节点无效: " + String(connectionMatrix[i,1])); assert(connectionMatrix[i,2] >= 1 and connectionMatrix[i,2] <= nNodes, "管道" + String(i) + "终点节点无效: " + String(connectionMatrix[i,2])); end for; end when; when {time >= monitoringTimes[nextIndex]} then Modelica.Utilities.Streams.print("=== 系统状态 @ " + String(time) + “s ===”); Modelica.Utilities.Streams.print(“主流量: " + String(flow_rates[1]*3600) + " m³/h”); Modelica.Utilities.Streams.print(“泵功率: " + String(pumpPower/1000) + " kW”); Modelica.Utilities.Streams.print(“摩擦损失功率: " + String(lossPower/1000) + " kW”); Modelica.Utilities.Streams.print(“高程功率: " + String(elevationPower/1000) + " kW”); Modelica.Utilities.Streams.print(“能量平衡误差: " + String(abs(balance)) + " W (” + String(abs(balance)/max(pumpPower, 1e-10)*100) + “%)”); if nextIndex < size(monitoringTimes, 1) then nextIndex := nextIndex + 1; end if; end when; // 压力范围验证 for i in 1:nNodes loop assert(node_pressures[i] > 0 and node_pressures[i] < 2e6, “节点压力超出范围: P” + String(i) + “=” + String(node_pressures[i])); end for; // 能量守恒验证 if debugMode then assert(abs(balance) < pumpPowerThreshold, “能量不平衡: Δ=” + String(balance) + " W (泵功率=" + String(pumpPower) + " W)"); end if; // ===== 结果输出配置 ===== annotation( experiment( StartTime=0, StopTime=10, Interval=0.1, __Dymola_Algorithm=“Dassl” ) ); end HeatingSystemWithBranches; [108] 16:05:06 符号 警告 [HeatingSystemWithBranches: 98:3-98:60]: Variable node_pressures[4] does not have any remaining equation to be solved in. The original equations were: Equation 233: node_pressures[startNode[29]] - node_pressures[endNode[29]] = pressure_losses[29], which needs to solve for pressure_losses[29] Equation 225: node_pressures[startNode[28]] - node_pressures[endNode[28]] = pressure_losses[28], which needs to solve for pressure_losses[28] Equation 217: node_pressures[startNode[27]] - node_pressures[endNode[27]] = pressure_losses[27], which needs to solve for pressure_losses[27] Equation 209: node_pressures[startNode[26]] - node_pressures[endNode[26]] = pressure_losses[26], which needs to solve for pressure_losses[26] Equation 201: node_pressures[startNode[25]] - node_pressures[endNode[25]] = pressure_losses[25], which needs to solve for pressure_losses[25] Equation 193: node_pressures[startNode[24]] - node_pressures[endNode[24]] = pressure_losses[24], which needs to solve for pressure_losses[24] Equation 185: node_pressures[startNode[23]] - node_pressures[endNode[23]] = pressure_losses[23], which needs to solve for pressure_losses[23] Equation 177: node_pressures[startNode[22]] - node_pressures[endNode[22]] = pressure_losses[22], which needs to solve for pressure_losses[22] Equation 169: node_pressures[startNode[21]] - node_pressures[endNode[21]] = pressure_losses[21], which needs to solve for pressure_losses[21] Equation 161: node_pressures[startNode[20]] - node_pressures[endNode[20]] = pressure_losses[20], which needs to solve for pressure_losses[20] Equation 153: node_pressures[startNode[19]] - node_pressures[endNode[19]] = pressure_losses[19], which needs to solve for pressure_losses[19] Equation 145: node_pressures[startNode[18]] - node_pressures[endNode[18]] = pressure_losses[18], which needs to solve for pressure_losses[18] Equation 137: node_pressures[startNode[17]] - node_pressures[endNode[17]] = pressure_losses[17], which needs to solve for pressure_losses[17] Equation 129: node_pressures[startNode[16]] - node_pressures[endNode[16]] = pressure_losses[16], which needs to solve for pressure_losses[16] Equation 121: node_pressures[startNode[15]] - node_pressures[endNode[15]] = pressure_losses[15], which needs to solve for pressure_losses[15] Equation 113: node_pressures[startNode[14]] - node_pressures[endNode[14]] = pressure_losses[14], which needs to solve for pressure_losses[14] Equation 105: node_pressures[startNode[13]] - node_pressures[endNode[13]] = pressure_losses[13], which needs to solve for pressure_losses[13] Equation 97: node_pressures[startNode[12]] - node_pressures[endNode[12]] = pressure_losses[12], which needs to solve for pressure_losses[12] Equation 89: node_pressures[startNode[11]] - node_pressures[endNode[11]] = pressure_losses[11], which needs to solve for pressure_losses[11] Equation 81: node_pressures[startNode[10]] - node_pressures[endNode[10]] = pressure_losses[10], which needs to solve for pressure_losses[10] Equation 73: node_pressures[startNode[9]] - node_pressures[endNode[9]] = pressure_losses[9], which needs to solve for pressure_losses[9] Equation 65: node_pressures[startNode[8]] - node_pressures[endNode[8]] = pressure_losses[8], which needs to solve for pressure_losses[8] Equation 57: node_pressures[startNode[7]] - node_pressures[endNode[7]] = pressure_losses[7], which needs to solve for pressure_losses[7] Equation 49: node_pressures[startNode[6]] - node_pressures[endNode[6]] = pressure_losses[6], which needs to solve for pressure_losses[6] Equation 41: node_pressures[startNode[5]] - node_pressures[endNode[5]] = pressure_losses[5], which needs to solve for pressure_losses[5] Equation 33: node_pressures[startNode[4]] - node_pressures[endNode[4]] = pressure_losses[4], which needs to solve for pressure_losses[4] Equation 25: node_pressures[startNode[3]] - node_pressures[endNode[3]] = pressure_losses[3], which needs to solve for pressure_losses[3] Equation 17: node_pressures[startNode[2]] - node_pressures[endNode[2]] = pressure_losses[2], which needs to solve for pressure_losses[2] Equation 9: node_pressures[startNode[1]] - node_pressures[endNode[1]] = pressure_losses[1], which needs to solve for pressure_losses[1] Equation 1: algorithm when initial() then Modelica.Utilities.Streams.print(“=== 系统初始化 =", “”); Modelica.Utilities.Streams.print(“节点数: 23”, “”); Modelica.Utilities.Streams.print(“管道数: 29”, “”); for i in 1:29 loop assert(connectionMatrix[i,1] >= 1 and connectionMatrix[i,1] <= 23, “管道” + String(i, 0, true) + "起点节点无效: " + String(connectionMatrix[i,1], 0, true)); assert(connectionMatrix[i,2] >= 1 and connectionMatrix[i,2] <= 23, “管道” + String(i, 0, true) + “终点节点无效: " + String(connectionMatrix[i,2], 0, true)); end for; end when; when {time >= monitoringTimes[nextIndex]} then Modelica.Utilities.Streams.print(”= 系统状态 @ " + String(time, 6, 0, true) + “s ===”, “”); Modelica.Utilities.Streams.print(“主流量: " + String(flow_rates[1] * 3600.0, 6, 0, true) + " m³/h”, “”); Modelica.Utilities.Streams.print(“泵功率: " + String(pumpPower / 1000.0, 6, 0, true) + " kW”, “”); Modelica.Utilities.Streams.print(“能量平衡误差: " + String(abs(balance), 6, 0, true) + " W”, “”); if nextIndex < 4 then nextIndex := nextIndex + 1; end if; end when; for i in 1:23 loop assert(node_pressures[i] > 0.0 and node_pressures[i] < 2e6, “节点压力超出范围: P” + String(i, 0, true) + “=” + String(node_pressures[i], 6, 0, true)); end for; if debugMode then assert(abs(balance) < pumpPowerThreshold, “能量不平衡: Δ=” + String(balance, 6, 0, true) + " W (泵功率=” + String(pumpPower, 6, 0, true) + " W)"); end if; , which needs to solve for nextIndex [109] 16:05:06 符号 警告 [HeatingSystemWithBranches: 98:3-98:60]: Variable node_pressures[3] does not have any remaining equation to be solved in. The original equations were: Equation 233: node_pressures[startNode[29]] - node_pressures[endNode[29]] = pressure_losses[29], which needs to solve for pressure_losses[29] Equation 225: node_pressures[startNode[28]] - node_pressures[endNode[28]] = pressure_losses[28], which needs to solve for pressure_losses[28] Equation 217: node_pressures[startNode[27]] - node_pressures[endNode[27]] = pressure_losses[27], which needs to solve for pressure_losses[27] Equation 209: node_pressures[startNode[26]] - node_pressures[endNode[26]] = pressure_losses[26], which needs to solve for pressure_losses[26] Equation 201: node_pressures[startNode[25]] - node_pressures[endNode[25]] = pressure_losses[25], which needs to solve for pressure_losses[25] Equation 193: node_pressures[startNode[24]] - node_pressures[endNode[24]] = pressure_losses[24], which needs to solve for pressure_losses[24] Equation 185: node_pressures[startNode[23]] - node_pressures[endNode[23]] = pressure_losses[23], which needs to solve for pressure_losses[23] Equation 177: node_pressures[startNode[22]] - node_pressures[endNode[22]] = pressure_losses[22], which needs to solve for pressure_losses[22] Equation 169: node_pressures[startNode[21]] - node_pressures[endNode[21]] = pressure_losses[21], which needs to solve for pressure_losses[21] Equation 161: node_pressures[startNode[20]] - node_pressures[endNode[20]] = pressure_losses[20], which needs to solve for pressure_losses[20] Equation 153: node_pressures[startNode[19]] - node_pressures[endNode[19]] = pressure_losses[19], which needs to solve for pressure_losses[19] Equation 145: node_pressures[startNode[18]] - node_pressures[endNode[18]] = pressure_losses[18], which needs to solve for pressure_losses[18] Equation 137: node_pressures[startNode[17]] - node_pressures[endNode[17]] = pressure_losses[17], which needs to solve for pressure_losses[17] Equation 129: node_pressures[startNode[16]] - node_pressures[endNode[16]] = pressure_losses[16], which needs to solve for pressure_losses[16] Equation 121: node_pressures[startNode[15]] - node_pressures[endNode[15]] = pressure_losses[15], which needs to solve for pressure_losses[15] Equation 113: node_pressures[startNode[14]] - node_pressures[endNode[14]] = pressure_losses[14], which needs to solve for pressure_losses[14] Equation 105: node_pressures[startNode[13]] - node_pressures[endNode[13]] = pressure_losses[13], which needs to solve for pressure_losses[13] Equation 97: node_pressures[startNode[12]] - node_pressures[endNode[12]] = pressure_losses[12], which needs to solve for pressure_losses[12] Equation 89: node_pressures[startNode[11]] - node_pressures[endNode[11]] = pressure_losses[11], which needs to solve for pressure_losses[11] Equation 81: node_pressures[startNode[10]] - node_pressures[endNode[10]] = pressure_losses[10], which needs to solve for pressure_losses[10] Equation 73: node_pressures[startNode[9]] - node_pressures[endNode[9]] = pressure_losses[9], which needs to solve for pressure_losses[9] Equation 65: node_pressures[startNode[8]] - node_pressures[endNode[8]] = pressure_losses[8], which needs to solve for pressure_losses[8] Equation 57: node_pressures[startNode[7]] - node_pressures[endNode[7]] = pressure_losses[7], which needs to solve for pressure_losses[7] Equation 49: node_pressures[startNode[6]] - node_pressures[endNode[6]] = pressure_losses[6], which needs to solve for pressure_losses[6] Equation 41: node_pressures[startNode[5]] - node_pressures[endNode[5]] = pressure_losses[5], which needs to solve for pressure_losses[5] Equation 33: node_pressures[startNode[4]] - node_pressures[endNode[4]] = pressure_losses[4], which needs to solve for pressure_losses[4] Equation 25: node_pressures[startNode[3]] - node_pressures[endNode[3]] = pressure_losses[3], which needs to solve for pressure_losses[3] Equation 17: node_pressures[startNode[2]] - node_pressures[endNode[2]] = pressure_losses[2], which needs to solve for pressure_losses[2] Equation 9: node_pressures[startNode[1]] - node_pressures[endNode[1]] = pressure_losses[1], which needs to solve for pressure_losses[1] Equation 1: algorithm when initial() then Modelica.Utilities.Streams.print(“=== 系统初始化 =", “”); Modelica.Utilities.Streams.print(“节点数: 23”, “”); Modelica.Utilities.Streams.print(“管道数: 29”, “”); for i in 1:29 loop assert(connectionMatrix[i,1] >= 1 and connectionMatrix[i,1] <= 23, “管道” + String(i, 0, true) + "起点节点无效: " + String(connectionMatrix[i,1], 0, true)); assert(connectionMatrix[i,2] >= 1 and connectionMatrix[i,2] <= 23, “管道” + String(i, 0, true) + “终点节点无效: " + String(connectionMatrix[i,2], 0, true)); end for; end when; when {time >= monitoringTimes[nextIndex]} then Modelica.Utilities.Streams.print(”= 系统状态 @ " + String(time, 6, 0, true) + “s ===”, “”); Modelica.Utilities.Streams.print(“主流量: " + String(flow_rates[1] * 3600.0, 6, 0, true) + " m³/h”, “”); Modelica.Utilities.Streams.print(“泵功率: " + String(pumpPower / 1000.0, 6, 0, true) + " kW”, “”); Modelica.Utilities.Streams.print(“能量平衡误差: " + String(abs(balance), 6, 0, true) + " W”, “”); if nextIndex < 4 then nextIndex := nextIndex + 1; end if; end when; for i in 1:23 loop assert(node_pressures[i] > 0.0 and node_pressures[i] < 2e6, “节点压力超出范围: P” + String(i, 0, true) + “=” + String(node_pressures[i], 6, 0, true)); end for; if debugMode then assert(abs(balance) < pumpPowerThreshold, “能量不平衡: Δ=” + String(balance, 6, 0, true) + " W (泵功率=” + String(pumpPower, 6, 0, true) + " W)"); end if; , which needs to solve for nextIndex [110] 16:05:06 脚本 错误 Translation of HeatingSystemWithBranches failed. [1] 16:53:14 翻译 错误 [HeatingSystemWithBranches: 237:5-238:87]: Subscript ‘24’ for dimension 1 (size = 23) of node_elevations is out of bounds. [2] 16:53:14 脚本 错误 Translation of HeatingSystemWithBranches failed. 一百多行警告怎么这么多bug呀
09-16
[1] 14:33:35 符号 错误 Too many equations, over-determined system. The model has 405 equation(s) and 325 variable(s). [2] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 13 (size: 1) stationIdx = 2 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [3] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 16 (size: 1) stationIdx = 3 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [4] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 19 (size: 1) stationIdx = 4 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [5] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 22 (size: 1) stationIdx = 5 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [6] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 25 (size: 1) stationIdx = 6 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [7] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 28 (size: 1) stationIdx = 7 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [8] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 31 (size: 1) stationIdx = 8 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [9] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 34 (size: 1) stationIdx = 9 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [10] 14:33:35 符号 警告 [HeatingSystemWithBranches: 171:7-171:33]: Equation 37 (size: 1) stationIdx = 10 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [11] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 40 (size: 1) stationIdx = 1 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [12] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 43 (size: 1) stationIdx = 2 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [13] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 46 (size: 1) stationIdx = 3 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [14] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 49 (size: 1) stationIdx = 4 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [15] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 52 (size: 1) stationIdx = 5 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [16] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 55 (size: 1) stationIdx = 6 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [17] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 58 (size: 1) stationIdx = 7 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [18] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 61 (size: 1) stationIdx = 8 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [19] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 64 (size: 1) stationIdx = 9 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [20] 14:33:35 符号 警告 [HeatingSystemWithBranches: 176:7-176:47]: Equation 67 (size: 1) stationIdx = 10 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: stationIdx Equations used to solve those variables: Equation 10 (size: 1): stationIdx = 1 [21] 14:33:35 符号 警告 [HeatingSystemWithBranches: 183:9-183:50]: Equation 73 (size: 1) branchIdx = 2 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: branchIdx Equations used to solve those variables: Equation 70 (size: 1): branchIdx = 1 [22] 14:33:35 符号 警告 [HeatingSystemWithBranches: 183:9-183:50]: Equation 76 (size: 1) branchIdx = 3 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: branchIdx Equations used to solve those variables: Equation 70 (size: 1): branchIdx = 1 [23] 14:33:35 符号 警告 [HeatingSystemWithBranches: 183:9-183:50]: Equation 79 (size: 1) branchIdx = 4 is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: branchIdx Equations used to solve those variables: Equation 70 (size: 1): branchIdx = 1 [24] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 99 (size: 1) startNode = connectionMatrix[2,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [25] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 100 (size: 1) endNode = connectionMatrix[2,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [26] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 109 (size: 1) startNode = connectionMatrix[3,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [27] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 110 (size: 1) endNode = connectionMatrix[3,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [28] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 119 (size: 1) startNode = connectionMatrix[4,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [29] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 120 (size: 1) endNode = connectionMatrix[4,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [30] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 129 (size: 1) startNode = connectionMatrix[5,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [31] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 130 (size: 1) endNode = connectionMatrix[5,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [32] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 139 (size: 1) startNode = connectionMatrix[6,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [33] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 140 (size: 1) endNode = connectionMatrix[6,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [34] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 149 (size: 1) startNode = connectionMatrix[7,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [35] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 150 (size: 1) endNode = connectionMatrix[7,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [36] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 159 (size: 1) startNode = connectionMatrix[8,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [37] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 160 (size: 1) endNode = connectionMatrix[8,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [38] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 169 (size: 1) startNode = connectionMatrix[9,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [39] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 170 (size: 1) endNode = connectionMatrix[9,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [40] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 179 (size: 1) startNode = connectionMatrix[10,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [41] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 180 (size: 1) endNode = connectionMatrix[10,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [42] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 189 (size: 1) startNode = connectionMatrix[11,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [43] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 190 (size: 1) endNode = connectionMatrix[11,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [44] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 199 (size: 1) startNode = connectionMatrix[12,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [45] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 200 (size: 1) endNode = connectionMatrix[12,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [46] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 209 (size: 1) startNode = connectionMatrix[13,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [47] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 210 (size: 1) endNode = connectionMatrix[13,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [48] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 219 (size: 1) startNode = connectionMatrix[14,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [49] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 220 (size: 1) endNode = connectionMatrix[14,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [50] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 229 (size: 1) startNode = connectionMatrix[15,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [51] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 230 (size: 1) endNode = connectionMatrix[15,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [52] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 239 (size: 1) startNode = connectionMatrix[16,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [53] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 240 (size: 1) endNode = connectionMatrix[16,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [54] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 249 (size: 1) startNode = connectionMatrix[17,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [55] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 250 (size: 1) endNode = connectionMatrix[17,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [56] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 259 (size: 1) startNode = connectionMatrix[18,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [57] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 260 (size: 1) endNode = connectionMatrix[18,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [58] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 269 (size: 1) startNode = connectionMatrix[19,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [59] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 270 (size: 1) endNode = connectionMatrix[19,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [60] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 279 (size: 1) startNode = connectionMatrix[20,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [61] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 280 (size: 1) endNode = connectionMatrix[20,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [62] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 289 (size: 1) startNode = connectionMatrix[21,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [63] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 290 (size: 1) endNode = connectionMatrix[21,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [64] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 299 (size: 1) startNode = connectionMatrix[22,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [65] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 300 (size: 1) endNode = connectionMatrix[22,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [66] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 309 (size: 1) startNode = connectionMatrix[23,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [67] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 310 (size: 1) endNode = connectionMatrix[23,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [68] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 319 (size: 1) startNode = connectionMatrix[24,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [69] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 320 (size: 1) endNode = connectionMatrix[24,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [70] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 329 (size: 1) startNode = connectionMatrix[25,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [71] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 330 (size: 1) endNode = connectionMatrix[25,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [72] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 339 (size: 1) startNode = connectionMatrix[26,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [73] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 340 (size: 1) endNode = connectionMatrix[26,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [74] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 349 (size: 1) startNode = connectionMatrix[27,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [75] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 350 (size: 1) endNode = connectionMatrix[27,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [76] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 359 (size: 1) startNode = connectionMatrix[28,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [77] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 360 (size: 1) endNode = connectionMatrix[28,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [78] 14:33:35 符号 警告 [HeatingSystemWithBranches: 206:5-206:39]: Equation 369 (size: 1) startNode = connectionMatrix[29,1] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: startNode Equations used to solve those variables: Equation 89 (size: 1): startNode = connectionMatrix[1,1] [79] 14:33:35 符号 警告 [HeatingSystemWithBranches: 207:5-207:37]: Equation 370 (size: 1) endNode = connectionMatrix[29,2] is not big enough to solve for enough variables. Remaining unsolved variables are: Already solved: endNode Equations used to solve those variables: Equation 90 (size: 1): endNode = connectionMatrix[1,2] [80] 14:33:35 符号 警告 [HeatingSystemWithBranches: 122:3-122:20]: Variable returnIdx does not have any remaining equation to be solved in. The original equations were: [81] 14:33:35 符号 警告 [HeatingSystemWithBranches: 93:3-93:56]: Variable monitor does not have any remaining equation to be solved in. The original equations were: [82] 14:33:35 脚本 错误 Translation of HeatingSystemWithBranches failed.
09-16
// This function solves Ax=b, then stores x in b // The input b is required to be N*m, i.e., // m vectors to be solved. template <typename EIGENMAT> inline void solve(EIGENMAT &b) const { int iM; for (int j = 0; j <= N - 1; j++) { iM = std::min(j + lowerBw, N - 1); for (int i = j + 1; i <= iM; i++) { if (operator()(i, j) != 0.0) { b.row(i) -= operator()(i, j) * b.row(j); } } } for (int j = N - 1; j >= 0; j--) { b.row(j) /= operator()(j, j); iM = std::max(0, j - upperBw); for (int i = iM; i <= j - 1; i++) { if (operator()(i, j) != 0.0) { b.row(i) -= operator()(i, j) * b.row(j); } } } return; } // This function solves ATx=b, then stores x in b // The input b is required to be N*m, i.e., // m vectors to be solved. template <typename EIGENMAT> inline void solveAdj(EIGENMAT &b) const { int iM; for (int j = 0; j <= N - 1; j++) { b.row(j) /= operator()(j, j); iM = std::min(j + upperBw, N - 1); for (int i = j + 1; i <= iM; i++) { if (operator()(j, i) != 0.0) { b.row(i) -= operator()(j, i) * b.row(j); } } } for (int j = N - 1; j >= 0; j--) { iM = std::max(0, j - lowerBw); for (int i = iM; i <= j - 1; i++) { if (operator()(j, i) != 0.0) { b.row(i) -= operator()(j, i) * b.row(j); } } } return; } }; // MINCO for s=3 and non-uniform time template <int Dim> class MINCO_S3NU { public: MINCO_S3NU() = default; ~MINCO_S3NU() { A.destroy(); } private: int N; Eigen::Matrix<double, Dim, 3> headPVA; Eigen::Matrix<double, Dim, 3> tailPVA; BandedSystem A; Eigen::MatrixXd b; Eigen::VectorXd T1; Eigen::VectorXd T2; Eigen::VectorXd T3; Eigen::VectorXd T4; Eigen::VectorXd T5; Eigen::DiagonalMatrix<double, Dim> energyWeights; public: inline void setConditions(const Eigen::Matrix<double, Dim, 3> &headState, const Eigen::Matrix<double, Dim, 3> &tailState, const int &pieceNum) { N = pieceNum; headPVA = headState; tailPVA = tailState; A.create(6 * N, 6, 6); b.resize(6 * N, Dim); T1.resize(N); T2.resize(N); T3.resize(N); T4.resize(N); T5.resize(N); energyWeights.setIdentity(); return; } 注释上述代码
09-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值