Skip to content

Commit

Permalink
[docs] call optimize! in solve_and_print_solution (#3899)
Browse files Browse the repository at this point in the history
  • Loading branch information
lamont-granquist authored Dec 4, 2024
1 parent 7bf6e26 commit f155771
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/manual/solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ For code like libraries that should be more robust to the range of possible
termination and result statuses, do some variation of the following:
```jldoctest solutions
julia> function solve_and_print_solution(model)
optimize!(model)
status = termination_status(model)
if status in (OPTIMAL, LOCALLY_SOLVED)
println("Solution is optimal")
Expand Down

0 comments on commit f155771

Please sign in to comment.