Skip to content

Commit 2242f20

Browse files
committed
was printing the wrong variables, now fixed and added asserts
1 parent b35fe8a commit 2242f20

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/save_and_load_optimization_state_to_disc.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ close(fh)
3838
# Print the same candidates:
3939
best100b = best_candidate(res100b)
4040
acand100b = optctrlb.optimizer.population[idx]
41-
println("Best candidate after load: ", best100)
42-
println("Candidate num $(idx) after load: ", acand100)
41+
println("Best candidate after load: ", best100b)
42+
println("Candidate num $(idx) after load: ", acand100b)
43+
44+
@assert best100b == best100
45+
@assert acand100b == acand100
4346

4447
# Clean up the temp file:
4548
rm(tempfilename)

0 commit comments

Comments
 (0)