Returns the problem's objective.
Arguments
- x
A Problem object.
Details
Problem objects are immutable: the objective cannot be modified after
construction. To change the objective, create a new Problem().
Examples
x <- Variable(2)
prob <- Problem(Minimize(sum_entries(x)), list(x >= 1))
objective(prob)
#> minimize SumEntries(var79, NULL, FALSE)
