Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnsembleSummary support for DiffEqArray #548

Open
ChrisRackauckas opened this issue Jul 12, 2020 · 0 comments
Open

EnsembleSummary support for DiffEqArray #548

ChrisRackauckas opened this issue Jul 12, 2020 · 0 comments

Comments

@ChrisRackauckas
Copy link
Member

It would be nice to have EnsembleSummary support DiffEqArray outputs, i.e.:

function save_mortality(sol, ind)
    # Save x[5]=flow and N*x[8]=total from solution
    flow_and_total = [[x[5],p.N .* x[8]] for x in sol]
    return (DiffEqArray(flow_and_total,sol.t), false)
end
ensembleprob = EnsembleProblem(prob,  output_func = save_mortality)
sol = solve(ensembleprob, SOSRI(), EnsembleThreads(), saveat = 0.5, trajectories = 1000)

The issue is that the current codepath assumes an array output instead of an array of arrays, so an automated conversion would be the quickest way of getting this supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant