hi_model_set_sense: Set the sense of the optimization model

View source: R/model-api.R

hi_model_set_senseR Documentation

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)

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').

Value

NULL

Examples

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


highs documentation built on June 8, 2025, 10:36 a.m.