-
Notifications
You must be signed in to change notification settings - Fork 18
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
Refactor some of the code related to model creation #886
Conversation
abelsiqueira
commented
Oct 16, 2024
•
edited
Loading
edited
- Create new files src/utils.jl and src/model-preparation.jl to help split the code from src/create-model.jl.
- The file src/utils.jl contains useful functions for create_model.
- The file src/model-preparation should be useful in the future for data and structure creation that should happen before the model.
- Create a simple sets NamedTuple for this section.
- Create function add_expressions_to_dataframe! with a large chunk of code from create_model that adds incoming and outgoing flows to some dataframes.
- Create function create_variables! that creates the variables in create_model.
- Both of these functions actually involve things happening inside create_model, but for now we are keeping them there.
- Move the sets creation to a function create_sets.
- Store the sets in a NamedTuple
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
=======================================
Coverage 99.90% 99.90%
=======================================
Files 20 22 +2
Lines 1023 1046 +23
=======================================
+ Hits 1022 1045 +23
Misses 1 1 ☔ View full report in Codecov by Sentry. |
ca44739
to
482a75e
Compare
Create new files src/utils.jl and src/model-preparation.jl to help split the code from src/create-model.jl. The file src/utils.jl contains useful functions for create_model. The file src/model-preparation should be useful in the future for data and structure creation that should happen before the model. Create a simple sets NamedTuple for this section. Create function add_expressions_to_dataframe! with a large chunk of code from create_model that adds incoming and outgoing flows to some dataframes. Create function create_variables! that creates the variables in create_model. Both of these functions actually involve things happening inside create_model, but for now we are keeping them there.
482a75e
to
ea4291f
Compare
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Copy-pasted from previous run comparing only the first commit
|
Move the sets creation to a function create_sets. Store the sets in a NamedTuple.
541b56c
to
090b109
Compare
This doesn't close #885, but it can be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!