powered by
This function assigns a coefficient to a variable in the objective function.
hi_solver_set_objective(solver, index, obj)
The solver instance with the updated objective.
An object of class "highs_solver".
The variable index.
A numeric value representing the objective coefficient.
solver <- example_solver() hi_solver_set_objective(solver, 2, 3.5)
Run the code above in your browser using DataLab