Posts a (heuristic) solution to CPLEX.

Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0

Syntax

C#
public abstract void PostHeuristicSolution(
	INumVar[] vars,
	double[] vals,
	int start,
	int length,
	double obj,
	Cplex..::..Callback..::..Context..::..SolutionStrategy strategy
)
Visual Basic
Public MustOverride Sub PostHeuristicSolution ( _
	vars As INumVar(), _
	vals As Double(), _
	start As Integer, _
	length As Integer, _
	obj As Double, _
	strategy As Cplex..::..Callback..::..Context..::..SolutionStrategy _
)

Parameters

vars
Type: array<ILOG.Concert..::..INumVar>[]()[][]
Variables that constitute the solution to be posted.
vals
Type: array<System..::..Double>[]()[][]
Values for variables in vars.
start
Type: System..::..Int32
Index of first variable in vars and vals that constitutes the solution.
length
Type: System..::..Int32
Number of variables in vars and vals that constitute the solution.
obj
Type: System..::..Double
(Estimated) objective value for the new solution.
strategy
Type: ILOG.CPLEX..::..Cplex..::..Callback..::..Context..::..SolutionStrategy
Strategy for completing partial solutions.

Remarks

This method posts a solution vector to CPLEX. The vector is queued internally. The next time CPLEX plans to invoke a heuristic, CPLEX looks at the queue and attempts to create feasible solution from each vector. This procedure can result in new incumbent solutions.

Throws ILOG.Concert.Exception if an error occurs.

See Also