click to edit master title style - brigham young...
TRANSCRIPT
Click to edit Master title style
APMonitor Modeling Language
John HedengrenBrigham Young University
Advanced Process Solutions, LLChttp://apmonitor.com
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Overview of APM
Software as a service accessible through: MATLAB, Python, Web-browser interface Linux / Windows / Mac OS / Android platforms
Solvers APOPT1, BPOPT1, IPOPT2, SNOPT3, MINOS3
Problem characteristics: Large-scale Nonlinear Programming (NLP) Mixed Integer NLP (MINLP) Multi-objective Real-time systems Differential Algebraic Equations (DAEs)
1 – APS, LLC2 – EPL3 – SBS, Inc.
mmn zuyxzuyxhzuyxg
zuyxtxfts
zuyxJ
,),,,(0),,,(0
,,,,0..
),,,(min
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Overview of APM
Vector / matrix algebra with set notation Automatic Differentiation
Exact 1st and 2nd Derivatives
Large-scale, sparse systems of equations Object-oriented access
Thermo-physical properties Database of preprogrammed models
Parallel processing Optimization with uncertain parameters Custom solver or model connections
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Unique Features of APM
Initialization with nonlinear presolve
Explicit variable substitution every function call
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
),,,(0
,,,,0
),,,(0),(..
),,(min
21
21
212
11
uyyxh
uyyxtxf
uyyxguxgyts
uyxJ
Intermediate
Variables
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
),,(0),,(0
,,,0..
),,(min
uyxhuyxg
uyxtxfts
uyxJ
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Unique Features of APM
Model development workflow
Solve higher index DAEs (Index 3+ with APM) Index-1 only (e.g. MATLAB ode15s) Index-1 + Index-2 Hessenberg (e.g. DASPK)
Classes of problems LP, QP, NLP, DAE MILP, MIQP, MINLP, MIDAE
Steady State Dynamic Sequential
Simulate 1 4 7
Estimate 2 5 -
Optimize 3 6 -
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Solver Benchmarking – Hock-Schittkowski (116)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
10
20
30
40
50
60
70
80
90
100
Not worse than 2 times slower than the best solver ()
Per
cent
age
(%)
APOPT+BPOPTAPOPT1.0
BPOPT1.0
IPOPT3.10
IPOPT2.3
SNOPT6.1MINOS5.5
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Solver Benchmarking - Dynamic Optimization (37)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
10
20
30
40
50
60
70
80
90
100
Not worse than 2 times slower than the best solver ()
Per
cent
age
(%)
APOPT+BPOPTAPOPT1.0
BPOPT1.0
IPOPT3.10
IPOPT2.3
SNOPT6.1MINOS5.5
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Solver Benchmarking – SBML (341)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 510
20
30
40
50
60
70
80
90
100
Not worse than 2 times slower than the best solver ()
Per
cent
age
(%)
APOPT+BPOPTAPOPT1.0
BPOPT1.0
IPOPT3.10
IPOPT2.3
SNOPT6.1MINOS5.5
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Computational Biology
Drug treatment and discovery – large-scale models
05
1015
1.9
1.95
21
2
3
4
5
6
7
Log(
Viru
s)
HIV Virus Simulation
time (years)Log(kr1)
1.828
2.364
2.899
3.435
3.970
4.506
5.041
5.576
6.112
6.647
Click to edit Master title styleBiological Kinetic Models Modestly Sized
0
20
40
60
80
100
120
# of M
odels
# of Physical Entities
Mean = 20Median = 10
Model sizes from 409 curated models in the Biomodels repository (http://www.ebi.ac.uk/biomodels-main/)
Click to edit Master title styleModel Size Limited by Tools
Large ErbB signalling model (~504 physical entities)* Parameter estimation (simulated annealing) took “24 hours
on a 100-node cluster computer”
We need better tools (parameter estimation, optimization) to deal with large models!
*Chen et al. Mol Syst Biol. 2009;5:239 .
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Flow Assurance for Oil and Gas Industry
Fouling and Plugging largest loss category Billions $$$ per year in lost revenue
Predictive Analytics Real-time or Off-line Monitoring Solution Empirical and First Principles Models
Safe OperationsReliability TargetsRegulatory ReportsMaximize EconomicsTraining Simulators
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Safe, environmentally friendly, and economic operations
Environmental Impact
Safety: Velocity of Inlet Waste Gas
Environmental: Emission Levels
Safety: LEL of Waste Gas
Economic: Fuel Costs
Economic: Size / Insulation
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
UAS System Dynamics
Cable-drogue dynamics using Newton 2nd law
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Dynamic System Example
ModelParameters
! time constanttau = 5! gainK = 2! manipulated variableu = 1
End ParametersVariables
! output or controlled variablex = 1
End VariablesEquations
! first order differential equationtau * $x = -x + K * u
End EquationsEnd Model
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
0 2 4 6 8 10 12 14 16 18 201
2
3
4
Man
ipul
ated
uopt
0 2 4 6 8 10 12 14 16 18 200
5
10
15
Con
trolle
d
xopt
Optimization Under Uncertainty
Conservative movement based on worst case CV
Upper Limit
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Selecting a Model for Predictive Control
Many model forms Linear vs. Non-linear Steady state vs. Dynamic Empirical vs. First Principles
Select the simplest model Accuracy requirements
Steady State Gain Dynamics – Time to Steady State
Speed requirements PID < Linear MPC < Nonlinear MPC
),,,(0),,,(0,,,,0
ModelNonlinear ][][][
][][]1[)(SS Form Discrete
)(SS Form Continuous
d
c
dpuxhdpuxg
dpuxxf
kuDkxCkykuBkxAkx
DuCxyBuAxx
dd
dd
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Friction Stir Welding
A rotating tool creates heat and plasticizes the metal. This allows the metal to be “stirred” together
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Getting Started with APM
Download Software at APMonitor.com Bi-weekly Webinars
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Applications Deployed for Real-time Systems
APMonitor.com Advanced Process Solutions, LLCOct 14, 2012
Future Development Plans
APM Modeling Language MI-DAE systems
Active Development Efforts Mixed Integer solvers that exploit DAE structure Interfaces to other scripting languages
Industrial and Academic Collaborators APOPT and BPOPT MINLP solver development
Additional information at INFORMS session WC04