0% found this document useful (0 votes)
71 views

A Brief GAMS Tutorial For Dynamic Optimization

This document provides an overview of dynamic optimization problems and how they can be formulated as nonlinear programming problems using collocation on finite elements. It discusses how differential algebraic equation (DAE) models from engineering are converted to NLP problems by discretizing the time domain using collocation points. An example dynamic optimization problem of controlling a Hicks reactor is presented to demonstrate how the model equations are coded in GAMS.

Uploaded by

José Salinas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

A Brief GAMS Tutorial For Dynamic Optimization

This document provides an overview of dynamic optimization problems and how they can be formulated as nonlinear programming problems using collocation on finite elements. It discusses how differential algebraic equation (DAE) models from engineering are converted to NLP problems by discretizing the time domain using collocation points. An example dynamic optimization problem of controlling a Hicks reactor is presented to demonstrate how the model equations are coded in GAMS.

Uploaded by

José Salinas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A Brief GAMS Tutorial

for Dynamic Optimization

L. T. Biegler
Chemical Engineering Department
Carnegie Mellon University
Pittsburgh, PA
Dynamic Optimization Problem

s.t.

t, time tf, final time


z, differential variables u, control variables
y, algebraic variables p, time independent parameters
Carnegie Mellon
DAE Models in Engineering

Differential Equations
• Conservation Laws (Mass, Energy, Momentum)

Algebraic Equations
• Constitutive Equations, Equilibrium (physical properties,
hydraulics, rate laws)

Characteristics
• Large-scale models – not easily scaled
• Sparse but no regular structure
• Direct solvers widely used
• Coarse-grained decomposition of linear algebra

Carnegie Mellon
Nonlinear Programming Formulation

Nonlinear Dynamic
Optimization Problem

Collocation on
finite Elements

Nonlinear Programming
Problem (NLP)

Carnegie Mellon
Collocation on Finite Elements
Polynomials
True solution
•" •" •"
•" •" •"
•" •" •" •"
•" •"
•"
" " " " " " " " " " " "
to ti Collocation points
tf
i
Mesh points
Finite element, i

" " " "


element i " " "
" " "
" "

Algebraic and Control variables


Discontinuous
Carnegie Mellon
Nonlinear Programming Problem

s.t.

Carnegie Mellon
Dynamic Optimization:
Methods of Solution

•  GAMS – requires complex set notation and conditional


statements, general formulation with all collocation
equations
•  AMPL – similar to GAMS, more elegant set notation
and conditional statements, general formulation with all
collocation equations
•  DynoPC – requires only statement of model, data-driven
program in Windows, uses IPOPT and ADOL-C

Carnegie Mellon
Example: Hicks
Reactor Problem

Carnegie Mellon
Example: Hicks Reactor Problem

Carnegie Mellon
Introduction and define Sets

Carnegie Mellon
Define Sets and Conditional Sets

Carnegie Mellon
Define parameters for collocation

Carnegie Mellon
Define Variables and Equations

Carnegie Mellon
Collocation Model

Carnegie Mellon
Initialization and Solution

Carnegie Mellon

You might also like