Files
generalFunctions/src/constants/positions.js
Rene De Ren 089f4c5129 Add position constants, reactor/settler config schemas
- New src/constants/positions.js: POSITIONS enum (upstream/downstream/atEquipment/delta)
- New src/configs/reactor.json: Full schema for CSTR/PFR reactor parameters and ASM3 initial state
- New src/configs/settler.json: Schema for settler node
- Export POSITIONS, POSITION_VALUES, isValidPosition from index.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:43:24 +01:00

19 lines
486 B
JavaScript

/**
* Canonical position constants for parent-child relationships.
* Use these instead of hardcoded strings throughout the codebase.
*/
const POSITIONS = Object.freeze({
UPSTREAM: 'upstream',
DOWNSTREAM: 'downstream',
AT_EQUIPMENT: 'atEquipment',
DELTA: 'delta',
});
const POSITION_VALUES = Object.freeze(Object.values(POSITIONS));
function isValidPosition(pos) {
return POSITION_VALUES.includes(pos);
}
module.exports = { POSITIONS, POSITION_VALUES, isValidPosition };