Fix subclass function
This commit is contained in:
@@ -135,7 +135,7 @@ class Reactor {
|
|||||||
.position(position)
|
.position(position)
|
||||||
.value(eventData.value, eventData.timestamp, eventData.unit);
|
.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} ------------------ `);
|
this.logger.debug(`---------------------- updating ${measurementType} ------------------ `);
|
||||||
switch (measurementType) {
|
switch (measurementType) {
|
||||||
case "concentration":
|
|
||||||
// add concentation handling function
|
|
||||||
break;
|
|
||||||
case "temperature":
|
case "temperature":
|
||||||
this.temperature = value;
|
this.temperature = value;
|
||||||
break;
|
break;
|
||||||
@@ -316,14 +313,14 @@ class Reactor_PFR extends Reactor {
|
|||||||
return stateNew;
|
return stateNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMeasurement(variant, subType, value, position) {
|
_updateMeasurement(measurementType, value, position, context) {
|
||||||
switch(subType) {
|
switch(measurementType) {
|
||||||
case "oxygen":
|
case "oxygen":
|
||||||
grid_pos = Math.round(position * this.n_x);
|
grid_pos = Math.round(position * this.n_x);
|
||||||
this.state[grid_pos][S_O_INDEX] = value; // naive approach for reconciling measurements and simulation
|
this.state[grid_pos][S_O_INDEX] = value; // naive approach for reconciling measurements and simulation
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.updateMeasurement(variant, subType, value, position);
|
super._updateMeasurement(measurementType, value, position, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user