Skip to content
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

Semi continuous variable #424

Open
datadrivensupplychain opened this issue May 9, 2022 · 7 comments
Open

Semi continuous variable #424

datadrivensupplychain opened this issue May 9, 2022 · 7 comments

Comments

@datadrivensupplychain
Copy link

Can this be made an option for declaring variables? I know lpsolve and gurobi both support semi-continuous variables.

@dirkschumacher
Copy link
Owner

Yeah, seems like a good idea. Not sure if ROI supports it though.

@datadrivensupplychain
Copy link
Author

Thanks, I hope it's possible. I'm using Gurobi extensively with ompr now, and lack of semi continuous variables is one of the few gaps I see in capabilities (besides the limitations to MILP only)

Also is there any way to provide some financial support for the ompr project? I'm certainly gaining financially by using ompr in my consulting work, I'd like to help keep it going.

@sbmack
Copy link

sbmack commented Sep 5, 2022

Also is there any way to provide some financial support for the ompr project? I'm certainly gaining financially by using ompr in my consulting work, I'd like to help keep it going.

I did a compare and compare and contrast between a Gurobi v. ompr R formulation in an earlier post.

A few years ago I suggested to the Gurobi people who oversaw their R platform that they consider using ompr as their R interface and update it with additional functionality to make it more robust. (Given that ompr is a side-project for Dirk). My hope was that Gurobi would make its enhanced ompr version freely available and solver independent. Unfortunately, after a response of mild curiousity from Gurobi, nothing became of it.

@datadrivensupplychain
Copy link
Author

datadrivensupplychain commented Sep 5, 2022 via email

@dirkschumacher
Copy link
Owner

HiGHS also supports semi continuous/integer variable. We should really do that.

@datadrivensupplychain
Copy link
Author

datadrivensupplychain commented Sep 6, 2022

@dirkschumacher So with ompr.highs, do you no longer need ROI to solve using ompr? I saw on LinkedIn that you and Florian had authored an R package for HiGHS, but I assumed (and made a comment) that you needed to write ROI.plugin.highs to use HiGHS as a solver.

TBH one of the few big drawbacks I see with ompr is having to track down the ROI.plugin.solvername package for the solver you want. (Installing ROI.plugin.gurobi was a feat I don't want to repeat). If that's not necessary in the future, that will be a MAJOR win for ompr as an R-based alternative to Pyomo or PuLP.

@dirkschumacher
Copy link
Owner

It has always been possible to use other solvers apart from ROI. You just need to write your own glue code connecting the ompr model to an ompr solution. If you look at the HiGHS interface, it is actually not a lot of work: https://github.com/dirkschumacher/ompr.highs/blob/c0e0ce60753a41956e31de71c9e9da2ceaccee3f/R/highs.R#L26-L84

Substituting the call to highs by the call to the Gurobi R package would probably give you 95% of a Gurobi solver for ompr. A solver really is just a plain function mapping a model to a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants