From 5c0c084a1ff228a2015c8f0cd969b6d4fcc30b7d Mon Sep 17 00:00:00 2001 From: n0rbed Date: Wed, 14 Aug 2024 22:18:24 +0300 Subject: [PATCH] bug fix --- src/solver/solve_helpers.jl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/solver/solve_helpers.jl b/src/solver/solve_helpers.jl index 828eefe5d..1b897feca 100644 --- a/src/solver/solve_helpers.jl +++ b/src/solver/solve_helpers.jl @@ -176,16 +176,15 @@ function add_sol!(solutions, new_sols, var, index) end function add_sol_to_all(solutions, new_sols, var) - existing_solutions = copy(solutions) - solutions = [] + new_solutions = [] for new_sol in new_sols - copy_sol = copy(existing_solutions) - for i in eachindex(copy_sol) - copy_sol[i][var] = new_sol + sol_to_add = deepcopy(solutions) + for i in eachindex(sol_to_add) + sol_to_add[i][var] = new_sol end - append!(solutions, copy_sol) + append!(new_solutions, sol_to_add) end - return solutions + return new_solutions end function gen_separating_var(vars)