Implement EMBA Specialization Solver web app

Full React+TypeScript app with LP-based optimization engine,
drag-and-drop specialization ranking (with touch/arrow support),
course selection UI, results dashboard with decision tree, and
two optimization modes (maximize-count, priority-order).
This commit is contained in:
2026-02-28 20:43:00 -05:00
parent e62afa631b
commit 9e00901179
43 changed files with 10098 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { analyzeDecisionTree } from '../solver/decisionTree';
import type { OptimizationMode } from '../data/types';
import type { SetAnalysis } from '../solver/decisionTree';
export interface WorkerRequest {
pinnedCourseIds: string[];
openSetIds: string[];
ranking: string[];
mode: OptimizationMode;
}
export interface WorkerResponse {
type: 'setComplete' | 'allComplete';
analysis?: SetAnalysis;
analyses?: SetAnalysis[];
}
self.onmessage = (e: MessageEvent<WorkerRequest>) => {
const { pinnedCourseIds, openSetIds, ranking, mode } = e.data;
const analyses = analyzeDecisionTree(
pinnedCourseIds,
openSetIds,
ranking,
mode,
(analysis) => {
// Progressive update: send each set's results as they complete
const response: WorkerResponse = { type: 'setComplete', analysis };
self.postMessage(response);
},
);
// Final result with sorted analyses
const response: WorkerResponse = { type: 'allComplete', analyses };
self.postMessage(response);
};