fix(silo): varer = læssestationens pulje (tom mælketank med fuld pulje viste ingen mælk -> noProducts); sammenlægning af kilder kun for siloer, ikke staldes mælke/gyllepunkter (v1.17.4.0)
This commit is contained in:
@@ -549,6 +549,8 @@ do
|
||||
local st1, st2 = sources[1].station, sources[2].station
|
||||
sources[1].station = {name = "tankA", sourceStorages = {[pool] = pool}}
|
||||
sources[2].station = {name = "tankB", sourceStorages = {[pool] = pool}}
|
||||
local k1, k2 = sources[1].kind, sources[2].kind
|
||||
sources[1].kind, sources[2].kind = "silo", "silo"
|
||||
local vPool = newVehicle("Tank", 0, 0, 10000)
|
||||
runs[vPool] = outboundRun(77, {1, 2}, {{fillType = "SUGAR", policy = "sell"}}, {collectRound = true})
|
||||
local inputPool = ADOutbound.buildPlanInput(adEnv, runs[vPool], vPool)
|
||||
@@ -559,6 +561,25 @@ do
|
||||
check("O-pool kun første kilde", table.concat(ids, ","), "1")
|
||||
check("O-pool logget", lastLog("deler lager") ~= nil, true)
|
||||
sources[1].station, sources[2].station = st1, st2
|
||||
sources[1].kind, sources[2].kind = k1, k2
|
||||
end
|
||||
|
||||
-- O-pool-stald: mælke- og gyllemarkør ved samme stald deler lager, men er forskellige læssepunkter
|
||||
do
|
||||
local pool = {}
|
||||
sources[31] = {kind = "husbandry", wayPointId = 31, station = {name = "barnSlurry", sourceStorages = {[pool] = pool}}, name = "Stald"}
|
||||
sources[32] = {kind = "husbandry", wayPointId = 32, station = {name = "barnMilk", sourceStorages = {[pool] = pool}}, name = "Stald"}
|
||||
products[31] = {{fillType = SUGAR_FT or 5, name = "SUGAR", title = "Sukker", available = 20000, level = 20000, capacity = 50000, isPallet = false}}
|
||||
products[32] = {{fillType = SUGAR_FT or 5, name = "SUGAR", title = "Sukker", available = 20000, level = 20000, capacity = 50000, isPallet = false}}
|
||||
local vBarn = newVehicle("Tank2", 0, 0, 10000)
|
||||
runs[vBarn] = outboundRun(78, {31, 32}, {{fillType = "SUGAR", policy = "sell"}}, {collectRound = true})
|
||||
local inputBarn = ADOutbound.buildPlanInput(adEnv, runs[vBarn], vBarn)
|
||||
local ids = {}
|
||||
for _, product in ipairs(inputBarn.products) do
|
||||
for _, source in ipairs(product.sources) do table.insert(ids, tostring(source.wayPointId)) end
|
||||
end
|
||||
check("O-pool-stald: stalde lægges ikke sammen", table.concat(ids, ","), "31,32")
|
||||
sources[31], sources[32], products[31], products[32] = nil, nil, nil, nil
|
||||
end
|
||||
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
|
||||
Reference in New Issue
Block a user