{"id":34501407,"url":"https://github.com/abdelrahmanelsafty75/construction-cost-optimization","last_synced_at":"2026-05-24T23:31:36.594Z","repository":{"id":329804826,"uuid":"1120708958","full_name":"abdelrahmanelsafty75/construction-cost-optimization","owner":"abdelrahmanelsafty75","description":"\"Cost minimization tool for construction using Linear Programming and AI sensitivity analysis.\"","archived":false,"fork":false,"pushed_at":"2025-12-22T02:03:20.000Z","size":6494,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T08:08:34.110Z","etag":null,"topics":["construction-tech","gui","linear-programming","operations-research","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdelrahmanelsafty75.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T19:28:10.000Z","updated_at":"2025-12-22T02:09:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abdelrahmanelsafty75/construction-cost-optimization","commit_stats":null,"previous_names":["abdelrahmanelsafty75/construction-cost-optimization"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/abdelrahmanelsafty75/construction-cost-optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelrahmanelsafty75%2Fconstruction-cost-optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelrahmanelsafty75%2Fconstruction-cost-optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelrahmanelsafty75%2Fconstruction-cost-optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelrahmanelsafty75%2Fconstruction-cost-optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdelrahmanelsafty75","download_url":"https://codeload.github.com/abdelrahmanelsafty75/construction-cost-optimization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelrahmanelsafty75%2Fconstruction-cost-optimization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27992996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["construction-tech","gui","linear-programming","operations-research","python"],"created_at":"2025-12-24T02:01:38.661Z","updated_at":"2025-12-24T02:01:59.636Z","avatar_url":"https://github.com/abdelrahmanelsafty75.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏗️ Construction Cost Optimizer\n\n![Python Version](https://img.shields.io/badge/python-3.8%2B-blue?style=for-the-badge\u0026logo=python)\n![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)\n![Status](https://img.shields.io/badge/status-stable-success?style=for-the-badge)\n![Topic](https://img.shields.io/badge/topic-Operations%20Research-orange?style=for-the-badge)\n\nLinear Programming solution for minimizing construction material costs while meeting engineering specifications.\n\n\n\n---\n\n##  Problem Statement\n\nA construction company needs to produce a concrete mix using two raw materials with specific cost and property characteristics:\n\n### Materials Overview\n\n| Material | Cost/Unit | Strength | Durability | Water Resistance |\n|----------|-----------|----------|------------|------------------|\n| **Cement** | $20 | 2 units | 1 unit | 1 unit |\n| **Sand** | $10 | 1 unit | 1 unit | 3 units |\n\n### Requirements\n- ✅ Minimum **Strength**: 30 units\n- ✅ Minimum **Durability**: 20 units  \n- ✅ Minimum **Water Resistance**: 40 units\n\n### Objective\n**Minimize** the total cost while meeting all engineering specifications.\n\n---\n\n## ✅ Solution\n\nUsing Linear Programming optimization:\n\n```\n🎯 Optimal Mix:\n   • Cement: 10 units\n   • Sand: 10 units\n   • Total Cost: $300\n```\n\nAll constraints satisfied:\n- Strength: 2(10) + 10 = **30 units** ✓\n- Durability: 10 + 10 = **20 units** ✓\n- Water Resistance: 10 + 3(10) = **40 units** ✓\n\n---\n\n## 📐 Mathematical Model\n\n### Decision Variables\n- `x₁` = Units of Cement\n- `x₂` = Units of Sand\n\n### Objective Function\n```\nMinimize: Z = 20x₁ + 10x₂\n```\n\n### Constraints\n```\nSubject to:\n   2x₁ + x₂  ≥ 30    (Strength)\n   x₁  + x₂  ≥ 20    (Durability)\n   x₁  + 3x₂ ≥ 40    (Water Resistance)\n   x₁, x₂    ≥ 0     (Non-negativity)\n```\n\n---\n\n## 📂 Project Structure\n\n```\nconstruction-cost-optimization/\n├── src/\n│   ├── solver.py          # Custom LP Algorithm Implementation\n│   ├── visualizer.py      # Matplotlib Visualization Tools\n│   ├── gui.py             # Tkinter User Interface\n│   └── main.py            # Application Entry Point\n│\n├── docs/\n│   ├── problem_statement.md      # Detailed Problem Description\n│   ├── mathematical_model.md     # Complete LP Formulation\n│   ├── user_guide.md             # Usage Instructions\n│   └── presentation.pdf          # Project Presentation\n│\n├── screenshots/           # Application Screenshots \u0026 Plots\n├── requirements.txt       # Python Dependencies\n└── README.md             # This File\n```\n\n---\n\n##  Installation\n\n### Prerequisites\n- Python 3.8 or higher\n- pip package manager\n\n### Quick Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/abdelrahmanelsafty75/construction-cost-optimization.git\ncd construction-cost-optimization\n\n# Install dependencies\npip install -r requirements.txt\n\n# Verify installation\npython src/main.py\n```\n\n---\n\n##  Usage\n\n### Option 1: Interactive Menu\n```bash\npython src/main.py\n```\n\nLaunches an interactive menu with options:\n1. CLI Mode - Command-line interface\n2. GUI Mode - Graphical user interface\n3. Run Examples - Pre-configured scenarios\n4. Generate Visualizations - Create plots\n\n### Option 2: Direct GUI Launch\n```bash\npython src/gui.py\n```\n\nOpens the graphical interface immediately with:\n- Input fields for costs and requirements\n- Real-time optimization solving\n- Interactive result visualization\n- Parameter adjustment controls\n\n---\n\n## ✨ Features\n\n### Core Capabilities\n- **Custom Manual Solver** - Corner point method implementation from scratch\n- **PuLP Integration** - Verification using industry-standard solver\n- **Interactive GUI** - User-friendly Tkinter interface\n- **Advanced Visualizations** - Professional matplotlib charts\n- **Sensitivity Analysis** - Test parameter variations\n- **Batch Processing** - Run multiple scenarios\n\n### Visualization Tools\n- **Feasible Region Plot** - Shows constraints and optimal solution\n- **Cost Comparison** - Compare different scenarios\n- **Sensitivity Analysis** - Price variation impact\n- **Property Breakdown** - Material contribution charts\n\n---\n\n## 🖼️ Screenshots\n\n### GUI Interface\n![GUI Interface](screenshots/gui_input_window_01.png)\n\n### Feasible Region Visualization\n![Feasible Region](screenshots/gui_output_graph_00.png)\n\n### Optimization Results\n![Results Output](screenshots/gui_recommended_02.png)\n\n---\n\n## 📚 Documentation\n\nComprehensive documentation available in the `docs/` folder:\n\n- **[Problem Statement](docs/problem_statement.md)** - Business context and problem description\n- **[Mathematical Model](docs/mathematical_model.md)** - Complete LP formulation and solution methods\n- **[User Guide](docs/user_guide.md)** - Installation, usage, and troubleshooting\n- **[Presentation](docs/presentation.pdf)** - Original project presentation\n\n---\n\n## 🔬 Technical Details\n\n### Algorithm Implementation\n- **Method**: Corner Point (Graphical) Method\n- **Approach**: Find constraint intersections, evaluate objective at each\n- **Verification**: Compare with PuLP Simplex solver\n- **Complexity**: O(n²) for n constraints\n\n### Technologies Used\n- **Python 3.8+** - Core programming language\n- **NumPy** - Numerical computations\n- **Matplotlib** - Data visualization and plotting\n- **Tkinter** - GUI framework (built-in with Python)\n- **PuLP** - LP solver for verification (optional)\n\n---\n\n## 🎓 Academic Context\n\n**Course:** Operations Research  \n**Institution:** October 6 University  \n**Semester:** Fall 2025 \n\n\nThis project demonstrates practical applications of Linear Programming in:\n- Construction management\n- Resource allocation\n- Cost optimization\n- Constraint satisfaction problems\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n##  Contact\n\nFor questions, suggestions, or collaboration:\n-  Email: [abdelrhmanelsafty74gmail.com]\n-  LinkedIn: [www.linkedin.com/in/abdelrahmanelsafty75]\n\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eMade with ❤️ by the Construction Optimization Team\u003c/strong\u003e\n  \u003cbr\u003e\n  \u003csub\u003eOperations Research Project - Fall 2025\u003c/sub\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelrahmanelsafty75%2Fconstruction-cost-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdelrahmanelsafty75%2Fconstruction-cost-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelrahmanelsafty75%2Fconstruction-cost-optimization/lists"}