-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method to convert to ROI::OP class #9
Comments
Right now an optimization model (object created by Something similar could be done with a |
This could also give an easy way to print a model. m <- MIPModel()
# ...
s <- capture.output(print(m$op))
s[1] <- "New Title"
s would return a printable version of the |
I would not like not add this to It would look something like this: m <- MIPModel()
# ...
s <- as_OP(m) # this is a ROI::OP object
print(s) |
I would certainly be happy with a MIPModel to OP converter. One key question: would you generate the OP object, cache it as part of |
Yes, |
I could live with either Outside the tidyverse packages, I think the more common punctuation for "as" methods is a period rather than an underscore, so maybe |
I added a first function Also sorry that it took so long. |
Thanks. I just tested it, and it works fine. No worries about the delay. Meanwhile, I have failed miserably trying to find a writer plugin for ROI/CPLEX. Apparently they have some (sparsely documented) methods for registering and then calling OP readers and writers, but there don't seem to be any coded yet. Perhaps they're expecting third parties to code them? So while I can see the full structure of the model (coefficients, bounds, ...), I cannot easily print or export the model. :-( Maybe someday ... |
By printing you mean exporting to LP format? |
I find writing the .mps file is not easy, in that, I mock this example for anyone who wanna transfer MIP modeling in .mps file format. e.g.
|
Create a method to translate an
ompr
model to aROI::OP
object as suggested in dirkschumacher/ompr#93The text was updated successfully, but these errors were encountered: