Skip to content

Commit f3a2d1d

Browse files
committed
Fix bug in _compress when plants have fixed size
Capacity was being incorrectly multiplied by T twice. This happened because there were two references to the same struct in the plant sizes array. This fix replaces the second reference by an actual copy of the struct.
1 parent 029a47a commit f3a2d1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/instance/parse.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function parse(json)::Instance
171171
),
172172
)
173173
end
174-
length(sizes) > 1 || push!(sizes, sizes[1])
174+
length(sizes) > 1 || push!(sizes, deepcopy(sizes[1]))
175175
sort!(sizes, by = x -> x.capacity)
176176

177177
# Initial capacity

0 commit comments

Comments
 (0)