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

Pipeable Interface #33

Open
jaredlander opened this issue Jan 7, 2020 · 4 comments
Open

Pipeable Interface #33

jaredlander opened this issue Jan 7, 2020 · 4 comments

Comments

@jaredlander
Copy link

Just briefly looked at the README and this looks really nice. One of the many things I like about {ompr} is that it was designed with a pipe in mind. This package uses the model$function() paradigm, and I get why, it's more in line with or-tools, gonum, etc. But that feels less natural in R, at least to me. Would love if it we could use pipes.

@dirkschumacher
Copy link
Member

@jaredlander thanks for the feedback. I just haven't figured out a good way to support pipes while still having a mutable solver object. Maybe I provide two ways of working with a solver, once with model$xxx and one with pipes.

@jaredlander
Copy link
Author

Admittedly, this is me asking for a whole new interface without offering any help, but the README said you wanted suggestions, so I threw it out there.

I do get the battle between mutable and pipeable. But mutable seems more pythonic and pipeable more Ronic (is that the term?).

I'll say I am excited for the possibility of a tool like {ompr} that can do quadratic programming or arbitrary convex optimization.

Have you ever thought about adding R Bindings to or-tools? It doesn't seem like the Google team will do it (google/or-tools#798), but it seems like the C++ functions could just be wrapped using {Rcpp}. Of course, I'm saying that without taking the burden of doing it, so I apologize for trivializing the effort.

@dirkschumacher
Copy link
Member

Thanks a lot for the feedback. That gives one more data point in favor of a pipe interface:)

Re. or-tools: yeah I have thought about it and has been on my list. I wish I had more time for optimization work :) I honestly think that R is a great language for that.

@jaredlander
Copy link
Author

R is an amazing language for optimization, I'll dare say it is the successor to MATLAB when it comes to handling matrices.

One thing that or-tools has that so far seems missing in R is interval objects.

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

No branches or pull requests

2 participants