powered by
This function sets the sense of the optimization model to either maximization or minimization.
hi_model_set_sense(model, maximum)
NULL
an object of class "highs_model".
"highs_model"
a boolean value indicating whether the model should be set to maximization (`TRUE`) or minimization (`FALSE`).
model <- hi_new_model() hi_model_set_sense(model, TRUE) # Set the model to maximization hi_model_set_sense(model, FALSE) # Set the model to minimization
Run the code above in your browser using DataLab