You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Currently Julia performs poorly with anonymous functions, and the sorting system has used a funny trick with types to pass a different comparison function. After reading @mauro3's comment about implicit objective functions in #30, I got an idea for a proposal for how to solve 3 problems in a somewhat cluncky way.
immutable Density <:ODEImplicit
mu::Float64endfunctionode_fun(typ::Density, y, y_t, t)
return (typ.mu .* y .* t) - y_t
end
t_out, y_out =ode_xx(Density(1.091), y0, [0.1.])
This would of be in addition to the normal F(y,t) = y', system currently proposed. This approach has 3 main advantages.
It uses types instead of anonymous functions. That enables the use of Julia's dispatch and inference system to generate specific code for each ODE problem. Better performance will probably be the result.
It gives a nice way to access system properties inside the differentiation function. If you do not need system properties, you can define the immutable/type as empty.
It gives a natural way to tag different problem specifications in a way that encourages multiple dispatch.
The text was updated successfully, but these errors were encountered:
Hmm... Different objective function specifications can actually just be controlled by a keyword argument. We would need to call a different internal solver function anyway, and then the check of the keyword argument will be outside the inner loop and not affect the types of the returned values.
Currently Julia performs poorly with anonymous functions, and the sorting system has used a funny trick with types to pass a different comparison function. After reading @mauro3's comment about implicit objective functions in #30, I got an idea for a proposal for how to solve 3 problems in a somewhat cluncky way.
This would of be in addition to the normal
F(y,t) = y'
, system currently proposed. This approach has 3 main advantages.The text was updated successfully, but these errors were encountered: