Example code for a "Gurobi worker"
AnsweredI am evaluating and building a prototype for an application where coming form one front end multiple different optimizations may have to be executed in parallel. My understand is that a setup where a "worker" pulls the data from the frontend and build the model would be the best solution (as explained here: https://demos.gurobi.com/cutstock/doc/architecture?scenario=0Ogs4XxB9l.ffIdPoVZp).
However, I am lacking a bit of imagination regarding what the code for such a workher would look like practically. Is there any example code somewhere or a more detailed explanation that I didn't find, yet?
Kind regards
Mike
-
The link you refer to is regarding the architecture we used to build the cut stock demo and is not part of the Gurobi product. Could you please rephrase your question and tell us what you are trying to accomplish with Gurobi?
0 -
If you want to launch multiple optimizations at once and disconnect, the next release will include a batch feature. Batch will make it easy to submit multiple optimizations, disconnect and reconnect later to get the solution.
0 -
Jennifer, thanks a lot for your swift reply.
I'll try to clarify: I understand that the demo architecture is not part of the product itself but as it seems to be best practice to set an application up this way I thought maybe you or another user has a more detailed explanation of how this could work ;)
Regarding 9.0: Will batches be executed in parallel or sequentially? I. e. if one optimization takes 1 hour and I start 2 at the same time, will I receive at result after 1 or 2 hours?
0 -
The batch jobs will run on a compute server and whether they are executed in parallel or sequentially depends on that compute server's load and job limit. With a job limit of at least 2 and no other load, the jobs will be executed in parallel, but they will then compete for the machine's resources. So the effect on the running time depends e.g. on the models and how powerful the machine is.
0
Please sign in to leave a comment.
Comments
4 comments