hi_solver_set_objective: Set the objective coefficient for a set of variables.

View source: R/solver-api.R

hi_solver_set_objectiveR Documentation

Set the objective coefficient for a set of variables.

Description

This function assigns a coefficient to a variable in the objective function.

Usage

hi_solver_set_objective(solver, index, coeff)

Arguments

solver

An object of class "highs_solver".

index

The variable index.

coeff

A numeric value representing the objective coefficient.

Value

The solver instance with the updated objective.

Examples

solver <- example_solver()
hi_solver_set_objective(solver, 2, 3.5)


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