An explainable accessibility route-planning engine and WebAssembly demo.
npm run generate:data
npm run check
npm test
npm run demonpm run buildnpm run weblet graph = demo_campus_graph()
let encoded = graph_to_json(graph)
let restored = graph_from_json(encoded)
let state = new_graph_state(restored).unwrap()
let closed = set_edge_construction(
state,
4,
true,
"scheduled maintenance",
).unwrap()
println(graph_state_to_json(closed))| Path | Purpose |
|---|---|
| routeable.mbt | Public MoonBit domain model, constraints, planner and explanation API |
| graph_io.mbt | JSON exchange and detailed structural validation |
| graph_state.mbt | Versioned edge updates and auditable change history |
| metadata.mbt | Algorithm identity, complexity and limitations |
| campus_network.mbt | Generated, deterministic demonstration graph |
| cmd/main | Runnable CLI demonstration |
| web/bridge | Standalone Wasm exports over the MoonBit planner |
| web/ | Dependency-free browser UI that calls the Wasm bridge |
| tools/generate_demo_network.mjs | Reproducibly generates the checked-in sample map |
| .github/workflows/ci.yml | Checks, tests and Wasm build |
pub(all) struct ProfileComparison {
profile : MobilityProfile
reachable : Bool
distance_meters : Int
friction_score : Double
grade : String
message : String
} derive(Debug)pub(all) struct Route {
profile : MobilityProfile
node_ids : Array[Int]
segments : Array[RouteSegment]
total_meters : Int
total_score : Double
accessible : Bool
summary : String
warnings : Array[String]
} derive(Eq, ToJson, Debug, FromJson)pub(all) struct RouteMetrics {
distance_meters : Int
average_slope : Double
total_crossings : Int
low_light_segments : Int
covered_segments : Int
rest_stops : Int
warning_count : Int
estimated_minutes : Int
} derive(Debug)fn set_edge_construction(state : GraphState, edge_id : Int, construction : Bool, reason : String) -> GraphState?Install
Download zipAn explainable accessibility route-planning engine and WebAssembly demo.