Update dependencies and correct node name
This commit is contained in:
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"name": "asm3",
|
||||
"name": "reactor",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "asm3",
|
||||
"name": "reactor",
|
||||
"version": "0.0.1",
|
||||
"license": "SEE LICENSE",
|
||||
"dependencies": {
|
||||
"generalFunctions": "git+https://gitea.centraal.wbd-rd.nl/p.vanderwilt/generalFunctions.git#fix-missing-references",
|
||||
"generalFunctions": "git+https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions.git",
|
||||
"mathjs": "^14.5.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.28.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.3.tgz",
|
||||
"integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==",
|
||||
"version": "7.28.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
|
||||
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -62,7 +62,7 @@
|
||||
},
|
||||
"node_modules/generalFunctions": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+https://gitea.centraal.wbd-rd.nl/p.vanderwilt/generalFunctions.git#302e12238745766a679ef11ca6ed5f4ea1548f87",
|
||||
"resolved": "git+https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions.git#efc97d6cd17399391b011298e47e8c1b1599592d",
|
||||
"license": "SEE LICENSE"
|
||||
},
|
||||
"node_modules/javascript-natural-sort": {
|
||||
@@ -72,9 +72,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mathjs": {
|
||||
"version": "14.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.7.0.tgz",
|
||||
"integrity": "sha512-RaMhb+9MSESjDZNox/FzzuFpIUI+oxGLyOy1t3BMoW53pGWnTzZtlucJ5cvbit0dIMYlCq00gNbW1giZX4/1Rg==",
|
||||
"version": "14.8.0",
|
||||
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.8.0.tgz",
|
||||
"integrity": "sha512-DN4wmAjNzFVJ9vHqpAJ3vX0UF306u/1DgGKh7iVPuAFH19JDRd9NAaQS764MsKbSwDB6uBSkQEmgVmKdgYaCoQ==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.26.10",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "asm3",
|
||||
"name": "reactor",
|
||||
"version": "0.0.1",
|
||||
"description": "Implementation of the asm3 model for Node-Red",
|
||||
"repository": {
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"generalFunctions": "git+https://gitea.centraal.wbd-rd.nl/p.vanderwilt/generalFunctions.git#fix-missing-references",
|
||||
"generalFunctions": "git+https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions.git",
|
||||
"mathjs": "^14.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
18
reactor.html
18
reactor.html
@@ -1,7 +1,7 @@
|
||||
<script src="/advancedReactor/menu.js"></script>
|
||||
<script src="/reactor/menu.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType("advancedReactor", {
|
||||
RED.nodes.registerType("reactor", {
|
||||
category: "WWTP",
|
||||
color: "#c4cce0",
|
||||
defaults: {
|
||||
@@ -41,13 +41,13 @@
|
||||
outputLabels: ["process", "dbase", "parent"],
|
||||
icon: "font-awesome/fa-recycle",
|
||||
label: function() {
|
||||
return this.name || "advancedReactor";
|
||||
return this.name || "Reactor";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
// wait for the menu scripts to load
|
||||
const waitForMenuData = () => {
|
||||
if (window.EVOLV?.nodes?.advancedReactor?.initEditor) {
|
||||
window.EVOLV.nodes.advancedReactor.initEditor(this);
|
||||
if (window.EVOLV?.nodes?.reactor?.initEditor) {
|
||||
window.EVOLV.nodes.reactor.initEditor(this);
|
||||
} else {
|
||||
setTimeout(waitForMenuData, 50);
|
||||
}
|
||||
@@ -115,8 +115,8 @@
|
||||
},
|
||||
oneditsave: function() {
|
||||
// save logger fields
|
||||
if (window.EVOLV?.nodes?.['advancedReactor']?.loggerMenu?.saveEditor) {
|
||||
window.EVOLV.nodes['advancedReactor'].loggerMenu.saveEditor(this);
|
||||
if (window.EVOLV?.nodes?.reactor?.loggerMenu?.saveEditor) {
|
||||
window.EVOLV.nodes.reactor.loggerMenu.saveEditor(this);
|
||||
}
|
||||
|
||||
// save position field
|
||||
@@ -136,7 +136,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-template-name="advancedReactor">
|
||||
<script type="text/html" data-template-name="reactor">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
@@ -243,6 +243,6 @@
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="advancedReactor">
|
||||
<script type="text/html" data-help-name="reactor">
|
||||
<p>New reactor node</p>
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const nameOfNode = "advancedReactor"; // name of the node, should match file name and node type in Node-RED
|
||||
const nameOfNode = "reactor"; // name of the node, should match file name and node type in Node-RED
|
||||
const nodeClass = require('./src/nodeClass.js'); // node class
|
||||
const { MenuManager } = require('generalFunctions');
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class Reactor {
|
||||
this.kla = config.kla; // if NaN, use externaly provided OTR [d-1]
|
||||
|
||||
this.currentTime = Date.now(); // milliseconds since epoch [ms]
|
||||
this.timeStep = 1 / (24*60*60) * this.config.timeStep; // time step [d]
|
||||
this.timeStep = 1 / (24*60*60) * this.config.timeStep; // time step in seconds, converted to days.
|
||||
this.speedUpFactor = 60; // speed up factor for simulation, 60 means 1 minute per simulated second
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user