$.Time += dt
$.Counter += dt
if ($.Counter < 5) return
$.Counter = 0
var data = {
Gas: #Fuel.$.Gas,
Heat: #HeatStorage.$.Energy,
Battery: #Battery.$.Energy,
ConsumedPower: #ElectricConsumer.$.Consumed,
ConsumedHeat: #HeatConsumer.$.Consumed,
TWP: #ThermalPowerStation.$.Heat,
HS: #HeatingSystem.$.Heat,
}
data.Total = Properties.values(data).sum()
var factor = 0.01 // scale, so that it fits into vis
data.Gas *= factor
data.ConsumedPower *= factor
data.ConsumedHeat *= factor
data.Total *= factor
Properties.own(data).each(function(ea) {
data[ea] = data[ea].roundTo(0.000001)
})
data.Time = $.Time,
#SimulationResults.addData(data)