Initializing help system before first use

mmxnlp

Topics covered in this chapter:

The mmxnlp module provides access to nonlinear solvers, extending the capabilities provided by the mmxprs and mmnl modules. In particular, this module allows existing linear or mixed integer (MIP) models to be upgraded to include nonlinearities, without requiring unnecessary changes to the formulation. To use this module, the following line must be included in the header of the Mosel model file:

 uses 'mmxnlp'
Problem type and module hierarchy

Module mmxprs provides

  • linear models and
  • mixed integer linear models.
Module mmnl adds support for
  • convex quadratic models,
  • convex quadratic mixed integer models,
  • convex, quadratically constrained models, and
  • convex, quadratically constrained mixed integer models.
Module mmxnlp adds support for
  • general nonlinear problems and
  • general nonlinear mixed integer problems.

If the mmxnlp module is used for a model which does not require a general nonlinear solver, this should be equivalent to using the appropriate mmxprs or mmnl module directly.

New functionality for the Mosel language

The userfunc type

A nonlinear model may employ one or more black box evaluation functions, which can be used to provide function evaluations to the solver. These are represented in mmxnlp by the new userfunc type. The implementation of each userfunc must be described by calling one of:

  • userfuncMosel: to declare that a user function is implemented as a Mosel function
Note that user functions returning multiple arguments are support by the mmxnlp module. The F construction allows a userfunc to be included in any nonlinear (nlctr) expression, and groups each occurrence of the userfunc with its parameters . During the solve, the parameters (which are of type nlctr themselves) will be evaluated at the current solution, and the real-valued results passed to the userfunc implementation. The function userfuncinfo can be used to find out which parameters the system has deduced it needs to pass to a particular userfunc.

The tolset type

The module provides a large number of configurable tolerances for users of the Xpress NonLinear SLP solver. A tolset describes a convergence tolerance set, which can be used for those nonlinear solvers supporting variable-specific convergence tolerances. The elements of a tolerance set are defined by using settol, and assigned to a variable or list of variables using settolset. For more details on tolerance sets, please refer to the Xpress NonLinear Reference Manual.

  • XNLP_TOL_TC: The absolute closure tolerance
  • XNLP_TOL_TA: The absolute delta tolerance
  • XNLP_TOL_RA: The relative delta tolerance
  • XNLP_TOL_TM: The absolute matrix tolerance
  • XNLP_TOL_RM: The relative matrix tolerance
  • XNLP_TOL_TI: The absolute impact tolerance
  • XNLP_TOL_RI: The relative impact tolerance
  • XNLP_TOL_TS: The relative slack impact tolerance
  • XNLP_TOL_RS: The absolute slack impact tolerance

The mpproblem.xprs.xnlp problem type

When using the mmxnlp module, the type of the active Mosel problem is changed from mpproblem.xprs to the extended type mpproblem.xprs.xnlp. This means that all of the routines presented in this section operate in the context of the current Mosel problem.

mmxnlp and the other Mosel modules

mmxnlp is designed to provide seamless integration with other Mosel functionalities. However, the fundamentally different nature of nonlinear problems makes some compromises necessary; these are listed in this section.

Overloaded functions

The following functionality is modified or extended by the mmxnlp module:

  • Retrieval of solution values with getsol, both for variables and nonlinear constraints. A detailed description of the behaviour of this function can be found in the documentation for the mmxprs and mmnl modules.
  • Functions implemented in the mmnl module are extended for nonlinear solvers:
  • Functions implemented in the mmxprs module are extended for nonlinear solvers:

Module compatibility

The mmquad module is incompatible with the mmxnlp module, and should not be used together with it.

The mmxprs and mmnl modules are automatically loaded when using the mmxnlp module.

The mmnl module defines several discontinuous functions for use with decision variables (mpvar), which are not supported by the mmxnlp module. These constructions should instead be modelled with integer constraints. The functions are: round, ceil, floor, idiv and mod.

The following standard functionalities are not available for nonlinear problems:

Control parameters

When using mmxnlp, getparam and setparam are extended to additionally provide access to all the control and problem parameters of the Xpress NonLinear SLP solver. The module also provides the following controls of its own:

When set to true, Mosel uses the model's semantics to break down nonlinear formulas and feed the information to the solver for nonlinear eliminations and to detect network structures in the model.
When set to true, quadratic expressions will be treated as being of general nonlinear type. If they are known to be non-convex, the overhead of attempting to treat the expression as convex initially is avoided.
When set to true, names from the Mosel file will be passed to the underlying solver to improve the readability of messages it generates. This is an alias for XPRS_LOADNAMES.
The solution status of the problem. For a detailed description of this value, please see the documentation for the XSLP_NLPSTATUS attribute in the Xpress NonLinear Reference Manual.
Solver selection when available.
When set to true, informative messages from any underlying nonlinear solver will be displayed. This is an alias for XPRS_VERBOSE.

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