Injects a solution to be used as the potential new incumbent.
vars
. vals[j]
specifies the solution value for vars[j]
. The injected solution is specified by providing solution values for all variables. If a user heuristic is successful in finding a new candidate for an incumbent, it can be passed to Cplex
by the method setSolution
. Cplex
analyzes the solution and, if it is both feasible and better than the current incumbent, uses it as the new incumbent. A solution is specified using arrays vars
and vals
, where vals[i]
specifies the solution value for vars[i]
.
Do not call this method multiple times. Calling it again overwrites any previously specified solution.
Cplex.HeuristicCallback Class | ILOG.CPLEX Namespace | Cplex.HeuristicCallback.SetSolution Overload List