An open API service indexing awesome lists of open source software.

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."

Awesome Lists containing this project

README

          

# šŸ—ļø Construction Cost Optimizer

![Python Version](https://img.shields.io/badge/python-3.8%2B-blue?style=for-the-badge&logo=python)
![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)
![Status](https://img.shields.io/badge/status-stable-success?style=for-the-badge)
![Topic](https://img.shields.io/badge/topic-Operations%20Research-orange?style=for-the-badge)

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
![GUI Interface](screenshots/gui_input_window_01.png)

### Feasible Region Visualization
![Feasible Region](screenshots/gui_output_graph_00.png)

### Optimization Results
![Results Output](screenshots/gui_recommended_02.png)

---

## šŸ“š 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