Skip to content

panktipatel1711/Task-Scheduler-Optimization-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

""" Module: write_readme.py Description: A robust local file writer script to safely generate the professional, high-impact README.md file without terminal-escaping issues. """ import os

readme_content = """# Task Scheduler Optimization System ⚙️

An enterprise-grade Operations Research (OR) platform that maps dependency-bound task networks to resource timelines. The system leverages Directed Acyclic Graphs (DAG) and benchmarks an $O(N \log N)$ Max-Heap Priority Heuristic against an exact global Google OR-Tools CP-SAT Solver.


🏗️ System Architecture & Workflow

[CSV / API JSON Ingestion] ──> [DAG Topological Cycle Check] ──> [Dual-Engine Solvers] ──> [SQLite Log Layer] ──> [Streamlit Gantt App]

🧠 Core DSA & Engineering Implementations

1. Directed Acyclic Graphs (DAG) & Kahn's Algorithm

Task workflows are handled as directed dependency networks. The pre-processor monitors in-degree variables, runs linear cycle detection to catch infinite scheduling loops, and returns a safe linear sequence for resource allocation.

2. Max-Priority Queues (heapq)

The greedy pipeline uses an inverted internal binary heap layout. It constantly extracts the highest-priority, tightest-deadline task, mimicking operating system thread execution architectures.

3. Constraint Satisfaction (CP-SAT Invariants)

  • Disjunctive Timelines: AddNoOverlap(Intervals) ensures no two tasks execute concurrently on a single person.
  • Precedence Safety: Start >= End of Parent mathematically guarantees prerequisite enforcement.
  • Modulo Working Windows: Start >= S + 24k and End <= E + 24k forces tasks strictly inside repeating 24-hour shift calendars.

📊 Performance Benchmarks (Identical Dataset)

Operational Analytics Tracked Track A: Max-Heap Heuristic Track B: Google CP-SAT Solver Impact / Business Value
SLA Compliance Rate 71.4% 100.0% +28.6% On-Time Increase
Accumulated Project Delays 14 Hours Overdue 0 Hours (Perfect Fit) Eliminates Overtime Penalties
Mathematical Feasibility Approximate Local Search Globally Proven Optimum Maximum Resource Efficiency

📂 Repository File Architecture

Task-Scheduler-Optimization-System/
├── data/                    # Operational datasets (tasks.csv, resources.csv)
├── src/                     # Computational pipeline packages
│   ├── greedy.py            # Kahn's sort & Max-Heap baseline engine
│   ├── cpsat_solver.py      # Google OR-Tools exact constraints model
│   ├── metrics.py           # SLA compilation and utilization trackers
│   └── app.py               # FastAPI production router gateway
├── tests/                   # Automated PyTest constraint invariant assertions
├── app_dashboard.py         # Main entrypoint: Interactive Streamlit UI App
├── main.py                  # Main entrypoint: High-Impact Terminal CLI Dashboard
└── requirements.txt         # Package lockfile (ortools, fastapi, streamlit, altair)

💻 Technical Installation & Execution

1. Isolation & Environment Setup

cd Task-Scheduler-Optimization-System
python -m venv .venv
.\\.venv\\Scripts\\activate
pip install -r requirements.txt

2. Launching the Dashboards

  • To view the Web Dashboard (Interactive Altair Gantt & Live KPI Analytics):
    streamlit run app_dashboard.py
  • To run the quick Terminal CLI Dashboard:
    python main.py
  • To serve the production backend API gateway:
    uvicorn src.app:app --reload

✨ Strategic Key Outcomes

  • Integrated business constraints directly into strict mathematical interval and boundary formulas.
  • Built a complete Python data pipeline separating validation structures (Pydantic), API serving (FastAPI), mathematical optimization (OR-Tools), and front-end rendering (Streamlit).
  • Created a verifiable benchmarking engine that explicitly highlights the performance gap between greedy heuristics and advanced global searches. """

def generate_readme(): try: # Write the README.md in the current working directory with open("README.md", "w", encoding="utf-8") as f: f.write(readme_content) print("\n[SUCCESS] README.md has been generated successfully and cleanly!") except Exception as e: print(f"\n[ERROR] Could not write README.md: {str(e)}")

if name == "main": generate_readme()

About

A high-performance text plagiarism detection pipeline engineering exact string matching via Knuth-Morris-Pratt (KMP) and Rabin-Karp architectures, coupled with structural winnowing fingerprinting for local alignment. Implements an optimized sub-linear time candidate screening matrix leveraging MinHash and Locality-Sensitive Hashing (LSH) to handle

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages