-
Notifications
You must be signed in to change notification settings - Fork 4
Add lower_bound()/upper_bound() expression operators #264
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
Open
Juliette-Gerbaux
wants to merge
131
commits into
main
Choose a base branch
from
feat/lb_ub_operator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+528
−26
Open
Changes from all commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
d2b46d2
Add first tests on thermal heuristics
24700f4
Implement accurate heuristic on simple problem
fd3a884
Add comments
0a6d4df
Add fast heuristic and improve accurate
c703040
rename test heuristic
9db4b54
Implement complex model
83360de
Accurate for complex model
bde9904
Type errors and useless solver parameters
4bfd696
check hourly outputs
3427eb4
fast heuristic for complex case
c79ba8f
Test for 2 weeks
dd61b8d
Test for 2 scenarios
5cb88db
add test for scenarios
9a9ec8d
Add more details on tests concerning scenarios
1be8483
Add milp test for second case
96fa166
remove milp test
add82e9
Add test accurate for second test case
40282a0
Add fast test for second test case
5700856
convert fast to optimization problem
dcd2c47
Optimization problem for fast on simple case
ea55b7d
Optimization model fast complex case
25bddc0
Small corrections
db17284
Correct test
6cf6611
Optimization problem heuristic fast second complex test case
3d9cb5b
Equivalent solution for fast heuristic optimization
57e5f7c
Api for fast and accurate models
e828f65
Api for accurate heuristic model
78a4712
Move models to library
0b10902
Move some functions from tests to src
912f083
Remove all functions from simple test
5b5c2b0
Move functions from second complex test to src
412e62c
Remove functions from second test and filter ts on scenarios and time…
e4fc78a
Sort imports
282c0f3
Run black
547ba3c
Change solver to fix tests in the ci
3f3d09f
Fix ci
6061ffe
Rename tests
e7c4cbe
Generalize check_output
8067cc8
More tests on data
c1408fa
Refactor model
17c76e6
Refactor problem.py
0ad6401
Generic database
54c93c0
Correct error
585fc50
Create ThermalProblemBuilder
ec850d8
Resolution steps
a3325e7
Simplify get_value out of database
5fadf5d
Simplify update of database
f259b55
Fix ci
f59285c
Remove not used imports
b6ec938
New test
38aafbb
Small changes
627aeb2
New test with bc
a5dcb1f
Refactoring
2915a19
Exhibit models
8663444
Remove unused imports
945c58d
New class for time scenario parameters
8a42060
Refactor solve
c88263c
Sort imports
3fbfa5d
Formating
8a0fe98
Refactor data_path
dec3bd5
Fix test
8ed1d47
Refactor models
042fc12
Fix test
e099b75
Run isort
f1f08e8
Week scenario parameters
d5f1535
Refactor solve
296f532
Rename functions
cb14787
Refactor cluster parameters
1d2f622
Correct error
c2abe5a
Refactor update
9a4ddbe
New test
75df4fd
New test with ramp
1d0da2c
Refactor
d2334fe
Add description for tests
137dc77
Beginning of new test
0329ffa
Improve edit_value
4b7bb35
Improve cluster parameters
d9831be
Move expected_output class
270200b
Change names
bb36d38
Remove network and database building from thermal_problem_builder
3c694b4
Correct pytest fixture
580ddcc
Remove solve from thermal problem builder
2c9a765
Fix test
1aebb07
Move tests
9ce1fd5
Improve test with parameters
5a57bcb
Use data_path
b4790ce
Improve pytest fixture
35a2f64
Improve tests
a34780f
Fix ci
a4534e7
Fix tests
b039478
Fix test on day ahead reserve
9a68f0e
Unused code
f9f5134
api file
2cf0f5a
Small changes
38c4535
Merge branch 'main' into api_thermal_heuristic
Juliette-Gerbaux a8271fb
Move files
Juliette-Gerbaux 2015411
Prepare test_one_cluster
Juliette-Gerbaux 81fb135
Update tests
Juliette-Gerbaux e50a82f
Update test with bc
Juliette-Gerbaux 05e3791
Update test with different scenarios and xpress settings
Juliette-Gerbaux 2622caa
Remove test with different scenarios and xpress settings
Juliette-Gerbaux cb853e4
Remove day ahead test
Juliette-Gerbaux 85bf988
Implement fast heuristic as an algorithm
Juliette-Gerbaux 46b3805
Implement accurate heuristic
Juliette-Gerbaux 54b9fed
integer-strategy in system and heuristic in optim-config
Juliette-Gerbaux 11652f3
Implement interger-strategy in variables building
Juliette-Gerbaux 19a0128
heuristic id in parsing
Juliette-Gerbaux 7eb031c
Add heuristic validation and update optim-config documentation
Juliette-Gerbaux f81b7a9
Workflow with 2 iterations and thermal heuristic
Juliette-Gerbaux bd43257
Remove obsolete code
Juliette-Gerbaux ff9533d
Fix ci
Juliette-Gerbaux db5ef38
Test with ramp
Juliette-Gerbaux 1811dff
Validate heuristic input/output time-dependence at optim-config parsing
Juliette-Gerbaux e2f88ec
Validate optim-config automatically in SimulationSession
Juliette-Gerbaux 15456c0
Merge branch 'main' into api_thermal_heuristic
Juliette-Gerbaux decc740
Fix ci
Juliette-Gerbaux 3320444
Refactor e2e tests
Juliette-Gerbaux d45ce1a
Formatting
tbittar bcecb33
Refactoring
tbittar b96b782
Fix solution retrieval, window size in fast heuristic bugs
tbittar f0ac336
Review comments
Juliette-Gerbaux 310f1a3
non_prop_cost in tests
Juliette-Gerbaux fb21ca4
Remove tests of heuristic behaviour
Juliette-Gerbaux f159263
New mixed strategies test
Juliette-Gerbaux 9d0ab1d
Enforce heuristic-id consistency with integer-strategy
Juliette-Gerbaux f85f8cc
Guard bound mutation on merged relaxed/exact variables
Juliette-Gerbaux 8155f8e
Document integer-strategy and thermal heuristics
Juliette-Gerbaux 194932e
Merge branch 'main' into api_thermal_heuristic
Juliette-Gerbaux faab029
Update changelog
Juliette-Gerbaux b4d2f3f
Add lower_bound()/upper_bound() expression operators
Juliette-Gerbaux 4a484e8
Merge branch 'main' into feat/lb_ub_operator
Juliette-Gerbaux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
That's a bit a detail, but do you think the lower/upper bounds always have the same indexing structure as their related variable? I would say that this is not necessarily the case (ex: variable time-dep but bounds time-indep).
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.
I agree, and more precisely, I think a lower/upper bound should always be "less granularly" indexed than the variable (the remark is valid for both time and scenario). Ie. the var can depend on time/scenario but not the bound. The reverse should not be possible (at least you think about a use case where we need that ?)
And if you agree on that, no checks are currently made within GemsPy, which may lead to some failures, see #267
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.
Then here, I think we should enrich the IdexingStructureProvider to also bear information about variable bounds indexing (clean way)
Otherwise simply using the variable indexing should be fine at the cost of possibly having some expressions with a constant timeseries (should work but not optimal)
Uh oh!
There was an error while loading. Please reload this page.
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.
I thought it was better to have the same indexing structure as the variable: since the heuristic can change the value of the bound and make it time-dependent, it seemed more intuitive for the heuristic to change only the value and not the indexing structure — but I'm open to changing that. The issue #267 would still be valid.