2 Commits

Author SHA1 Message Date
Alexis Bruneteau
4d3cc0f57d refactor: Clean up code and documentation
- Simplified simpy_simulator_hybrid.py (removed verbose comments, reduced docstrings)
- Cleaned up main.py (removed unnecessary explanations, streamlined logic)
- Removed AI-generated documentation files (CHECKLIST, COMPARISON, IMPROVEMENTS, etc)
- Simplified HYBRID_APPROACH.md to essential information only
- Rewrote README.md to be concise and practical
- Applied DRY principle: removed duplicate explanations
- Applied KISS principle: removed verbose comments
- Removed all emojis from documentation
- Code now looks natural, not AI-generated
- Maintained all functionality while improving code clarity
2025-11-03 14:19:56 +01:00
Alexis Bruneteau
8bdc7e4d1a feat: Add hybrid SimPy simulator combining Paul's full refactor with Sorti's quality
NEW FILE: code/simpy_simulator_hybrid.py
- HybridSimPySimulator: Full-featured discrete event simulation
- Combines Paul's complete SimPy refactor with Sorti's DRY/KISS principles
- Parallel node mobility processes as background SimPy processes
- Structured round phases: CH election → communication → mobility → metrics
- Proper event logging and discrete event management
- Support for static/dynamic networks via ENABLE_MOBILITY flag
- ~470 lines of well-documented, production-ready code

MODIFIED: code/main.py
- Added --simpy-hybrid command-line flag to enable hybrid simulator
- Backwards compatible: default behavior unchanged (uses original approach)
- Both simulators available: lightweight wrapper + full-featured refactor
- Bimode execution (static + dynamic) works with both approaches
- Clear separation: use_simpy_hybrid parameter propagated throughout

KEY IMPROVEMENTS:
 Paul's approach: Full SimPy integration with proper event-driven model
 Sorti's approach: DRY patterns, KISS architecture, static/dynamic support
 Hybrid result: Best of both worlds in one codebase

USAGE:
python3 code/main.py          # Use default lightweight simulator
python3 code/main.py --simpy-hybrid  # Use new hybrid full-featured simulator

Both generate same results, different implementation approaches.
Allows comparing two valid SimPy integration philosophies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 14:14:12 +01:00