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.
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
See also examples goalprog.c, Polygon_initialvalue.c, Polygon_textformula.c, Polygon_tokens.c, Polygon_userfunc.c, Polygon_userfunc_map.c, Polygon_userfunc_mapdelta.c, Polygon_userfunc_multimap.c, Polygon_userfunc_multimapdelta.c, Polygon_userfunc_vecmap.c, Polygon_userfunc_vecmapdelta.c.
Further information
1. XPRSoptimize automatically selects the solver algorithm based on the problem type. If the problem contains nonlinear formulas, it is equivalent to calling XPRSnlpoptimize, except that the g flag will be applied by default. For problems containing MIP entities, including general constraints and piecewise linear functions, it is equivalent to calling XPRSmipoptimize. Otherwise, it is equivalent to calling XPRSlpoptimize. To determine which algorithm 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.
2. 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.
3. 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.
4. 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).
5. The algorithm used to solve the problem is stored in the OPTIMIZETYPEUSED attribute.
6. Regarding the l flag, a branch and bound search is required when the problem contains MIP entities, or when the problem is reformulated as a MIP (for example, if the problem contains piecewise linear functions or min/max constraints), or when the global solver is selected. In these cases, passing the l flag will cause the Optimizer to stop after solving the root node.
Related topics
XPRSlpoptimize ( LPOPTIMIZE), XPRSmipoptimize ( MIPOPTIMIZE), XPRSnlpoptimize ( NLPOPTIMIZE), Solution Methods.

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