Gurobi的Runtime属性是否包括接口的时间

Does Gurobi's Runtime attribute include time for the interface

我从一些 Matlab 程序中调用 Gurobi 来解决 modelresult = gurobi(model) 的优化问题。从 Gurobi 的网站上,我得到 result.runtime 我得到

Runtime for the most recent optimization (in seconds). Note that all times reported by the Gurobi Optimizer are wall-clock times.

runtime具体包括什么?特别是,我想知道它是否有所作为,即如果我从 .mps 文件读取模型并直接求解它,从 matlab 到 Gurobi 的通信是否有一些开销会影响运行时,即

model = gurobi_read(model.mps);
result = gurobi_read(model.mps);
time = result.runtime;

或者如果我在实际求解之前对模型进行操作,即

model = gurobi_read(model.mps);
model.A(model.sense=='>',:) = -model.A(model.sense=='>',:);
model.rhs(model.sense=='>',:) = -model.rhs(model.sense=='>',:);
model.sense(model.sense=='>') = '<';
result = gurobi(model);
time = result.runtime;

Runtime attribute reports the solve time only; it does not include any runtime from the APIs. Part of the reason for this is that all Gurobi interfaces are built on the C API,因此 MATLAB 接口从 C API 获取运行时值,它不知道任何 MATLAB 开销。