Funktion auf cubicSplineInterpolation

This commit is contained in:
Jens Cornelsen
2025-01-13 20:05:54 +01:00
parent 373f75359a
commit 89d31f606b
4 changed files with 15 additions and 13 deletions

View File

@@ -1,10 +1,10 @@
// Funktion zur Berechnung der Bilanzinnentemperatur aus Tabelle 8 EFH oder Tabelle 10 MFH
import { linearInterpolation, nevillePolynomialInterpolation } from "js-interpolate";
import { cubicSplineInterpolation } from "js-interpolate";
import { any } from "node_modules/cypress/types/bluebird/index.js";
// aus Eingabeformular
let wohneinheiten = 3;
let wohneinheiten = 2;
const datasetEinfamilienHaus = {
Januar: {
@@ -157,7 +157,7 @@ export function funktionBilanzInnentemperatur(heizlast: number, zeitkonstane: nu
for (const key in data) {
const values = data[key as unknown as keyof typeof data]
const interpolated = linearInterpolation(
const interpolated = cubicSplineInterpolation(
values.map((value, i) => ({ x: HeizLast[i], y: value })),
heizlast
)
@@ -165,7 +165,7 @@ export function funktionBilanzInnentemperatur(heizlast: number, zeitkonstane: nu
interpolations.push(interpolated)
}
const interpolated = linearInterpolation(
const interpolated = cubicSplineInterpolation(
interpolations.map((interpolation, i) => {
return {
x: Object.keys(data)[i],