Problem about EnergyPlus Co-simulation Toolbox, java.net.S​ocketTimeo​utExceptio​n: Accept timed out

조회 수: 9 (최근 30일)
I'm a new user trying to use the energplus co-simulation toolbox, which is from below webstie
I use Matlab R2018b and energyplus 9.2.
However, when I try to run the example file, following problem occurs
Error using mlep/acceptSocket (line 1144)
Java exception occurred:
java.net.SocketTimeoutException: Accept timed out
at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
Error in mlep/start (line 289)
obj.acceptSocket;
Error in mlepMatlab_example (line 47)
ep.start
Do you have any tips or suggestions? Thanks in advance!
  댓글 수: 1
Jiri Dostal
Jiri Dostal 2020년 9월 11일
I have experienced these issues when the EnergyPlus has some fundamental problem and could not run properly. I'd suggest running EnergyPlus alone with some of its own examples first.
The toolbox runs an EP simulation in the background and tries to connect to its external interface (the socket). It this connection fails, then either EP is not working or there are some communication restrictions at place in your OS.
I sorry, I can't help you more at the moment.
Jiri

댓글을 달려면 로그인하십시오.

답변 (5개)

Urmila Rajpurohith
Urmila Rajpurohith 2020년 8월 26일

Jiri Dostal
Jiri Dostal 2020년 9월 11일
편집: Jiri Dostal 2020년 9월 11일
I have experienced these issues when the EnergyPlus had some fundamental problem and could not run properly. I'd suggest running EnergyPlus alone with some of its own examples first.
The toolbox runs an EP simulation in the background and tries to connect to its external interface (the socket). It this connection fails, then either EP is not working or there are some communication restrictions at place in your OS.
I sorry, I can't help you more at the moment.
Jiri

Dongxue Zhan
Dongxue Zhan 2020년 12월 3일
Hello, I faced the same problem, can you share how did you fix it finally?

Mariam Ahmed
Mariam Ahmed 2022년 1월 30일
편집: Mariam Ahmed 2022년 1월 30일
I have faced this issue with some of my E+ models. This is a summary of what I found/did:
1- My simple E+ models worked fine but the sophisticated ones had this issue you reported.
2- I used MATLAB/Simulink debugger to try to figure where the simulation fails and the error was indeed from E+ simulation as Mr. Jiri indicated.
3- The reason why the co-simulation fails is the communication between E+ and MATLAB/simulnk could not be established. see below:
"EP: **FATAL:Error in ExternalInterface: Check EnergyPlus *.err file"
4- The .err file of E+ simulation (generated after the co-simulation of MATLAB/simulink and E+ fails/terminates) was not very useful as it did not indicate what is casuing the communication error when connecting to socket. This what was in the .err file
""EP: Error when connecting to socket: WSAGetLastError"
5- I compared the socket.cfg file for the E+ models that worked fine with the E+ co-simulation toolbox AND those that had this issue you reported, And they were exactly the same.
6- I tried to fix all E+ errors and almost all of the warnings and still the E+ co-simuation fails
7- After over 2 days of inspecting my E+ model, removing some of my shading planes, under Class "Shading:Building:Detailed" solved the issue.
8- I still do not know why those planes cause the error. That is, E+ model run PERFECTLY fine if I replace the ExternalInterface Schedules with EMS Schedules and run the simulation using EP-Launch (without using Matlab/Simulink).
I am still trying to figure out the actual cause of the error, but for now, the simulation runs fine following Step 6 and the results are more or less reasonable And I have no new E+ errors or warnings

Jiri Dostal
Jiri Dostal 2022년 1월 31일
Dear all,
EP calculates pre-simulation steps to determine intial value for simulation. Simulink starts EP and waits for EP to communicate. EP starts communication when all pre-simulation tasks are ready. But on the other hand, when EP fails, then Simulink waits for the same timeout to return.
For EP files with long pre-simulation calculations increase the "acceptTimeout" parameter in the "mlep.m" class.
Jiri
  댓글 수: 1
Ouo Adeline Ouattara
Ouo Adeline Ouattara 2022년 2월 10일
Thank you for your suggestion dear Jiri.
Do you have some suggestion for the error messages below that I get when I try to run an cosimulation whith ExternalInterface:Variable or EnergyManagementSystem:Actuator
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;
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;

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by