I'm trying to understand the api and I found the following issue
The Problem class exposes the method getIncumbentSolution
|
def getIncumbentValues(self, solution, vars): |
which takes a solution and the variables as an input, you can get the variables from the method
but there is no way to get a solution without using
|
def Solve(data_model, solver_settings=None): |
directly which I think defeats the purpose of using the
Problem class
A possible fix would be for Problem.solve()
|
def solve(self, settings=solver_settings.SolverSettings()): |
to return the solution after
populate_solution or save it in a member variable like
self.solution
I'm trying to understand the api and I found the following issue
The
Problemclass exposes the methodgetIncumbentSolutioncuopt/python/cuopt/cuopt/linear_programming/problem.py
Line 1694 in 0aa1b31
which takes a solution and the variables as an input, you can get the variables from the method
cuopt/python/cuopt/cuopt/linear_programming/problem.py
Line 389 in 0aa1b31
cuopt/python/cuopt/cuopt/linear_programming/solver/solver.py
Line 13 in 0aa1b31
ProblemclassA possible fix would be for
Problem.solve()cuopt/python/cuopt/cuopt/linear_programming/problem.py
Line 1931 in 0aa1b31
populate_solutionor save it in a member variable likeself.solution