hi_solver_set_objective {highs}R 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)


[Package highs version 1.10.0-3 Index]