Linear Programming solution for minimizing construction material costs while meeting engineering specifications.
A construction company needs to produce a concrete mix using two raw materials with specific cost and property characteristics:
| Material | Cost/Unit | Strength | Durability | Water Resistance |
|---|---|---|---|---|
| Cement | $20 | 2 units | 1 unit | 1 unit |
| Sand | $10 | 1 unit | 1 unit | 3 units |
- ✅ Minimum Strength: 30 units
- ✅ Minimum Durability: 20 units
- ✅ Minimum Water Resistance: 40 units
Minimize the total cost while meeting all engineering specifications.
Using Linear Programming optimization:
🎯 Optimal Mix:
• Cement: 10 units
• Sand: 10 units
• Total Cost: $300
All constraints satisfied:
- Strength: 2(10) + 10 = 30 units ✓
- Durability: 10 + 10 = 20 units ✓
- Water Resistance: 10 + 3(10) = 40 units ✓
x₁= Units of Cementx₂= Units of Sand
Minimize: Z = 20x₁ + 10x₂
Subject to:
2x₁ + x₂ ≥ 30 (Strength)
x₁ + x₂ ≥ 20 (Durability)
x₁ + 3x₂ ≥ 40 (Water Resistance)
x₁, x₂ ≥ 0 (Non-negativity)
construction-cost-optimization/
├── src/
│ ├── solver.py # Custom LP Algorithm Implementation
│ ├── visualizer.py # Matplotlib Visualization Tools
│ ├── gui.py # Tkinter User Interface
│ └── main.py # Application Entry Point
│
├── docs/
│ ├── problem_statement.md # Detailed Problem Description
│ ├── mathematical_model.md # Complete LP Formulation
│ ├── user_guide.md # Usage Instructions
│ └── presentation.pdf # Project Presentation
│
├── screenshots/ # Application Screenshots & Plots
├── requirements.txt # Python Dependencies
└── README.md # This File
- Python 3.8 or higher
- pip package manager
# Clone the repository
git clone https://github.com/abdelrahmanelsafty75/construction-cost-optimization.git
cd construction-cost-optimization
# Install dependencies
pip install -r requirements.txt
# Verify installation
python src/main.pypython src/main.pyLaunches an interactive menu with options:
- CLI Mode - Command-line interface
- GUI Mode - Graphical user interface
- Run Examples - Pre-configured scenarios
- Generate Visualizations - Create plots
python src/gui.pyOpens the graphical interface immediately with:
- Input fields for costs and requirements
- Real-time optimization solving
- Interactive result visualization
- Parameter adjustment controls
- Custom Manual Solver - Corner point method implementation from scratch
- PuLP Integration - Verification using industry-standard solver
- Interactive GUI - User-friendly Tkinter interface
- Advanced Visualizations - Professional matplotlib charts
- Sensitivity Analysis - Test parameter variations
- Batch Processing - Run multiple scenarios
- Feasible Region Plot - Shows constraints and optimal solution
- Cost Comparison - Compare different scenarios
- Sensitivity Analysis - Price variation impact
- Property Breakdown - Material contribution charts
Comprehensive documentation available in the docs/ folder:
- Problem Statement - Business context and problem description
- Mathematical Model - Complete LP formulation and solution methods
- User Guide - Installation, usage, and troubleshooting
- Presentation - Original project presentation
- Method: Corner Point (Graphical) Method
- Approach: Find constraint intersections, evaluate objective at each
- Verification: Compare with PuLP Simplex solver
- Complexity: O(n²) for n constraints
- Python 3.8+ - Core programming language
- NumPy - Numerical computations
- Matplotlib - Data visualization and plotting
- Tkinter - GUI framework (built-in with Python)
- PuLP - LP solver for verification (optional)
Course: Operations Research
Institution: October 6 University
Semester: Fall 2025
This project demonstrates practical applications of Linear Programming in:
- Construction management
- Resource allocation
- Cost optimization
- Constraint satisfaction problems
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions, suggestions, or collaboration:
- Email: [abdelrhmanelsafty74gmail.com]
- LinkedIn: [www.linkedin.com/in/abdelrahmanelsafty75]
Operations Research Project - Fall 2025


