feat: run-model v3 — bygninger som kilder/mål (sourceBuildingIds/targetBuildingIds), XML v3

This commit is contained in:
2026-09-23 18:14:46 +02:00
parent 4137442b50
commit d80f45aef3
3 changed files with 85 additions and 3 deletions
+5
View File
@@ -39,6 +39,9 @@ function ADRunsStorage.writeRecords(xmlFile, records)
-- v2: udkørsel
xmlFile:setString(key .. "#kind", record.kind or "supply")
xmlFile:setString(key .. "#sources", record.sources or "")
-- v3: bygninger (flow-tavlen)
xmlFile:setString(key .. "#sourceBuildings", record.sourceBuildings or "")
xmlFile:setString(key .. "#targetBuildings", record.targetBuildings or "")
xmlFile:setString(key .. "#products", record.products or "")
xmlFile:setInt(key .. "#sellAt", record.sellAt or ADRuns.DEFAULT_SELL_AT_PERCENT)
xmlFile:setInt(key .. "#storeAbove", record.storeAbove or ADRuns.DEFAULT_STORE_ABOVE_PERCENT)
@@ -64,6 +67,8 @@ function ADRunsStorage.readRecords(xmlFile)
returnBelow = xmlFile:getInt(key .. "#returnBelow"),
kind = xmlFile:getString(key .. "#kind"),
sources = xmlFile:getString(key .. "#sources"),
sourceBuildings = xmlFile:getString(key .. "#sourceBuildings"),
targetBuildings = xmlFile:getString(key .. "#targetBuildings"),
products = xmlFile:getString(key .. "#products"),
sellAt = xmlFile:getInt(key .. "#sellAt"),
storeAbove = xmlFile:getInt(key .. "#storeAbove"),