Skip to content

Feat/frontend#43

Open
HuynhTri-dev wants to merge 75 commits intomainfrom
feat/frontend
Open

Feat/frontend#43
HuynhTri-dev wants to merge 75 commits intomainfrom
feat/frontend

Conversation

@HuynhTri-dev
Copy link
Copy Markdown
Collaborator

@HuynhTri-dev HuynhTri-dev commented Dec 6, 2025

Add Support and Organization and change the linkfor document and Github page

Types of changes

  • 🐛 Bug fix (non-breaking change which fixes an issue)

  • ✨ Feature (non-breaking change which adds functionality)

  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

  • 📝 Docs (documentation only changes)

  • ♻️ Refactor (code improvement without changing functionality)

Checklist

  • Docker build successful (src/backend)

  • All tests passing (pytest)

  • Code follows project standards (Black, Ruff, MyPy)

  • Service boundaries maintained

  • .env.example updated (if environment variables changed)

  • No debug print statements left

HuynhTri-dev and others added 30 commits November 24, 2025 20:34
The backgroundColor property in Chart.js datasets can be multiple types.
This change adds a strict type guard to ensure it is treated as a string
array before indexing, preventing TypeScript compilation errors.
Merge latest changes from main to ensure all dependencies and
configurations are current. Restructure files and directories to
comply with the main branch's conventions.
Customize a color palette and dark mode support to align with the GreenWave team's visual identity.
This update improves the visual hierarchy to make the dashboard more intuitive for administrators. It applies a modern color palette and updates the styling to match the new design system.
- Refactor UserMap layout to use flexbox for better responsiveness
- Redesign AQIGauge with a modern doughnut chart and dynamic status icons
- Fix display issues in AQIGauge centering and aspect ratio
- Add TrafficEnvironmentImpact model publishing to IoT Agent
- Integrate PM2.5, CO2, noise metrics from SUMO simulation
- Calculate environmental impact based on traffic flow
- Publish entity to Orion-LD via NGSI-LD v1.0 API
- Add /notify endpoint to receive NGSI-LD notifications from Orion
- Handle TrafficFlowObserved, AirQualityObserved, TrafficEnvironmentImpact entities
- Implement send_command_via_orion() to PATCH TrafficLight.forcePhase
- Add setup_subscription() for subscribing to 3 entity types
- Watch attributes: queues, phase, pm25, co2, averageSpeed
- Add train_dqn.py for deep Q-learning agent training
- Add baseline.py for baseline traffic control comparison
- Add evaluator.py for model performance evaluation
- Add docker-compose.yml for SUMO_RL services orchestration
- Create Pydantic model for SUMO traffic flow metrics
- Add validation for queues, vehicleCount, avgSpeed fields
- Include dateObservedFrom/To temporal properties
- Add refRoadSegment relationship to road network
- Define NGSI-LD compliant schema with example data
- Create singleton service extending BaseService
- Implement CRUD operations: create, get_all, get_by_id, update, delete
- Proxy all operations to Orion-LD Context Broker
- Follow existing service architecture pattern
- Create router with 5 REST endpoints (GET, POST, PATCH, DELETE)
- Add query filtering support (limit, offset, type, id, etc.)
- Implement proper error handling with HTTPException
- Mount at /api/v1/traffic-flow/ prefix
- Import traffic_flow_router from api.routers
- Register router with app.include_router()
- Enable /api/v1/traffic-flow/* endpoints in FastAPI application
- Add section 7: TrafficFlowObserved component schema
- Define all properties with x-ngsi metadata (Property/Relationship types)
- Include validation rules (minimum values for numeric fields)
- Add unitCode for avgSpeed (MTS - meters per second)
- Provide example entity data following Smart Data Models standard
- Update e1 detector outputs (e1_0.xml through e1_5.xml)
- Update e1 instant detector outputs (e1i_0.xml through e1i_4.xml)
- Update e2 detector outputs (e2_0.xml, e2_2.xml)
- Detector data from latest SUMO simulation runs
The previous layout was not optimized for small screens, causing
elements to overflow or look cluttered. This update adjusts Tailwind responsive classes to ensure a clean and readable display on mobile devices.
- Add Flask, TensorFlow, Stable-Baselines3, SUMO libraries
- Pin TensorFlow to 2.18.0 for Python 3.12 compatibility
- Include all necessary packages for DQN training and evaluation
- Update Flask server port to avoid conflict with other services
- Update MY_NOTIFY_HOST to use port 5000
- Align with NGSI-LD subscription notification endpoint
- Replace deprecated Config.schema_extra with model_config
- Use json_schema_extra key for example data
- Fix Pydantic v2 deprecation warning
- Change MY_NOTIFY_HOST from host.docker.internal to 172.20.0.1
- Fix Orion-LD notification routing from Docker to host
- Enable proper event-driven communication on Linux
Merge branch 'docs/getting-started' into feature/frontend to integrate
the getting-started documentation with the frontend feature branch.
- Update e1 detectors (e1_0 to e1_5) with latest positions
- Update e1i instant detectors (e1i_0 to e1i_4)
- Update e2 multi-entry exit detectors (e2_0, e2_2)
- Improve traffic flow measurement accuracy
- Implement 10,000 steps training (5x more than fast version)
- Enhanced architecture: 128-128-64 neurons with Dropout(0.2)
- Optimized hyperparameters:
  * Learning rate: 0.0005 (more stable)
  * Epsilon decay: 7,000 steps (better exploration)
  * Replay buffer: 10,000 experiences
  * Batch size: 64 (2x larger)
- Double DQN with target network
- Multi-objective reward: 60% traffic + 40% environment
- Auto-save models in .keras format
- Training stats export to JSON
- Total parameters: 25,538 (vs 8,500 in fast version)
evaluate_dqn.py:
- Compare 3 controllers: Baseline, Random, DQN
- Track 10+ metrics: waiting time, queue, speed, PM2.5, CO2, fuel
- Generate 6-panel visualization charts
- Export JSON comparison results
- Force CPU-only mode to avoid GPU/CUDA issues

monitor_live.py:
- Real-time training progress monitor
- Display metrics: epsilon, loss, reward, queue, buffer
- Progress bar with ETA calculation
- Auto-refresh every 10 seconds
HuynhTri-dev and others added 30 commits December 2, 2025 19:25
merge and add related backend SUMO files and utility scripts. Create a new dashboard from description of SUMO docs.
…ces, and backend SUMO simulation files for user/admin dashboards, map features, and health monitoring.
…scription for context brocker, and change the new logo
…ning, and API for simulation control and traffic light management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants