Neville Ausgetauscht + PDF
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user