Restart external solver from Matlab script

1 次查看(过去 30 天)
Hello, I am starting external solver from Matlab script using the following command. Sometimes the external solver fails to start and shows error message. I have written if-else statement for restarting external solver. Duration of normal run is about 30 minutes and failed one lasts for about 30 seconds so I thought that I can distinguish between those two and restart it using measuring time. Unfortunatelly, until on the screen is the error message and no one pushes OK button, it does not continue. So until I find there is the error message it can take much more than 30 seconds so entire run is failed then.
clc
close all
clear all
tic
! "C:\Program Files\external_solver.exe" -i file1.dat -o file1.out;
et = toc
if et < 300;
! "C:\Program Files\external_solver.exe" -i file1.dat -o file1.out
end
;
I would like to ask you for help how to deal with restarting the external solver without manual input (clicking on the error message) in case it failes and show the error message.
Best regards Michal
  1 个评论
M Teaxdriv
M Teaxdriv 2022-7-12
Hello,
I got an idea and I would like to ask you for help with it.
I would like to measure time from start of external solver and in case it lasts longer than 3600 sec to start it again.
Do you know how realize it?
BR
Michal

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by