Getting Started with Layer 3 Optimization
Get cost-optimal energy scheduling running in minutes. This guide walks you through installation, EV charging optimization, and peak shaving with battery storage.Installation
Quick Examples
EV Charging Schedule
Optimize charging for a fleet of EVs on a time-of-use tariff:Peak Shaving with Battery
Reduce demand peaks using battery storage:Integration with Layer 2 Forecasts
Use Layer 2 predictions as optimization inputs:Configuration Reference
OptimizationConfig
| Parameter | Default | Description |
|---|---|---|
horizon | "24h" | Optimization window ("24h", "7d", etc.) |
resolution | "15min" | Time slot size ("15min", "1h") |
objective | "minimize_cost" | Primary objective function |
max_iterations | 1000 | Solver iteration limit |
tolerance | 1e-6 | Convergence tolerance |
weights | {"cost": 1.0, "carbon": 0.0, "peak": 0.0} | Multi-objective weights |
EVChargingScheduler
| Parameter | Default | Description |
|---|---|---|
site_capacity_kw | 200.0 | Maximum total site power draw |
num_chargers | 10 | Number of EVSE ports |
charger_capacity_kw | 22.0 | Max power per charging port |
PeakShavingController
| Parameter | Default | Description |
|---|---|---|
peak_target_kw | None | Target peak (None = auto 80th percentile) |
Next Steps
EV Charging Deep Dive
Priority scheduling, carbon-aware optimization, and constraint details
Peak Shaving Deep Dive
Two-pass algorithm, SOC management, and demand charge savings
Layer 2 Forecasting
Generate the forecasts that feed into Layer 3
GitHub Repository
Source code, examples, and issue tracker
You’re now ready to optimize energy schedules! Layer 3 takes forecasts from Layer 2 and tariff data from Layer 1 to produce cost-optimal dispatch decisions.