-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
WIP Add comments to solvers.jl #542
Conversation
m.colVal = colVal | ||
end | ||
end | ||
|
||
# The MathProgBase interface defines a conic problem to always be | ||
# a minimization problem, so we need to flip the objective before | ||
# reporting it to the user | ||
if traits.conic && m.objSense == :Max | ||
m.objVal *= -1 | ||
scale!(m.linconstrDuals, -1) |
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.
@mlubin this is a NOP right because we don't support duals for conic problems, right?
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.
Yep
sos::Bool | ||
conic::Bool | ||
int::Bool # has integer variables | ||
lin::Bool # has only linear constraints |
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.
and linear objective?
Perf changes for the
So pretty marginal, but something (maybe) |
I'll probably keep going with this, because its turning up some real stuff, but this PR was going to get a bit long (even with clean discrete commits) |
function verify_ownership(m::Model, vec::Vector{Variable}) | ||
n = length(vec) | ||
@inbounds for i in 1:n | ||
!isequal(vec[i].m, m) && return false |
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.
why !isequal
instead of !===
?
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.
Shrug, @joehuchette ? I just copied what was there
I hadn't looked at this stuff in a while, so while I review it I thought I'd add comments for the sake of future generations.