diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f84efbe..108967f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,9 +50,9 @@ jobs: fail-fast: false matrix: version: - - "1.8" + - "lts" # automatically expands to the latest LTS release of Julia - "1" # automatically expands to the latest stable 1.x release of Julia - - "pre" + - "pre" # automatically expands to the latest pre-release of Julia os: - ubuntu-latest arch: diff --git a/Project.toml b/Project.toml index 6c8a8b9..f50bda7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ConstraintLearning" uuid = "4bd09668-9077-4be7-adc9-6307a490e6df" authors = ["azzaare and contributors"] -version = "0.1.8" +version = "0.1.9" [deps] CompositionalNetworks = "4b67e4b5-442d-4ef5-b760-3f5df3a57537" @@ -25,15 +25,15 @@ Constraints = "0.5" DataFrames = "1" Dictionaries = "0.4" Evolutionary = "0.11" -Flux = "0.13, 0.14" +Flux = "0.14" LocalSearchSolvers = "0.4" Memoization = "0.2" PrettyTables = "2" QUBOConstraints = "0.2" -TestItemRunner = "0.2, 1" -TestItems = "0.1, 1" +TestItemRunner = "1" +TestItems = "1" ThreadPools = "2" -julia = "1.8" +julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" diff --git a/src/icn/cbls.jl b/src/icn/cbls.jl index abb07e5..1fe08ec 100644 --- a/src/icn/cbls.jl +++ b/src/icn/cbls.jl @@ -91,8 +91,13 @@ function CompositionalNetworks.optimize!( @debug "pool" s.pool best_values(s.pool) best_values(s) s.pool.configurations # Return best values - best = BitVector(collect(best_values(s))) - weights!(icn, best) + + if has_solution(s) + weights!(icn, BitVector(collect(best_values(s)))) + else + CompositionalNetworks.generate_weights(icn) + end + best = weights(icn) return best, Dictionary{BitVector, Int}([best], [1]) end