Skip to content
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
7 changes: 7 additions & 0 deletions src/algorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ function get_outgoing_state(node::Node)
outgoing_value = current_bound
end
end
# Round integers to their exact value: this idea was suggested by
# @akulbansal5. It has all of the usual issues associated with
# feasibility tolerances (the rounded state + controls may not be
# feasible), but it seems pretty reasonable for the forward pass.
if JuMP.is_integer(state.out) || JuMP.is_binary(state.out)
outgoing_value = Float64(round(Int, outgoing_value))
end
values[name] = outgoing_value
end
return values
Expand Down
Loading