Neville Ausgetauscht + PDF

This commit is contained in:
Moritz Utcke
2025-01-13 11:09:20 +07:00
parent d084ed506d
commit 01b701c392
13 changed files with 500 additions and 307 deletions

View File

@@ -1,6 +1,6 @@
// Funktion zur Berechnung des monatlichen Belastungsgrades aus Tabelle 9 EFH und Tabelle 11 MFH
import { nevillePolynomialInterpolation } from "js-interpolate";
import { cubicSplineInterpolation } from "js-interpolate";
let wohneinheiten = 3;
@@ -155,23 +155,23 @@ export function funktionMonatlicherBelastungsgrad(heizlast: number, zeitkonstane
for (const key in data) {
const values = data[key as unknown as keyof typeof data]
const interpolate = nevillePolynomialInterpolation(
const interpolated = cubicSplineInterpolation(
values.map((value, i) => ({ x: HeizLast[i], y: value })),
values.length
heizlast
)
interpolations.push(interpolate(heizlast))
interpolations.push(interpolated)
}
const interpolate = nevillePolynomialInterpolation(
const interpolated = cubicSplineInterpolation(
interpolations.map((interpolation, i) => {
return {
x: Object.keys(data)[i],
y: interpolation
}
}),
interpolations.length
zeitkonstane
)
return interpolate(zeitkonstane)
return interpolated
}