Commit Graph

4 Commits

Author SHA1 Message Date
3a08de3a4a Fix wealth distribution chart functionality
- Add get_wealth_histogram() method to EconomicModel for histogram data
- Add new API endpoint /simulation/<id>/distribution for chart data
- Extend main data API with include_distribution parameter
- Update real-time progress updates to include distribution data
- Fix frontend updateCharts() to handle wealth distribution chart
- Add distribution data processing in simulation.js
- Update test_charts.py to verify histogram functionality

Resolves issue where wealth distribution chart was not updating during simulations.
2025-08-24 20:10:58 +02:00
27e185c2a6 Fix Markov simulation chart display issue
- Fix circular import issue by moving simulation_manager to app/__init__.py
- Enhance get_wealth_evolution to include inequality metrics data
- Add get_inequality_evolution method for complete chart data
- Update API to return top10_shares and capital_shares in evolution data
- Modify onSimulationComplete to fetch and populate charts with complete data
- Fix simulation threading to properly mark completion state
- Add test script to verify chart data generation

The charts now properly display simulation results by fetching complete
evolution data when simulation completes, resolving the empty diagrams issue.
2025-08-24 19:44:24 +02:00
bec913a599 Add Docker support: Dockerfile, docker-compose.yml, and production configuration
- Add Dockerfile with multi-stage build for Flask app containerization
- Include .dockerignore to optimize build context
- Add docker-compose.yml for easy deployment with health checks
- Update run.py to handle production mode with allow_unsafe_werkzeug
- Add DOCKER.md with comprehensive deployment instructions
- Configure health check endpoint at /health
- Run as non-root user for security
- Support for environment variables and proper port mapping
2025-08-24 19:20:38 +02:00
26c82959a2 Initial commit: Markov Economics Simulation App 2025-08-24 19:12:50 +02:00