Skip to content

wity-system

wity-graph → headless spatial/topological network computation and temporal simulation. Type-driven propagation, cascade, impact, pathfinding, scenario state, spatial projection, and frequency-based simulation runtime. Stored as <wity-knowledge>.

wity-system ​

Headless spatial/topological network computation library — propagation, reachability, and scenario analysis built on wity-graph primitives. Model water networks, telecom infrastructure, military planning, drone operations, or any domain that is a typed network with behavioral traits.

For AI coding agents: llms.txt · llms-full.txt · llms-api.txt

Quick start ​

js
import { GraphAbstract } from '@wity/graph-headless';
import { SystemGraph } from 'wity-system';

const sys = new SystemGraph({ GraphAbstract });

sys.registerAssetType('plant', {
    label: 'Water Treatment Plant',
    role: 'source',
    canFail: true,
    coordFields: ['lat', 'lon'],
});

sys.registerAssetType('house', {
    label: 'Household',
    role: 'sink',
    canFail: false,
});

sys.registerConnectionType('feeds', {
    label: 'Feed Pipe',
    directionality: 'directed',
    carriesFlow: true,
    defaultCost: 1,
    costField: 'length',
});

sys.addAsset('WTP', 'plant',  { lat: -19.25, lon: 146.80, pressure: 100 });
sys.addAsset('V1',  'valve',  { status: 'open' });
sys.addAsset('H1',  'house',  {});

sys.addConnection('WTP', 'V1', 'feeds', { length: 500 });
sys.addConnection('V1',  'H1', 'feeds', { length: 120 });

// Cascade auto-detects sources and flow edges from type traits
sys.cascade(['V1']);
// → { reachable: ['WTP'], cutOff: ['H1'], disabled: ['V1'] }

// Shortest path auto-reads costField from connection type
sys.shortestPath('WTP', 'H1');
// → { path: ['WTP', 'V1', 'H1'], cost: 620 }

Architecture ​

Level 1  @wity/graph-headless  — DAG, typed nodes/edges, traversal, serialization
    ↑
Level 2  system-core           — type registry with behavioral traits, assets,
         (wity-system)           connections, regions, playback, propagation/cascade,
                                  pathfinding, scenario state, optional spatial projection,
                                  aspects (further models of a system, in its one graph)
         system-formalisms      — the kinds of model a system can hold beside its
                                  structure (its aspects), each declared as data: process
         system-sim             — temporal simulation runtime: frequency-based features,
                                  influence propagation, event detection, history
    ↑
Level 3  (application widget)  — water networks, telecom infra, military planning,
                                  drone operations, digital twins, etc.

Stack-agnostic. Isomorphic. Zero DOM. Zero framework.