Model Formulation: Gurobi v. OMPR #421
Replies: 5 comments 5 replies
-
Agreed, I recently purchased gurobi for a very large MILP project I'm working. Installing ROI.plugin.gurobi was a bit of a hassle, but the ability to model algebraically in R then pass to ompr is so much easier. |
Beta Was this translation helpful? Give feedback.
-
I just tried using a |
Beta Was this translation helpful? Give feedback.
-
I’ve formulated a MILPModel using the CRAN version of ompr. (Very large optimization models, so using MILPModel is so much faster than MIPModel, at least with the CRAN version). I cannot extract the exact arguments from my MILPModel object, to then pass directly to the gurobi package.
Right now I’m on the critical path with my project, but I’ll dig into using the dev version of MIPModel once the project closes in a few weeks.
From: SteveM ***@***.***>
Sent: Monday, May 02, 2022 12:25 PM
To: dirkschumacher/ompr ***@***.***>
Cc: datadrivensupplychain ***@***.***>; Comment ***@***.***>
Subject: Re: [dirkschumacher/ompr] Model Formulation: Gurobi v. OMPR (Discussion #421)
Whatever works. But I'm curious, is the fail in model formulation using MILPModel or in solver execution with a gurobi call from MILPModel?
As I noted above, generating constraints using matrix/array data structures can be confusing with MILPModel. While the updated, (development) version of MIPModel retains the simpler syntax of the original. So supersedes MILPModel.
That said, if your failure mode is in formulation suggest refactoring with the development version of MIPModel and trying that. Good Luck...
—
Reply to this email directly, view it on GitHub <#421 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ASKSE64WN6YMUI4C3TSXQH3VIAFXZANCNFSM5TBAN4HQ> .
You are receiving this because you commented. <https://github.com/notifications/beacon/ASKSE66Y2EDH5DZ5DVWDPGTVIAFXZA5CNFSM5TBAN4H2YY3PNVWWK3TUL52HS4DFWFCGS43DOVZXG2LPNZBW63LNMVXHJKTDN5WW2ZLOORPWSZGOAAUNE5A.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
@sbmack Do you know if it's possible to use a Gurobi solution and restart the optimization from a current solution? Sometimes I'll run a model for X hours just to see what will result; but then later want to use the solution as a starting point to further run the optimization. |
Beta Was this translation helpful? Give feedback.
-
I am working with
|
Beta Was this translation helpful? Give feedback.
-
Gurobi has some sample models formulated in R available on its web page. I reformulated this Gurobi model
facility.R using OMPR in order to do a simple compare and contrast between the two modeling platforms . Below is a portion of the Gurobi model followed by the OMPR equivalent using the same data.
A visual comparison of both formulations shows how much simpler the OMPR version is and also how much it resembles legacy algebraic model management systems. OMPR is not yet fully featured, but its potential as a model management platform given its efficient and intuitive design paradigm seems to be significant. Note that Gurobi could probably consider using an augmented OMPR version as its formulation engine in R.
This is the OMPR equivalent:
Beta Was this translation helpful? Give feedback.
All reactions