Convergence path error,Variables of this type do not support indexing with points.
2 ビュー (過去 30 日間)
古いコメントを表示
I have a new problem, I obtain aspen convergence in the connection operation between aspen and matlab, my code is:
Conv = aspen.Tree.FindNode("\Data\Results Summary\Run-Status\Output\PER_ERROR");
I also found the corresponding path in aspen, but the code is wrong, At the same time, I have checked that CSDN does not support indexing with points for variables of this type, but when I change the code to:
Conv = Aspen.Tree.FindNode("\Data\Results Summary\Run-Status\Output\PER_ERROR");
ConvValue = Conv.Value;
I still get an error
1 件のコメント
回答 (1 件)
Shishir Reddy
2025 年 1 月 8 日
Hey
When working with the integration between Aspen and MATLAB, it's important to ensure that the objects and methods used are correctly referenced. The try-catch blocks can be used to get more detailed information about what might be going wrong.
try
Conv = Aspen.Tree.FindNode("\Data\Results Summary\Run-Status\Output\PER_ERROR");
ConvValue = Conv.Value;
disp(['Convergence Value: ', num2str(ConvValue)]);
catch ME
disp(['Error: ', ME.message]);
end
If FindNode is returning an empty result, it could indeed indicate that the node path you are trying to access does not exist or that the Aspen run was aborted early.
So, before accessing the node, verify that the Aspen simulation has completed successfully.
runStatusNode = Aspen.Tree.FindNode("\Data\Results Summary\Run-Status\Output\RUN_STATUS");
if ~isempty(runStatusNode)
runStatus = runStatusNode.Value;
disp(['Run Status: ', runStatus]);
else
disp('Run status node not found.');
end
By following these steps, you should be able to determine whether the issue is due to an aborted run or an incorrect node path.
I hope this helps.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!