Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion python/cuopt/cuopt/linear_programming/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,16 @@ def updateObjective(self, coeffs=[], constant=None, sense=None):

def getIncumbentValues(self, solution, vars):
"""
Extract incumbent values of the vars from a problem solution.
This is a utility function that can be used for extracting incumbent values
of the given variables during a Solve using the incumbent callback.
Please check docs for more details and examples of incumbent callbacks.

Parameters
----------
solution : List[float]
Array-like structure containing incumbent values.
vars : List[:py:class:`Variable`]
List of variables to extract corresponding incumbent values.
"""
values = []
for var in vars:
Expand Down