XPRSaddmipsol
XPRSaddmipsol |
Purpose
Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.
Synopsis
int XPRS_CC XPRSaddmipsol(XPRSprob prob, int ilength, const double mipsolval[], const int mipsolcol[], const char* solname);
Arguments
prob
|
The current problem.
|
ilength
|
Number of columns for which a value is provided.
|
mipsolval
|
Double array of length
ilength containing solution values.
|
mipsolcol
|
Optional integer array of length
ilength containing the column indices for the solution values provided in
mipsolval. Should be
NULL when
ilength is equal to
COLS, in which case it is assumed that
mipsolval provides a complete solution vector.
|
solname
|
An optional name to associate with the solution. Can be NULL.
|
Related controls
Integer
Counts the number of times the
XPRSaddcboptnode callback has been called, in particular after rerunning due to XPRSaddmipsol.
|
|
Controls the local search heuristic for an infeasible or partial solution.
|
Further information
1. The function returns immediately after passing the solution to the Optimizer. The solution is placed in a pool until the Optimizer is able to analyze the solution during a MIP solve.
2. If the provided solution is found to be infeasible, a limited local search heuristic will be run in an attempt to find a close feasible integer solution.
3. If a partial solution is provided, global columns will be fixed to any provided values and a limited local search will be run in an attempt to find integer feasible values for the remaining unspecified columns. Values provided for continuous column in partial solutions are currently ignored.
4. The
XPRSaddcbusersolnotify callback function can be used to discover the outcome of a loaded solution. The optional name provided as
solname will be returned in the callback function.
5. If one or more solutions are loaded during the
XPRSaddcboptnode callback, the Optimizer will process all loaded solutions and fire the callback again. This will be repeated as long as new solutions are loaded during the callback. You can check the
CALLBACKCOUNT_OPTNODE attribute if you only want to run once.
Related topics