Skip to content

Commit f649860

Browse files
authored
New release (#20)
* 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
1 parent 3102b17 commit f649860

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ConstraintLearning"
22
uuid = "4bd09668-9077-4be7-adc9-6307a490e6df"
33
authors = ["azzaare <jf@baffier.fr> and contributors"]
4-
version = "0.1.8"
4+
version = "0.1.9"
55

66
[deps]
77
CompositionalNetworks = "4b67e4b5-442d-4ef5-b760-3f5df3a57537"

src/icn/cbls.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,13 @@ function CompositionalNetworks.optimize!(
9191
@debug "pool" s.pool best_values(s.pool) best_values(s) s.pool.configurations
9292

9393
# Return best values
94-
best = BitVector(collect(best_values(s)))
95-
weights!(icn, best)
94+
95+
if has_solution(s)
96+
weights!(icn, BitVector(collect(best_values(s))))
97+
else
98+
CompositionalNetworks.generate_weights(icn)
99+
end
100+
best = weights(icn)
96101

97102
return best, Dictionary{BitVector, Int}([best], [1])
98103
end

0 commit comments

Comments
 (0)