Initializing help system before first use

XPRSoptimize (OPTIMIZE)

Purpose
This function begins a search for the optimal solution of the problem. The direction of optimization is given by OBJSENSE.
Topic area
Synopsis
int XPRS_CC XPRSoptimize(XPRSprob prob, const char *flags, int *solvestatus, int *solstatus);
OPTIMIZE [-flags]
Arguments
prob 
The current problem.
flags 
Flags to pass to XPRSoptimize ( OPTIMIZE). The default is "" or NULL. If the argument includes:
solve the problem to local optimality;
solve the problem to global optimality;
if a branch and bound search is necessary to solve the problem, stop after solving the root node.
solvestatus 
The solve status after termination. Takes the same values as SOLVESTATUS
solstatus 
The solution status after termination. Takes the same values as SOLSTATUS
Example
Further information
1. A problem is identified as a MIP if it contains any of the following: MIP entities, piecewise linear constraints or general constraints, or any of the callbacks set by XPRSaddcboptnode, XPRSaddcbpreintsol or XPRSaddcbchgbranchobject.
2. XPRSoptimize automatically selects the optimization method based on the problem type. If the problem contains nonlinear formulas or a non-convex quadratic constraint or objective function, it is equivalent to calling XPRSnlpoptimize, except that the g flag will be applied by default. Otherwise, for a problem identified as a MIP, it is equivalent to calling XPRSmipoptimize and for all other problems it is equivalent to calling XPRSlpoptimize. To determine which method was selected check the OPTIMIZETYPEUSED attribute. If the value is XPRS_OPTIMIZETYPE_LOCAL, then you can check the LOCALSOLVERSELECTED attribute to determine which local solver was selected.
3. Passing the s flag is equivalent to setting the NLPSOLVER control to XSLP_NLPSOLVER_LOCAL. Passing the x flag is equivalent to setting the NLPSOLVER control to XSLP_NLPSOLVER_GLOBAL. If neither flag is passed, and if the NLPSOLVER control is XSLP_NLPSOLVER_AUTOMATIC, then this decision will be made based on problem attributes, including convexity and the presence of user functions, and which features are authorized by the license file.
4. Any additional flags not listed above will be treated in the same way as for XPRSlpoptimize, XPRSmipoptimize and XPRSnlpoptimize, depending on the type of optimization performed. The DEFAULTALG control will also behave in the same way as for these functions.
5. If there is a solve in progress, XPRSoptimize will always try to continue that solve (similar to XPRSmipoptimize but unlike XPRSnlpoptimize, which would only do so if the -c flag was given).
6. The method used to solve the problem is stored in the OPTIMIZETYPEUSED attribute.
7. Regarding the l flag, a branch and bound search is required when a problem is identified as a MIP, or when the global solver is selected. This includes a problem with non-linear formulas that can be reformulated as a MIP (for example, if the formulas contain only piecewise linear functions, min/max functions or convex quadratic constraints). In these cases, passing the l flag will cause the Optimizer to stop after solving the initial LP relaxation.
Related topics
XPRSlpoptimize ( LPOPTIMIZE), XPRSmipoptimize ( MIPOPTIMIZE), XPRSnlpoptimize ( NLPOPTIMIZE), Solution Methods.

© 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.