Skip to content

About

A professional offline broadcast planning tool for MCR operators — IRD scheduling, ASI-aware conflict detection, and a local AI assistant for natural-language schedule management.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Broadcast Planner

Professional broadcast planning system for MCR (Master Control Room) operations.

Overview

This system parses broadcast synopses from various sources (text, PDF, Excel, Outlook) and creates optimized broadcast schedules with IRD (Integrated Receiver Decoder) assignments while respecting hardware topology constraints and ASI stream limitations.

Features

  • Multi-format synopsis parsing (text, PDF, Excel, Outlook Calendar)
  • Intelligent IRD assignment based on capabilities and availability
  • ASI stream constraint management
  • Conflict detection and resolution
  • Deterministic and explainable scheduling decisions
  • Enterprise-grade architecture
  • AI Chat Assistant - Local LLM-powered agent for natural language schedule management

Installation

# Clone repository
git clone [repository-url]
cd broadcast-planner

# Install dependencies using Poetry
poetry install

# Copy environment configuration
cp .env.example .env

# Run initial setup
poetry run python scripts/bootstrap_project.py

Configuration

Environment Variables

Configure .env file with appropriate values for your environment.

Hardware Topology

Define your hardware topology in config/topology.yaml

Device Capabilities

Update device capabilities in config/devices.xlsx

Usage

# Run the planner
poetry run python scripts/run_planner.py --input [input-file] --output [output-file]

# Run with specific date range
poetry run python scripts/run_planner.py --input [input-file] --start-date 2026-01-12 --end-date 2026-01-19

Architecture

The system follows a clean domain-driven design with clear separation of concerns:

  • Domain Models: Core business entities (Device, Broadcast, Stream, etc.)
  • Parsers: Extract broadcast information from various formats
  • Scheduling Engine: Deterministic assignment logic with ASI constraints
  • Agents: Support layer for normalization and explanation
  • Outputs: Generate schedules and conflict reports
  • Agent Package: LLM-based chat assistant with validation and audit

AI Chat Assistant

The application includes an embedded AI assistant that runs entirely locally - no external API calls.

Features

  • Natural language commands: "Move event X to IRD 22", "Ban IRD 15 for today"
  • Explain assignments: "Why is the Arsenal match on IRD 5?"
  • Propose validated changes with operator approval workflow
  • Learning memory: remembers operator preferences without retraining
  • Full audit trail of all agent interactions

LLM Backend Options

  1. Ollama (Recommended): Easy setup with local HTTP API

    • Install from https://ollama.ai
    • Pull a model: ollama pull llama3.2
    • Start Ollama and launch the app
  2. llama.cpp: Direct GGUF model loading

    • Install: pip install llama-cpp-python
    • Set model path in Agent Preferences

Agent Commands

  • "Explain why event [X] was assigned to IRD [Y]"
  • "Move event [X] to another IRD that supports BISS-CA"
  • "Swap assignments between event [X] and event [Y]"
  • "Lock this assignment so future reruns don't change it"
  • "Extend event window by 60 minutes"
  • "Rerun schedule for today with preference: maximize stream_key reuse"
  • "Ban IRD [X] for today"

Safety

  • All proposed changes go through the deterministic validator
  • Operator approval required before applying changes (unless auto-apply enabled)
  • Full audit trail stored in SQLite database
  • Agent never invents technical values

Testing

# Run all tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=. --cov-report=html

# Run agent-specific tests
poetry run pytest tests/test_agent_*.py

Hardware Topology

Multi-Channel Boxes

  • TITAN A: IRDs 1-4 (3 ASI streams)
  • TITAN B: IRDs 5-8 (2 ASI streams)
  • TITAN C: IRDs 39-42 (2 ASI streams)
  • MediaKind RX 1 A: IRDs 9-13 (3 ASI streams)
  • MediaKind RX 1 B: IRDs 14-16 (2 ASI streams)

Standalone Units

  • IRDs 17-38: Each with 1 channel + 1 ASI

License

Proprietary - Internal Use Only

About

A professional offline broadcast planning tool for MCR operators — IRD scheduling, ASI-aware conflict detection, and a local AI assistant for natural-language schedule management.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages