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

Update for julia new lts #21

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions 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 <[email protected]> and contributors"]
version = "0.1.8"
version = "0.1.9"

[deps]
CompositionalNetworks = "4b67e4b5-442d-4ef5-b760-3f5df3a57537"
Expand All @@ -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"
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
Loading