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

added optimal_coloring #12

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

dstahlke
Copy link
Contributor

@dstahlke dstahlke commented Aug 5, 2023

Use PicoSAT to find the optimal proper coloring of a graph.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Patch coverage: 93.93% and project coverage change: -1.30% ⚠️

Comparison is base (8a43175) 98.94% compared to head (72d4652) 97.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   98.94%   97.65%   -1.30%     
==========================================
  Files           5        6       +1     
  Lines          95      128      +33     
==========================================
+ Hits           94      125      +31     
- Misses          1        3       +2     
Files Changed Coverage Δ
src/GraphsOptim.jl 100.00% <ø> (ø)
src/coloring.jl 93.93% <93.93%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle
Copy link
Member

gdalle commented Aug 8, 2023

Hey! I have seen the PR and I'm grateful for the contribution, but I don't have time to review rn, hopefully in the coming weeks. Do you need this urgently?

@dstahlke
Copy link
Contributor Author

dstahlke commented Aug 8, 2023

No hurry. Take your time.

@gdalle
Copy link
Member

gdalle commented Sep 25, 2023

@dstahlke coming back to your PR now.

The immediate goal of this package is to leverage the JuMP ecosystem and remain solver-agnostic. Do you think you might be able to translate your implementation into a JuMP formalism instead of PicoSAT?

I think JuMP is starting to support constraint programming but I don't know how far they've come
https://jump.dev/blog/constraint-programming-update/

@dstahlke
Copy link
Contributor Author

It look like ConstraintProgrammingExtensions.jl is not compatible with GraphsOptim.jl. They have conflicting version requirements for MathOptInterface.

@gdalle
Copy link
Member

gdalle commented Oct 27, 2023

Then I suggest we formulate this as an integer program

@dstahlke
Copy link
Contributor Author

dstahlke commented Oct 27, 2023

My concern with this is that it seems unusably slow. For example queens_graph(6) takes 16.5 seconds with ILP, as compared to 0.00276 seconds with PicoSAT. I'd imagine queens_graph(7) or queens_graph(8) would be out of reach with ILP.

@gdalle
Copy link
Member

gdalle commented Oct 30, 2023

Good point. I will look into constraint programming in JuMP, it would be cool to have example of that too

https://discourse.julialang.org/t/status-of-constraint-programming-in-jump/105580

@gdalle gdalle marked this pull request as draft January 17, 2024 14:10
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

Successfully merging this pull request may close these issues.

3 participants