Clear Filters
Clear Filters

Energyplus co-simulation toolbox - ExternalIn​terface:Ac​tuator

10 views (last 30 days)
I am a user of "Energyplus Co-simulation Toolbox" downloaded from "https://github.com/dostaji4/EnergyPlus-co-simulation-toolbox".
I used "ExternalInterface:Schedule" in the "ExternalInterface" options to get the desired result.
But when I use "ExternalInterface:Actuator" among the "ExternalInterface" options, the following error occurs.
Java exception occurred:
java.net.SocketTimeoutException: Accept timed out
at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
I know that the ExternalInterface:Actuator option only allows limited variables.
I ran the simulation while recognizing the content of it, but I keep failing.
My code is follow.
clc
clear all
ep = mlep;
workDir = 'C:\Users\USER0001\Desktop\#BESRG\2020\논문\EMSTEST\ANN_all_In_One\test';
ep.idfFile = 'EMSWindowShadeControl';
ep.epwFile = 'KOR_Inchon.471120_IWEC';
BG_Simul_DayDay=24; % hour
ep.initialize;
inputs = ep.inputTable;
outputs = ep.outputTable;
timestep = ep.timestep; %
endTime = 4*24*60*60; %[s]
outputSigName(1,1)={'iradiance'};
outputSigName(2,1)={'Angle'};
logTable = table('Size',[0, 1 + ep.nOut],...
'VariableTypes',repmat({'double'},1,1 + ep.nOut),...
'VariableNames',[{'Time'}; outputSigName]);
t = 0;
iLog = 1;
while t < endTime
u = 1; % Control Status
y = ep.step(u);
t = ep.time; %[s]
logTable(iLog, :) = num2cell([t y']);
iLog = iLog + 1;
end
ep.stop;
or, can i get a very simple example code using ExternalInterface:Actuator?
  4 Comments
Jiri Dostal
Jiri Dostal on 6 Oct 2020
Yes, contact me, if you need anything. I'll try my best ;). Jiri
Ouo Adeline Ouattara
Ouo Adeline Ouattara on 10 Feb 2022
Hello,
I'm also a user of MLEP toolbox.
I used "ExternalInterface:Schedule" in the "ExternalInterface" options to get the desired result.
But when I try to use "ExternalInterface:Actuator" or "ExternalInterface:Variable", the bellow errors accurs
''Error using mlep/loadIdf (line 772)
Subscripting into a table using one subscript (as in
t(i)) or three or more subscripts (as in t(i,j,k)) is
not supported. Always specify a row subscript and a
variable subscript, as in t(rows,vars).
Error in mlep/initialize (line 196)
obj.loadIdf; ''
'' Error using mlep/loadIdf (line 782)
Subscripting into a table using one subscript (as in
t(i)) or three or more subscripts (as in t(i,j,k)) is
not supported. Always specify a row subscript and a
variable subscript, as in t(rows,vars).
Error in mlep/initialize (line 196)
obj.loadIdf; ''
@Byung - Gi Jeon I saw that you used one of these options of External Interface whith succes; any ideas to fix these errors? Or can you please share with me one of your simply code and idf file?
@Jiri Dostal Can you please help me to fix it?
Thank in advance for your reply

Sign in to comment.

Answers (0)

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!