Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Optimization in Julia
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Philip I. Thomas
November 14, 2014
Technology
0
1.9k
Optimization in Julia
Philip I. Thomas
November 14, 2014
Tweet
Share
More Decks by Philip I. Thomas
See All by Philip I. Thomas
Staffjoy Seed Round Pitch Deck
philipithomas
1
9.4k
Decision Algorithms In Production.
philipithomas
0
300
Staffjoy Dec 2015 Angel Round Pitch Deck
philipithomas
1
9.4k
Staffjoy Y Combinator Fellowship Demo Day Pitch Deck
philipithomas
1
8.6k
Predictive Analysis using JuMP
philipithomas
0
430
Overview of Programming Languages
philipithomas
0
550
Other Decks in Technology
See All in Technology
Sansanでの認証基盤内製化と移行
sansantech
PRO
0
480
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
740
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
800
マルチプレーンGPUネットワークを実現するシャッフルアーキテクチャの整理と考察
markunet
2
250
20260311 ビジネスSWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
330
身体を持ったパーソナルAIエージェントの 可能性を探る開発
yokomachi
1
120
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
140
ガバメントクラウドにおけるAWSの長期継続割引について
takeda_h
2
190
2026年もソフトウェアサプライチェーンのリスクに立ち向かうために / Product Security Square #3
flatt_security
1
300
ランサムウエア対策してますか?やられた時の対策は本当にできてますか?AWSでのリスク分析と対応フローの泥臭いお話。
hootaki
0
140
AI時代の「本当の」ハイブリッドクラウド — エージェントが実現した、あの頃の夢
ebibibi
0
120
AI時代のSaaSとETL
shoe116
1
150
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
3
400
YesSQL, Process and Tooling at Scale
rocio
174
15k
Darren the Foodie - Storyboard
khoart
PRO
3
2.9k
Making Projects Easy
brettharned
120
6.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
Documentation Writing (for coders)
carmenintech
77
5.3k
Agile that works and the tools we love
rasmusluckow
331
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
RailsConf 2023
tenderlove
30
1.4k
HDC tutorial
michielstock
1
540
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Transcript
Optimization in Julia Philip I. Thomas, philipithomas.com
Goal Give an understanding of how to formulate and express
an optimization problem in JuMP (Julia for Mathematical Programming)
About Me • philipithomas.com • Engineer, OpenDNS • Education -
Systems Engineering and Physics • For fun - Workforce Scheduling
Agenda • Optimization and Operations Research • Julia • JuliaOpt
• Examples
Optimization and OR
Optimization Minimize or maximize a function subject to constraints. •
Linear Programming • Nonlinear Programming • Dynamic Programming • Constraint Programming
Minimize x Subject to x >= 0
Minimize x Subject to x >= 0 Min 0
Minimize x - y Subject to x <= 0 y
>= -4 x - 2y = -2
Minimize x - y Subject to x <= 0 y
>= -4 x - 2y = -2 Substitute x - y = -2 + y Min -6 (x = -2, y = 4)
Minimize -2x - 3y - 3z Subject to 3x +
2y + z = 10 3x + 5y +3z = 15 x, y, z > 0 Source: Wikipedia
Minimize -2x - 3y - 3z Subject to 3x +
2y + z = 10 3x + 5y +3z = 15 x, y, z > 0 Min -130/7 Source: Wikipedia
Simplex Algorithm Source: Wikipedia
Minimize -2x - 3y - 3z Subject to 3x +
2y + z = 10 3x + 5y +3z = 15 x, y, z > 0 x, y, z ∈ Z
Minimize -2x - 3y - 3z^2 Subject to 3x +
2y + z = 10 3x + 5y +3z = 15 x, y, z > 0
Minimize -2x - 3y*z Subject to 3x + 2y +
z = 10 3x + 5y +3z = 15 x, y, z > 0
Complexity Notation • Nondeterministic-Polynomial Time • Some of the hardest
problems in computer science
Operations Research Optimization and Applied Mathematics in Business • Military
• Workforce scheduling • Routing • Factories • Sports Games
Julia
None
About Julia • Fast • JIT Compiler • Dynamic Dispatch
• Package Manager • Parallel and Distributed • Call C and Python functions • Open Source (JuliaLang.org)
http://learnxinyminutes.com/docs/julia/
JuMP
Julia for Mathematical Programming • Modeling language written in Julia
• Supports a variety of solvers • LP, IP, Convex Programming, Constraint Programming
Solvers • Commercial / Open Source • Parallelism / Stability
Source: JuliaOpt.org
Why JuMP • High-Level • Portable • Extensible
Examples
Examples Online github.com/philipithomas/jump-examples Need Julia with JuMP package and CBC
Solver.
macklemore.jl We’re going to the thriftshop and need 99 cents.
Coins are heavy - minimize the mass needed to carry 99 cents. Source: ProjectEuler.net
sudoku.jl Constraint Satisfaction - Not Optimization http://www.dailysudoku.com/sudoku/today.shtml
salesman.jl https://forio.com/app/showcase/route-optimizer/
Scheduling • 20 employees • not available all the time
• varying demand throughout a day • some part time, some full time • minimum shift length, maximum shift length • time between shifts
Conclusion
Agenda • Optimization and OR • Julia • JuliaOpt •
Applications
Goal Give an understanding of how to formulate and express
an optimization problem in JuMP (Julia for Mathematical Programming)
Further Reading • In Pursuit of the Traveling Salesman: Mathematics
at the Limits of Computation by William Cook • Data Smart (Chapter 4) by John Foreman • Intro to Operations Research by Hillier
Optimization in Julia Philip I. Thomas, philipithomas.com