Restart external solver from Matlab script

1 visualización (últimos 30 días)
M Teaxdriv
M Teaxdriv el 11 de Jul. de 2022
Editada: M Teaxdriv el 12 de Jul. de 2022
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 comentario
M Teaxdriv
M Teaxdriv el 12 de Jul. de 2022
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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by