Skip to content
jplumhoffPublic

About

Monte Carlo simulation tool for analyzing project timelines. Visual task graph editor with probability distributions for completion times

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

193 Commits

Folders and files

Repository files navigation

Norns - Monte Carlo Project Timeline Analyzer

A full-stack web application for analyzing project timelines using Monte Carlo simulation. Define task dependency graphs with duration estimates, run thousands of simulated scenarios, and receive probability distributions showing likely project completion times.

Architecture

Frontend (UI) - /ui

  • React-based visual graph editor with drag-and-drop task management
  • Cycle detection, validation, and automatic layout
  • JSON import/export for task graphs

Backend (API) - /api

  • .NET 10.0 REST API with Monte Carlo simulation engine
  • Critical path analysis: tasks are topologically sorted, then a relaxation algorithm finds the longest path by negating weights and applying shortest-path logic
  • Returns probability distributions and statistical insights (mean, median, percentiles) for potential project completion times.

Technology Stack

Frontend: React 18, TypeScript, Vite 5, ReactFlow 11, TailwindCSS, Playwright

Backend: .NET 10.0, ASP.NET Core, MedallionTopologicalSort, xUnit + Shouldly

Quick Start

Prerequisites

  • Node.js 20.x LTS
  • .NET 10.0 SDK
  • Docker (optional)

Development

UI:

cd ui
npm install
npm run dev       # http://localhost:5173
npm run build     # Production build

API:

cd api
dotnet restore
dotnet run --project Norns.Api
# http://localhost:5000
# OpenAPI spec: http://localhost:5000/openapi/v1.json

Full Stack (Docker Compose):

docker-compose up --build
# http://localhost:8080 (API proxied at /api/)

Testing

# UI
cd ui
npm run test:unit      # Vitest unit tests
npm test               # Playwright E2E tests

# API
cd api
dotnet test

Usage

Creating a Task Graph

  1. Open the UI application
  2. Use the default Start and End nodes as anchors
  3. Click "Add Node" to create tasks with unique IDs
  4. Enter duration estimates (minimum and maximum days)
  5. Drag between node handles to create dependency edges
  6. Use auto-layout to organize the graph automatically
  7. Export/import graphs as JSON files

Running Simulations

  1. Click "Run Simulation" in the toolbar
  2. Configure the number of trials (default: 10,000)
  3. Click "Start" to queue the simulation
  4. Monitor real-time progress via the progress indicator
  5. View results when the simulation completes

Interpreting Results

The results dialog displays:

  • Histogram: Probability distribution of project completion times
  • Statistics: Min, max, mean, median, and percentile values (P50, P85, P95)

The P85 value indicates the duration within which the project will complete 85% of the time.

License

MIT

About

Monte Carlo simulation tool for analyzing project timelines. Visual task graph editor with probability distributions for completion times

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages