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

Time creating dataframes et al. separately from reading CSV #680

Closed
abelsiqueira opened this issue Jun 27, 2024 · 0 comments · Fixed by #681
Closed

Time creating dataframes et al. separately from reading CSV #680

abelsiqueira opened this issue Jun 27, 2024 · 0 comments · Fixed by #681
Assignees
Labels
Type: improvement Better way of doing something

Comments

@abelsiqueira
Copy link
Member

What and Why

The create_energy_problem_from_csv_folder function times two calls:

  • create_connection... which reads the CSV files into the connection
  • EnergyProblem(connection) which reads the dataframes input, creates internal structures and compute constraints partitions.

Most timing should happen inside EnergyProblem(connection), then it also shows when called directly.

Possible Drawbacks

No response

Related Issues

No response

@abelsiqueira abelsiqueira added the Type: improvement Better way of doing something label Jun 27, 2024
@abelsiqueira abelsiqueira self-assigned this Jun 27, 2024
abelsiqueira added a commit to abelsiqueira/TulipaEnergyModel.jl that referenced this issue Jun 27, 2024
Instead of using @Elapsed and saving the time inside
EnergyProblem, use TimerOuputs.
Time the inner parts of the EnergyProblem constructor.

Closes TulipaEnergy#680
abelsiqueira added a commit to abelsiqueira/TulipaEnergyModel.jl that referenced this issue Jun 27, 2024
To avoid changing the EnergyProblem structure too much
because of timing, we create a timings dictionary.
We time the constructor of EnergyProblem instead of
the function that reads the CSV folder. This way
we time the functions inside the constructor, which
are the expensive functions in the input.

Closes TulipaEnergy#680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: improvement Better way of doing something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant