Spaces:
Sleeping
Sleeping
| title: Smart Grid Environment Server | |
| emoji: π― | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: docker | |
| pinned: false | |
| app_port: 8000 | |
| base_path: /web | |
| tags: | |
| - openenv | |
| # β‘ Smart Grid OpenEnv Environment | |
| A realistic reinforcement learning environment that simulates **energy | |
| distribution in a smart electrical grid** powered by renewable sources. | |
| Built for the Meta x PyTorch OpenEnv Hackathon, this environment enables | |
| AI agents to learn how to balance demand, renewable generation, and | |
| battery storage. | |
| ------------------------------------------------------------------------ | |
| ## π Problem Overview | |
| Modern power grids must handle: | |
| - Fluctuating energy demand | |
| - Intermittent solar and wind generation | |
| - Limited battery storage | |
| The goal is to optimally distribute energy across regions while | |
| minimizing: | |
| - Unmet demand | |
| - Energy waste | |
| - Battery misuse | |
| ------------------------------------------------------------------------ | |
| ## π§ Environment Design | |
| ### β± Time-based Simulation | |
| - Each episode = 24 timesteps (hours) | |
| - Demand and generation vary dynamically over time | |
| ------------------------------------------------------------------------ | |
| ## π¦ Observation Space | |
| ``` | |
| Feature Description | |
| ------------------ -------------------------- | |
| hour Current timestep (0--23) | |
| demand_r1 Demand in Region 1 | |
| demand_r2 Demand in Region 2 | |
| demand_r3 Demand in Region 3 | |
| solar_generation Solar power available | |
| wind_generation Wind power available | |
| battery_level Current battery storage | |
| battery_capacity Maximum battery capacity | |
| ``` | |
| ------------------------------------------------------------------------ | |
| ## π― Action Space | |
| The agent must output: | |
| supply_r1, supply_r2, supply_r3, charge_battery | |
| ------------------------------------------------------------------------ | |
| ## π§© Tasks | |
| - Easy: balanced_grid_easy | |
| - Medium: solar_management, wind_uncertainty | |
| - Hard: peak_demand, full_grid_challenge | |
| ------------------------------------------------------------------------ | |
| ## π Running Locally | |
| pip install -r requirements.txt | |
| uvicorn server.app:app --reload | |
| ------------------------------------------------------------------------ | |
| ## π³ Docker | |
| docker build -t smart_grid_env .\ | |
| docker run -p 8000:8000 smart_grid_env | |
| ------------------------------------------------------------------------ | |
| ## π€ Inference | |
| python inference.py | |
| ------------------------------------------------------------------------ | |
| ## π Project Structure | |
| ``` | |
| smart_grid/ | |
| βββ client.py | |
| βββ models.py | |
| βββ openenv.yaml | |
| βββ inference.py | |
| βββ server/ | |
| βββ tasks/ | |
| ``` | |
| ------------------------------------------------------------------------ | |
| ## π Goal | |
| Train an AI agent that balances supply, demand, and storage efficiently. | |