[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DAE daspk solver problem

From: Bill Greene
Subject: Re: DAE daspk solver problem
Date: Fri, 28 Oct 2016 12:02:34 -0400

I was able to solve this using ode5r from odepkg. My test code is below:

function radau5PendulumDAE

vopt = odeset ('InitialStep', 1e-3, 'AbsTol', 1e-8);
len=1; theta0=pi/2; m=1; g=9.81;
y0=[ len*sin(theta0), -len*cos(theta0), 0, 0, m*g];
odef = @(t,x) odeFunc (t, x, m, g, len)
sol=ode5r (odef, [0, 5], y0, vopt);
figure; plot(sol.x, sol.y(:,1));

function y = odeFunc (t, x, m, g, len)
lam = x(5);
y=[x(2); -lam*x(1); x(4); -lam*x(3)-m*g; x(1)^2 + x(3)^2 - 1];

On Fri, Oct 28, 2016 at 2:18 AM, Sebastian Schöps <address@hidden> wrote:
Lazy_Tom wrote
> I don't know why DAE solvers index capabilities are not reported in Octave
> manual. Matlab at least tells you that you can go no further than index 1
> (at least without doing some "magic"...)

You are right. Feel free to oben a bug report at savannah, maybe immediately
suggesting a string that can be added to the help. However, I assume that
dassl and daspk will be deprecated in some future version since we are
moving to odeXY compatible solvers.

Lazy_Tom wrote
> about the paper you cited, yup, I'm aware of it and I agree, it is quite
> nice.
> Well, at least I'll gave it a try, I think that for DAE problems I'll move
> to openModelica

I think that ode5r from odepkg should be able to solve index3 problems since
its based on Radau 5 [1]. We hope to have a new release of odepkg quickly
after Octave 4.2. I will keep in mind to include such information in the

Regarding openModelica: yes, they do some clever tricks for higher index. As
far as I recall it's based on dummy derivatives [2]. Such stuff is easier
for modelica since it is in some sense a symbolic language. However, to my
best knowledge, it is not really well suited for big problems. So, as usual,
the best choice depends on what you want to do :)



View this message in context:
Sent from the Octave - General mailing list archive at

Help-octave mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]