{"id":19647443,"url":"https://github.com/mohazamani/cutting-stock-optimization","last_synced_at":"2026-06-14T15:37:23.172Z","repository":{"id":261572041,"uuid":"884700537","full_name":"MohaZamani/Cutting-Stock-Optimization","owner":"MohaZamani","description":"AI-based solutions for the Cutting Stock Problem using Genetic Algorithm, Simulated Annealing, and Hill Climbing to minimize material waste and optimize roll usage.","archived":false,"fork":false,"pushed_at":"2024-11-07T08:47:50.000Z","size":523,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T00:24:03.403Z","etag":null,"topics":["ai","artificial-intelligence","cutting-stock","cutting-stock-problem","genetic-algorithm","hill-climbing","simulated-annealing"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/MohaZamani.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}},"created_at":"2024-11-07T08:29:09.000Z","updated_at":"2024-11-07T08:50:47.000Z","dependencies_parsed_at":"2024-11-07T09:38:51.270Z","dependency_job_id":"63dc4b61-2920-40b6-a0cf-7216e973eb35","html_url":"https://github.com/MohaZamani/Cutting-Stock-Optimization","commit_stats":null,"previous_names":["mohazamani/cutting-stock-optimization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohaZamani/Cutting-Stock-Optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FCutting-Stock-Optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FCutting-Stock-Optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FCutting-Stock-Optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FCutting-Stock-Optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohaZamani","download_url":"https://codeload.github.com/MohaZamani/Cutting-Stock-Optimization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FCutting-Stock-Optimization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34326240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["ai","artificial-intelligence","cutting-stock","cutting-stock-problem","genetic-algorithm","hill-climbing","simulated-annealing"],"created_at":"2024-11-11T14:44:12.274Z","updated_at":"2026-06-14T15:37:23.156Z","avatar_url":"https://github.com/MohaZamani.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cutting Stock Optimization with Genetic, Simulated Annealing, and Hill Climbing Algorithms\n\nThis project implements and analyzes three optimization algorithms—Genetic Algorithm, Simulated Annealing, and Hill Climbing—to solve the **Cutting Stock Problem**. This classic problem involves minimizing material waste while cutting materials to fulfill specific size requests.\n\n## Problem Overview\n\nThe **Cutting Stock Problem** is an NP-hard problem where the goal is to cut standard-sized stock materials (e.g., rolls of paper) to meet specific size requests with minimal waste. For example, if we have a 10-meter roll and requests for 3, 5, and 7 meters, we aim to cut the roll in a way that meets these requests while minimizing leftover material.\n\nThe specific objectives for this project are to optimize solutions for four different input scenarios by minimizing the total number of rolls required.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/Screenshot 1403-08-17 at 12.12.26.png\" alt=\"drawing\" width=\"330\"/\u003e\n\u003c/p\u003e\n\n## Requirements\n\nThe project must fulfill the following criteria:\n\n1. Use fewer than 56 rolls for **input1**\n2. Use fewer than 80 rolls for **input2**\n3. Use fewer than 115 rolls for **input3**\n4. Use fewer than 235 rolls for **input4**\n\n## Solution Approach\n\nThis project explores three AI-based optimization methods:\n\n- **Genetic Algorithm**: An evolutionary algorithm inspired by natural selection, leveraging crossover, mutation, and selection strategies to evolve solutions.\n- **Simulated Annealing**: A probabilistic technique that avoids local minima by allowing occasional moves to worse solutions, aiming to converge to an optimal solution over time.\n- **Hill Climbing**: A heuristic search that iteratively makes small changes to improve the solution, suitable for problems where local optimization is effective.\n\nEach algorithm is tailored to suit the constraints and objective of the cutting stock problem, with custom parameters to enhance performance.\n\n## Files\n\n- **AI_HW2.pdf**: Problem description and requirements.\n- **HW02.ipynb**: Contains the full implementation and report. This notebook includes:\n  - Code for each optimization algorithm\n  - Parameter tuning and testing\n  - Detailed analysis of results and performance comparison\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.x\n- Jupyter Notebook\n- Required libraries: `numpy`, `matplotlib`, and any other dependencies specified in the notebook.\n\n### Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/MohaZamani/Cutting-Stock-Optimization.git\n   ```\n2. Open the Jupyter Notebook:\n   ```bash\n   jupyter notebook HW02.ipynb\n   ```\n3. Run the cells sequentially to execute the implementations and view the results.\n\n## Results\n\nThe notebook provides a comprehensive analysis of each algorithm's effectiveness in minimizing roll usage for each input case. Performance improvements were achieved through careful parameter selection, resulting in optimal solutions that meet or exceed the specified roll limits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fcutting-stock-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohazamani%2Fcutting-stock-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fcutting-stock-optimization/lists"}