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 graph data access and constraint creation to use the indices tables #942

Open
8 of 16 tasks
Tracked by #701
abelsiqueira opened this issue Dec 4, 2024 · 1 comment
Open
8 of 16 tasks
Tracked by #701

Comments

@abelsiqueira
Copy link
Member

abelsiqueira commented Dec 4, 2024

The goal of the issue is to remove most/all data from graph. The easiest way to do this will be to find a constraint or similar loop that accesses graph[...]... and create the necessary columns in the corresponding DB. Sometimes there is no corresponding DB, so a necessary step is moving that loop to use a DB.

Some things to do:

  • Use TulipaIO instead of directly accessing the data
  • Inside each function, create a joined table appending more columns to the indices tables
  • Remove the dependency on data stored in the graph and use the new table instead
  • Change loops over sets to loop over rows of the new table

One noteworthy point is that to remove profiles we need to store the profile_aggregation in the new table.

After all graph access is removed, remove the objects from graph, or even graph itself.

To avoid becoming a huge PR, we can create smaller PRs or commits per file or per loop. This issue can be worked on by multiple people at the same time then.

The list of files that have graph[...] is below. Some might not be applicable for this issue:

For the add_*_constraints functions, the graph object should NOT be an argument. The sets object should be avoided if possible. If you encounter a place where that is not possible, let's discuss.

@abelsiqueira
Copy link
Member Author

@datejada I've updated the description to mention the creation of a new table inside the relevant function

abelsiqueira added a commit that referenced this issue Dec 5, 2024
abelsiqueira added a commit that referenced this issue Dec 6, 2024
abelsiqueira added a commit that referenced this issue Dec 9, 2024
abelsiqueira added a commit that referenced this issue Dec 18, 2024
Remove graph dependency from src/constraints/consumer.jl.
Create profiles structure with lookup to the profile vector. 

Part of #942 and #642 
Closes #943
abelsiqueira added a commit that referenced this issue Jan 7, 2025
abelsiqueira added a commit that referenced this issue Jan 8, 2025
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