-
Notifications
You must be signed in to change notification settings - Fork 43
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
Better support of single variable constraints #590
Conversation
Codecov Report
@@ Coverage Diff @@
## master #590 +/- ##
==========================================
+ Coverage 86.64% 87.06% +0.41%
==========================================
Files 47 47
Lines 4792 4978 +186
==========================================
+ Hits 4152 4334 +182
- Misses 640 644 +4
Continue to review full report at Codecov.
|
I think it's time to merge this PR into master... I think the review will be a very hard job. This PR does not fix any issue but is a prerequisite for issues #583 #593 #436 #591 #531. Moreover, it turns out that Next tasks (I'll open a follow-up issue) :
|
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.
Yes, I think that it is not possible to really review this pull request. You may just explain us (at a high level) what did you do on our next meeting.
@@ -8,7 +8,7 @@ mutable struct Node | |||
depth::Int | |||
parent::Union{Nothing, Node} | |||
optstate::OptimizationState | |||
#branch::Union{Nothing, Branch} # branch::Id{Constraint} | |||
#branch::Union{Nothing, Branch} # branch::ConstrId |
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.
This can be deleted
@rrsadykov Yes it's planned ! I don't merge it right now because I think it's better to release a 0.3.10 before. More work for 0.4.0 than I initially thought. |
Introduce a new structure to store single variable constraints.
task for #583, #436.
A lot of work in this PR, because this change has an impact on almost everything in the
MathProg
modules.I did this PR because we were not supporting multiple single var constraints and the dual value associated with single var constraints was not in the Dual Solution.
Contributions were highly interdependent.
Contribution 1
Creation of a new data structure
SingleVarConstraint
to store the representation of a single var constraint :1*var <> rhs
This constraint is not stored in the coefficient matrix nor transmitted to the subsolver for the sake of performance.
If one creates such a constraint, changes its sense or its rhs, one must ensure that one calls
bounds_propagation!
before calling the subsolver.Contribution 2
bounds_propagation!
iterates over the single var constraints and updates the lower and upper bounds of the variables.These changes are propagated to the subsolver.
Contribution 3
New data structure for
PrimalSolution
andDualSolution
(first task of #593) because the DualSolution now stores the reduced cost and the active bound of each variable (if it has a non-zero reduced cost)