Rewrite reactor to source and register it properly to node object

This commit is contained in:
2025-07-21 12:44:07 +02:00
parent 73c2b654e1
commit b1719376cf
2 changed files with 16 additions and 12 deletions

View File

@@ -20,6 +20,7 @@ class Reactor {
* @param {object} config - Configuration object containing reactor parameters.
*/
constructor(config) {
this.config = config;
// EVOLV stuff
this.logger = new logger(undefined, undefined, config.general.name);
this.emitter = new EventEmitter();
@@ -122,7 +123,7 @@ class Reactor {
n += 1;
}
this.currentTime += n_iter * this.timeStep * day2ms / this.speedUpFactor;
this.emitter.emit("stateChanges", this.getEffluent);
this.emitter.emit("stateChange", this.getEffluent);
}
}
}