Initializing help system before first use

problem.loadlpsol

problem.loadlpsol


Purpose
Loads an LP solution for the problem into the Optimizer. The returned status is either 0 if the solution is loaded or 1 if the solution is not loaded because the problem is in presolved status.
Synopsis
status = problem.loadlpsol(x, slack, dual, dj)
Arguments
Optional: Array of length problem.attributes.cols (for the original problem and not the presolve problem) containing the values of the variables.
slack 
Optional: double array of length problem.attributes.rows containing the values of slack variables.
dual 
Optional: double array of length problem.attributes.rows containing the values of dual variables.
dj 
Optional: double array of length problem.attributes.cols containing the values of reduced costs.
Example
This example loads a problem and loads a solution for the problem.
p.read("problem", "")
status = p.loadlpsol(x, None, dual, None)
Further information
1. At least one of variables x and dual variables dual must be provided.
2. When variables x is None, the variables will be set to their bounds.
3. When slack variables slack is None, it will be computed from variables x. If slacks are provided, variables cannot be omitted.
4. When dual variables dual is None, both dual variables and reduced costs will be set to zero.
5. When reduced costs dj is None, it will be computed from dual variables dual. If reduced costs are provided, dual variables cannot be omitted.
Related topics