Initializing help system before first use

# maximize, minimize

Purpose
Maximize/minimize the current problem.
Synopsis
`procedure maximize(alg: integer, obj: linctr)`
`procedure maximize(obj: linctr)`
`procedure maximize(alg: integer, qobj: qexp)`
`procedure maximize(qobj: qexp)`
`procedure maximize(alg: integer, nlobj: nlctr)`
`procedure maximize(nlobj: nlctr)`
`procedure maximize(alg: integer, rbobj: robustctr)`
`procedure maximize(rbobj: robustctr)`
`procedure maximize(alg: integer, objs: list, objconfs: list of objconfig)`
`procedure maximize(objs: list, objconfs: list of objconfig)`
`procedure maximize(alg: integer, objs: array(range), objconfs: array(range) of objconfig)`
`procedure maximize(objs: array(range), objconfs: array(range) of objconfig)`
Arguments

alg | Algorithm choice:
XPRS_BAR | Newton-Barrier to solve LP
XPRS_DUAL | Dual simplex
XPRS_NET | Network solver
XPRS_LIN | Only solve LP ignoring all discrete entities
XPRS_PRI | Primal simplex
XPRS_ENUM | Start a search for the n-best MIP solutions
XPRS_LPSTOP | Stop the MIP solution process after solving the first LP
XPRS_CONT | Continue a previously interrupted solution process
XPRS_LOCAL | Solve the linearization of the problem ( mmxnlp only)
XPRS_COREPB | Solve the linear part of the problem ( mmxnlp only)
XPRS_TUNE | Enable the tuner
obj | Objective function constraint
qobj | Quadratic objective function (with module mmquad)
nlobj | Non linear objective function (with module mmnl)
rbobj | Robust objective function (with module mmrobust)
objs | Objective functions of type linctr, nlctr or mpvar (multi-objective)
objconfs | Objective configurations (multi-objective)

Example
The following maximizes Profit using the dual simplex algorithm and stops before the branch-and-bound search:

    declarations
     Profit:linctr
    end-declarations

    maximize(XPRS_DUAL+XPRS_LPSTOP, Profit)

The following minimizes MinCost using the Newton-Barrier algorithm and ignoring all discrete entities

    declarations
     MinCost:linctr
    end-declarations

    minimize(XPRS_BAR+XPRS_LIN, MinCost)

The following solves three objectives using a lexicographic multi-objective solve, where the first two objectives are minimized and the last is maximized:

    declarations
     Obj1, Obj2, Obj3:linctr
    end-declarations

    minimize([Obj1, Obj2, Obj3], [objconfig(3, 1), objconfig(2, 1), objconfig(1, -1)])

The following solves a weighted combination of a linear and a nonlinear objective, where the first objective is maximized and the second is minimized:

    declarations
     Profit:linctr
     Deviation:nlctr
    end-declarations

    minimize([Profit, Deviation], [objconfig("weight", 2), objconfig("weight", -1)])

Further information
1. This procedure calls the Optimizer to maximize/minimize the current problem (excluding all hidden constraints) using the given constraint(s) as objective function(s). Optionally, the algorithm to be used can be defined. By default, the branch-and-bound search is executed automatically if the problem contains any discrete entities. Where appropriate, several algorithm choice parameters may be combined (using plus signs).
2. If XPRS_LIN is specified, then the discreteness of all discrete entities is ignored, even during the presolve procedure.
3. If XPRS_LPSTOP is specified, then just the LP at the top node is solved and no Branch-and-Bound search is initiated. But the discreteness of the discrete entities is taken into account in presolving the LP at the top node. Note also that getprobstat still returns information related to the MIP problem when this option is used although only an LP solve has been executed and the solution information returned by getsol corresponds to the current LP solution. However, if the the MIP is solved to optimality during this call, the MIP optimal solution will be returned by getsol.
4. If XPRS_CONT is used after a solve has completed, the routine returns immediately without altering the current problem status.
5. If XPRS_ENUM is specified, the optimiser starts a search for the n-best MIP solutions. The maximum number of solutions to store may be specified using the XPRS_enummaxsol (default: 10). After the execution of the enumeration, the number of solutions found during the search is returned by the control parameter XPRS_enumsols. The procedure selectsol can then be used to select one of these solutions.
6. If XNLP_LOCAL is specified for a non-linear problem having been loaded using mmxnlp and which have been solved using XSLP, then the current linearization will be reoptimized.
7. If XPRS_TUNE is specified the problem will be tuned and then solved with the best control settings identified by the tuner. For a user guide about the tuner, please refer to the documentation of the Xpress Optimizer.
8. If XNLP_COREPB is specified for a non-linear problem having been loaded using mmxnlp, then only the linear part of the problem will be loaded and optimized. This is usefull for checking if the linear part of the problem is well posed.
9. Support for quadratic programming requires the module mmnl.
10. Support for general nonlinear programming requires the module mmxnlp.
11. Support for robust programming requires the module mmrobust.
12. The objs parameter must be a list or array containing objects of type linctr, nlctr or mpvar or a union of these types. See the Xpress Optimizer Reference Manual for more information about multi-objective optimization.
Related topics
postsolve, loadprob, selectsol, XPRS_maxupdc, XPRS_usechecktime.
Module
mmxprs
Parent Topic Procedures and functions

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