Hi James,
As per my understanding you would like to find the solve time of a MILP problem solved using ‘intlinprog’ in MATLAB, without relying on ‘tic’ and ‘toc’.
The ‘intlinprog’ function in MATLAB does not explicitly track the solve time. It does not provide an output field specifically dedicated to the solve time. Instead, ‘intlinprog’ relies on the underlying solver to handle the solve process and track the time internally.
You may use the ‘datetime’ function for the same if you are dealing with ‘parfor’ loop.
It returns an array that represents points in time. You can note the time at the begin of thread and note the time just prior to ending the thread and then use simple arithmetic operation to note the runtime of each thread.
I have attached a dummy code in the ‘solveTime.m’ file that uses the ‘datetime’ function to calculate the runtime of each thread created using a ‘parfor’ loop.
You may find detailed documentation for the ‘datetime’ function here: https://in.mathworks.com/help/matlab/ref/datetime.html
I hope this helps.
Thanks,
Ninad.