Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

基因演算法與管理科學應用

Genetic Algorithm
& Applications in Management Science

林春成
國立陽明交通大學
工業工程與管理學系
林春成
 教育背景
 台大電機系CS組 博士 (2009)
 台大商研所 碩士 (2007)
 台大電機系CS組 碩士學程 (2000-2002,後直升)
 台大數學系 學士 (2000)
 經歷
 陽明交大工工系 特聘教授 (2020 – 迄今)
 陽明交大管院 副院⻑ (2017 – 迄今)
 陽明交大EMBA學程 教授 (2019 – 迄今)
 亞洲大學 講座教授 (兼任) (2020 – 迄今)
 中醫大附設醫院 顧問 (2020 – 迄今)
 台灣作業研究學會 理事⻑ (2022 – 迄今)
 工業工程學會 理事 (2022 – 迄今)
 演算法與計算理論學會 理事 (2020 – 迄今)
 IEEE Senior Member (2017 – 迄今)
 陽明交大工工系 教授(2016-迄今)、副教授(2013–16)、助理教授(2011–13)
 IEEE Taipei Section 財務⻑ (2017 – 2019)
 日本東京大學 客座副教授 (2012/8/1–31)
 北市大資科系 助理教授 (2010 – 2011)
 高科大資工系 助理教授 (2009 – 2010) 2
林春成
 研究興趣
 演算法、機器學習、作業研究
 智慧製造、資通訊技術應用、計算管理科學

 主要獎項
 科技部傑出研究獎 (2019)
 工業工程獎章 (2022)
 傑出電機工程教授獎 (2021)
 資訊學會李國鼎穿石獎 (2020)
 終身全球前2%頂尖科學家 (1960-2020/2021)
 系統學會傑出青年獎 (2020)
電腦學會傑出青年獎 (2018)
優秀青年工業工程師獎 (2017)
優秀青年電機工程師獎 (2017)
管科學會呂鳳章先生紀念獎章 (2017)
 4次交大優良教學獎 (2019、2018、2017、2015)
3
Contact Information
 E-mail: cclin321@nycu.edu.tw

 URL: https://cclin321.iem.nycu.edu.tw/

 Office: 管理二館501室

 Phone: 校外(03)5731758; 校內31758

 Office hour: E-mail contact in advance

4
Operations Research / Management Science

 Methodology
 Mathematical Programming
 Metaheuristic Algorithm
 Statistics
 Machine Learning
 Artificial Intelligence

 Applications
 Assignment Problem / Matching Problem
 Facility Location Problem
 Flow Shop Scheduling / Job Shop Scheduling
 Traveling Salesman Problem / Vehicle Routing Problem
 Supply Chain Management & Logistics
5
Motivations
 Practical problems are generally NP-Complete
or NP-hard Problems

 Generally, they are solved by Metaheuristic Algorithms

 The most basic metaheuristic algorithm is


genetic algorithm (a.k.a., evolutionary algorithm)

 Learn how to implement genetic algorithm


to solve practical problems

6
最佳化問題

最佳化目標
決策變數
轉換、限制 Max f(x) or Min c(x)
x = (x1, x2, …, xm)
(⽬標可能超過⼀個)

7
數學規劃法 vs 啟發式演算法 vs 機器學習法

 數學規劃法:用套裝軟體求解
決策變數 數學規劃模型轉換 最佳化目標
x = (x1, x2, …, xm) (限制式: ≥ , =, ≤ , …) Max f(x) or Min c(x)

 啟發式演算法:猜決策變數的解,因可算得其目標值,故再反覆迭代改進解
決策變數 用演算法流程轉換 最佳化目標
x = (x1, x2, …, xm) (if, else, while …) Max f(x) or Min c(x)

 機器學習法:只好用輸入的x和輸出的y的實際資料來學習黑盒子模型的行為

決策變數 最佳化目標
x = (x1, x2, …, xm)
無法轉換(黑盒子) Max f(x) or Min c(x)

8
例如 …
把限制式和目標式代入到CPLEX、
 數學規劃法 LINGO、Gurobi等套裝軟體求解
x = (x1, x2) 4 x1 + 7 x2 ≤ 620 產能
最大化利潤
x1 = 產品1數量 6 x1 + 3 x2 ≤ 360 產能
Max f(x) = 9 x1 + 10 x2
x2 = 產品2數量 x1 和 x2 都是整數

 啟發式演算法 用程式語言(如if, for)來描述


