Skip to content

Commit

Permalink
was printing the wrong variables, now fixed and added asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfeldt committed Jun 7, 2021
1 parent b35fe8a commit 2242f20
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/save_and_load_optimization_state_to_disc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ close(fh)
# Print the same candidates:
best100b = best_candidate(res100b)
acand100b = optctrlb.optimizer.population[idx]
println("Best candidate after load: ", best100)
println("Candidate num $(idx) after load: ", acand100)
println("Best candidate after load: ", best100b)
println("Candidate num $(idx) after load: ", acand100b)

@assert best100b == best100
@assert acand100b == acand100

# Clean up the temp file:
rm(tempfilename)
Expand Down

0 comments on commit 2242f20

Please sign in to comment.