How shaswatabarua/bup-cse-fest-2026-gridwise works
GridWise accepts a 24-hour campus energy scenario and operator notes, interprets the notes as directives, validates them, and optimizes a battery-aware schedule to minimize grid cost. Its main path is the FastAPI optimization endpoint through interpretation, guardrails, and the PuLP/CBC solver, then back as hourly plan and totals. The README also documents deterministic fallback parsing, in-memory caching, and an optional Gemini provider. Those capabilities are represented from documentation and sampled code; deployment and test infrastructure are omitted.
Main entry points: main.py GridWise API · llm_interpreter.py Note interpreter · optimizer.py Schedule optimizer · schemas.py Request and response schemas
Components 12
API and contracts
- GridWise API
app/main.py - Request and response schemas
app/schemas.py
Note interpretation
- Note interpreter
app/llm_interpreter.py - Provider settings
app/config.py - Deterministic parser
app/llm_interpreter.py - Interpretation cache
app/llm_interpreter.py - Directive guardrails
app/guardrails.py
Schedule optimization
- Schedule optimizer
app/optimizer.py
External services
- CBC solver
- Groq model service
- Gemini model service
Other components
- Campus operator
Connections 14
- Campus operator → GridWise API: submits scenario
- GridWise API → Request and response schemas: validates request
- GridWise API → Note interpreter: interprets notes
- Note interpreter → Provider settings: reads settings
- Note interpreter → Interpretation cache: checks and updates
- Note interpreter → Groq model service: calls when selected
- Note interpreter → Gemini model service: calls when selected
- Note interpreter → Deterministic parser: falls back on error
- Note interpreter → GridWise API: returns directives
- GridWise API → Directive guardrails: validates directives
- GridWise API → Schedule optimizer: solves schedule
- Schedule optimizer → CBC solver: solves model
- Schedule optimizer → GridWise API: returns plan and totals
- GridWise API → Campus operator: returns JSON result