Skip to content

Commit

Permalink
New release (#20)
Browse files Browse the repository at this point in the history
* Cleaning and CI updates (#13)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat ci (#17)

* Cleaning and CI updates (#13) (#14)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat and CI

* Fixes for learning ICN with CBLS (#19)

* Compat, CI, and Parallelism: release (#18)

* Cleaning and CI updates (#13)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat ci (#17)

* Cleaning and CI updates (#13) (#14)

* Cleaning and CI updates

* Fix CI for Julia 1.8

* Compat and CI

* Fixes for learning ICN aith CBLS

* Update Project.toml
  • Loading branch information
Azzaare authored Aug 12, 2024
1 parent 3102b17 commit f649860
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ConstraintLearning"
uuid = "4bd09668-9077-4be7-adc9-6307a490e6df"
authors = ["azzaare <jf@baffier.fr> and contributors"]
version = "0.1.8"
version = "0.1.9"

[deps]
CompositionalNetworks = "4b67e4b5-442d-4ef5-b760-3f5df3a57537"
Expand Down
9 changes: 7 additions & 2 deletions src/icn/cbls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f649860

Please sign in to comment.