-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implementation of smoothing stabilization #348
Conversation
Codecov Report
@@ Coverage Diff @@
## master #348 +/- ##
==========================================
- Coverage 76.03% 73.79% -2.24%
==========================================
Files 51 52 +1
Lines 3764 3931 +167
==========================================
+ Hits 2862 2901 +39
- Misses 902 1030 +128
Continue to review full report at Codecov.
|
@guimarqu What is the best way to do a linear combination of two |
If the coefficient depends on the duty, it’s better to use a loop. |
If the coefficient is independent, is it possible to perform the linear combination in O(n)? |
Loop is O(n), lookup is O(log n). constrids = [constrid for (constrid, _) in getconstr(form)] # sorted ? If not, we should consider keeping the constraint dict sorted
constrvals = zeros(Float64, length(constrids)
pos = 1
for (constrid, constrval) in dualsolution # sorted and O(n)
while constrids[pos] < constrid
pos += 1
end
if ! (constrids[pos] > constrid)
constrvals[pos] += coefficient * constrval
end
end |
It's not a good idea to keep the constraints dict sorted. If we assume that no constraints are added during column generation, we can sort the constrids once at the beginning of colgen. |
Ok, I will first do a simple version in O(n\log n). We will see latter if we need to improve that |
…ation # Conflicts: # src/Algorithm/colgen.jl
@guimarqu In |
Yes, they are. |
…ation # Conflicts: # src/Algorithm/Algorithm.jl
# Conflicts: # src/Algorithm/colgen.jl
…ation # Conflicts: # src/Algorithm/colgen.jl
@guimarqu Guillaume, can you review and merge? All tests without stabilization work. For the moment, stabilization is not quite ready yet, but the column generation algorithm is fully prepared for it. I think I need a couple days more to finish the implementation and add tests. Can you leave the branch after merge so I can continue |
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.
- colgen code looks much better thanks to
SubprobInfo
EmptyStorage
becomesFormulationStorage
( Names for Data/Storage/StorageState #330 )- new algorithm for stabilisation.
Only style issues :
- there is a lot of comments to delete
return
is mandatory at the end of a method (style guide https://github.com/invenia/BlueStyle)
On github, 1 branch = 1 PR, you can create a new branch from this one or after the merge of this one into master.
Do you want to finish stabilization before release of 0.3 (we can wait until mid-June max) ? |
I think I can finish this week |
No description provided.