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

Change default output structure #123

Open
VEZY opened this issue Jan 7, 2025 · 0 comments
Open

Change default output structure #123

VEZY opened this issue Jan 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@VEZY
Copy link
Member

VEZY commented Jan 7, 2025

The structure of the output is very complex at the time, with for each scale a vector with values for each time-step with a vector of the results for each node inside. When we transform it into a DataFrame, it takes as long as making the whole simulation.

Proposition: simplify the output structure with for each scale one vector of nametuple with the timestep, the node, and the values of the variables, e.g.:

Leaf = [
 (timestep=1, node = node_8, area=1.0, length=2.0),
 (timestep=1, node = node_11, area=1.0, length=2.0),
 (timestep=2, node = node_8, area=1.5, length=2.1),
 (timestep=2, node = node_11, area=1.8, length=3.0),
]

Plant = [
...
]

This way it would already follow the Tables.jl interface, so no copy would be done when transforming into a DataFrame.

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

No branches or pull requests

1 participant