Closed
Description
Documentation is not completely correct in the section about modifying an objective here. The first listed example produces the model below
julia> model = Model();
julia> @variable(model, x);
julia> @objective(model, Min, 2x)
2 x
julia> @objective(model, Max, -2x)
-2 x
julia> print(model)
Max -2 x
Subject to
The second listed example produces
julia> model = Model();
julia> @variable(model, x);
julia> @objective(model, Min, 2x)
2 x
julia> new_objective = @expression(model, -2 * x)
-2 x
julia> set_objective_function(model, new_objective)
julia> print(model)
Min -2 x
Subject to
Both are stated to be equivalent, but clearly they aren't.
Metadata
Metadata
Assignees
Labels
No labels