A solution to the Developer Technical Test demonstrating advanced path optimization with multiple constraints.
This project implements a sophisticated path optimization solution that can be applied to various operations research scenarios. While themed around Star Wars (finding the optimal path for the Millennium Falcon), the underlying problem is a classic example of:
- Path Optimization with Resource Constraints
- Risk-Aware Route Planning
- Time-Window Based Scheduling
- Multi-Objective Optimization
This solution's approach can be adapted to solve various industry problems:
-
Supply Chain Optimization
- Delivery route planning with time windows
- Fleet management with fuel constraints
- Risk-aware transportation routing
-
Project Management
- Critical path analysis with resource constraints
- Risk-based project scheduling
- Multi-stage project planning
-
Network Design
- Telecommunication network routing
- Utility grid optimization
- Traffic flow optimization
- Graph-based path finding using NetworkX
- Resource-constrained path optimization
- Risk probability calculations
- Multi-objective optimization balancing:
- Path length
- Resource usage
- Risk exposure
- Time constraints
- Interactive path visualization
- Risk probability assessment
- Resource utilization tracking
- Multiple path comparison
- Python 3.8+: Core implementation
- NetworkX: Graph algorithms and path optimization
- Pandas: Data manipulation and analysis
- SQLite: Route database management
- Streamlit: Interactive web interface
- CLI: Command-line interface for automation
- Python API: For integration into other systems
class PathOptimizer:
def __init__(self):
self.graph = None
self.constraints = NoneKey Features:
- Resource constraint handling
- Risk assessment
- Path feasibility checking
- Alternative path generation
pip install streamlit pandas networkx plotlypython give-me-the-odds.py <config_file1.json> <config_file2.json>streamlit run app.py- Demonstrates basic path optimization with single constraint
- Shows multi-constraint optimization with risk assessment
- Shows the interactive web interface for path optimization
The solution can be adapted for various scenarios by modifying:
-
Constraint Types
- Resource limitations
- Time windows
- Risk thresholds
-
Optimization Objectives
- Minimize distance
- Minimize risk
- Balance multiple factors
-
Risk Models
- Different probability distributions
- Custom risk assessment functions
- Multiple risk factors
- Efficient graph-based implementation
- Handles complex constraints
- Scalable to large networks
- Real-time calculation capability
Contributions are welcome! Areas of particular interest:
- Additional optimization algorithms
- New constraint types
- Performance improvements
- Real-world use case implementations
This project is licensed under the MIT License - see the LICENSE file for details.
- Extended optimization criteria
- Additional risk models
- Real-time path recalculation
- Machine learning integration
- Original problem statement by [lioncowlionant].
- Inspiration from Star Wars universe.


