Merge origin/main into origin/dev-moritz

This commit is contained in:
Moritz Utcke
2025-01-12 14:25:35 +07:00
parent f16fb41db0
commit f8402a0136
54 changed files with 4907 additions and 130 deletions

View File

@@ -1,9 +1,10 @@
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH (Januar, Zeitkonstante 90)
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH und Tabelle 11 MFH
import { nevillePolynomialInterpolation } from "js-interpolate";
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH (Zeitkonstante 90,130)
const dataset = {
let wohneinheiten = 3;
const datasetEinfamilienHausMittlereBelastung = {
Januar: {
50: [ 0.557, 0.554, 0.55, 0.543, 0.536, 0.533, 0.531, 0.53, 0.53 ],
90: [ 0.562, 0.559, 0.555, 0.548, 0.541, 0.538, 0.536, 0.535, 0.535 ],
@@ -66,6 +67,79 @@ const dataset = {
},
}
const datasetMehrfamilienHausMittlereBelastung = {
Januar: {
50: [0.575, 0.574, 0.573, 0.570, 0.567, 0.566, 0.566, 0.565, 0.565],
90: [0.578, 0.577, 0.575, 0.573, 0.570, 0.569, 0.568, 0.568, 0.568],
130: [0.580, 0.579, 0.578, 0.575, 0.572, 0.571, 0.571, 0.570, 0.570],
},
Februar: {
50: [0.548, 0.547, 0.546, 0.543, 0.541, 0.539, 0.539, 0.538, 0.538],
90: [0.551, 0.549, 0.548, 0.546, 0.543, 0.542, 0.541, 0.541, 0.541],
130: [0.553, 0.552, 0.550, 0.548, 0.545, 0.544, 0.543, 0.543, 0.543],
},
März: {
50: [0.463, 0.462, 0.461, 0.459, 0.457, 0.456, 0.455, 0.455, 0.455],
90: [0.465, 0.464, 0.463, 0.461, 0.459, 0.458, 0.458, 0.457, 0.457],
130: [0.467, 0.466, 0.465, 0.463, 0.461, 0.460, 0.459, 0.459, 0.459],
},
April: {
50: [0.327, 0.326, 0.326, 0.324, 0.323, 0.322, 0.321, 0.321, 0.321],
90: [0.329, 0.328, 0.327, 0.326, 0.324, 0.323, 0.323, 0.323, 0.323],
130: [0.330, 0.329, 0.328, 0.327, 0.325, 0.325, 0.324, 0.324, 0.324],
},
Mai: {
50: [0.179, 0.178, 0.178, 0.177, 0.176, 0.176, 0.176, 0.176, 0.175],
90: [0.179, 0.179, 0.179, 0.178, 0.177, 0.177, 0.176, 0.176, 0.176],
130: [0.180, 0.180, 0.179, 0.179, 0.178, 0.177, 0.177, 0.177, 0.177],
},
Juni: {
50: [0.100, 0.100, 0.099, 0.099, 0.099, 0.098, 0.098, 0.098, 0.098],
90: [0.100, 0.100, 0.100, 0.099, 0.099, 0.099, 0.099, 0.099, 0.099],
130: [0.101, 0.101, 0.100, 0.100, 0.099, 0.099, 0.099, 0.099, 0.099],
},
Juli: {
50: [0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
90: [0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
130: [0.031, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030, 0.030],
},
August: {
50: [0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
90: [0.043, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
130: [0.043, 0.043, 0.043, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042],
},
September: {
50: [0.173, 0.172, 0.172, 0.171, 0.170, 0.170, 0.170, 0.170, 0.170],
90: [0.173, 0.173, 0.173, 0.172, 0.171, 0.171, 0.170, 0.170, 0.170],
130: [0.174, 0.174, 0.173, 0.173, 0.172, 0.171, 0.171, 0.171, 0.171],
},
Oktober: {
50: [0.318, 0.317, 0.317, 0.315, 0.314, 0.313, 0.313, 0.312, 0.312],
90: [0.319, 0.319, 0.318, 0.317, 0.315, 0.314, 0.314, 0.314, 0.314],
130: [0.321, 0.320, 0.319, 0.318, 0.316, 0.316, 0.315, 0.315, 0.315],
},
November: {
50: [0.481, 0.480, 0.479, 0.477, 0.475, 0.474, 0.473, 0.473, 0.473],
90: [0.484, 0.483, 0.482, 0.479, 0.477, 0.476, 0.476, 0.475, 0.475],
130: [0.486, 0.485, 0.484, 0.481, 0.479, 0.478, 0.477, 0.477, 0.477],
},
Dezember: {
50: [0.578, 0.577, 0.576, 0.573, 0.570, 0.569, 0.569, 0.568, 0.568],
90: [0.581, 0.580, 0.578, 0.576, 0.573, 0.572, 0.571, 0.571, 0.571],
130: [0.583, 0.582, 0.581, 0.578, 0.575, 0.574, 0.574, 0.573, 0.573],
},
};
function getDatasetBelastung(wohneinheiten: number) {
if (wohneinheiten < 3) {
return datasetEinfamilienHausMittlereBelastung;
} else {
return datasetMehrfamilienHausMittlereBelastung;
}
}
const dataset = getDatasetBelastung(wohneinheiten);
// Für "Ohne Teilbeheizung" habe ich hier einfach 0 eingesetzt:
const HeizLast = [0, 5, 10, 25, 50, 75, 100, 125, 150];
@@ -73,7 +147,7 @@ const HeizLast = [0, 5, 10, 25, 50, 75, 100, 125, 150];
// jede einzeln interpolieren und dann zwischen den Tabellen interpolieren.
// Falls wir also den Wert an Stelle Heizlast: 120, Zeitkonstante 100, Monat:
// Januar haben wollen:
function crossInterpolate(heizlast: number, zeitkonstane: number, monat: keyof typeof dataset) {
export function funktionMonatlicherBelastungsgrad(heizlast: number, zeitkonstane: number, monat: keyof typeof dataset) {
const data = dataset[monat]
const interpolations: number[] = []
@@ -100,6 +174,4 @@ function crossInterpolate(heizlast: number, zeitkonstane: number, monat: keyof t
)
return interpolate(zeitkonstane)
}
console.log(crossInterpolate(120, 100, "Januar"));
}