100個決策變數 float cost = 0; 最小化成本
x = (x[0], …, x[99]) for ( i = 0; i < 100 ; i++ ) Min cost
cost += d[i][x[i]];
猜幾組答案 算這幾組答案的目標值
根據目標值優劣來回饋改進這幾組解
 機器學習法
機台的20個參數 最大化良率
x = (x1, x2, …, x20)
無法轉換(黑盒子) Max y

用 輸入的x 和 輸出的y 的實際資料來訓練⼀個迴歸模型


9
例如 …
把限制式和目標式代入
 數學規劃法 到CPLEX、LINGO等套裝軟體求解
x = (x1, x2) 4 x1 + 7 x2 ≤ 620 產能
最大化利潤
x1 = 產品1數量 6 x1 + 3 x2 ≤ 360 產能
Max f(x) = 9 x1 + 10 x2
x1 = 產品2數量 x1 和 x2 都是整數

 啟發式演算法 用程式語言(如if, else, while)來描述


100個決策變數 float cost = 0; 最小化成本
x = (x[0], …, x[99]) for ( i = 0; i < 100 ; i++ ) Min cost
cost += d[i][x[i]];
猜幾組答案 算這幾組答案的目標值
根據目標值優劣來回饋改進這幾組解
 機器學習法
機台的20個參數 最大化良率
x = (x1, x2, …, x20)
無法轉換(黑盒子) Max y

用 輸入的x 和 輸出的y 的實際資料來訓練⼀個迴歸模型


10
例如 …
把限制式和目標式代入
 數學規劃法 到CPLEX、LINGO等套裝軟體求解
x = (x1, x2) 4 x1 + 7 x2 ≤ 620 產能
最大化利潤
x1 = 產品1數量 6 x1 + 3 x2 ≤ 360 產能
Max f(x) = 9 x1 + 10 x2
x1 = 產品2數量 x1 和 x2 都是整數

 啟發式演算法 用程式語言(如if, for)來描述


100個決策變數 float cost = 0; 最小化成本
x = (x[0], …, x[99]) for ( i = 0; i < 100 ; i++ ) Min cost
cost += d[i][x[i]];
猜幾組答案 算這幾組答案的目標值
根據目標值優劣來回饋改進這幾組解
 機器學習法
機台的20個參數 最大化良率
x = (x1, x2, …, x20)
無法轉換(黑盒子) Max y

用 輸入的x 和 輸出的y 的實際資料來訓練⼀個迴歸模型


11
Metaheuristics vs Mathematical Programming

Simple! Practical! Sometimes hard!


Problem
Solution
Modelling
encoding
Mathematical Programming:
Max 9X + 10Y Total Profit
Subject to (s.t.)
Metaheuristic 4X + 7Y ≤ 4220 Capacity Constraint #1
Black Box 7X + 6Y ≤ 4510 Capacity Constraint #2
Algorithm 9X + 8Y ≤ 7200 Capacity Constraint #3
6X + 3Y ≤ 3600 Capacity Constraint #4
X, Y ≥ 0

Solution
decoding S/W optimizer

 Optimal solutions  Optimal solutions are guaranteed!


or approximation solutions  But only suitable
 Could solve large-scale problems for small-scale problems
12
Metaheuristic Algorithm
Begin

Generate initial
solutions

Stop Yes Output the final


Criteria (best) solution
No

Find neighbor End


solutions

