Fix subclass function

This commit is contained in:
2025-09-15 17:39:54 +02:00
parent f6b026928e
commit 94ea4fe76b

View File

@@ -135,7 +135,7 @@ class Reactor {
.position(position)
.value(eventData.value, eventData.timestamp, eventData.unit);
this.updateMeasurement(measurementType, eventData.value, position, eventData);
this._updateMeasurement(measurementType, eventData.value, position, eventData);
});
}
@@ -155,12 +155,9 @@ class Reactor {
}
updateMeasurement(measurementType, value, position, context) {
_updateMeasurement(measurementType, value, position, context) {
this.logger.debug(`---------------------- updating ${measurementType} ------------------ `);
switch (measurementType) {
case "concentration":
// add concentation handling function
break;
case "temperature":
this.temperature = value;
break;
@@ -316,14 +313,14 @@ class Reactor_PFR extends Reactor {
return stateNew;
}
updateMeasurement(variant, subType, value, position) {
switch(subType) {
_updateMeasurement(measurementType, value, position, context) {
switch(measurementType) {
case "oxygen":
grid_pos = Math.round(position * this.n_x);
this.state[grid_pos][S_O_INDEX] = value; // naive approach for reconciling measurements and simulation
return;
}
super.updateMeasurement(variant, subType, value, position);
super._updateMeasurement(measurementType, value, position, context);
}
/**