# Tutorial 3: Smart Schedule Delay Explorer

**Difficulty:** Beginner  
**Estimated hands-on time:** 60–90 min  
**Purpose:** Upload schedule and screen constraints.  
**Safety:** Educational only. No connection to real plant control systems, restricted datasets, or operational decision making.

## What you will build

A standalone demonstration tool you can run on your own computer, understand, modify, and show to peers. The default data and responses are synthetic or predefined.

## Prerequisites

- Python 3.10+ (64-bit recommended); Chrome or Edge for the interface.
- Internet connection only for installing Python packages (where required). Voice recognition may additionally require browser internet access.
- An editor such as VS Code, or any text editor.

## Step-by-step

1. Extract the AIMPACT ZIP, then open a terminal in `build_lab/03_schedule_delay`.
2. Install requirements: `python -m pip install -r requirements.txt`.
3. Run `streamlit run app.py`.
4. Open the local URL printed by Streamlit (typically `http://localhost:8501`).
5. Change the input values and observe the interactive chart or results.
6. Explore the sample data, validation notice, and download/export feature.
7. Edit one response, label, threshold or chart title in the source, save, and rerun or refresh.
8. Capture a screenshot, describe what you changed, and propose a pull request to AIMPACT.

## How it works

The tool reads activity-level schedule data and calculates a transparent weighted constraint score. This version is deliberately rule-based, not a trained ML forecasting model. Change the weights and observe how prioritization changes.

## Mini-challenges for contributors

- Add one engineering-relevant input or command and explain its meaning.
- Improve accessibility and provide a screenshot of the result.
- Add basic input validation or a clear failure message.
- Write a short limitations section explaining what would be needed for real deployment.

## Suggested evidence for a community submission

Include a screenshot, the exact Python/browser version, sample input, observed output, and known limitations. Never include internal site data, passwords, personal records or proprietary APMS code.

## Troubleshooting

- If `streamlit` is not found, activate the environment where you installed requirements and rerun the installation.
- If the default port is occupied, close the other server or change the port.
- For voice recognition, use Chrome/Edge on localhost and check microphone permission. Typed commands are a fallback.
- If you are offline, package installation and some browser speech-recognition engines may not work.

## Responsible use

Models are demonstration baselines. Do not interpret outputs as certified condition monitoring, project forecasts, or safety inspections. Validate on authorized data with domain experts before any real-world use.
