Marco Caliari schrieb:
> Dear Thomas,
> 
> finally I jointed the OctaveForge developers. I'm using your odepkg 
> quite a lot in this period, and I have the following remarks/suggestions 
> (in principle, I can implement all of them):
> 
> 1) It should be possible to avoid to store the solution at each time 
> step, otherwise, for very long integrations, you may have 'out of 
> memory'. This could be easily handled with an additional flag.
> 
> 2) Besides the OutputFcn, it would be nice to have an output function 
> every a certain number of time steps (e.g., producing plots).
> 
> 3) It would be nice if the OutputFcn could modify the solution (we 
> already discussed about it). It should be enough to allow the output 
> function to have a second output argument (the first is true/false), 
> i.e. the possibily modify solution.
> 
> All of the above would not break any compatibility with Matlab, since 
> they should be enabled with some additional options in odeset.
> 
> Comments?
> 
> Best regards,
> 
> Marco

Hi Marco,

it's great that you joined our OF project! And further that OdePkg is useful 
for 
you. BTW, I sent a copy of this email to our octave-dev list, so that others 
can 
participate in our discussion if they want to do that...

1) Please make the necessary changes.

2) Don't know if I understand the exercise?!

3) I don't like the idea that an OutputFcn should be able to modify the 
solution 
vector (because of the word 'Output'), but I like YOUR idea! We have reached a 
state with OdePkg where we are, let's say, 'highly compatible' to Matlab but 
now 
it seems that we are breaking the limits. However, I think the philosophy of 
OdePkg should be different here and maybe this could be another solution:

What if we would have another Option for odeset, let's say, 'PostProcess' or 
similar, which can be of the form empty matrix or function handle. If it is 
empty then nothing happens, if it is a function handle then call that function 
and allow a modification of the solution vector. That function then would be 
called before OutputFcn (and before Events function if there is one available) 
so that OutputFcn gets a modified solution vector. Could we reach the same 
results which such a modification instead of changes to OutputFcn? Matlab 
compatibility still would be there because going beyond the current state of 
the 
art doesn't seem to be a bug for me.

By example what I could imagine:

   vopt = odeset ("PostProcess", @mysolutionmodifier, "OutputFcn", @odeplot);
   [t, y] = ode23 (...)

and the function needed

   function [y, ?varargout?] = mysolutionmodifier (t, y, vflag, varargin)
     vflag is 'init' or [] or 'done' like eg. in odeplot

Changes with this kind of approach would be necessary for odeset.m and 
odepkg_structure_check.m but not for the rest of the solvers that (maybe) 
cannot 
support this feature at all?!

What would you say?

Regards,

   Thomas





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to