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

Debug features in callbacks #164

Closed
joehuchette opened this issue Apr 24, 2014 · 8 comments
Closed

Debug features in callbacks #164

joehuchette opened this issue Apr 24, 2014 · 8 comments
Assignees

Comments

@joehuchette
Copy link
Contributor

This is kind of a cool idea from @IainNZ JuMPeR that would (1) be easy to implement, and (2) more elegant than littering a callback with print statements IMO, especially with more complex logic/multiple cuts. The idea is just to print out all cuts that get added (or heurstic solutions, or branches...) in a nice little block. See https://github.com/IainNZ/JuMPeR.jl/blob/0bd4b43bb53ef5545b0f3e4df19378c64387483e/src/oracle_poly.jl#L139

@mlubin
Copy link
Member

mlubin commented Apr 25, 2014

Yes, we could pretty easily do this. Just need a nice syntax for it.

@joehuchette
Copy link
Contributor Author

Keyword argument? Either in the solve call or when setting lazy/user/heuristic callback

@joehuchette
Copy link
Contributor Author

(Probably solve, verbose_callback=true)

@joehuchette joehuchette added this to the 0.6 milestone Apr 29, 2014
@joehuchette joehuchette self-assigned this Apr 29, 2014
@mlubin mlubin mentioned this issue Jul 28, 2014
4 tasks
@mlubin
Copy link
Member

mlubin commented Jul 30, 2014

What about a keyword argument when adding the constraint itself instead of adding any extra state:

@addLazyConstraint(m, x+y <= 2, print_constraint=true)

This is simpler but not quite as pretty.

@joehuchette
Copy link
Contributor Author

It is simpler, but at that point I'm not sure it's worth the effort rather than just doing a println(x+y<=2), especially since callback constraints are often build up in pieces. I'm thinking we mark this for a later release and take some time to think about how to do this in a really cool way.

@joehuchette joehuchette removed this from the 0.6 milestone Jul 30, 2014
@chriscoey
Copy link
Contributor

@joehuchette any new thoughts on this? and see JuliaOpt/MathProgBase.jl#170

@joehuchette
Copy link
Contributor Author

Not really, I think something like addlazycallback(m, func, verbose=true) is reasonable and would be a nice addition.

@mlubin
Copy link
Member

mlubin commented Feb 5, 2018

Resolved vacuously. Callbacks don't happen here anymore, but this is still a useful idea for the solver-specific callbacks.

@mlubin mlubin closed this as completed Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants