https://github.com/abdelrahmanelsafty75/construction-cost-optimization
"Cost minimization tool for construction using Linear Programming and AI sensitivity analysis."
https://github.com/abdelrahmanelsafty75/construction-cost-optimization
construction-tech gui linear-programming operations-research python
Last synced: 8 days ago
JSON representation
"Cost minimization tool for construction using Linear Programming and AI sensitivity analysis."
- Host: GitHub
- URL: https://github.com/abdelrahmanelsafty75/construction-cost-optimization
- Owner: abdelrahmanelsafty75
- Created: 2025-12-21T19:28:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-12-22T02:03:20.000Z (5 months ago)
- Last Synced: 2025-12-23T08:08:34.110Z (5 months ago)
- Topics: construction-tech, gui, linear-programming, operations-research, python
- Language: Python
- Homepage:
- Size: 6.19 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# šļø Construction Cost Optimizer




Linear Programming solution for minimizing construction material costs while meeting engineering specifications.
---
## Problem Statement
A construction company needs to produce a concrete mix using two raw materials with specific cost and property characteristics:
### Materials Overview
| Material | Cost/Unit | Strength | Durability | Water Resistance |
|----------|-----------|----------|------------|------------------|
| **Cement** | $20 | 2 units | 1 unit | 1 unit |
| **Sand** | $10 | 1 unit | 1 unit | 3 units |
### Requirements
- ā
Minimum **Strength**: 30 units
- ā
Minimum **Durability**: 20 units
- ā
Minimum **Water Resistance**: 40 units
### Objective
**Minimize** the total cost while meeting all engineering specifications.
---
## ā
Solution
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** ā
---
## š Mathematical Model
### Decision Variables
- `xā` = Units of Cement
- `xā` = Units of Sand
### Objective Function
```
Minimize: Z = 20xā + 10xā
```
### Constraints
```
Subject to:
2xā + xā ā„ 30 (Strength)
xā + xā ā„ 20 (Durability)
xā + 3xā ā„ 40 (Water Resistance)
xā, xā ā„ 0 (Non-negativity)
```
---
## š Project Structure
```
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
```
---
## Installation
### Prerequisites
- Python 3.8 or higher
- pip package manager
### Quick Setup
```bash
# 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.py
```
---
## Usage
### Option 1: Interactive Menu
```bash
python src/main.py
```
Launches an interactive menu with options:
1. CLI Mode - Command-line interface
2. GUI Mode - Graphical user interface
3. Run Examples - Pre-configured scenarios
4. Generate Visualizations - Create plots
### Option 2: Direct GUI Launch
```bash
python src/gui.py
```
Opens the graphical interface immediately with:
- Input fields for costs and requirements
- Real-time optimization solving
- Interactive result visualization
- Parameter adjustment controls
---
## ⨠Features
### Core Capabilities
- **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
### Visualization Tools
- **Feasible Region Plot** - Shows constraints and optimal solution
- **Cost Comparison** - Compare different scenarios
- **Sensitivity Analysis** - Price variation impact
- **Property Breakdown** - Material contribution charts
---
## š¼ļø Screenshots
### GUI Interface

### Feasible Region Visualization

### Optimization Results

---
## š Documentation
Comprehensive documentation available in the `docs/` folder:
- **[Problem Statement](docs/problem_statement.md)** - Business context and problem description
- **[Mathematical Model](docs/mathematical_model.md)** - Complete LP formulation and solution methods
- **[User Guide](docs/user_guide.md)** - Installation, usage, and troubleshooting
- **[Presentation](docs/presentation.pdf)** - Original project presentation
---
## š¬ Technical Details
### Algorithm Implementation
- **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
### Technologies Used
- **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)
---
## š Academic Context
**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
---
## š¤ Contributing
Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
---
## Contact
For questions, suggestions, or collaboration:
- Email: [abdelrhmanelsafty74gmail.com]
- LinkedIn: [www.linkedin.com/in/abdelrahmanelsafty75]
---
Made with ā¤ļø by the Construction Optimization Team
Operations Research Project - Fall 2025