How jimgreen/power_plan_web works
Power Plan Web is a local web application for planning renewable, hydrogen, storage, and diesel microgrids. Users maintain a scheme and its hourly inputs, launch an optimization, inspect or assess results, and compare result workbooks; task controls and user management are additional capabilities. The README documents the page/API workflow, while the SOURCE INDEX establishes key backend module references. Server internals are only partially excerpted, so undocumented runtime links are omitted rather than inferred.
Main entry points: server.py HTTP API and tasks · plan_optimizer.py Planning MILP · estimate.py Metrics and aggregation · planning_store.py Scheme workbooks
Components 20
Web experience
- Parameter maintenance
assets/planning.js - Optimization page
assets/optimize.js - Evaluation page
assets/evaluation.js - Results comparison
assets/comparison.js - Task controls
assets/tasks.js - User management
assets/users.js
Planning and assessment
- Feasibility precheck
calculation_precheck.py - Planning MILP
plan_optimizer.py - Dispatch constraints
dispatch_milp.py - Solver adapters
milp_solver.py - Metrics and aggregation
estimate.py - Reliability assessment
reliability.py
Server runtime
- HTTP API and tasks
server.py - File-content cache
file_cache.py - Safe file operations
file_ops.py
Local data
- Scheme workbooks
planning_store.py - Result workbooks
- User database
Other components
- User
- MILP solver
Connections 31
- User → Parameter maintenance: edits scheme
README.md - User → Optimization page: starts solve
README.md - User → Evaluation page: requests assessment
README.md - User → Results comparison: compares results
README.md - User → Task controls: controls tasks
README.md - User → User management: manages users
README.md - Parameter maintenance → HTTP API and tasks: calls scheme APIs
README.md - Optimization page → HTTP API and tasks: calls optimization APIs
README.md - Evaluation page → HTTP API and tasks: calls evaluation APIs
README.md - Results comparison → HTTP API and tasks: calls comparison API
README.md - Task controls → HTTP API and tasks: calls task APIs
README.md - User management → HTTP API and tasks: calls auth APIs
README.md - HTTP API and tasks → Scheme workbooks: reads and saves schemes
README.md - HTTP API and tasks → Feasibility precheck: checks feasibility
server.py - HTTP API and tasks → Planning MILP: runs optimization
server.py - HTTP API and tasks → Metrics and aggregation: runs evaluation
README.md - HTTP API and tasks → Reliability assessment: uses assessment module
server.py - HTTP API and tasks → Result workbooks: reads and writes results
README.md - HTTP API and tasks → User database: persists users and sessions
README.md - Planning MILP → Dispatch constraints: builds constraints
plan_optimizer.py - Planning MILP → Solver adapters: solves model
plan_optimizer.py - Planning MILP → Metrics and aggregation: uses metric helpers
plan_optimizer.py - Feasibility precheck → Planning MILP: checks planning inputs
calculation_precheck.py - Feasibility precheck → Metrics and aggregation: uses calculation helpers
calculation_precheck.py - Metrics and aggregation → Planning MILP: uses planning helpers
estimate.py - Metrics and aggregation → Scheme workbooks: uses scheme storage
estimate.py - Dispatch constraints → Solver adapters: dispatches solve
dispatch_milp.py - Safe file operations → File-content cache: invalidates entries
file_ops.py - Scheme workbooks → Safe file operations: uses safe writes
planning_store.py - Scheme workbooks → File-content cache: uses cached reads
planning_store.py - Solver adapters → MILP solver: invokes backend