Skip to content
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

Fix bug in relax_integrality #2666

Merged
merged 2 commits into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1244,10 +1244,15 @@ function _info_from_variable(v::VariableRef)
ub = has_ub ? upper_bound(v) : Inf
has_fix = is_fixed(v)
fixed_value = has_fix ? fix_value(v) : NaN
start_or_nothing = start_value(v)
has_start = !(start_or_nothing isa Nothing)
start = has_start ? start_or_nothing : NaN
has_start = start !== Nothing
has_start, start = false, NaN
if MOI.supports(
backend(owner_model(v)),
MOI.VariablePrimalStart(),
MOI.VariableIndex,
)
start = start_value(v)
has_start = start !== nothing
end
binary = is_binary(v)
integer = is_integer(v)
return VariableInfo(
Expand Down