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.
This commit is contained in:
2023-07-07 10:05:31 -05:00
parent 029a47a64b
commit f3a2d1d616

View File

@@ -171,7 +171,7 @@ function parse(json)::Instance
), ),
) )
end end
length(sizes) > 1 || push!(sizes, sizes[1]) length(sizes) > 1 || push!(sizes, deepcopy(sizes[1]))
sort!(sizes, by = x -> x.capacity) sort!(sizes, by = x -> x.capacity)
# Initial capacity # Initial capacity