Learn R Programming

highs (version 1.10.0-1)

hi_model_set_sense: Set the sense of the optimization model

Description

This function sets the sense of the optimization model to either maximization or minimization.

Usage

hi_model_set_sense(model, maximum)

Value

NULL

Arguments

model

an object of class "highs_model".

maximum

a boolean value indicating whether the model should be set to maximization (`TRUE`) or minimization (`FALSE`).

Examples

Run this code
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