Interface Gurobi Matlab Optimization
Hey there,
I'm using MATLAB as my programming environment and Gurobi as my problem solver. The general interface is working but I was wondering if there are any ways to make the communication process between Matlab and Gurobi faster?
For example: Gurobi is called from my Matlab script and solves a problem which takes basically no time (I check the parameter 'runtime' from the output of the Gurobi function. But if I check the needed combined time for the function call and the solving process (as shown in the picture), this time is much higher. Because I have to call the function several times, it becomes quite time consuming.
I'm using the matrix based structure in Matlab and pass these on to Gurobi, is there any conversion happening in Gurobi or is there a better way to pass the problem to Gurobi?
Anyone any ideas, how I could speed up this process? Thank you very much
Best wishes
Lukas
-
Can you post your log file?
0 -
Hey,
Do you mean this with logfile? (The first three lines are the code from Matlab and last two lines are the combined time for function call and solving time).
Thank you very much.
Lukas
0 -
Hi Lukas,
Is your Gurobi solver running locally on your machine? I just ran a few tests and cannot reproduce those timings.
Maybe you can also share how you are constructing the model?Thanks,
Matthias0 -
Hey Matthias,
I think the Gurobi solver is running locally on my machine see the picture. (config.gurobiPath{1} is the path where Gurobi is installed at my machine)
And this is how I construct my model:
Thanks for your help,
Lukas
0
Please sign in to leave a comment.
Comments
4 comments