Initializing help system before first use

XPRSaddmipsol

Purpose
Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.
Topic area
Synopsis
int XPRS_CC XPRSaddmipsol(XPRSprob prob, int length, const double solval[], const int colind[], const char* name);
Arguments
prob 
The current problem.
length 
Number of columns for which a value is provided.
solval 
Double array of length length containing solution values.
colind 
Optional integer array of length length containing the column indices for the solution values provided in solval. Should be NULL when length is equal to COLS, in which case it is assumed that solval provides a complete solution vector.
name 
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.

Example
See also examples addmipsol.c, tsp.c.
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, integer 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 name 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

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.