Funktion auf cubicSplineInterpolation
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user