English | νκ΅μ΄
An AI-powered factory layout optimization system using Genetic Algorithm (GA) to maximize production efficiency while minimizing material flow distances. This system intelligently arranges 16 manufacturing equipment units in a linear 16-step production sequence to achieve optimal throughput and workflow efficiency.
Our genetic algorithm successfully optimized a real factory layout with 16 equipment units (ID 0-15) over 300 generations:
- π― Target Production: 35 units/hour
- β‘ Optimized Throughput: Achieved target with minimal distance
- π Convergence: Stable optimization over 300 generations
- π Multi-objective: Balanced production rate vs. material flow distance
- π¨ Visual Analytics: Comprehensive performance tracking and layout visualization
- 𧬠Advanced Genetic Algorithm: N populations à N generations evolutionary optimization
- π― Multi-objective Optimization: Balances production throughput (35 units/hour) and material flow distance
- π Real-time Visualization: Interactive layout visualization with performance analytics
- βοΈ Constraint Handling: Equipment footprint, clearance zones, and spatial constraints
- π Progress Monitoring: Generation-wise fitness evolution and convergence analysis
- π§ Flexible Configuration: Customizable equipment definitions and process sequences
pip install matplotlib numpygit clone https://github.com/imjeasung/Factory-Layout-Optimizer.git
cd Factory-Layout-Optimizer
python GA_Facility_Optimizer.pyLayout Features:
- π Equipment Arrangement: 16 machines (ID 0-15) optimally positioned in 19Γ19 grid
- π Color-coded Identification: Each equipment unit with unique color visualization
- π Safety Clearance Zones: Automated clearance space management
- π Optimized Flow Paths: Minimized inter-equipment material transport distances
- π Spatial Constraints: Intelligent footprint management and collision avoidance
Path Details:
- π Script Used:
path_visualizer.py - π§ Algorithm: Utilizes A* search to find optimal paths between sequential machines.
βοΈ Continuous Flow: Visualizes the "one-stroke" or continuous path for material handling, minimizing travel interruptions.- π Input Data: Requires
optimized_layout_data.json(generated byGA_Facility_Optimizer.py) which contains the optimized layout and machine sequence. - π― Objective: To clearly show the actual travel routes for materials/AGVs post-layout optimization, aiding in identifying potential bottlenecks or inefficiencies in flow.
Analysis Dashboard Includes:
- π Fitness Evolution Curve: Real-time convergence tracking over 300 generations
- π Distance Optimization Progress: Material flow distance minimization trends
- β‘ Throughput Performance: Production rate optimization and target achievement
- β Population Validity Metrics: Solution feasibility and constraint satisfaction rates
- π― Multi-objective Balance: Trade-off analysis between competing objectives
- Population Size: 100 individuals per generation
- Generations: 300 iterations
- Mutation Rate: 0.3 (30%)
- Crossover Rate: 0.8 (80%)
- Elite Preservation: Top 5 individuals per generation
- Tournament Selection: Size 5
- π― Maximize Throughput: Target 35 units/hour production rate
- π Minimize Distance: Reduce material flow distances between equipment
- β Constraint Satisfaction: Ensure spatial and operational constraints
- π Factory Dimensions: 19Γ19 grid units
- ποΈ Equipment Count: 16 manufacturing stations
- π Process Sequence: Linear 16-step production flow
- β‘ Material Transport Speed: 0.5 units/second
| ID | Equipment Name | Footprint | Cycle Time | Clearance |
|---|---|---|---|---|
| 0 | μμμ¬_ν¬μ | 2Γ2 | 20s | 1 unit |
| 1 | 1μ°¨_μ μ | 3Γ3 | 35s | 1 unit |
| 2 | λ°λ§_κ°κ³΅ | 4Γ2 | 45s | 1 unit |
| 3 | λλ¦΄λ§ | 2Γ2 | 25s | 1 unit |
| 4 | μ΄μ²λ¦¬_A | 3Γ4 | 70s | 2 units |
| 5 | μ λ°_κ°κ³΅_A | 3Γ2 | 40s | 1 unit |
| 6 | 쑰립_A | 2Γ3 | 55s | 2 units |
| 7 | μ΅μ’ _κ²μ¬_A | 1Γ2 | 15s | 1 unit |
| 8 | 2μ°¨_μ μ | 3Γ2 | 30s | 1 unit |
| 9 | νλ©΄_μ²λ¦¬ | 2Γ4 | 50s | 2 units |
| 10 | μΈμ²_곡μ _1 | 2Γ2 | 20s | 1 unit |
| 11 | μ΄μ²λ¦¬_B | 4Γ4 | 75s | 2 units |
| 12 | μ λ°_κ°κ³΅_B | 2Γ3 | 42s | 1 unit |
| 13 | λΆν_쑰립 | 3Γ3 | 60s | 1 unit |
| 14 | νμ§_κ²μ¬_B | 2Γ1 | 18s | 1 unit |
| 15 | ν¬μ₯_λΌμΈ_A | 4Γ3 | 30s | 2 units |
fitness = (THROUGHPUT_WEIGHT Γ throughput) - (DISTANCE_WEIGHT Γ total_distance)Optimization Weights:
THROUGHPUT_WEIGHT: 1.0DISTANCE_WEIGHT: 0.005BONUS_ACHIEVEMENT: 0.2 (when target reached)
- π― Production Target: 35 units per hour β
- π Material Transport Speed: 0.5 units per second
- β‘ Algorithm Convergence: Stable optimization after ~150 generations
- β Solution Validity: >90% valid solutions maintained throughout evolution
- π Consistency: Reproducible results across multiple runs
machines_definitions = [
{"id": 0, "name": "μμμ¬_ν¬μ
", "footprint": (2, 2), "cycle_time": 20, "clearance": 1},
{"id": 1, "name": "1μ°¨_μ μ", "footprint": (3, 3), "cycle_time": 35, "clearance": 1},
# Add more equipment definitions...
]PROCESS_SEQUENCE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # Linear 16-stepFACTORY_WIDTH = 19
FACTORY_HEIGHT = 19Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
μ μ μκ³ λ¦¬μ¦(GA)μ νμ©νμ¬ 16κ° μ€λΉμ μ ν 16λ¨κ³ 곡μ μ μ΅μ ννλ AI μμ€ν μ λλ€. μμ° ν¨μ¨μ±μ κ·Ήλννλ©΄μ λ¬Όλ₯ λμ μ μ΅μννμ¬ μ΅μ μ μ€λΉ λ°°μΉλ₯Ό μ°Ύμμ€λλ€.
ID 15λ²κΉμ§μ μ€λΉλ‘ ꡬμ±λ μ€μ 곡μ₯ λ μ΄μμμ 300μΈλμ κ±Έμ³ μ±κ³΅μ μΌλ‘ μ΅μ ν:
- π― λͺ©ν μμ°λ: μκ°λΉ 35κ°
- β‘ μ΅μ νλ μ²λ¦¬λ: λͺ©ν λ¬μ± λ° κ±°λ¦¬ μ΅μν
- π μλ ΄μ±: 300μΈλμ κ±ΈμΉ μμ μ μ΅μ ν
- π λ€μ€ λͺ©ν: μμ°μ¨ vs λ¬Όλ₯ 거리 κ· ν
- π§¬ κ³ κΈ μ μ μκ³ λ¦¬μ¦: 300κ°μ²΄ Γ 300μΈλ μ§ν μ΅μ ν
- π― λ€μ€ λͺ©ν μ΅μ ν: μμ°λ(μκ°λΉ 35κ°)κ³Ό μ΄λ 거리 λμ κ³ λ €
- π μ€μκ° μκ°ν: μ±λ₯ λΆμμ΄ ν¬ν¨λ λνν λ μ΄μμ μκ°ν
- βοΈ μ μ½ μ‘°κ±΄ μ²λ¦¬: μ€λΉ ν¬κΈ°, ν΄λ¦¬μ΄λ°μ€, κ³΅κ° μ μ½ κ³ λ €
- π μ§ν μν© λͺ¨λν°λ§: μΈλλ³ μ ν©λ μ§ν λ° μλ ΄ λΆμ
- π§ μ μ°ν μ€μ : μ€λΉ μ μ λ° κ³΅μ μμ 컀μ€ν°λ§μ΄μ§
16κ° μ€λΉ(ID 0-15)κ° μ΅μ λ°°μΉλ κ²°κ³Όλ‘, κ° μ€λΉλ κ³ μ μμμΌλ‘ ꡬλΆλλ©° ν΄λ¦¬μ΄λ°μ€ μμκ³Ό λ¬Όλ₯ νλ¦μ΄ μ΅μ νλμμ΅λλ€.
300μΈλμ κ±ΈμΉ μ ν©λ μ§ν, 거리 μ΅μ ν, μ²λ¦¬λ λΆμ, λͺ¨μ§λ¨ μ ν¨μ± λ±μ μ’ ν©μ μΌλ‘ λΆμν κ²°κ³Όλ₯Ό μ 곡ν©λλ€.
- μ§λ¨ ν¬κΈ°: μΈλλΉ 100κ° κ°μ²΄
- μΈλ μ: 300ν λ°λ³΅
- λ³μ΄μ¨: 0.3 (30%)
- κ΅μ°¨μ¨: 0.8 (80%)
- μλ¦¬νΈ λ³΄μ‘΄: μΈλλΉ μμ 5κ° κ°μ²΄
- π― μμ°λ μ΅λν: μκ°λΉ 35κ° λͺ©ν μμ°μ¨
- π 거리 μ΅μν: μ€λΉ κ° λ¬Όλ₯ μ΄λ 거리 λ¨μΆ
- β μ μ½ μ‘°κ±΄ λ§μ‘±: κ³΅κ° λ° μ΄μ μ μ½ μ‘°κ±΄ μ€μ
pip install matplotlib numpygit clone https://github.com/imjeasung/Factory-Layout-Optimizer.git
cd Factory-Layout-Optimizer
python GA_Facility_Optimizer.pyνλ‘μ νΈμ μ€λΉ ꡬμ±, 곡μ μμ, 곡μ₯ ν¬κΈ° λ±μ νμμ λ°λΌ μμ ν μ μμ΅λλ€.
Pull requestsλ₯Ό νμν©λλ€! μ£Όμ λ³κ²½μ¬νμ κ²½μ° λ¨Όμ μ΄μλ₯Ό μ΄μ΄ λ Όμν΄ μ£ΌμΈμ.
μ΄ νλ‘μ νΈλ MIT λΌμ΄μ μ€ νμ μμ΅λλ€. μμΈν λ΄μ©μ LICENSE νμΌμ μ°Έμ‘°νμΈμ.
Made with β€οΈ by imjeasung
π Star this repo if you find it useful!


