How can I link Aspen plus and matlab

Dear,
Is there any one can help me on the code that already shared about Aspen plus - MATLAB link? Since I can get access to Aspen plus V10, so I tried to link MATLAB with Aspen plus V8.8.
But when i run the code---a slightly change compared to the original code (Version and file name). Instead of running 'Reactive_Distillation.bkp', I run the file 'ETHANOLColumn_v8.8.bkp' shared for the optimisation in Aspen and MATLAB.
%% Example of Application
Reflux_Ratio = [1, 3, 5, 7];
for i = 1:length(Reflux_Ratio)
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value; % Column Reflux
It shows the error on the sentence 'Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value; % Column Reflux'.
>> AspenPlus_Matlab_Link
Dot indexing is not supported for variables of this type.
Error in AspenPlus_Matlab_Link (line 17)
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value; % Column Reflux
Can anyone help me on this ? I can invoke the aspen file but when trying to do sensitivity analysis, the error shows on the input sentence.
Thank you so much!

Réponses (1)

Mario Malic
Mario Malic le 3 Sep 2020

0 votes

Bolded text might be the error. See the documentation on FindNode function.
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value

7 commentaires

wanrong wang
wanrong wang le 3 Sep 2020
Thank you so much. Mario.
After I check the code and the link you send, then I changed to (the bolded text)
'Reflux_Ratio = [1, 3, 5, 7];
for i = 1:length(Reflux_Ratio)
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value = Reflux_Ratio(i); % Column Reflux'
But it showed another error :
Unrecognized property 'FindNode' for class 'Interface.8E567522_F9BA_11CF_90B2_0000C0A810C4'.
Error in AspenPlus_Matlab_Link (line 17)
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value = Reflux_Ratio(i); % Column Reflux
I'm wondering if you know the reason why this error shows. I'm using MATLABR2019a.
Thanks!!!!
Mario Malic
Mario Malic le 3 Sep 2020
Modifié(e) : Mario Malic le 3 Sep 2020
I don't use this program, so I can't be of help.
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR").Value;
This code is alright, MATLAB found something, but this BASIS_RR is probably not a structure, but maybe is just a variable.
Aspen.Tree.FindNode("\Data\Blocks\T-101\Input\BASIS_RR"); % try with this
wanrong wang
wanrong wang le 4 Sep 2020
Thank you!! Mario. I will try this.
Vincent Kroeze
Vincent Kroeze le 15 Sep 2020
Modifié(e) : Vincent Kroeze le 15 Sep 2020
Hi,
It may sound weird, but i get the same error if I save my .bkp file on the wrong screen (page) (so properties instead of simulation). Which could make sense, as the FindNode routine indeed does not exist under properties.
Maybe it helps.
wanrong wang
wanrong wang le 19 Avr 2021
Thank you so much. Vincent. So sorry for the late reply. I've solved the problem now.
Yue Ming
Yue Ming le 25 Mai 2021
Hi,I have the same problem with "Unrecognized property 'FindNode' for class 'Interface.8E567522_F9BA_11CF_90B2_0000C0A810C4' as mentioned above.Can you tell me how it was solved?
文玥
文玥 le 4 Sep 2023
Hi
I'm sorry to trouble you.I have the same problem with " "Unrecognized property 'FindNode' for class 'Interface.8E567522_F9BA_11CF_90B2_0000C0A810C4'as mentioned above.Is your problem solved?Can you tell me how it was solved?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange

Commenté :

le 4 Sep 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by