The objective is the single number that the service makes as small
(minimize()) or as large (maximize()) as possible. Calling either
function again replaces the objective. An expression with several elements
has to be combined into one first, for example with sum(). A model
without an objective asks for any solution that meets the constraints.
Arguments
- m
A
model().- e
The expression to minimize or maximize.
Details
In a model with random variables, the objective has to be one number, not
one per scenario: summarize it first, for example with expectation()
(the stochastic help page lists all the summaries).