mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
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:
@@ -171,7 +171,7 @@ function parse(json)::Instance
|
||||
),
|
||||
)
|
||||
end
|
||||
length(sizes) > 1 || push!(sizes, sizes[1])
|
||||
length(sizes) > 1 || push!(sizes, deepcopy(sizes[1]))
|
||||
sort!(sizes, by = x -> x.capacity)
|
||||
|
||||
# Initial capacity
|
||||
|
||||
Reference in New Issue
Block a user