Neighbors replace
some old solutions
or not
13
global optimum
1D f(x)
local
optimum f(x' )
accept

f(x) reject
f(x' )
x
x' x x'
Initial
global optimum
2D n-D space
x = (x1, x2, …, xn)

f(x' ) …
f(x)

x x'
14
Population-based metaheuristics

z z

y y
x x
Well-known Metaheuristics
 Local-search-based metaheuristics
 Simulated Annealing (SA)

 Population-based metaheuristics
 Genetic Algorithm (GA)
 Particle Swarm Optimization (PSO)
 Ant Colony Optimization (ACO)

16
Example
 VLSI floorplanning

CPU chip
 Related work
 Wong & Liu, “A new algorithm for floorplan design,” DAC-86.
 Wong & Liu, “Floorplan design for rectangular and L-shaped
modules,” ICCAD'87.
 Wong, Leong, Liu, Simulated Annealing for VLSI Design, pp.
31--71, Kluwer Academic Publishers, 1988.
17
Objectives
 Genetic algorithm (GA)

 Implementing the GA in Python language


or using Google OR-tools

 GA applications
in operations research/management science (OR/MS)
 Facility location problem
 Facility layout problem
 Assignment problem
 Scheduling problem
 Container packing problem
 Vehicle routing problem
 Dynamic optimization, many-objective problem, uncertainty …

 Preparing presentation of an academic paper


or implementing a practical project
18
Schedule (tentative)
 Week 1: Introduction + Installation
 Week 2: (2/20 4:00上課) Basic Python Programming (1) / 交2⼈⼀組的名單
 Week 3: 228和平紀念日補假
 Week 4: Basic Python Programming (2)
 Week 5: Genetic Algorithm (GA) – Basic (1)
 Week 6: Genetic Algorithm (GA) – Basic (2)
 Week 7: Assignment Problem Using GA / 說明專題 & 專題分組
 Week 8: 清明節放假
 Week 9: (4/10 4:00上課) Traveling Salesman Problem Using GA
 Week 10: 期中報告(分組,每組5分鐘說明期末專題要報告/實作的論文)
 Week 11: Vehicle Routing Problem Using GA
 Week 12: Flow Shop Scheduling Using GA
 Week 13: Job Shop Scheduling Using GA
 Week 14: Facility Location Problem Using GA
 Week 15: 期末專題
 Week 16: 期末專題
 Week 16: 06/04 (Sun. 11:59PM): 交Term project投影片、書面報告
 Week 17: 彈性補充教學
 Week 18: 彈性補充教學
Logistics
 ⼀般上課週
 週⼀3:30 ~ 6:20 (M415)
 教學約⼀小時,剩餘時間當場實作作業
 助教當場檢查正確後即可先走 (得分100%)
 沒交,當週作業沒分 (得分0%)
 兩⼈⼀組寫作業

 期中報告週(week 10)、期末專題週(weeks 15-16)


 四⼈⼀組做專題

20
Evaluation
 每週實作作業 40%
 2⼈⼀組,每週⼀於課堂上有實作作業,
當場做完當場交,先做完可先走(100分),沒交當週作業沒分(0分)
 請假者仍要補交,在當週週二前跟助教約時間繳交,否則用email
 每週三會把當週作業解答影片上傳至e3

 期中報告15% (上台報告)
 分?組(4⼈⼀組),各組上台用5分鐘報告期末專題的規劃
 第11週前上傳投影片至e3系統

 期末專題 45% (報告週每堂均簽到 + 上台報告 + 書面報告)


 分組報告/實作⼀篇期刊論文  上台報告(少於30分鐘)
 第16週交投影片和書面報告  第16週上傳到 e3系統
 (佔5%) 專題報告的二週,每個⼈每堂均要簽到

21
課程網站與助教
 所有的課程資訊可查e3系統

 助教(管理二館002b室):
 周鈺倫(工工碩班) (E-mail: ricky890705@gmail.com)
 陳靜 (工工碩班) (E-mail: sylvie.cjing@gmail.com)
 阮妍洋(工工碩班) (E-mail: ntt.thao2794@gmail.com)

22
Further courses
 Evolutionary Computation (演化計算/仿生計算)

 Metaheuristics (萬用啟發式演算法)

 Soft Computing

 Fuzzy Systems

 Computational Intelligence

 Artificial Intelligence

 Computer Vision, Image Processing, Natural Language

23
References
 Journals on EC methodology
 IEEE Transactions on Evolutionary Computation
 IEEE Transactions on Cybernetics
 IEEE Computational Intelligence Magazine
 Evolutionary Computation (MIT Press)
 Applied Soft Computing (Elsevier Press)
 Swarm and Evolutionary Computation (Elsevier Press)
 Information Sciences (Elsevier Press)
 Evolutionary Intelligence (Springer Press)
 Memetic Computing (Springer Press), Soft Computing (Springer Press),
Natural Computing (Springer Press)
 Journals on OR/MS applications
 European Journal of Operational Research (Elsevier Press)
 Computers & Industrial Engineering (Elsevier Press)
 Computers & Operations Research (Elsevier Press)
 International Journal of Production Economics (Elsevier Press)
 International Journal of Production Research (Tylor & Francis Press)
 … 24
References
 Conferences
 IEEE Congress on Evolutionary Computation (CEC)
 IEEE World Congress on Computational Intelligence (WCCI)
 IEEE Symposium Series on Computational Intelligence (SSCI)
 ACM Genetic and Evolutionary Computation Conference (GECCO)
 International Conference on Genetic Algorithms (ICGA) / GP

25

You might also like