Wikunia / ConstraintSolver.jl

ConstraintSolver in Julia: Blog posts ->
https://opensourc.es/blog/constraint-solver-1
MIT License
135 stars 13 forks source link

first version of linking variables #143

Closed Wikunia closed 4 years ago

Wikunia commented 4 years ago

Implements #142 Should get some more testing. Not super sure yet :smile:

codecov[bot] commented 4 years ago

Codecov Report

Merging #143 into master will decrease coverage by 0.05%. The diff coverage is 99.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
- Coverage   98.91%   98.86%   -0.06%     
==========================================
  Files          31       31              
  Lines        2405     2473      +68     
==========================================
+ Hits         2379     2445      +66     
- Misses         26       28       +2     
Flag Coverage Δ
#unittests 98.86% <99.13%> (-0.06%) :arrow_down:
Impacted Files Coverage Δ
src/constraints/table.jl 100.00% <ø> (ø)
src/hashes.jl 100.00% <ø> (ø)
src/type_inits.jl 100.00% <ø> (ø)
src/constraints/not_equal.jl 94.44% <83.33%> (-1.86%) :arrow_down:
src/ConstraintSolver.jl 99.13% <100.00%> (+<0.01%) :arrow_up:
src/MOI_wrapper/constraints.jl 100.00% <100.00%> (ø)
src/MOI_wrapper/variables.jl 99.45% <100.00%> (+0.02%) :arrow_up:
src/Variable.jl 97.80% <100.00%> (+0.10%) :arrow_up:
src/constraints/equal.jl 96.51% <100.00%> (+0.85%) :arrow_up:
src/types.jl 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0bad1a0...42084dd. Read the comment docs.

Wikunia commented 4 years ago

If a == b this is now using EqualSet. The code includes bugfixes for the TableConstraint and for EqualSet. Missing: EqualSet with more variables is currently not pruning.

Wikunia commented 4 years ago

Benchmark Report for ConstraintSolver

Job Properties

Results

A ratio greater than 1.0 denotes a possible regression (marked with :x:), while a ratio less than 1.0 denotes a possible improvement (marked with :white_check_mark:). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds).

ID time ratio memory ratio
["eternity", "6x5"] 1.11 (5%) :x: 1.08 (1%) :x:
["sudoku", "top95_81"] 1.00 (5%) 1.01 (1%) :x:

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

Julia versioninfo

Target

Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.6.8-arch1-1 #1 SMP PREEMPT Wed, 29 Apr 2020 16:22:56 +0000 x86_64 unknown
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2804 MHz    1329959 s     386535 s     389093 s    6105407 s      94409 s
       #2  2837 MHz    1360086 s     389345 s     368172 s    1235568 s      22083 s
       #3  2823 MHz    1601984 s     280378 s     370538 s    1189637 s      22307 s
       #4  2863 MHz    1572428 s     258974 s     387068 s    1197165 s      35582 s

  Memory: 15.393684387207031 GB (2496.91796875 MB free)
  Uptime: 176421.0 sec
  Load Avg:  1.4990234375  1.6552734375  1.61083984375
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)

Baseline

Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.6.8-arch1-1 #1 SMP PREEMPT Wed, 29 Apr 2020 16:22:56 +0000 x86_64 unknown
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2840 MHz    1333705 s     386535 s     389688 s    6124642 s      94528 s
       #2  2824 MHz    1363253 s     389345 s     368920 s    1255290 s      22114 s
       #3  2881 MHz    1621475 s     280378 s     370926 s    1193464 s      22350 s
       #4  2848 MHz    1574452 s     258974 s     387710 s    1218147 s      35607 s

  Memory: 15.393684387207031 GB (2726.046875 MB free)
  Uptime: 176658.0 sec
  Load Avg:  1.91796875  1.96142578125  1.75
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Wikunia commented 4 years ago

Missing:

Wikunia commented 4 years ago

I think it will be easier to check why it's sometimes slower and sometimes faster when having more PRs with smaller things:

Each should be benchmarked independently. For that add another eternity benchmark i.e 5x5 getting all solutions

Wikunia commented 4 years ago

Replaced by #160