GAMS differential equations

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

GAMS differential equations

Post by Archiver »


Hi, I wanna ask a question about GAMS,
I have an equation which contains differential equations.

here is an example of it ;

dx/dt = -k1*x + k2*y - k3*x

how can we code it in GAMS ?


thanks in advance




Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS differential equations

Post by Archiver »


Hi, I think that GAMS doesn't allow dynamic programming without previous discretization, If you want to solve an optimization problem considering the dynamic of the system you can use orthogonal collocation (as an example of a discretization method), you can find a very complete example of applying this technique programmed in GMAS in:

http://cepac.cheme.cmu.edu/pasi2008/sli ... index.html

In this example the aurthor solves an optimization problem for a batch chemical reactor (dynamic behaviour) in GAMS.
For more information about Orthogonal collocation method you can read:

1. Finlayson, B. A., Orthogonal collocation on finite elements--progress and potential. Mathematics and Computers in Simulation 1980, 22, (1), 11-17.

2. Finlayson, B. A., Nonlinear analysis in chemical engineering. Ravenna Park Publishing: Seattle, 2003; p vi, 328 p.

3. Flores-Tlacuahuac, A.; Grossmann, I. E., Simultaneous cyclic scheduling and control of a multiproduct CSTR. Industrial &
Engineering Chemistry Research 2006, 45, (20), 6698-6712.

4. Rice, R. G.; Duong, D. D., Applied mathematics and modeling for chemical engineers. Wiley: New York, 1995. (Chapter 8)

The fourth reference is very good, I hope this helps
Best regards!!!



2010/1/13 lvegas

Hi, I wanna ask a question about GAMS,
I have an equation which contains differential equations.

here is an example of it ;

dx/dt = -k1*x + k2*y - k3*x

how can we code it in GAMS ?


thanks in advance

--
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.






--
Daniel Andrés Navia López
Ingeniero Civil Químico
Mg.Sc.Ciencias de la Ingeniería, Mención Ingeniería Química
Máster en Investigación en Ingeniería de Procesos y Sistemas
626752875


--
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS differential equations

Post by Archiver »


Daniel is correct on the orthogonal collocation if you want to perform
optimization with the DAEs. If you are just looking to simulate,
DASPK or MATLAB may be sufficient (for index-1 types).

There are some good modeling languages that handle differential and
algebraic equations and perform the orthogonal collocation for you.
Here are some links:

http://en.wikipedia.org/wiki/ASCEND
http://en.wikipedia.org/wiki/APMonitor
http://en.wikipedia.org/wiki/EcosimPro
http://en.wikipedia.org/wiki/Modelica

I don't know if they are as efficient as handling the orthogonal
collocation in GAMS, however. Does anyone else have experience on
this?

-Giovanni

On Jan 18, 2:54 am, daniel navia wrote:
> > Hi, I think that GAMS doesn't allow dynamic programming without previous
> > discretization, If you want to solve an optimization problem considering the
> > dynamic of the system you can use orthogonal collocation (as an example of a
> > discretization method), you can find a very complete example of applying
> > this technique programmed in GMAS in:
> >
> > http://cepac.cheme.cmu.edu/pasi2008/sli ... index.html
> >
> > In this example the aurthor solves an optimization problem for a batch
> > chemical reactor (dynamic behaviour) in GAMS.
> > For more information about Orthogonal collocation method you can read:
> >
> > 1. Finlayson, B. A., Orthogonal collocation on finite elements--progress
> > and potential. Mathematics and Computers in Simulation 1980, 22, (1), 11-17.
> >
> > 2. Finlayson, B. A., Nonlinear analysis in chemical engineering. Ravenna
> > Park Publishing: Seattle, 2003; p vi, 328 p.
> >
> > 3. Flores-Tlacuahuac, A.; Grossmann, I. E., Simultaneous cyclic
> > scheduling and control of a multiproduct CSTR. Industrial &
> > Engineering Chemistry Research 2006, 45, (20), 6698-6712.
> >
> > 4. Rice, R. G.; Duong, D. D., Applied mathematics and modeling for
> > chemical engineers. Wiley: New York, 1995. (Chapter 8)
> >
> > The fourth reference is very good, I hope this helps
> > Best regards!!!
> >
> > 2010/1/13 lvegas
> >
> >
> >
> >
> >
>> > > Hi, I wanna ask a question about GAMS,
>> > > I have an equation which contains differential equations.
> >
>> > > here is an example of it ;
> >
>> > > dx/dt = -k1*x + k2*y - k3*x
> >
>> > > how can we code it in GAMS ?
> >
>> > > thanks in advance
> >
>> > > --
>> > > "gamsworld" group.
>> > > To post to this group, send email to gamsworld@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > gamsworld+unsubscribe@googlegroups.com
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/gamsworld?hl=en.
> >
> > --
> > Daniel Andrés Navia López
> > Ingeniero Civil Químico
> > Mg.Sc.Ciencias de la Ingeniería, Mención Ingeniería Química
> > Máster en Investigación en Ingeniería de Procesos y Sistemas
> > 626752875- Hide quoted text -
> >
> > - Show quoted text -


Post Reply