dostaji4 / EnergyPlus-co-simulation-toolbox

Simulate runtime binded EnergyPlus models from Matlab/Simulink.
Other
18 stars 13 forks source link

Errors during installing the toolbox #9

Open Zakio12 opened 1 year ago

Zakio12 commented 1 year ago

Dear Dostal, I am trying to use the EnergyPlus Co-simulation Toolbox and when I run the setupMlep.m and choose the energyplus path I get the following error. I would appreciate your help. Thanks you. PS: I use E+ V9.0 and Matlab R2015a


setupMlep Error: File: mlepSO.m Line: 568 Column: 19 The input character is not valid in MATLAB statements or expressions. Error in setupMlep (line 60) versionEnergyPlus = mlep.getEPversion(iddPath);


Zakio12 commented 8 months ago

I have used another version of Matlab and the toolbox is running fine if I choose output variables with short names. However, when I choose a variable with a long name, the error below appears.

Error using table (line 335)
'EP_ZN__Refrigeration_Air_Chiller_System_Total_Compressor_Electric_Energy'
is longer than the maximum allowed length for a
table variable name.
Error in mlepMatlab_example (line 41)
logTable = table('Size',[0, 1 + ep.nOut],...
Zakio12 commented 8 months ago

The mlepMatlab script utilizes the following code to define the variable name using the format EP_ZoneName_VariableNameUsedByEnergyPlus. Instead of using [{'Time'}; ep.outputSigName] as shown in the code below, I've simply replaced it with [{'Time'}; {'VariableName1'};{'VariableName2'};...;{'VariableNameN'}] Original code :

logTable = table('Size',[0, 1 + ep.nOut],...
    'VariableTypes',repmat({'double'},1,1 + ep.nOut),...
    'VariableNames',[{'Time'}; ep.outputSigName]);

Modified code :

logTable = table('Size',[0, 1 + ep.nOut],...
    'VariableTypes',repmat({'double'},1,1 + ep.nOut),...
    'VariableNames',[{'Time'}; {'VariableName1'};{'VariableName2'};..;{'VariableNameN'}];