-
Notifications
You must be signed in to change notification settings - Fork 94
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
Steepest edge #1
Conversation
…tting and updating of gamma values
…leau; implemented initialization. TODO: tests, implement update
…mma updates to inf and nan for some
…be and checked that it corresponds)
… - well, matlab - computed values)
…tting and updating of gamma values
…leau; implemented initialization. TODO: tests, implement update
…mma updates to inf and nan for some
…be and checked that it corresponds)
… - well, matlab - computed values)
@@ -82,6 +82,8 @@ class ITableau | |||
virtual void computeMultipliers() = 0; | |||
virtual void computeReducedCost( unsigned nonBasic ) = 0; | |||
virtual const double *getCostFunction() const = 0; | |||
// TODO: not sure if i'm allowed to add to this virtual class? |
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 fine
* can update gamma more cheaply using a recurrence relation. See Goldfarb and Reid (1977), | ||
* Forrest and Goldfarb (1992). | ||
*/ | ||
return (c[j] * c[j]) / gamma[j]; |
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.
Are we sure gamma[j] isn't zero?
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.
It shouldn't be, because it's the weight of the vector p[j] (the direction the variable x moves in if you increment nonbasic variable Xj). We can add an ASSERT to be sure?
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.
Sure, let's add an assert
src/reluplex/Tableau.cpp
Outdated
_basisFactorization->forwardTransformation( ANColumnQ, invB_Aq ); | ||
|
||
// Compute alphas and nus | ||
double *alpha = new double[_n-_m]; |
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 memory needs to be deleted, I think.
If this is reallocated in every iteration, we can just allocate it once when the dimensions of the tableau are set, as "work memory". If we do that, we need to adjust their size when addRow() is invoked.
Please check if we need to update the gamma function in Tableau::performDegeneratePivot |
Merge Andrew's work
Changes towards satisfying the unit tests and runtime assertions
Implemented steepest edge pivot selection strategy (new selection rule in SteepestEdge.h; also modified Tableau to update data relevant to steepest edge before pivot operation)